isaacscript-common 30.9.0 → 30.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.rollup.d.ts +114 -83
  2. package/dist/isaacscript-common.lua +163 -98
  3. package/dist/src/arrays/cachedEnumValues.d.ts +2 -2
  4. package/dist/src/arrays/cachedEnumValues.d.ts.map +1 -1
  5. package/dist/src/arrays/cachedEnumValues.lua +3 -3
  6. package/dist/src/classes/ModUpgraded.d.ts +2 -2
  7. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  8. package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts +2 -2
  9. package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts.map +1 -1
  10. package/dist/src/classes/callbacks/PostPlayerChangeStat.lua +2 -2
  11. package/dist/src/classes/features/other/EdenStartingStats.d.ts +30 -0
  12. package/dist/src/classes/features/other/EdenStartingStats.d.ts.map +1 -0
  13. package/dist/src/classes/features/other/EdenStartingStats.lua +54 -0
  14. package/dist/src/enums/ISCFeature.d.ts +29 -28
  15. package/dist/src/enums/ISCFeature.d.ts.map +1 -1
  16. package/dist/src/enums/ISCFeature.lua +30 -28
  17. package/dist/src/enums/{StatType.d.ts → PlayerStat.d.ts} +2 -2
  18. package/dist/src/enums/PlayerStat.d.ts.map +1 -0
  19. package/dist/src/enums/PlayerStat.lua +30 -0
  20. package/dist/src/features.d.ts +31 -28
  21. package/dist/src/features.d.ts.map +1 -1
  22. package/dist/src/features.lua +3 -0
  23. package/dist/src/functions/playerStats.d.ts +5 -3
  24. package/dist/src/functions/playerStats.d.ts.map +1 -1
  25. package/dist/src/functions/playerStats.lua +23 -18
  26. package/dist/src/index.d.ts +2 -2
  27. package/dist/src/index.d.ts.map +1 -1
  28. package/dist/src/index.lua +6 -6
  29. package/dist/src/interfaces/PlayerStats.d.ts +22 -0
  30. package/dist/src/interfaces/PlayerStats.d.ts.map +1 -0
  31. package/dist/src/interfaces/PlayerStats.lua +4 -0
  32. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +3 -3
  33. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  34. package/dist/src/shouldFire.d.ts +2 -2
  35. package/dist/src/shouldFire.d.ts.map +1 -1
  36. package/package.json +2 -2
  37. package/src/arrays/cachedEnumValues.ts +3 -2
  38. package/src/classes/ModUpgraded.ts +8 -4
  39. package/src/classes/callbacks/PostPlayerChangeStat.ts +4 -4
  40. package/src/classes/features/other/EdenStartingStats.ts +87 -0
  41. package/src/enums/ISCFeature.ts +1 -0
  42. package/src/enums/{StatType.ts → PlayerStat.ts} +1 -1
  43. package/src/features.ts +3 -0
  44. package/src/functions/playerStats.ts +25 -21
  45. package/src/index.ts +2 -2
  46. package/src/interfaces/PlayerStats.ts +22 -0
  47. package/src/interfaces/private/AddCallbackParametersCustom.ts +6 -6
  48. package/src/shouldFire.ts +2 -2
  49. package/dist/src/enums/StatType.d.ts.map +0 -1
  50. package/dist/src/enums/StatType.lua +0 -30
  51. package/dist/src/interfaces/StatTypeType.d.ts +0 -22
  52. package/dist/src/interfaces/StatTypeType.d.ts.map +0 -1
  53. package/dist/src/interfaces/StatTypeType.lua +0 -4
  54. package/src/interfaces/StatTypeType.ts +0 -22
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.9.0
3
+ isaacscript-common 30.10.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -2845,6 +2845,37 @@ ____exports.HealthType.BROKEN = 7
2845
2845
  ____exports.HealthType[____exports.HealthType.BROKEN] = "BROKEN"
2846
2846
  ____exports.HealthType.MAX_HEARTS = 8
2847
2847
  ____exports.HealthType[____exports.HealthType.MAX_HEARTS] = "MAX_HEARTS"
2848
+ return ____exports
2849
+ end,
2850
+ ["src.enums.PlayerStat"] = function(...)
2851
+ local ____exports = {}
2852
+ ____exports.PlayerStat = {}
2853
+ ____exports.PlayerStat.DAMAGE = 0
2854
+ ____exports.PlayerStat[____exports.PlayerStat.DAMAGE] = "DAMAGE"
2855
+ ____exports.PlayerStat.FIRE_DELAY = 1
2856
+ ____exports.PlayerStat[____exports.PlayerStat.FIRE_DELAY] = "FIRE_DELAY"
2857
+ ____exports.PlayerStat.SHOT_SPEED = 2
2858
+ ____exports.PlayerStat[____exports.PlayerStat.SHOT_SPEED] = "SHOT_SPEED"
2859
+ ____exports.PlayerStat.TEAR_HEIGHT = 3
2860
+ ____exports.PlayerStat[____exports.PlayerStat.TEAR_HEIGHT] = "TEAR_HEIGHT"
2861
+ ____exports.PlayerStat.TEAR_RANGE = 4
2862
+ ____exports.PlayerStat[____exports.PlayerStat.TEAR_RANGE] = "TEAR_RANGE"
2863
+ ____exports.PlayerStat.TEAR_FALLING_ACCELERATION = 5
2864
+ ____exports.PlayerStat[____exports.PlayerStat.TEAR_FALLING_ACCELERATION] = "TEAR_FALLING_ACCELERATION"
2865
+ ____exports.PlayerStat.TEAR_FALLING_SPEED = 6
2866
+ ____exports.PlayerStat[____exports.PlayerStat.TEAR_FALLING_SPEED] = "TEAR_FALLING_SPEED"
2867
+ ____exports.PlayerStat.MOVE_SPEED = 7
2868
+ ____exports.PlayerStat[____exports.PlayerStat.MOVE_SPEED] = "MOVE_SPEED"
2869
+ ____exports.PlayerStat.TEAR_FLAG = 8
2870
+ ____exports.PlayerStat[____exports.PlayerStat.TEAR_FLAG] = "TEAR_FLAG"
2871
+ ____exports.PlayerStat.TEAR_COLOR = 9
2872
+ ____exports.PlayerStat[____exports.PlayerStat.TEAR_COLOR] = "TEAR_COLOR"
2873
+ ____exports.PlayerStat.FLYING = 10
2874
+ ____exports.PlayerStat[____exports.PlayerStat.FLYING] = "FLYING"
2875
+ ____exports.PlayerStat.LUCK = 11
2876
+ ____exports.PlayerStat[____exports.PlayerStat.LUCK] = "LUCK"
2877
+ ____exports.PlayerStat.SIZE = 12
2878
+ ____exports.PlayerStat[____exports.PlayerStat.SIZE] = "SIZE"
2848
2879
  return ____exports
