isaacscript-common 7.1.0 → 7.2.1

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 (255) hide show
  1. package/dist/callbacks/itemPickup.d.ts.map +1 -1
  2. package/dist/callbacks/itemPickup.lua +3 -1
  3. package/dist/callbacks/postCustomDoorEnter.d.ts.map +1 -1
  4. package/dist/callbacks/postCustomDoorEnter.lua +14 -11
  5. package/dist/callbacks/postDiceRoomActivated.d.ts.map +1 -1
  6. package/dist/callbacks/postDiceRoomActivated.lua +5 -4
  7. package/dist/callbacks/postItemDischarged.lua +2 -1
  8. package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
  9. package/dist/callbacks/postPlayerChangeStat.lua +44 -15
  10. package/dist/callbacks/postSlotDestroyed.lua +3 -3
  11. package/dist/classes/DefaultMap.d.ts +5 -5
  12. package/dist/classes/DefaultMap.d.ts.map +1 -1
  13. package/dist/core/constants.d.ts +2 -2
  14. package/dist/core/constants.d.ts.map +1 -1
  15. package/dist/core/constants.lua +3 -1
  16. package/dist/core/constantsFirstLast.d.ts +2 -0
  17. package/dist/core/constantsFirstLast.d.ts.map +1 -1
  18. package/dist/core/constantsFirstLast.lua +36 -9
  19. package/dist/enums/AmbushType.d.ts +1 -0
  20. package/dist/enums/AmbushType.d.ts.map +1 -1
  21. package/dist/enums/AmbushType.lua +1 -0
  22. package/dist/enums/CornerType.d.ts +1 -0
  23. package/dist/enums/CornerType.d.ts.map +1 -1
  24. package/dist/enums/CornerType.lua +1 -0
  25. package/dist/enums/PocketItemType.d.ts +1 -0
  26. package/dist/enums/PocketItemType.d.ts.map +1 -1
  27. package/dist/enums/PocketItemType.lua +1 -0
  28. package/dist/enums/RockAltType.d.ts +1 -0
  29. package/dist/enums/RockAltType.d.ts.map +1 -1
  30. package/dist/enums/RockAltType.lua +1 -0
  31. package/dist/enums/SaveDataKey.d.ts +11 -0
  32. package/dist/enums/SaveDataKey.d.ts.map +1 -0
  33. package/dist/enums/{private/SaveDataKey.lua → SaveDataKey.lua} +2 -0
  34. package/dist/enums/SerializationType.d.ts +1 -0
  35. package/dist/enums/SerializationType.d.ts.map +1 -1
  36. package/dist/enums/SerializationType.lua +1 -0
  37. package/dist/enums/SlotDestructionType.d.ts +1 -0
  38. package/dist/enums/SlotDestructionType.d.ts.map +1 -1
  39. package/dist/enums/SlotDestructionType.lua +1 -0
  40. package/dist/enums/StatType.d.ts +1 -3
  41. package/dist/enums/StatType.d.ts.map +1 -1
  42. package/dist/enums/StatType.lua +0 -2
  43. package/dist/enums/index.d.ts +1 -0
  44. package/dist/enums/index.d.ts.map +1 -1
  45. package/dist/enums/index.lua +8 -0
  46. package/dist/features/customGridEntity.d.ts.map +1 -1
  47. package/dist/features/customGridEntity.lua +3 -1
  48. package/dist/features/customStage/backdrop.d.ts +1 -1
  49. package/dist/features/customStage/backdrop.d.ts.map +1 -1
  50. package/dist/features/customStage/backdrop.lua +5 -3
  51. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  52. package/dist/features/customStage/customStageGridEntities.lua +3 -1
  53. package/dist/features/customStage/exports.d.ts.map +1 -1
  54. package/dist/features/customStage/exports.lua +3 -1
  55. package/dist/features/customStage/init.lua +2 -2
  56. package/dist/features/customStage/shadows.d.ts.map +1 -1
  57. package/dist/features/customStage/shadows.lua +2 -1
  58. package/dist/features/deployJSONRoom.lua +13 -10
  59. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  60. package/dist/features/extraConsoleCommands/listCommands.lua +8 -2
  61. package/dist/features/saveDataManager/exports.d.ts +2 -1
  62. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  63. package/dist/features/saveDataManager/main.d.ts +1 -1
  64. package/dist/features/saveDataManager/main.d.ts.map +1 -1
  65. package/dist/features/saveDataManager/main.lua +1 -1
  66. package/dist/functions/bitSet128.d.ts.map +1 -1
  67. package/dist/functions/bosses.d.ts.map +1 -1
  68. package/dist/functions/bosses.lua +3 -1
  69. package/dist/functions/cacheFlag.d.ts +23 -1
  70. package/dist/functions/cacheFlag.d.ts.map +1 -1
  71. package/dist/functions/cacheFlag.lua +78 -0
  72. package/dist/functions/collectibles.d.ts.map +1 -1
  73. package/dist/functions/deepCopy.lua +2 -1
  74. package/dist/functions/doors.d.ts.map +1 -1
  75. package/dist/functions/doors.lua +3 -1
  76. package/dist/functions/entities.lua +2 -1
  77. package/dist/functions/flying.lua +2 -2
  78. package/dist/functions/gridEntities.lua +2 -1
  79. package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -1
  80. package/dist/functions/gridEntitiesSpecific.lua +5 -3
  81. package/dist/functions/index.d.ts +0 -1
  82. package/dist/functions/index.d.ts.map +1 -1
  83. package/dist/functions/index.lua +0 -8
  84. package/dist/functions/input.d.ts +5 -2
  85. package/dist/functions/input.d.ts.map +1 -1
  86. package/dist/functions/input.lua +11 -3
  87. package/dist/functions/kColor.d.ts.map +1 -1
  88. package/dist/functions/levelGrid.d.ts.map +1 -1
  89. package/dist/functions/levelGrid.lua +3 -1
  90. package/dist/functions/nextStage.d.ts.map +1 -1
  91. package/dist/functions/nextStage.lua +7 -5
  92. package/dist/functions/npcs.d.ts.map +1 -1
  93. package/dist/functions/npcs.lua +4 -2
  94. package/dist/functions/pills.d.ts.map +1 -1
  95. package/dist/functions/pills.lua +9 -3
  96. package/dist/functions/playerIndex.d.ts.map +1 -1
  97. package/dist/functions/playerIndex.lua +2 -1
  98. package/dist/functions/playerStats.d.ts.map +1 -1
  99. package/dist/functions/playerStats.lua +1 -2
  100. package/dist/functions/players.d.ts +1 -1
  101. package/dist/functions/players.d.ts.map +1 -1
  102. package/dist/functions/players.lua +13 -15
  103. package/dist/functions/pocketItems.d.ts.map +1 -1
  104. package/dist/functions/pocketItems.lua +3 -1
  105. package/dist/functions/rng.d.ts.map +1 -1
  106. package/dist/functions/rng.lua +3 -0
  107. package/dist/functions/rockAlt.d.ts.map +1 -1
  108. package/dist/functions/rockAlt.lua +11 -20
  109. package/dist/functions/rooms.d.ts +4 -4
  110. package/dist/functions/rooms.d.ts.map +1 -1
  111. package/dist/functions/rooms.lua +18 -16
  112. package/dist/functions/spawnCollectible.d.ts.map +1 -1
  113. package/dist/functions/stage.d.ts.map +1 -1
  114. package/dist/functions/stage.lua +8 -2
  115. package/dist/functions/trinkets.d.ts.map +1 -1
  116. package/dist/functions/trinkets.lua +4 -2
  117. package/dist/functions/types.d.ts +64 -0
  118. package/dist/functions/types.d.ts.map +1 -1
  119. package/dist/functions/types.lua +63 -0
  120. package/dist/functions/vector.d.ts.map +1 -1
  121. package/dist/interfaces/ChargeBarSprites.d.ts +1 -1
  122. package/dist/interfaces/Corner.d.ts +5 -0
  123. package/dist/interfaces/Corner.d.ts.map +1 -1
  124. package/dist/interfaces/CustomStageLua.d.ts +57 -0
  125. package/dist/interfaces/CustomStageLua.d.ts.map +1 -1
  126. package/dist/interfaces/GridEntityCustomData.d.ts +6 -0
  127. package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
  128. package/dist/interfaces/JSONRoomsFile.d.ts +7 -3
  129. package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
  130. package/dist/interfaces/PlayerHealth.d.ts +1 -1
  131. package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
  132. package/dist/interfaces/PocketItemDescription.d.ts +1 -1
  133. package/dist/interfaces/PocketItemDescription.d.ts.map +1 -1
  134. package/dist/interfaces/RoomDescription.d.ts +1 -1
  135. package/dist/interfaces/RoomDescription.d.ts.map +1 -1
  136. package/dist/interfaces/StatTypeType.d.ts +4 -1
  137. package/dist/interfaces/StatTypeType.d.ts.map +1 -1
  138. package/dist/interfaces/TrinketSituation.d.ts +1 -1
  139. package/dist/interfaces/TrinketSituation.d.ts.map +1 -1
  140. package/dist/maps/keyboardToString.d.ts +4 -0
  141. package/dist/maps/keyboardToString.d.ts.map +1 -0
  142. package/dist/maps/keyboardToString.lua +73 -0
  143. package/dist/types/AnyEntity.d.ts +5 -0
  144. package/dist/types/AnyEntity.d.ts.map +1 -1
  145. package/dist/types/AnyGridEntity.d.ts +5 -0
  146. package/dist/types/AnyGridEntity.d.ts.map +1 -1
  147. package/dist/types/CollectibleIndex.d.ts +4 -3
  148. package/dist/types/CollectibleIndex.d.ts.map +1 -1
  149. package/dist/types/Immutable.d.ts +3 -1
  150. package/dist/types/Immutable.d.ts.map +1 -1
  151. package/dist/types/PickupIndex.d.ts +4 -2
  152. package/dist/types/PickupIndex.d.ts.map +1 -1
  153. package/dist/types/PlayerIndex.d.ts +3 -2
  154. package/dist/types/PlayerIndex.d.ts.map +1 -1
  155. package/dist/types/SerializedIsaacAPIClass.d.ts +6 -0
  156. package/dist/types/SerializedIsaacAPIClass.d.ts.map +1 -1
  157. package/dist/types/TSTLClass.d.ts +5 -0
  158. package/dist/types/TSTLClass.d.ts.map +1 -1
  159. package/dist/types/TrapdoorDestination.d.ts +3 -0
  160. package/dist/types/TrapdoorDestination.d.ts.map +1 -1
  161. package/package.json +2 -2
  162. package/src/callbacks/itemPickup.ts +5 -2
  163. package/src/callbacks/postCustomDoorEnter.ts +18 -11
  164. package/src/callbacks/postDiceRoomActivated.ts +7 -12
  165. package/src/callbacks/postItemDischarged.ts +3 -1
  166. package/src/callbacks/postPlayerChangeStat.ts +45 -3
  167. package/src/callbacks/postSlotDestroyed.ts +3 -2
  168. package/src/callbacks/reorderedCallbacks.ts +2 -2
  169. package/src/classes/DefaultMap.ts +8 -8
  170. package/src/core/constants.ts +3 -3
  171. package/src/core/constantsFirstLast.ts +29 -14
  172. package/src/enums/AmbushType.ts +1 -0
  173. package/src/enums/CornerType.ts +1 -0
  174. package/src/enums/PocketItemType.ts +1 -0
  175. package/src/enums/RockAltType.ts +1 -0
  176. package/src/enums/SaveDataKey.ts +10 -0
  177. package/src/enums/SerializationType.ts +1 -0
  178. package/src/enums/SlotDestructionType.ts +1 -0
  179. package/src/enums/StatType.ts +7 -7
  180. package/src/enums/index.ts +1 -0
  181. package/src/enums/indexTypeDoc.ts +1 -0
  182. package/src/features/customGridEntity.ts +2 -1
  183. package/src/features/customStage/backdrop.ts +5 -3
  184. package/src/features/customStage/customStageGridEntities.ts +2 -1
  185. package/src/features/customStage/exports.ts +5 -4
  186. package/src/features/customStage/init.ts +2 -2
  187. package/src/features/customStage/shadows.ts +2 -1
  188. package/src/features/deployJSONRoom.ts +14 -19
  189. package/src/features/extraConsoleCommands/listCommands.ts +3 -2
  190. package/src/features/fastReset.ts +1 -1
  191. package/src/features/indexTypeDoc.ts +2 -1
  192. package/src/features/saveDataManager/exports.ts +4 -4
  193. package/src/features/saveDataManager/main.ts +1 -1
  194. package/src/features/saveDataManager/save.ts +1 -1
  195. package/src/functions/bitSet128.ts +1 -5
  196. package/src/functions/bosses.ts +2 -1
  197. package/src/functions/cacheFlag.ts +90 -1
  198. package/src/functions/cards.ts +3 -3
  199. package/src/functions/collectibles.ts +2 -8
  200. package/src/functions/color.ts +1 -1
  201. package/src/functions/deepCopy.ts +2 -2
  202. package/src/functions/dimensions.ts +1 -1
  203. package/src/functions/doors.ts +2 -2
  204. package/src/functions/entities.ts +2 -2
  205. package/src/functions/flying.ts +1 -1
  206. package/src/functions/gridEntities.ts +2 -2
  207. package/src/functions/gridEntitiesSpecific.ts +4 -3
  208. package/src/functions/index.ts +0 -1
  209. package/src/functions/indexTypeDoc.ts +0 -1
  210. package/src/functions/input.ts +17 -4
  211. package/src/functions/jsonHelpers.ts +1 -1
  212. package/src/functions/kColor.ts +1 -5
  213. package/src/functions/levelGrid.ts +3 -2
  214. package/src/functions/nextStage.ts +6 -5
  215. package/src/functions/npcs.ts +3 -2
  216. package/src/functions/pills.ts +11 -9
  217. package/src/functions/playerIndex.ts +3 -1
  218. package/src/functions/playerStats.ts +0 -1
  219. package/src/functions/players.ts +5 -6
  220. package/src/functions/pocketItems.ts +4 -4
  221. package/src/functions/rng.ts +8 -5
  222. package/src/functions/rockAlt.ts +28 -13
  223. package/src/functions/rooms.ts +27 -26
  224. package/src/functions/spawnCollectible.ts +1 -2
  225. package/src/functions/stage.ts +3 -2
  226. package/src/functions/trinkets.ts +6 -5
  227. package/src/functions/types.ts +100 -0
  228. package/src/functions/vector.ts +1 -5
  229. package/src/interfaces/ChargeBarSprites.ts +1 -1
  230. package/src/interfaces/Corner.ts +5 -0
  231. package/src/interfaces/CustomStageLua.ts +66 -0
  232. package/src/interfaces/GridEntityCustomData.ts +6 -0
  233. package/src/interfaces/JSONRoomsFile.ts +7 -3
  234. package/src/interfaces/PlayerHealth.ts +1 -1
  235. package/src/interfaces/PocketItemDescription.ts +1 -1
  236. package/src/interfaces/RoomDescription.ts +1 -1
  237. package/src/interfaces/StatTypeType.ts +4 -1
  238. package/src/interfaces/TrinketSituation.ts +1 -1
  239. package/src/maps/keyboardToString.ts +77 -0
  240. package/src/types/AnyEntity.ts +5 -0
  241. package/src/types/AnyGridEntity.ts +5 -0
  242. package/src/types/CollectibleIndex.ts +4 -3
  243. package/src/types/Immutable.ts +3 -1
  244. package/src/types/PickupIndex.ts +4 -2
  245. package/src/types/PlayerIndex.ts +3 -2
  246. package/src/types/SerializedIsaacAPIClass.ts +6 -0
  247. package/src/types/TSTLClass.ts +5 -0
  248. package/src/types/TrapdoorDestination.ts +3 -0
  249. package/dist/enums/private/SaveDataKey.d.ts +0 -7
  250. package/dist/enums/private/SaveDataKey.d.ts.map +0 -1
  251. package/dist/functions/collectibleCacheFlag.d.ts +0 -24
  252. package/dist/functions/collectibleCacheFlag.d.ts.map +0 -1
  253. package/dist/functions/collectibleCacheFlag.lua +0 -80
  254. package/src/enums/private/SaveDataKey.ts +0 -6
  255. package/src/functions/collectibleCacheFlag.ts +0 -90