2849
2880
  end,
2850
2881
  ["src.enums.SlotDestructionType"] = function(...)
@@ -2854,37 +2885,6 @@ ____exports.SlotDestructionType.NORMAL = 0
2854
2885
  ____exports.SlotDestructionType[____exports.SlotDestructionType.NORMAL] = "NORMAL"
2855
2886
  ____exports.SlotDestructionType.COLLECTIBLE_PAYOUT = 1
2856
2887
  ____exports.SlotDestructionType[____exports.SlotDestructionType.COLLECTIBLE_PAYOUT] = "COLLECTIBLE_PAYOUT"
2857
- return ____exports
2858
- end,
2859
- ["src.enums.StatType"] = function(...)
2860
- local ____exports = {}
2861
- ____exports.StatType = {}
2862
- ____exports.StatType.DAMAGE = 0
2863
- ____exports.StatType[____exports.StatType.DAMAGE] = "DAMAGE"
2864
- ____exports.StatType.FIRE_DELAY = 1
2865
- ____exports.StatType[____exports.StatType.FIRE_DELAY] = "FIRE_DELAY"
2866
- ____exports.StatType.SHOT_SPEED = 2
2867
- ____exports.StatType[____exports.StatType.SHOT_SPEED] = "SHOT_SPEED"
2868
- ____exports.StatType.TEAR_HEIGHT = 3
2869
- ____exports.StatType[____exports.StatType.TEAR_HEIGHT] = "TEAR_HEIGHT"
2870
- ____exports.StatType.TEAR_RANGE = 4
2871
- ____exports.StatType[____exports.StatType.TEAR_RANGE] = "TEAR_RANGE"
2872
- ____exports.StatType.TEAR_FALLING_ACCELERATION = 5
2873
- ____exports.StatType[____exports.StatType.TEAR_FALLING_ACCELERATION] = "TEAR_FALLING_ACCELERATION"
2874
- ____exports.StatType.TEAR_FALLING_SPEED = 6
2875
- ____exports.StatType[____exports.StatType.TEAR_FALLING_SPEED] = "TEAR_FALLING_SPEED"
2876
- ____exports.StatType.MOVE_SPEED = 7
2877
- ____exports.StatType[____exports.StatType.MOVE_SPEED] = "MOVE_SPEED"
2878
- ____exports.StatType.TEAR_FLAG = 8
2879
- ____exports.StatType[____exports.StatType.TEAR_FLAG] = "TEAR_FLAG"
2880
- ____exports.StatType.TEAR_COLOR = 9
2881
- ____exports.StatType[____exports.StatType.TEAR_COLOR] = "TEAR_COLOR"
2882
- ____exports.StatType.FLYING = 10
2883
- ____exports.StatType[____exports.StatType.FLYING] = "FLYING"
2884
- ____exports.StatType.LUCK = 11
2885
- ____exports.StatType[____exports.StatType.LUCK] = "LUCK"
2886
- ____exports.StatType.SIZE = 12
2887
- ____exports.StatType[____exports.StatType.SIZE] = "SIZE"
2888
2888
  return ____exports
2889
2889
  end,
2890
2890
  ["src.types.ReadonlySet"] = function(...)
@@ -17064,10 +17064,10 @@ function ____exports.validateInterfaceMatchesEnum(self)
17064
17064
  end
17065
17065
  return ____exports
17066
17066
  end,
17067
- ["src.interfaces.StatTypeType"] = function(...)
17067
+ ["src.interfaces.PlayerStats"] = function(...)
17068
17068
  local ____exports = {}
17069
- local ____StatType = require("src.enums.StatType")
17070
- local StatType = ____StatType.StatType
17069
+ local ____PlayerStat = require("src.enums.PlayerStat")
17070
+ local PlayerStat = ____PlayerStat.PlayerStat
17071
17071
  return ____exports
17072
17072
  end,
17073
17073
  ["src.interfaces.private.AddCallbackParametersCustom"] = function(...)
@@ -17144,61 +17144,63 @@ ____exports.ISCFeature.DISABLE_ALL_SOUND = 25
17144
17144
  ____exports.ISCFeature[____exports.ISCFeature.DISABLE_ALL_SOUND] = "DISABLE_ALL_SOUND"
17145
17145
  ____exports.ISCFeature.DISABLE_INPUTS = 26
17146
17146
  ____exports.ISCFeature[____exports.ISCFeature.DISABLE_INPUTS] = "DISABLE_INPUTS"
17147
- ____exports.ISCFeature.FADE_IN_REMOVER = 27
17147
+ ____exports.ISCFeature.EDEN_STARTING_STATS = 27
17148
+ ____exports.ISCFeature[____exports.ISCFeature.EDEN_STARTING_STATS] = "EDEN_STARTING_STATS"
17149
+ ____exports.ISCFeature.FADE_IN_REMOVER = 28
17148
17150
  ____exports.ISCFeature[____exports.ISCFeature.FADE_IN_REMOVER] = "FADE_IN_REMOVER"
17149
- ____exports.ISCFeature.FAST_RESET = 28
17151
+ ____exports.ISCFeature.FAST_RESET = 29
17150
17152
  ____exports.ISCFeature[____exports.ISCFeature.FAST_RESET] = "FAST_RESET"
17151
- ____exports.ISCFeature.FLYING_DETECTION = 29
17153
+ ____exports.ISCFeature.FLYING_DETECTION = 30
17152
17154
  ____exports.ISCFeature[____exports.ISCFeature.FLYING_DETECTION] = "FLYING_DETECTION"
17153
- ____exports.ISCFeature.FORGOTTEN_SWITCH = 30
17155
+ ____exports.ISCFeature.FORGOTTEN_SWITCH = 31
17154
17156
  ____exports.ISCFeature[____exports.ISCFeature.FORGOTTEN_SWITCH] = "FORGOTTEN_SWITCH"
17155
- ____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS = 31
17157
+ ____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS = 32
17156
17158
  ____exports.ISCFeature[____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS] = "EXTRA_CONSOLE_COMMANDS"
17157
- ____exports.ISCFeature.ITEM_POOL_DETECTION = 32
17159
+ ____exports.ISCFeature.ITEM_POOL_DETECTION = 33
17158
17160
  ____exports.ISCFeature[____exports.ISCFeature.ITEM_POOL_DETECTION] = "ITEM_POOL_DETECTION"
17159
- ____exports.ISCFeature.MODDED_ELEMENT_DETECTION = 33
17161
+ ____exports.ISCFeature.MODDED_ELEMENT_DETECTION = 34
17160
17162
  ____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_DETECTION] = "MODDED_ELEMENT_DETECTION"
17161
- ____exports.ISCFeature.MODDED_ELEMENT_SETS = 34
17163
+ ____exports.ISCFeature.MODDED_ELEMENT_SETS = 35
17162
17164
  ____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_SETS] = "MODDED_ELEMENT_SETS"
17163
- ____exports.ISCFeature.NO_SIREN_STEAL = 35
17165
+ ____exports.ISCFeature.NO_SIREN_STEAL = 36
17164
17166
  ____exports.ISCFeature[____exports.ISCFeature.NO_SIREN_STEAL] = "NO_SIREN_STEAL"
17165
- ____exports.ISCFeature.PAUSE = 36
17167
+ ____exports.ISCFeature.PAUSE = 37
17166
17168
  ____exports.ISCFeature[____exports.ISCFeature.PAUSE] = "PAUSE"
17167
- ____exports.ISCFeature.PERSISTENT_ENTITIES = 37
17169
+ ____exports.ISCFeature.PERSISTENT_ENTITIES = 38
17168
17170
  ____exports.ISCFeature[____exports.ISCFeature.PERSISTENT_ENTITIES] = "PERSISTENT_ENTITIES"
17169
- ____exports.ISCFeature.PICKUP_INDEX_CREATION = 38
17171
+ ____exports.ISCFeature.PICKUP_INDEX_CREATION = 39
17170
17172
  ____exports.ISCFeature[____exports.ISCFeature.PICKUP_INDEX_CREATION] = "PICKUP_INDEX_CREATION"
17171
- ____exports.ISCFeature.PLAYER_INVENTORY = 39
17173
+ ____exports.ISCFeature.PLAYER_INVENTORY = 40
17172
17174
  ____exports.ISCFeature[____exports.ISCFeature.PLAYER_INVENTORY] = "PLAYER_INVENTORY"
17173
- ____exports.ISCFeature.PONY_DETECTION = 40
17175
+ ____exports.ISCFeature.PONY_DETECTION = 41
17174
17176
  ____exports.ISCFeature[____exports.ISCFeature.PONY_DETECTION] = "PONY_DETECTION"
17175
- ____exports.ISCFeature.PRESS_INPUT = 41
17177
+ ____exports.ISCFeature.PRESS_INPUT = 42
17176
17178
  ____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
17177
- ____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 42
17179
+ ____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 43
17178
17180
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
17179
- ____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 43
17181
+ ____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 44
17180
17182
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
17181
- ____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 44
17183
+ ____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 45
17182
17184
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
17183
- ____exports.ISCFeature.ROOM_CLEAR_FRAME = 45
17185
+ ____exports.ISCFeature.ROOM_CLEAR_FRAME = 46
17184
17186
  ____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
17185
- ____exports.ISCFeature.ROOM_HISTORY = 46
17187
+ ____exports.ISCFeature.ROOM_HISTORY = 47
17186
17188
  ____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