@@ -1 +1 @@
1
- {"version":3,"file":"itemPickup.d.ts","sourceRoot":"","sources":["../../src/callbacks/itemPickup.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA2BrD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO9D"}
1
+ {"version":3,"file":"itemPickup.d.ts","sourceRoot":"","sources":["../../src/callbacks/itemPickup.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA4BrD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO9D"}
@@ -12,6 +12,8 @@ local ____exports = require("features.saveDataManager.exports")
12
12
  local saveDataManager = ____exports.saveDataManager
13
13
  local ____playerDataStructures = require("functions.playerDataStructures")
14
14
  local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
15
+ local ____types = require("functions.types")
16
+ local asNumber = ____types.asNumber
15
17
  local ____PickingUpItem = require("types.PickingUpItem")
16
18
  local newPickingUpItem = ____PickingUpItem.newPickingUpItem
17
19
  local resetPickingUpItem = ____PickingUpItem.resetPickingUpItem
@@ -36,7 +38,7 @@ function postPEffectUpdateReordered(self, player)
36
38
  end
37
39
  end
38
40
  function queueEmpty(self, player, pickingUpItem)
39
- if pickingUpItem.itemType == ItemType.NULL or pickingUpItem.subType == 0 then
41
+ if pickingUpItem.itemType == ItemType.NULL or asNumber(nil, pickingUpItem.subType) == 0 then
40
42
  return
41
43
  end
42
44
  postItemPickupFire(nil, player, pickingUpItem)
@@ -1 +1 @@
1
- {"version":3,"file":"postCustomDoorEnter.d.ts","sourceRoot":"","sources":["../../src/callbacks/postCustomDoorEnter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAER,aAAa,EAId,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA6BrD,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAMD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,WAAW,EAChB,aAAa,EAAE,aAAa,GAC3B,IAAI,CAqBN;AAgHD,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,GACjB,YAAY,CAmDd"}
1
+ {"version":3,"file":"postCustomDoorEnter.d.ts","sourceRoot":"","sources":["../../src/callbacks/postCustomDoorEnter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAER,aAAa,EAId,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAkCrD,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAMD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,WAAW,EAChB,aAAa,EAAE,aAAa,GAC3B,IAAI,CAqBN;AAkHD,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,GACjB,YAAY,CAmDd"}
@@ -25,6 +25,8 @@ local getEffects = ____entitiesSpecific.getEffects
25
25
  local spawnEffect = ____entitiesSpecific.spawnEffect
26
26
  local ____players = require("functions.players")
27
27
  local getClosestPlayer = ____players.getClosestPlayer
28
+ local ____types = require("functions.types")
29
+ local asNumber = ____types.asNumber
28
30
  local ____postCustomDoorEnter = require("callbacks.subscriptions.postCustomDoorEnter")
29
31
  local postCustomDoorEnterFire = ____postCustomDoorEnter.postCustomDoorEnterFire
30
32
  local postCustomDoorEnterHasSubscriptions = ____postCustomDoorEnter.postCustomDoorEnterHasSubscriptions
@@ -32,32 +34,33 @@ function hasSubscriptions(self)
32
34
  return postCustomDoorEnterHasSubscriptions(nil)
33
35
  end
34
36
  function postEffectUpdaterCustomEntity(self, effect)
37
+ local customDoor = effect
35
38
  local ptrHash = GetPtrHash(effect)
36
39
  local doorData = v.room.customDoors:get(ptrHash)
37
40
  if doorData == nil then
38
41
  return
39
42
  end
40
- if doorData.state == effect.State then
43
+ if doorData.state == customDoor.State then
41
44
  return
42
45
  end
43
- doorData.state = effect.State
46
+ doorData.state = customDoor.State
44
47
  doorChangedState(nil, effect)
45
48
  end
46
- function doorChangedState(self, effect)
49
+ function doorChangedState(self, door)
47
50
  local room = game:GetRoom()
48
- local sprite = effect:GetSprite()
49
- local animation = getAnimationForCustomDoor(nil, effect)
51
+ local sprite = door:GetSprite()
52
+ local animation = getAnimationForCustomDoor(nil, door)
50
53
  sprite:Play(animation, true)
51
- local gridIndex = room:GetGridIndex(effect.Position)
54
+ local gridIndex = room:GetGridIndex(door.Position)
52
55
  local wall = room:GetGridEntity(gridIndex)
53
56
  if wall ~= nil then
54
- wall.CollisionClass = effect.State == DoorState.OPEN and GridCollisionClass.WALL_EXCEPT_PLAYER or GridCollisionClass.WALL
57
+ wall.CollisionClass = door.State == DoorState.OPEN and GridCollisionClass.WALL_EXCEPT_PLAYER or GridCollisionClass.WALL
55
58
  end
56
59
  end
57
- function getAnimationForCustomDoor(self, effect)
58
- local freshlySpawned = effect.FrameCount == 0
60
+ function getAnimationForCustomDoor(self, door)
61
+ local freshlySpawned = door.FrameCount == 0
59
62
  repeat
60
- local ____switch12 = effect.State
63
+ local ____switch12 = door.State
61
64
  local ____cond12 = ____switch12 == DoorState.OPEN
62
65
  if ____cond12 then
63
66
  do
@@ -185,7 +188,7 @@ function ____exports.spawnCustomDoorInternal(self, effectVariant, doorSlot)
185
188
  effect.RenderZOffset = -10000
186
189
  effect.PositionOffset = getPositionOffset(nil, doorSlot)
187
190
  local sprite = effect:GetSprite()
188
- sprite.Rotation = doorSlot * 90 - 90
191
+ sprite.Rotation = asNumber(nil, doorSlot) * 90 - 90
189
192
  local ptrHash = GetPtrHash(effect)
190
193
  local doorData = {slot = doorSlot, state = effect.State}
191
194
  v.room.customDoors:set(ptrHash, doorData)
@@ -1 +1 @@
1
- {"version":3,"file":"postDiceRoomActivated.d.ts","sourceRoot":"","sources":["../../src/callbacks/postDiceRoomActivated.ts"],"names":[],"mappings":";AAmBA,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAQxD"}
1
+ {"version":3,"file":"postDiceRoomActivated.d.ts","sourceRoot":"","sources":["../../src/callbacks/postDiceRoomActivated.ts"],"names":[],"mappings":";AAeA,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAQxD"}
@@ -16,19 +16,20 @@ function hasSubscriptions(self)
16
16
  return postDiceRoomActivatedHasSubscriptions(nil)
17
17
  end
18
18
  function postEffectUpdateDiceFloor(self, effect)
19
+ local diceFloor = effect
19
20
  if not hasSubscriptions(nil) then
20
21
  return
21
22
  end
22
23
  if v.room.diceRoomActivated then
23
24
  return
24
25
  end
25
- if effect.FrameCount == 0 then
26
+ if diceFloor.FrameCount == 0 then
26
27
  return
27
28
  end
28
- local closestPlayer = getClosestPlayer(nil, effect.Position)
29
- if isCloseEnoughToTriggerDiceFloor(nil, closestPlayer, effect) then
29
+ local closestPlayer = getClosestPlayer(nil, diceFloor.Position)
30
+ if isCloseEnoughToTriggerDiceFloor(nil, closestPlayer, diceFloor) then
30
31
  v.room.diceRoomActivated = true
31
- postDiceRoomActivatedFire(nil, closestPlayer, effect.SubType)
32
+ postDiceRoomActivatedFire(nil, closestPlayer, diceFloor.SubType)
32
33
  end
33
34
  end
34
35
  v = {room = {diceRoomActivated = false}}
@@ -70,10 +70,11 @@ function playerRecentlyCollidedWithBulb(self, player)
70
70
  return collidedOnThisFrame or collidedOnLastFrame
71
71
  end
72
72
  function preNPCCollisionSucker(self, npc, collider)
73
+ local sucker = npc
73
74
  if not hasSubscriptions(nil) then
74
75
  return nil
75
76
  end
76
- if npc.Variant ~= SuckerVariant.BULB then
77
+ if sucker.Variant ~= SuckerVariant.BULB then
77
78
  return nil
78
79
  end
79
80
  local player = collider:ToPlayer()
@@ -1 +1 @@
1
- {"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAsBrD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO/D"}
1
+ {"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA+BrD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO/D"}
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local Map = ____lualib.Map
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local hasSubscriptions, postPEffectUpdateReordered, v
5
+ local hasSubscriptions, postPEffectUpdateReordered, statEquals, v
6
6
  local ____DefaultMap = require("classes.DefaultMap")
7
7
  local DefaultMap = ____DefaultMap.DefaultMap
8
8
  local ____enums = require("enums.index")
@@ -12,7 +12,11 @@ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
12
12
  local ____exports = require("features.saveDataManager.exports")
13
13
  local saveDataManager = ____exports.saveDataManager
14
14
  local ____functions = require("functions.index")
15
+ local colorEquals = ____functions.colorEquals
15
16
  local getPlayerStat = ____functions.getPlayerStat
17
+ local isBitSet128 = ____functions.isBitSet128
18
+ local isBoolean = ____functions.isBoolean
19
+ local isColor = ____functions.isColor
16
20
  local isNumber = ____functions.isNumber
17
21
  local ____enums = require("functions.enums")
18
22
  local getEnumValues = ____enums.getEnumValues
@@ -31,23 +35,48 @@ function postPEffectUpdateReordered(self, player)
31
35
  local playerIndex = getPlayerIndex(nil, player, true)
32
36
  local playerStatMap = v.run.playersStatMap:getAndSetDefault(playerIndex)
33
37
  for ____, statType in ipairs(getEnumValues(nil, StatType)) do
34
- local storedStatValue = playerStatMap:get(statType)
35
- local currentStatValue = getPlayerStat(nil, player, statType)
36
- playerStatMap:set(statType, currentStatValue)
37
- if storedStatValue ~= nil and storedStatValue ~= currentStatValue then
38
- local isNumberStat = isNumber(nil, storedStatValue) and isNumber(nil, currentStatValue)
39
- local difference = isNumberStat and currentStatValue - storedStatValue or 0
40
- postPlayerChangeStatFire(
41
- nil,
42
- player,
43
- statType,
44
- difference,
45
- storedStatValue,
46
- currentStatValue
47
- )
38
+ do
39
+ local storedStatValue = playerStatMap:get(statType)
40
+ local currentStatValue = getPlayerStat(nil, player, statType)
41
+ playerStatMap:set(statType, currentStatValue)
42
+ if storedStatValue == nil then
43
+ goto __continue7
44
+ end
45
+ if not statEquals(nil, storedStatValue, currentStatValue) then
46
+ local isNumberStat = isNumber(nil, storedStatValue) and isNumber(nil, currentStatValue)
47
+ local difference = isNumberStat and currentStatValue - storedStatValue or 0
48
+ postPlayerChangeStatFire(
49
+ nil,
50
+ player,
51
+ statType,
52
+ difference,
53
+ storedStatValue,
54
+ currentStatValue
55
+ )
56
+ end
48
57
  end
58
+ ::__continue7::
49
59
  end
50
60
  end
61
+ function statEquals(self, oldValue, newValue)
62
+ local isNumberStat = isNumber(nil, oldValue) and isNumber(nil, newValue)
63
+ if isNumberStat then
64
+ return oldValue == newValue
65
+ end
66
+ local isBooleanStat = isBoolean(nil, oldValue) and isBoolean(nil, newValue)
67
+ if isBooleanStat then
68
+ return oldValue == newValue
69
+ end
70
+ local isBitSet128Stat = isBitSet128(nil, oldValue) and isBitSet128(nil, newValue)
71
+ if isBitSet128Stat then
72
+ return oldValue == newValue
73
+ end
74
+ local isColorStat = isColor(nil, oldValue) and isColor(nil, newValue)
75
+ if isColorStat then
76
+ return colorEquals(nil, oldValue, newValue)
77
+ end
78
+ error("Failed to determine the type of a stat in the \"POST_PLAYER_CHANGE_STAT\" callback.")
79
+ end
51
80
  v = {run = {playersStatMap = __TS__New(
52
81
  DefaultMap,
53
82
  function() return __TS__New(Map) end
@@ -3,7 +3,7 @@ local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local Map = ____lualib.Map
5
5
  local ____exports = {}
6
- local hasSubscriptions, postEntityRemove, postSlotAnimationChanged, PRIZE_GAME_FRAME_DELAY_UNTIL_REMOVAL, v
6
+ local hasSubscriptions, postEntityRemoveSlot, postSlotAnimationChanged, PRIZE_GAME_FRAME_DELAY_UNTIL_REMOVAL, v
7
7
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
8
  local EntityGridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityGridCollisionClass
9
9
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
@@ -22,7 +22,7 @@ local postSlotDestroyedHasSubscriptions = ____postSlotDestroyed.postSlotDestroye
22
22
  function hasSubscriptions(self)
23
23
  return postSlotDestroyedHasSubscriptions(nil)
24
24
  end
25
- function postEntityRemove(self, entity)
25
+ function postEntityRemoveSlot(self, entity)
26
26
  local slot = entity
27
27
  local ptrHash = GetPtrHash(slot)
28
28
  local gameFrameCount = game:GetFrameCount()
@@ -60,7 +60,7 @@ v = {room = {
60
60
  }}
61
61
  function ____exports.postSlotDestroyedInit(self, mod)
62
62
  saveDataManager(nil, "postSlotDestroyed", v, hasSubscriptions)
63
- mod:AddCallback(ModCallback.POST_ENTITY_REMOVE, postEntityRemove, EntityType.SLOT)
63
+ mod:AddCallback(ModCallback.POST_ENTITY_REMOVE, postEntityRemoveSlot, EntityType.SLOT)
64
64
  mod:AddCallbackCustom(ModCallbackCustom.POST_SLOT_ANIMATION_CHANGED, postSlotAnimationChanged)
65
65
  end
66
66
  return ____exports
@@ -1,8 +1,3 @@
1
- /**
2
- * A function that creates the default value for your `DefaultMap`. For example, if it was a
3
- * `DefaultMap` containing maps, the factory function would be: `() => new Map()`
4
- */
5
- export declare type FactoryFunction<V, Args extends unknown[]> = (...args: Args) => V;
6
1
  /**
7
2
  * `DefaultMap` is a data structure that makes working with default values easier.
8
3
  *
@@ -107,4 +102,9 @@ export declare class DefaultMap<Key, Value, Args extends unknown[] = []> extends
107
102
  */
108
103
  getConstructorArg(): Value | FactoryFunction<Value, Args>;
109
104
  }
105
+ /**
106
+ * A function that creates the default value for your `DefaultMap`. For example, if it was a
107
+ * `DefaultMap` containing maps, the factory function would be: `() => new Map()`
108
+ */
109
+ export declare type FactoryFunction<V, Args extends unknown[]> = (...args: Args) => V;
110
110
  //# sourceMappingURL=DefaultMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,oBAAY,eAAe,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,qBAAa,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,EAAE,CAAE,SAAQ,GAAG,CAC1E,GAAG,EACH,KAAK,CACN;IACC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,mBAAmB,CAA2C;IAEtE;;;OAGG;gBAED,6BAA6B,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EACnE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAqB3C;;;OAGG;IACH,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAWhD;;;OAGG;IACH,eAAe,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAYrC;;;OAGG;IACH,iBAAiB,IAAI,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC;CAW1D"}
1
+ {"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,qBAAa,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,EAAE,CAAE,SAAQ,GAAG,CAC1E,GAAG,EACH,KAAK,CACN;IACC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,mBAAmB,CAA2C;IAEtE;;;OAGG;gBAED,6BAA6B,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EACnE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAqB3C;;;OAGG;IACH,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAWhD;;;OAGG;IACH,eAAe,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAYrC;;;OAGG;IACH,iBAAiB,IAAI,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC;CAW1D;AAGD;;;GAGG;AACH,oBAAY,eAAe,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CollectibleType, ItemPoolType } from "isaac-typescript-definitions";
1
+ import { ItemPoolType } from "isaac-typescript-definitions";
2
2
  /**
3
3
  * The combination of the following flags:
4
4
  * - `DisplayFlag.VISIBLE` (1 << 0)
@@ -44,7 +44,7 @@ export declare const EMPTY_PNG_PATH = "gfx/none.png";
44
44
  * encountered by the player. The first TMTRAINER item takes the final possible 32 bit number. The
45
45
  * second TMTRAINER item subtracts one from that, and so on.
46
46
  */
47
- export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: CollectibleType;
47
+ export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: import("isaac-typescript-definitions").CollectibleType;
48
48
  /** Game frames are what is returned by the `Game.GetFrameCount` method. */
49
49
  export declare const GAME_FRAMES_PER_SECOND = 30;
50
50
  /** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
@@ -1 +1 @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AElC,yCAAyC;AACzC,eAAO,MAAM,uCAAuC,QAAmB,CAAC;AAExE,iCAAiC;AACjC,eAAO,MAAM,sCAAsC,QAAmB,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,gCAAgC,QAAmB,CAAC;AAEjE,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC,SAAS,CAAC;AAExD,eAAO,MAAM,cAAc,QAA+B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAyB,CAAC;AAExD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,sBAAsB,QAA8B,CAAC;AAElE,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,6FAA6F;AAC7F,eAAO,MAAM,gDAAgD,QAAQ,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAgB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAgB,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAkB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAsB,CAAC"}
@@ -8,6 +8,8 @@ local ____enums = require("functions.enums")
8
8
  local getEnumLength = ____enums.getEnumLength
9
9
  local ____flag = require("functions.flag")
10
10
  local addFlag = ____flag.addFlag
11
+ local ____types = require("functions.types")
12
+ local asCollectibleType = ____types.asCollectibleType
11
13
  local ____constantsFirstLast = require("core.constantsFirstLast")
12
14
  local NUM_NORMAL_PILL_COLORS = ____constantsFirstLast.NUM_NORMAL_PILL_COLORS
13
15
  --- The combination of the following flags:
@@ -39,7 +41,7 @@ ____exports.EMPTY_PNG_PATH = "gfx/none.png"
39
41
  --- The random items that appear when the player has TMTRAINER are generated on the fly as they are
40
42
  -- encountered by the player. The first TMTRAINER item takes the final possible 32 bit number. The
41
43
  -- second TMTRAINER item subtracts one from that, and so on.
42
- ____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
44
+ ____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = asCollectibleType(nil, (1 << 32) - 1)
43
45
  --- Game frames are what is returned by the `Game.GetFrameCount` method.
44
46
  ____exports.GAME_FRAMES_PER_SECOND = 30
45
47
  --- Render frames are what is returned by the `Isaac.GetFrameCount` method.
@@ -126,6 +126,8 @@ export declare const FIRST_CHARACTER = PlayerType.ISAAC;
126
126
  export declare const LAST_VANILLA_CHARACTER: PlayerType;
127
127
  /**
128
128
  * If there are no modded characters, this constant will represent a character that does not exist.
129
+ * (There is no way to determine the amount of modded characters at run-time, since there is no
130
+ * exposed player config.)
129
131
  */
130
132
  export declare const FIRST_MODDED_CHARACTER: PlayerType;
131
133
  export declare const FIRST_ROOM_TYPE = RoomType.DEFAULT;
@@ -1 +1 @@
1
- {"version":3,"file":"constantsFirstLast.d.ts","sourceRoot":"","sources":["../../src/core/constantsFirstLast.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAQtC,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,iBACX,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,iBAAoC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,6BAA6B,iBACuB,CAAC;AAElE,0FAA0F;AAC1F,eAAO,MAAM,6BAA6B,QAAqC,CAAC;AAEhF,wFAAwF;AACxF,eAAO,MAAM,4BAA4B,QACc,CAAC;AAExD,eAAO,MAAM,qBAAqB,QAC4B,CAAC;AAM/D;;;;;GAKG;AAC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D,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,YAA+B,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YAElC,CAAC;AAMF,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,UAA6B,CAAC;AAMzD,eAAO,MAAM,WAAW,wBAAwB,CAAC;AACjD,eAAO,MAAM,UAAU,YAA+B,CAAC"}
@@ -11,6 +11,13 @@ local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
11
11
  local ____enums = require("functions.enums")
12
12
  local getEnumLength = ____enums.getEnumLength
13
13
  local getLastEnumValue = ____enums.getLastEnumValue
14
+ local ____types = require("functions.types")
15
+ local asCard = ____types.asCard
16
+ local asCollectibleType = ____types.asCollectibleType
17
+ local asNumber = ____types.asNumber
18
+ local asPillEffect = ____types.asPillEffect
19
+ local asPlayerType = ____types.asPlayerType
20
+ local asTrinketType = ____types.asTrinketType
14
21
  local ____cachedClasses = require("core.cachedClasses")
15
22
  local itemConfig = ____cachedClasses.itemConfig
16
23
  --- Equal to `CollectibleType.SAD_ONION`.
@@ -19,7 +26,10 @@ ____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
19
26
  --
20
27
  -- Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles, like
21
28
  -- 666. We subtract one to account for `CollectibleType.NULL`.)
22
- ____exports.LAST_COLLECTIBLE_TYPE = itemConfig:GetCollectibles().Size - 1
29
+ ____exports.LAST_COLLECTIBLE_TYPE = asCollectibleType(
30
+ nil,
31
+ itemConfig:GetCollectibles().Size - 1
32
+ )
23
33
  --- Calculated from the `CollectibleType` enum.
24
34
  --
25
35
  -- Note that this cannot be calculated from the length of the enum, because unlike all of the other
@@ -27,7 +37,10 @@ ____exports.LAST_COLLECTIBLE_TYPE = itemConfig:GetCollectibles().Size - 1
27
37
  ____exports.LAST_VANILLA_COLLECTIBLE_TYPE = getLastEnumValue(nil, CollectibleType)
28
38
  --- If there are no modded collectibles, this constant will represent a collectible type that does
29
39
  -- not exist.
30
- ____exports.FIRST_MODDED_COLLECTIBLE_TYPE = ____exports.LAST_VANILLA_COLLECTIBLE_TYPE + 1
40
+ ____exports.FIRST_MODDED_COLLECTIBLE_TYPE = asCollectibleType(
41
+ nil,
42
+ asNumber(nil, ____exports.LAST_VANILLA_COLLECTIBLE_TYPE) + 1
43
+ )
31
44
  --- Calculated from the `CollectibleType` enum. `CollectibleType.NULL` is not included.
32
45
  ____exports.NUM_VANILLA_COLLECTIBLE_TYPES = getEnumLength(nil, CollectibleType) - 1
33
46
  --- Unlike vanilla collectible types, modded collectible types are always contiguous.
@@ -47,11 +60,14 @@ ____exports.FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY
47
60
  --
48
61
  -- Equal to `itemConfig.GetTrinkets().Size - 1`. (We subtract one to account for
49
62
  -- `TrinketType.NULL`.)
50
- ____exports.LAST_TRINKET_TYPE = ____exports.NUM_TRINKET_TYPES
63
+ ____exports.LAST_TRINKET_TYPE = asTrinketType(nil, ____exports.NUM_TRINKET_TYPES)
51
64
  --- Calculated from the `TrinketType` enum.
52
65
  ____exports.LAST_VANILLA_TRINKET_TYPE = getLastEnumValue(nil, TrinketType)
53
66
  --- If there are no modded trinkets, this constant will represent a trinket type that does not exist.
54
- ____exports.FIRST_MODDED_TRINKET_TYPE = ____exports.LAST_VANILLA_TRINKET_TYPE + 1
67
+ ____exports.FIRST_MODDED_TRINKET_TYPE = asTrinketType(
68
+ nil,
69
+ asNumber(nil, ____exports.LAST_VANILLA_TRINKET_TYPE) + 1
70
+ )
55
71
  --- Will change depending on how many modded cards there are.
56
72
  --
57
73
  -- Equal to `itemConfig.GetCards().Size - 1`. (We subtract one to account for `Card.NULL`.)
@@ -64,11 +80,14 @@ ____exports.FIRST_CARD = Card.FOOL
64
80
  --- Will change depending on how many modded cards there are.
65
81
  --
66
82
  -- Equal to `itemConfig.GetCards().Size - 1`. (We subtract one to account for `Card.NULL`.)
67
- ____exports.LAST_CARD = ____exports.NUM_CARDS
83
+ ____exports.LAST_CARD = asCard(nil, ____exports.NUM_CARDS)
68
84
  --- Calculated from the `Card` enum.
69
85
  ____exports.MAX_VANILLA_CARD = getLastEnumValue(nil, Card)
70
86
  --- If there are no modded cards, this constant will represent a card that does not exist.
71
- ____exports.FIRST_MODDED_CARD = ____exports.MAX_VANILLA_CARD + 1
87
+ ____exports.FIRST_MODDED_CARD = asCard(
88
+ nil,
89
+ asNumber(nil, ____exports.MAX_VANILLA_CARD) + 1
90
+ )
72
91
  --- Will change depending on how many modded pill effects there are.
73
92
  --
74
93
  -- Equal to `itemConfig.GetPillEffects().Size - 1`. (We subtract one to account for
@@ -85,12 +104,15 @@ ____exports.FIRST_PILL_EFFECT = PillEffect.BAD_GAS
85
104
  --
86
105
  -- Equal to `itemConfig.GetPillEffects().Size - 1`. (We subtract one to account for
87
106
  -- `PillEffect.NULL`.)
88
- ____exports.LAST_PILL_EFFECT = ____exports.NUM_PILL_EFFECTS
107
+ ____exports.LAST_PILL_EFFECT = asPillEffect(nil, ____exports.NUM_PILL_EFFECTS)
89
108
  --- Calculated from the `PillEffect` enum.
90
109
  ____exports.LAST_VANILLA_PILL_EFFECT = getLastEnumValue(nil, PillEffect)
91
110
  --- If there are no modded pill effects, this constant will represent a pill effect that does not
92
111
  -- exist.
93
- ____exports.FIRST_MODDED_PILL_EFFECT = ____exports.LAST_VANILLA_PILL_EFFECT + 1
112
+ ____exports.FIRST_MODDED_PILL_EFFECT = asPillEffect(
113
+ nil,
114
+ asNumber(nil, ____exports.LAST_VANILLA_PILL_EFFECT) + 1
115
+ )
94
116
  --- Equal to `PillColor.BLUE_BLUE`.
95
117
  ____exports.FIRST_PILL_COLOR = PillColor.BLUE_BLUE
96
118
  --- Equal to `PillColor.WHITE_YELLOW`.
@@ -111,7 +133,12 @@ ____exports.FIRST_CHARACTER = PlayerType.ISAAC
111
133
  --- Calculated from the `PlayerType` enum.
112
134
  ____exports.LAST_VANILLA_CHARACTER = getLastEnumValue(nil, PlayerType)
113
135
  --- If there are no modded characters, this constant will represent a character that does not exist.
114
- ____exports.FIRST_MODDED_CHARACTER = ____exports.LAST_VANILLA_CHARACTER + 1
136
+ -- (There is no way to determine the amount of modded characters at run-time, since there is no
137
+ -- exposed player config.)
138
+ ____exports.FIRST_MODDED_CHARACTER = asPlayerType(
139
+ nil,
140
+ asNumber(nil, ____exports.LAST_VANILLA_CHARACTER) + 1
141
+ )
115
142
  ____exports.FIRST_ROOM_TYPE = RoomType.DEFAULT
116
143
  ____exports.LAST_ROOM_TYPE = getLastEnumValue(nil, RoomType)
117
144
  ____exports.FIRST_STAGE = LevelStage.BASEMENT_1
@@ -1,3 +1,4 @@
1
+ /** This is used by the `POST_AMBUSH_STARTED` and `POST_AMBUSH_FINISHED` custom callbacks. */
1
2
  export declare enum AmbushType {
2
3
  CHALLENGE_ROOM = 0,
3
4
  BOSS_RUSH = 1
@@ -1 +1 @@
1
- {"version":3,"file":"AmbushType.d.ts","sourceRoot":"","sources":["../../src/enums/AmbushType.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,cAAc,IAAA;IACd,SAAS,IAAA;CACV"}
1
+ {"version":3,"file":"AmbushType.d.ts","sourceRoot":"","sources":["../../src/enums/AmbushType.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,oBAAY,UAAU;IACpB,cAAc,IAAA;IACd,SAAS,IAAA;CACV"}
@@ -1,4 +1,5 @@
1
1
  local ____exports = {}
2
+ --- This is used by the `POST_AMBUSH_STARTED` and `POST_AMBUSH_FINISHED` custom callbacks.
2
3
  ____exports.AmbushType = {}
3
4
  ____exports.AmbushType.CHALLENGE_ROOM = 0
4
5
  ____exports.AmbushType[____exports.AmbushType.CHALLENGE_ROOM] = "CHALLENGE_ROOM"
@@ -1,3 +1,4 @@
1
+ /** This is used by the `getRoomShapeCorners` helper function. */
1
2
  export declare enum CornerType {
2
3
  TOP_LEFT = 0,
3
4
  TOP_RIGHT = 1,
@@ -1 +1 @@
1
- {"version":3,"file":"CornerType.d.ts","sourceRoot":"","sources":["../../src/enums/CornerType.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,WAAW,IAAA;IACX,YAAY,IAAA;CACb"}
1
+ {"version":3,"file":"CornerType.d.ts","sourceRoot":"","sources":["../../src/enums/CornerType.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,UAAU;IACpB,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,WAAW,IAAA;IACX,YAAY,IAAA;CACb"}
@@ -1,4 +1,5 @@
1
1
  local ____exports = {}
2
+ --- This is used by the `getRoomShapeCorners` helper function.
2
3
  ____exports.CornerType = {}
3
4
  ____exports.CornerType.TOP_LEFT = 0
4
5
  ____exports.CornerType[____exports.CornerType.TOP_LEFT] = "TOP_LEFT"
@@ -1,3 +1,4 @@
1
+ /** This is used in the various pocket item helper functions. */
1
2
  export declare enum PocketItemType {
2
3
  EMPTY = 0,
3
4
  CARD = 1,
@@ -1 +1 @@
1
- {"version":3,"file":"PocketItemType.d.ts","sourceRoot":"","sources":["../../src/enums/PocketItemType.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,aAAa,IAAA;IACb,cAAc,IAAA;CACf"}
1
+ {"version":3,"file":"PocketItemType.d.ts","sourceRoot":"","sources":["../../src/enums/PocketItemType.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oBAAY,cAAc;IACxB,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,aAAa,IAAA;IACb,cAAc,IAAA;CACf"}
@@ -1,4 +1,5 @@
1
1
  local ____exports = {}
2
+ --- This is used in the various pocket item helper functions.
2
3
  ____exports.PocketItemType = {}
3
4
  ____exports.PocketItemType.EMPTY = 0
4
5
  ____exports.PocketItemType[____exports.PocketItemType.EMPTY] = "EMPTY"
@@ -1,3 +1,4 @@
1
+ /** This is used in the various rock alt type helper functions. */
1
2
  export declare enum RockAltType {
2
3
  URN = 0,
3
4
  MUSHROOM = 1,
@@ -1 +1 @@
1
- {"version":3,"file":"RockAltType.d.ts","sourceRoot":"","sources":["../../src/enums/RockAltType.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,GAAG,IAAA;IACH,QAAQ,IAAA;IACR,KAAK,IAAA;IACL,KAAK,IAAA;IAEL;;;;OAIG;IACH,eAAe,IAAA;IAEf;;;;OAIG;IACH,YAAY,IAAA;CACb"}
1
+ {"version":3,"file":"RockAltType.d.ts","sourceRoot":"","sources":["../../src/enums/RockAltType.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,oBAAY,WAAW;IACrB,GAAG,IAAA;IACH,QAAQ,IAAA;IACR,KAAK,IAAA;IACL,KAAK,IAAA;IAEL;;;;OAIG;IACH,eAAe,IAAA;IAEf;;;;OAIG;IACH,YAAY,IAAA;CACb"}
@@ -1,4 +1,5 @@
1
1
  local ____exports = {}
2
+ --- This is used in the various rock alt type helper functions.
2
3
  ____exports.RockAltType = {}
3
4
  ____exports.RockAltType.URN = 0
4
5
  ____exports.RockAltType[____exports.RockAltType.URN] = "URN"
@@ -0,0 +1,11 @@
1
+ /**
2
+ * These are the types of keys that you can put on the local variables that you feed to the save
3
+ * data manager.
4
+ */
5
+ export declare enum SaveDataKey {
6
+ PERSISTENT = "persistent",
7
+ RUN = "run",
8
+ LEVEL = "level",
9
+ ROOM = "room"
10
+ }
11
+ //# sourceMappingURL=SaveDataKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveDataKey.d.ts","sourceRoot":"","sources":["../../src/enums/SaveDataKey.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,WAAW;IACrB,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,IAAI,SAAS;CACd"}
@@ -1,4 +1,6 @@
1
1
  local ____exports = {}
2
+ --- These are the types of keys that you can put on the local variables that you feed to the save
3
+ -- data manager.
2
4
  ____exports.SaveDataKey = {}
3
5
  ____exports.SaveDataKey.PERSISTENT = "persistent"
4
6
  ____exports.SaveDataKey.RUN = "run"
@@ -1,3 +1,4 @@
1
+ /** This is used with the `deepCopy` and `merge` functions. */
1
2
  export declare enum SerializationType {
2
3
  NONE = 0,
3
4
  SERIALIZE = 1,
@@ -1 +1 @@
1
- {"version":3,"file":"SerializationType.d.ts","sourceRoot":"","sources":["../../src/enums/SerializationType.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,WAAW,IAAA;CACZ"}
1
+ {"version":3,"file":"SerializationType.d.ts","sourceRoot":"","sources":["../../src/enums/SerializationType.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,oBAAY,iBAAiB;IAC3B,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,WAAW,IAAA;CACZ"}
@@ -1,4 +1,5 @@
1
1
  local ____exports = {}
2
+ --- This is used with the `deepCopy` and `merge` functions.
2
3
  ____exports.SerializationType = {}
3
4
  ____exports.SerializationType.NONE = 0
4
5
  ____exports.SerializationType[____exports.SerializationType.NONE] = "NONE"
@@ -1,3 +1,4 @@
1
+ /** This is used in the `POST_SLOT_DESTROYED` custom callback. */
1
2
  export declare enum SlotDestructionType {
2
3
  NORMAL = 0,
3
4
  COLLECTIBLE_PAYOUT = 1
@@ -1 +1 @@
1
- {"version":3,"file":"SlotDestructionType.d.ts","sourceRoot":"","sources":["../../src/enums/SlotDestructionType.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,MAAM,IAAA;IACN,kBAAkB,IAAA;CACnB"}
1
+ {"version":3,"file":"SlotDestructionType.d.ts","sourceRoot":"","sources":["../../src/enums/SlotDestructionType.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,mBAAmB;IAC7B,MAAM,IAAA;IACN,kBAAkB,IAAA;CACnB"}
@@ -1,4 +1,5 @@
1
1
  local ____exports = {}
2
+ --- This is used in the `POST_SLOT_DESTROYED` custom callback.
2
3
  ____exports.SlotDestructionType = {}
3
4
  ____exports.SlotDestructionType.NORMAL = 0
4
5
  ____exports.SlotDestructionType[____exports.SlotDestructionType.NORMAL] = "NORMAL"
@@ -23,8 +23,6 @@ export declare enum StatType {
23
23
  /** Corresponds to `CacheFlag.FLYING` (1 << 7) and `EntityPlayer.CanFly`. */
24
24
  FLYING = 10,
25
25
  /** Corresponds to `CacheFlag.LUCK` (1 << 10) and `EntityPlayer.Luck`. */
26
- LUCK = 11,
27
- /** Corresponds to `CacheFlag.SIZE` (1 << 11) and `EntityPlayer.SizeMulti`. */
28
- SIZE = 12
26
+ LUCK = 11
29
27
  }
30
28
  //# sourceMappingURL=StatType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatType.d.ts","sourceRoot":"","sources":["../../src/enums/StatType.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,QAAQ;IAClB,4EAA4E;IAC5E,MAAM,IAAA;IAEN,sFAAsF;IACtF,UAAU,IAAA;IAEV,mFAAmF;IACnF,UAAU,IAAA;IAEV,+EAA+E;IAC/E,WAAW,IAAA;IAEX,8EAA8E;IAC9E,UAAU,IAAA;IAEV,4FAA4F;IAC5F,yBAAyB,IAAA;IAEzB,qFAAqF;IACrF,kBAAkB,IAAA;IAElB,8EAA8E;IAC9E,UAAU,IAAA;IAEV,kFAAkF;IAClF,SAAS,IAAA;IAET,mFAAmF;IACnF,UAAU,IAAA;IAEV,4EAA4E;IAC5E,MAAM,KAAA;IAKN,yEAAyE;IACzE,IAAI,KAAA;IAEJ,8EAA8E;IAC9E,IAAI,KAAA;CAIL"}
1
+ {"version":3,"file":"StatType.d.ts","sourceRoot":"","sources":["../../src/enums/StatType.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,QAAQ;IAClB,4EAA4E;IAC5E,MAAM,IAAA;IAEN,sFAAsF;IACtF,UAAU,IAAA;IAEV,mFAAmF;IACnF,UAAU,IAAA;IAEV,+EAA+E;IAC/E,WAAW,IAAA;IAEX,8EAA8E;IAC9E,UAAU,IAAA;IAEV,4FAA4F;IAC5F,yBAAyB,IAAA;IAEzB,qFAAqF;IACrF,kBAAkB,IAAA;IAElB,8EAA8E;IAC9E,UAAU,IAAA;IAEV,kFAAkF;IAClF,SAAS,IAAA;IAET,mFAAmF;IACnF,UAAU,IAAA;IAEV,4EAA4E;IAC5E,MAAM,KAAA;IAKN,yEAAyE;IACzE,IAAI,KAAA;CAOL"}
@@ -25,6 +25,4 @@ ____exports.StatType.FLYING = 10
25
25
  ____exports.StatType[____exports.StatType.FLYING] = "FLYING"
26
26
  ____exports.StatType.LUCK = 11
27
27
  ____exports.StatType[____exports.StatType.LUCK] = "LUCK"
28
- ____exports.StatType.SIZE = 12
29
- ____exports.StatType[____exports.StatType.SIZE] = "SIZE"
30
28
  return ____exports
@@ -4,6 +4,7 @@ export * from "./HealthType";
4
4
  export * from "./ModCallbackCustom";
5
5
  export * from "./PocketItemType";
6
6
  export * from "./RockAltType";
7
+ export * from "./SaveDataKey";
7
8
  export * from "./SerializationType";
8
9
  export * from "./SlotDestructionType";
9
10
  export * from "./StatType";