17187
- ____exports.ISCFeature.RUN_IN_N_FRAMES = 47
17189
+ ____exports.ISCFeature.RUN_IN_N_FRAMES = 48
17188
17190
  ____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
17189
- ____exports.ISCFeature.RUN_NEXT_ROOM = 48
17191
+ ____exports.ISCFeature.RUN_NEXT_ROOM = 49
17190
17192
  ____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
17191
- ____exports.ISCFeature.SAVE_DATA_MANAGER = 49
17193
+ ____exports.ISCFeature.SAVE_DATA_MANAGER = 50
17192
17194
  ____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
17193
- ____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 50
17195
+ ____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 51
17194
17196
  ____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
17195
- ____exports.ISCFeature.SPAWN_COLLECTIBLE = 51
17197
+ ____exports.ISCFeature.SPAWN_COLLECTIBLE = 52
17196
17198
  ____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
17197
- ____exports.ISCFeature.STAGE_HISTORY = 52
17199
+ ____exports.ISCFeature.STAGE_HISTORY = 53
17198
17200
  ____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
17199
- ____exports.ISCFeature.START_AMBUSH = 53
17201
+ ____exports.ISCFeature.START_AMBUSH = 54
17200
17202
  ____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
17201
- ____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 54
17203
+ ____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 55
17202
17204
  ____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
17203
17205
  return ____exports
17204
17206
  end,
@@ -18692,8 +18694,8 @@ local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
18692
18694
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
18693
18695
  local ____HealthType = require("src.enums.HealthType")
18694
18696
  local HealthType = ____HealthType.HealthType
18695
- local ____StatType = require("src.enums.StatType")
18696
- local StatType = ____StatType.StatType
18697
+ local ____PlayerStat = require("src.enums.PlayerStat")
18698
+ local PlayerStat = ____PlayerStat.PlayerStat
18697
18699
  local ____SerializationBrand = require("src.enums.private.SerializationBrand")
18698
18700
  local SerializationBrand = ____SerializationBrand.SerializationBrand
18699
18701
  local ____enums = require("src.functions.enums")
@@ -18716,7 +18718,7 @@ ____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
18716
18718
  ____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
18717
18719
  ____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
18718
18720
  ____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
18719
- ____exports.STAT_TYPE_VALUES = getEnumValues(nil, StatType)
18721
+ ____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
18720
18722
  ____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
18721
18723
  return ____exports
18722
18724
  end,
@@ -30595,24 +30597,28 @@ return ____exports
30595
30597
  end,
30596
30598
  ["src.functions.playerStats"] = function(...)
30597
30599
  local ____exports = {}
30598
- local ____StatType = require("src.enums.StatType")
30599
- local StatType = ____StatType.StatType
30600
- function ____exports.getPlayerStat(self, player, statType)
30601
- return ({
30602
- [StatType.DAMAGE] = player.Damage,
30603
- [StatType.FIRE_DELAY] = player.MaxFireDelay,
30604
- [StatType.SHOT_SPEED] = player.ShotSpeed,
30605
- [StatType.TEAR_HEIGHT] = player.TearHeight,
30606
- [StatType.TEAR_RANGE] = player.TearRange,
30607
- [StatType.TEAR_FALLING_ACCELERATION] = player.TearFallingAcceleration,
30608
- [StatType.TEAR_FALLING_SPEED] = player.TearFallingSpeed,
30609
- [StatType.MOVE_SPEED] = player.MoveSpeed,
30610
- [StatType.TEAR_FLAG] = player.TearFlags,
30611
- [StatType.TEAR_COLOR] = player.TearColor,
30612
- [StatType.FLYING] = player.CanFly,
30613
- [StatType.LUCK] = player.Luck,
30614
- [StatType.SIZE] = player.SpriteScale
30615
- })[statType]
30600
+ local ____PlayerStat = require("src.enums.PlayerStat")
30601
+ local PlayerStat = ____PlayerStat.PlayerStat
30602
+ function ____exports.getPlayerStats(self, player)
30603
+ return {
30604
+ [PlayerStat.DAMAGE] = player.Damage,
30605
+ [PlayerStat.FIRE_DELAY] = player.MaxFireDelay,
30606
+ [PlayerStat.SHOT_SPEED] = player.ShotSpeed,
30607
+ [PlayerStat.TEAR_HEIGHT] = player.TearHeight,
30608
+ [PlayerStat.TEAR_RANGE] = player.TearRange,
30609
+ [PlayerStat.TEAR_FALLING_ACCELERATION] = player.TearFallingAcceleration,
30610
+ [PlayerStat.TEAR_FALLING_SPEED] = player.TearFallingSpeed,
30611
+ [PlayerStat.MOVE_SPEED] = player.MoveSpeed,
30612
+ [PlayerStat.TEAR_FLAG] = player.TearFlags,
30613
+ [PlayerStat.TEAR_COLOR] = player.TearColor,
30614
+ [PlayerStat.FLYING] = player.CanFly,
30615
+ [PlayerStat.LUCK] = player.Luck,
30616
+ [PlayerStat.SIZE] = player.SpriteScale
30617
+ }
30618
+ end
30619
+ function ____exports.getPlayerStat(self, player, playerStat)
30620
+ local playerStats = ____exports.getPlayerStats(nil, player)
30621
+ return playerStats[playerStat]
30616
30622
  end
30617
30623
  return ____exports
30618
30624
  end,
@@ -30625,7 +30631,7 @@ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
30625
30631
  local ____exports = {}
30626
30632
  local statEquals
30627
30633
  local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
30628
- local STAT_TYPE_VALUES = ____cachedEnumValues.STAT_TYPE_VALUES
30634
+ local PLAYER_STAT_VALUES = ____cachedEnumValues.PLAYER_STAT_VALUES
30629
30635
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
30630
30636
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
30631
30637
  local ____bitSet128 = require("src.functions.bitSet128")
@@ -30687,7 +30693,7 @@ function PostPlayerChangeStat.prototype.____constructor(self)
30687
30693
  self.postPEffectReordered = function(____, player)
30688
30694
  local playerIndex = getPlayerIndex(nil, player, true)
30689
30695
  local playerStatMap = v.run.playersStatMap:getAndSetDefault(playerIndex)
30690
- for ____, statType in ipairs(STAT_TYPE_VALUES) do
30696
+ for ____, statType in ipairs(PLAYER_STAT_VALUES) do
30691
30697
  do
30692
30698
  local storedStatValue = playerStatMap:get(statType)
30693
30699
  local currentStatValue = getPlayerStat(nil, player, statType)
@@ -46913,6 +46919,62 @@ function DeployJSONRoom.prototype.deployJSONRoom(self, jsonRoom, seedOrRNG, verb
46913
46919
  self.preventGridEntityRespawn:preventGridEntityRespawn()
46914
46920
  end
46915
46921
  __TS__Decorate({Exported}, DeployJSONRoom.prototype, "deployJSONRoom", true)
46922
+ return ____exports
46923
+ end,
46924
+ ["src.classes.features.other.EdenStartingStats"] = function(...)
46925
+ local ____lualib = require("lualib_bundle")
46926
+ local Map = ____lualib.Map
46927
+ local __TS__New = ____lualib.__TS__New
46928
+ local __TS__Class = ____lualib.__TS__Class
46929
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
46930
+ local __TS__Decorate = ____lualib.__TS__Decorate
46931
+ local ____exports = {}
46932
+ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
46933
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
46934
+ local ____decorators = require("src.decorators")
46935
+ local Exported = ____decorators.Exported
46936
+ local ____playerDataStructures = require("src.functions.playerDataStructures")
46937
+ local mapGetPlayer = ____playerDataStructures.mapGetPlayer
46938
+ local mapSetPlayer = ____playerDataStructures.mapSetPlayer
46939
+ local ____playerStats = require("src.functions.playerStats")
46940
+ local getPlayerStats = ____playerStats.getPlayerStats
46941
+ local ____players = require("src.functions.players")
46942
+ local isEden = ____players.isEden
46943
+ local ____Feature = require("src.classes.private.Feature")
46944
+ local Feature = ____Feature.Feature
46945
+ local v = {run = {edenPlayerStats = __TS__New(Map)}}
46946
+ ____exports.EdenStartingStats = __TS__Class()
46947
+ local EdenStartingStats = ____exports.EdenStartingStats
46948
+ EdenStartingStats.name = "EdenStartingStats"
46949
+ __TS__ClassExtends(EdenStartingStats, Feature)
46950
+ function EdenStartingStats.prototype.____constructor(self)
46951
+ Feature.prototype.____constructor(self)
46952
+ self.v = v
46953
+ self.postPlayerInit = function(____, player)
46954
+ if not isEden(nil, player) then
46955
+ return
46956
+ end
46957
+ local existingStatMap = mapGetPlayer(nil, v.run.edenPlayerStats, player)
46958
+ if existingStatMap ~= nil then
46959
+ return
46960
+ end
46961
+ local playerStats = getPlayerStats(nil, player)
46962
+ mapSetPlayer(nil, v.run.edenPlayerStats, player, playerStats)
46963
+ end
46964
+ self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, self.postPlayerInit}}
46965
+ end
46966
+ function EdenStartingStats.prototype.getEdenStartingStat(self, player, playerStat)
46967
+ local playerStats = mapGetPlayer(nil, v.run.edenPlayerStats, player)
46968
+ if playerStats == nil then
46969
+ return nil
46970
+ end
46971
+ return playerStats[playerStat]
46972
+ end
46973
+ function EdenStartingStats.prototype.getEdenStartingStats(self, player)
46974
+ return mapGetPlayer(nil, v.run.edenPlayerStats, player)
46975
+ end
46976
+ __TS__Decorate({Exported}, EdenStartingStats.prototype, "getEdenStartingStat", true)
46977
+ __TS__Decorate({Exported}, EdenStartingStats.prototype, "getEdenStartingStats", true)
46916
46978
  return ____exports
46917
46979
  end,
46918
46980
  ["src.functions.deepCopyTests"] = function(...)
@@ -51756,6 +51818,8 @@ local ____DisableAllSound = require("src.classes.features.other.DisableAllSound"
51756
51818
  local DisableAllSound = ____DisableAllSound.DisableAllSound
51757
51819
  local ____DisableInputs = require("src.classes.features.other.DisableInputs")
51758
51820
  local DisableInputs = ____DisableInputs.DisableInputs
51821
+ local ____EdenStartingStats = require("src.classes.features.other.EdenStartingStats")
51822
+ local EdenStartingStats = ____EdenStartingStats.EdenStartingStats
51759
51823
  local ____ExtraConsoleCommands = require("src.classes.features.other.ExtraConsoleCommands")
51760
51824
  local ExtraConsoleCommands = ____ExtraConsoleCommands.ExtraConsoleCommands
51761
51825
  local ____FadeInRemover = require("src.classes.features.other.FadeInRemover")
@@ -51911,6 +51975,7 @@ function ____exports.getFeatures(self, mod, callbacks)
51911
51975
  [ISCFeature.DEPLOY_JSON_ROOM] = __TS__New(DeployJSONRoom, preventGridEntityRespawn, spawnCollectible),
51912
51976
  [ISCFeature.DISABLE_ALL_SOUND] = disableAllSound,
51913
51977
  [ISCFeature.DISABLE_INPUTS] = disableInputs,
51978
+ [ISCFeature.EDEN_STARTING_STATS] = __TS__New(EdenStartingStats),
51914
51979
  [ISCFeature.FADE_IN_REMOVER] = __TS__New(FadeInRemover),
51915
51980
  [ISCFeature.FAST_RESET] = __TS__New(FastReset),
51916
51981
  [ISCFeature.FLYING_DETECTION] = __TS__New(FlyingDetection, moddedElementSets),
@@ -53873,7 +53938,7 @@ do
53873
53938
  end
53874
53939
  end
53875
53940
  do
53876
- local ____export = require("src.enums.PocketItemType")
53941
+ local ____export = require("src.enums.PlayerStat")
53877
53942
  for ____exportKey, ____exportValue in pairs(____export) do
53878
53943
  if ____exportKey ~= "default" then
53879
53944
  ____exports[____exportKey] = ____exportValue
@@ -53881,7 +53946,7 @@ do
53881
53946
  end
53882
53947
  end
53883
53948
  do
53884
- local ____export = require("src.enums.RockAltType")
53949
+ local ____export = require("src.enums.PocketItemType")
53885
53950
  for ____exportKey, ____exportValue in pairs(____export) do
53886
53951
  if ____exportKey ~= "default" then
53887
53952
  ____exports[____exportKey] = ____exportValue
@@ -53889,7 +53954,7 @@ do
53889
53954
  end
53890
53955
  end
53891
53956
  do
53892
- local ____export = require("src.enums.SaveDataKey")
53957
+ local ____export = require("src.enums.RockAltType")
53893
53958
  for ____exportKey, ____exportValue in pairs(____export) do
53894
53959
  if ____exportKey ~= "default" then
53895
53960
  ____exports[____exportKey] = ____exportValue
@@ -53897,7 +53962,7 @@ do
53897
53962
  end
53898
53963
  end
53899
53964
  do
53900
- local ____export = require("src.enums.SerializationType")
53965
+ local ____export = require("src.enums.SaveDataKey")
53901
53966
  for ____exportKey, ____exportValue in pairs(____export) do
53902
53967
  if ____exportKey ~= "default" then
53903
53968
  ____exports[____exportKey] = ____exportValue
@@ -53905,7 +53970,7 @@ do
53905
53970
  end
53906
53971
  end
53907
53972
  do
53908
- local ____export = require("src.enums.SlotDestructionType")
53973
+ local ____export = require("src.enums.SerializationType")
53909
53974
  for ____exportKey, ____exportValue in pairs(____export) do
53910
53975
  if ____exportKey ~= "default" then
53911
53976
  ____exports[____exportKey] = ____exportValue
@@ -53913,7 +53978,7 @@ do
53913
53978
  end
53914
53979
  end
53915
53980
  do
53916
- local ____export = require("src.enums.StatType")
53981
+ local ____export = require("src.enums.SlotDestructionType")
53917
53982
  for ____exportKey, ____exportValue in pairs(____export) do
53918
53983
  if ____exportKey ~= "default" then
53919
53984
  ____exports[____exportKey] = ____exportValue
@@ -54981,7 +55046,7 @@ do
54981
55046
  end
54982
55047
  end
54983
55048
  do
54984
- local ____export = require("src.enums.PocketItemType")
55049
+ local ____export = require("src.enums.PlayerStat")
54985
55050
  for ____exportKey, ____exportValue in pairs(____export) do
54986
55051
  if ____exportKey ~= "default" then
54987
55052
  ____exports[____exportKey] = ____exportValue
@@ -54989,7 +55054,7 @@ do
54989
55054
  end
54990
55055
  end
54991
55056
  do
54992
- local ____export = require("src.enums.RockAltType")
55057
+ local ____export = require("src.enums.PocketItemType")
54993
55058
  for ____exportKey, ____exportValue in pairs(____export) do
54994
55059
  if ____exportKey ~= "default" then
54995
55060
  ____exports[____exportKey] = ____exportValue
@@ -54997,7 +55062,7 @@ do
54997
55062
  end
54998
55063
  end
54999
55064
  do
55000
- local ____export = require("src.enums.SaveDataKey")
55065
+ local ____export = require("src.enums.RockAltType")
55001
55066
  for ____exportKey, ____exportValue in pairs(____export) do
55002
55067
  if ____exportKey ~= "default" then
55003
55068
  ____exports[____exportKey] = ____exportValue
@@ -55005,7 +55070,7 @@ do
55005
55070
  end
55006
55071
  end
55007
55072
  do
55008
- local ____export = require("src.enums.SerializationType")
55073
+ local ____export = require("src.enums.SaveDataKey")
55009
55074
  for ____exportKey, ____exportValue in pairs(____export) do
55010
55075
  if ____exportKey ~= "default" then
55011
55076
  ____exports[____exportKey] = ____exportValue
@@ -55013,7 +55078,7 @@ do
55013
55078
  end
55014
55079
  end
55015
55080
  do
55016
- local ____export = require("src.enums.SlotDestructionType")
55081
+ local ____export = require("src.enums.SerializationType")
55017
55082
  for ____exportKey, ____exportValue in pairs(____export) do
55018
55083
  if ____exportKey ~= "default" then
55019
55084
  ____exports[____exportKey] = ____exportValue
@@ -55021,7 +55086,7 @@ do
55021
55086
  end
55022
55087
  end
55023
55088
  do
55024
- local ____export = require("src.enums.StatType")
55089
+ local ____export = require("src.enums.SlotDestructionType")
55025
55090
  for ____exportKey, ____exportValue in pairs(____export) do
55026
55091
  if ____exportKey ~= "default" then
55027
55092
  ____exports[____exportKey] = ____exportValue
@@ -1,6 +1,6 @@
1
1
  import { ActiveSlot, CacheFlag, ControllerIndex, DoorSlot, DoorSlotFlag, GridEntityType, GridEntityXMLType, ItemConfigCardType, ItemConfigTag, ItemPoolType, Keyboard, PillColor, PlayerForm, PocketItemSlot, RoomShape, SoundEffect, TrinketSlot } from "isaac-typescript-definitions";
2
2
  import { HealthType } from "../enums/HealthType";
3
- import { StatType } from "../enums/StatType";
3
+ import { PlayerStat } from "../enums/PlayerStat";
4
4
  import { SerializationBrand } from "../enums/private/SerializationBrand";
5
5
  export declare const ACTIVE_SLOT_VALUES: readonly ActiveSlot[];
6
6
  export declare const CACHE_FLAG_VALUES: readonly CacheFlag[];
@@ -20,6 +20,6 @@ export declare const POCKET_ITEM_SLOT_VALUES: readonly PocketItemSlot[];
20
20
  export declare const ROOM_SHAPE_VALUES: readonly RoomShape[];
21
21
  export declare const SERIALIZATION_BRAND_VALUES: readonly SerializationBrand[];
22
22
  export declare const SOUND_EFFECT_VALUES: readonly SoundEffect[];
23
- export declare const STAT_TYPE_VALUES: readonly StatType[];
23
+ export declare const PLAYER_STAT_VALUES: readonly PlayerStat[];
24
24
  export declare const TRINKET_SLOT_VALUES: readonly TrinketSlot[];
25
25
  //# sourceMappingURL=cachedEnumValues.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cachedEnumValues.d.ts","sourceRoot":"","sources":["../../../src/arrays/cachedEnumValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,cAAc,EACd,SA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9B,eAAO,MAAM,eAAe,EAAE,SAAS,QAAQ,EAA4B,CAAC;AAE5E,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA6B,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAC9B,CAAC;AAEhC,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA6B,CAAC;AAEhF,eAAO,MAAM,0BAA0B,EAAE,SAAS,kBAAkB,EACjC,CAAC;AAEpC,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAC1B,CAAC;AAE7B,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAC1B,CAAC"}
@@ -19,8 +19,8 @@ local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
19
19
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
20
20
  local ____HealthType = require("src.enums.HealthType")
21
21
  local HealthType = ____HealthType.HealthType
22
- local ____StatType = require("src.enums.StatType")
23
- local StatType = ____StatType.StatType
22
+ local ____PlayerStat = require("src.enums.PlayerStat")
23
+ local PlayerStat = ____PlayerStat.PlayerStat
24
24
  local ____SerializationBrand = require("src.enums.private.SerializationBrand")
25
25
  local SerializationBrand = ____SerializationBrand.SerializationBrand
26
26
  local ____enums = require("src.functions.enums")
@@ -43,6 +43,6 @@ ____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
43
43
  ____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
44
44
  ____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
45
45
  ____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
46
- ____exports.STAT_TYPE_VALUES = getEnumValues(nil, StatType)
46
+ ____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
47
47
  ____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
48
48
  return ____exports
@@ -22,8 +22,8 @@ export declare class ModUpgraded implements Mod {
22
22
  private callbacks;
23
23
  private features;
24
24
  constructor(mod: Mod, debug: boolean, timeThreshold?: float);
25
- AddCallback<T extends ModCallback | string>(modCallback: T, ...args: T extends ModCallback ? AddCallbackParameters[T] : unknown[]): void;
26
- AddPriorityCallback<T extends ModCallback | string>(modCallback: T, priority: CallbackPriority | int, ...args: T extends ModCallback ? AddCallbackParameters[T] : unknown[]): void;
25
+ AddCallback<T extends keyof AddCallbackParameters | string>(modCallback: T, ...args: T extends keyof AddCallbackParameters ? AddCallbackParameters[T] : unknown[]): void;
26
+ AddPriorityCallback<T extends keyof AddCallbackParameters | string>(modCallback: T, priority: CallbackPriority | int, ...args: T extends keyof AddCallbackParameters ? AddCallbackParameters[T] : unknown[]): void;
27
27
  HasData(): boolean;
28
28
  LoadData(): string;
29
29
  RemoveCallback<T extends ModCallback>(modCallback: T, callback: AddCallbackParameters[T][0]): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgraded.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAIhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAQ/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAMhG;;;;;;;;;;GAUG;AACH,qBAAa,WAAY,YAAW,GAAG;IAK9B,IAAI,EAAE,MAAM,CAAC;IAMpB,4FAA4F;IAC5F,OAAO,CAAC,GAAG,CAAM;IAEjB,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAA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,CAAC,SAAS,MAAM,qBAAqB,GAC1C,qBAAqB,CAAC,CAAC,CAAC,GACxB,OAAO,EAAE,GACZ,IAAI;IAwDA,OAAO,IAAI,OAAO;IAIlB,QAAQ,IAAI,MAAM;IAIlB,cAAc,CAAC,CAAC,SAAS,WAAW,EACzC,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACpC,IAAI;IAIA,UAAU,IAAI,IAAI;IAIlB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQnC;;;;;;OAMG;IACI,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,EAClD,iBAAiB,EAAE,CAAC,EACpB,GAAG,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,IAAI;IAQP;;;;OAIG;IACI,yBAAyB,CAAC,CAAC,SAAS,iBAAiB,EAC1D,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,gBAAgB,GAAG,GAAG,EAChC,GAAG,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,IAAI;IAOP;;;;;;;;;OASG;IACI,oBAAoB,CAAC,CAAC,SAAS,iBAAiB,EACrD,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1C,IAAI;IAOP;;;OAGG;IACI,eAAe,IAAI,IAAI;IA0C9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAiEnB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAsDrB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CAM5B"}
@@ -1,5 +1,5 @@
1
1
  import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
2
- import { StatType } from "../../enums/StatType";
2
+ import { PlayerStat } from "../../enums/PlayerStat";
3
3
  import { shouldFirePlayer } from "../../shouldFire";
4
4
  import { PlayerIndex } from "../../types/PlayerIndex";
5
5
  import { PossibleStatType } from "../../types/PossibleStatType";
@@ -8,7 +8,7 @@ import { CustomCallback } from "../private/CustomCallback";
8
8
  export declare class PostPlayerChangeStat extends CustomCallback<ModCallbackCustom.POST_PLAYER_CHANGE_STAT> {
9
9
  v: {
10
10
  run: {
11
- playersStatMap: DefaultMap<PlayerIndex, Map<StatType, PossibleStatType>, []>;
11
+ playersStatMap: DefaultMap<PlayerIndex, Map<PlayerStat, PossibleStatType>, []>;
12
12
  };
13
13
  };
14
14
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"PostPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPlayerChangeStat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAOhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAW3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,uBAAuB,CAAC;IACjF,CAAC;;;;MAAK;;IAatB,UAAmB,UAAU,0BAAoB;IAGjD,OAAO,CAAC,oBAAoB,CA+B1B;CACH"}
1
+ {"version":3,"file":"PostPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPlayerChangeStat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAOpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAW3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,uBAAuB,CAAC;IACjF,CAAC;;;;MAAK;;IAatB,UAAmB,UAAU,0BAAoB;IAGjD,OAAO,CAAC,oBAAoB,CA+B1B;CACH"}
@@ -6,7 +6,7 @@ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
6
6
  local ____exports = {}
7
7
  local statEquals
8
8
  local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
9
- local STAT_TYPE_VALUES = ____cachedEnumValues.STAT_TYPE_VALUES
9
+ local PLAYER_STAT_VALUES = ____cachedEnumValues.PLAYER_STAT_VALUES
10
10
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
11
11
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
12
12
  local ____bitSet128 = require("src.functions.bitSet128")
@@ -68,7 +68,7 @@ function PostPlayerChangeStat.prototype.____constructor(self)
68
68
  self.postPEffectReordered = function(____, player)
69
69
  local playerIndex = getPlayerIndex(nil, player, true)
70
70
  local playerStatMap = v.run.playersStatMap:getAndSetDefault(playerIndex)
71
- for ____, statType in ipairs(STAT_TYPE_VALUES) do
71
+ for ____, statType in ipairs(PLAYER_STAT_VALUES) do
72
72
  do
73
73
  local storedStatValue = playerStatMap:get(statType)
74
74
  local currentStatValue = getPlayerStat(nil, player, statType)
@@ -0,0 +1,30 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { PlayerStat } from "../../../enums/PlayerStat";
3
+ import { PlayerStats } from "../../../interfaces/PlayerStats";
4
+ import { Feature } from "../../private/Feature";
5
+ export declare class EdenStartingStats extends Feature {
6
+ /**
7
+ * We must use the `POST_PLAYER_INIT` callback since the two random collectibles have not been
8
+ * granted yet.
9
+ */
10
+ private postPlayerInit;
11
+ /**
12
+ * Helper function to get the value of the randomized starting stat for Eden. (At the beginning of
13
+ * a run, Eden starts with randomized stats.)
14
+ *
15
+ * Returns undefined if passed a player that is not Eden.
16
+ *
17
+ * In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
18
+ */
19
+ getEdenStartingStat<T extends PlayerStat>(player: EntityPlayer, playerStat: T): PlayerStats[T] | undefined;
20
+ /**
21
+ * Helper function to get all of the stat values that Eden started with at the beginning of the
22
+ * run.
23
+ *
24
+ * Returns undefined if passed a player that is not Eden.
25
+ *
26
+ * In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
27
+ */
28
+ getEdenStartingStats(player: EntityPlayer): Readonly<PlayerStats> | undefined;
29
+ }
30
+ //# sourceMappingURL=EdenStartingStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EdenStartingStats.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/EdenStartingStats.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAOvD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,iBAAkB,SAAQ,OAAO;IAc5C;;;OAGG;IACH,OAAO,CAAC,cAAc,CAYpB;IAEF;;;;;;;OAOG;IAEI,mBAAmB,CAAC,CAAC,SAAS,UAAU,EAC7C,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,CAAC,GACZ,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS;IAS7B;;;;;;;OAOG;IAEI,oBAAoB,CACzB,MAAM,EAAE,YAAY,GACnB,QAAQ,CAAC,WAAW,CAAC,GAAG,SAAS;CAGrC"}