isaacscript-common 6.6.3 → 6.7.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 (262) hide show
  1. package/dist/callbacks/customRevive.lua +4 -4
  2. package/dist/callbacks/postCursedTeleport.lua +2 -2
  3. package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
  4. package/dist/callbacks/postCustomDoorEnter.lua +6 -6
  5. package/dist/callbacks/postDiceRoomActivated.lua +2 -2
  6. package/dist/callbacks/postFlip.lua +3 -3
  7. package/dist/callbacks/postGridEntity.lua +3 -3
  8. package/dist/callbacks/postGridEntityCollision.lua +3 -3
  9. package/dist/callbacks/postGridEntityRender.lua +2 -2
  10. package/dist/callbacks/postNewRoomEarly.lua +5 -5
  11. package/dist/callbacks/postPickupCollect.lua +2 -2
  12. package/dist/callbacks/postPitRender.lua +2 -2
  13. package/dist/callbacks/postPitUpdate.lua +2 -2
  14. package/dist/callbacks/postPlayerCollectible.lua +2 -2
  15. package/dist/callbacks/postPoopRender.lua +2 -2
  16. package/dist/callbacks/postPoopUpdate.lua +2 -2
  17. package/dist/callbacks/postPressurePlateRender.lua +2 -2
  18. package/dist/callbacks/postPressurePlateUpdate.lua +2 -2
  19. package/dist/callbacks/postPurchase.lua +2 -2
  20. package/dist/callbacks/postRockRender.lua +2 -2
  21. package/dist/callbacks/postRockUpdate.lua +2 -2
  22. package/dist/callbacks/postSlotInitUpdate.lua +2 -2
  23. package/dist/callbacks/postSlotRender.lua +2 -2
  24. package/dist/callbacks/postSpikesRender.lua +2 -2
  25. package/dist/callbacks/postSpikesUpdate.lua +2 -2
  26. package/dist/callbacks/postTNTRender.lua +2 -2
  27. package/dist/callbacks/postTNTUpdate.lua +2 -2
  28. package/dist/callbacks/preBerserkDeath.lua +2 -2
  29. package/dist/callbacks/preNewLevel.lua +2 -2
  30. package/dist/callbacks/subscriptions/postDoorRender.d.ts +2 -3
  31. package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -1
  32. package/dist/callbacks/subscriptions/postDoorRender.lua +3 -3
  33. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +2 -3
  34. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -1
  35. package/dist/callbacks/subscriptions/postDoorUpdate.lua +3 -3
  36. package/dist/callbacks/subscriptions/postPitRender.d.ts +2 -3
  37. package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -1
  38. package/dist/callbacks/subscriptions/postPitRender.lua +3 -3
  39. package/dist/callbacks/subscriptions/postPitUpdate.d.ts +2 -3
  40. package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -1
  41. package/dist/callbacks/subscriptions/postPitUpdate.lua +3 -3
  42. package/dist/callbacks/subscriptions/postPoopRender.d.ts +2 -3
  43. package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -1
  44. package/dist/callbacks/subscriptions/postPoopRender.lua +3 -3
  45. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +2 -3
  46. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -1
  47. package/dist/callbacks/subscriptions/postPoopUpdate.lua +3 -3
  48. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +2 -3
  49. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -1
  50. package/dist/callbacks/subscriptions/postPressurePlateRender.lua +3 -3
  51. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +2 -3
  52. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -1
  53. package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +3 -3
  54. package/dist/enums/private/SerializationBrand.d.ts +0 -4
  55. package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
  56. package/dist/features/characterStats.lua +2 -2
  57. package/dist/features/collectibleItemPoolType.lua +2 -2
  58. package/dist/features/customGridEntity.d.ts.map +1 -1
  59. package/dist/features/customGridEntity.lua +5 -5
  60. package/dist/features/customStage/backdrop.lua +2 -2
  61. package/dist/features/customStage/{gridEntities.d.ts → customStageGridEntities.d.ts} +1 -1
  62. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -0
  63. package/dist/features/customStage/{gridEntities.lua → customStageGridEntities.lua} +8 -8
  64. package/dist/features/customStage/{util.d.ts → customStageUtils.d.ts} +1 -1
  65. package/dist/features/customStage/customStageUtils.d.ts.map +1 -0
  66. package/dist/features/customStage/{util.lua → customStageUtils.lua} +0 -0
  67. package/dist/features/customStage/exports.lua +4 -4
  68. package/dist/features/customStage/init.lua +6 -6
  69. package/dist/features/customStage/shadows.lua +2 -2
  70. package/dist/features/customStage/versusScreen.lua +4 -4
  71. package/dist/features/debugDisplay/v.lua +4 -4
  72. package/dist/features/deployJSONRoom.lua +20 -20
  73. package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
  74. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  75. package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
  76. package/dist/features/pause.lua +2 -2
  77. package/dist/features/persistentEntities.lua +2 -2
  78. package/dist/features/preventCollectibleRotation.lua +2 -2
  79. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  80. package/dist/features/saveDataManager/merge.lua +4 -3
  81. package/dist/features/sirenHelpers.lua +2 -2
  82. package/dist/functions/ambush.lua +5 -5
  83. package/dist/functions/array.d.ts.map +1 -1
  84. package/dist/functions/array.lua +1 -1
  85. package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
  86. package/dist/functions/bosses.d.ts.map +1 -0
  87. package/dist/functions/{boss.lua → bosses.lua} +38 -13
  88. package/dist/functions/collectibleTag.lua +2 -2
  89. package/dist/functions/collectibles.lua +5 -5
  90. package/dist/functions/deepCopy.d.ts +8 -5
  91. package/dist/functions/deepCopy.d.ts.map +1 -1
  92. package/dist/functions/deepCopy.lua +142 -38
  93. package/dist/functions/deepCopyTests.d.ts +6 -1
  94. package/dist/functions/deepCopyTests.d.ts.map +1 -1
  95. package/dist/functions/deepCopyTests.lua +19 -16
  96. package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
  97. package/dist/functions/entities.d.ts.map +1 -0
  98. package/dist/functions/{entity.lua → entities.lua} +25 -20
  99. package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
  100. package/dist/functions/entitiesSpecific.d.ts.map +1 -0
  101. package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
  102. package/dist/functions/familiars.lua +2 -2
  103. package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
  104. package/dist/functions/gridEntities.d.ts.map +1 -0
  105. package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
  106. package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
  107. package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
  108. package/dist/functions/gridEntitiesSpecific.lua +366 -0
  109. package/dist/functions/log.d.ts +1 -1
  110. package/dist/functions/log.d.ts.map +1 -1
  111. package/dist/functions/log.lua +16 -12
  112. package/dist/functions/mergeTests.d.ts +7 -1
  113. package/dist/functions/mergeTests.d.ts.map +1 -1
  114. package/dist/functions/mergeTests.lua +86 -7
  115. package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
  116. package/dist/functions/npcs.d.ts.map +1 -0
  117. package/dist/functions/{npc.lua → npcs.lua} +44 -9
  118. package/dist/functions/pickups.d.ts +4 -119
  119. package/dist/functions/pickups.d.ts.map +1 -1
  120. package/dist/functions/pickups.lua +10 -439
  121. package/dist/functions/pickupsSpecific.d.ts +229 -0
  122. package/dist/functions/pickupsSpecific.d.ts.map +1 -0
  123. package/dist/functions/pickupsSpecific.lua +560 -0
  124. package/dist/functions/playerHealth.lua +6 -6
  125. package/dist/functions/{player.d.ts → players.d.ts} +1 -1
  126. package/dist/functions/players.d.ts.map +1 -0
  127. package/dist/functions/{player.lua → players.lua} +0 -0
  128. package/dist/functions/pocketItems.lua +2 -2
  129. package/dist/functions/positionVelocity.lua +6 -6
  130. package/dist/functions/pressurePlate.d.ts +10 -0
  131. package/dist/functions/pressurePlate.d.ts.map +1 -0
  132. package/dist/functions/pressurePlate.lua +29 -0
  133. package/dist/functions/revive.lua +7 -7
  134. package/dist/functions/rooms.lua +2 -2
  135. package/dist/functions/saveFile.lua +3 -3
  136. package/dist/functions/spawnCollectible.lua +4 -4
  137. package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
  138. package/dist/functions/sprites.d.ts.map +1 -0
  139. package/dist/functions/{sprite.lua → sprites.lua} +0 -0
  140. package/dist/functions/table.d.ts +1 -1
  141. package/dist/functions/table.lua +1 -1
  142. package/dist/functions/transformations.lua +2 -2
  143. package/dist/functions/trinketGive.lua +2 -2
  144. package/dist/functions/trinkets.lua +6 -6
  145. package/dist/functions/utils.d.ts +7 -0
  146. package/dist/functions/utils.d.ts.map +1 -1
  147. package/dist/functions/utils.lua +35 -22
  148. package/dist/index.d.ts +10 -8
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.lua +26 -10
  151. package/dist/types/AnyGridEntity.d.ts +10 -0
  152. package/dist/types/AnyGridEntity.d.ts.map +1 -0
  153. package/dist/types/AnyGridEntity.lua +2 -0
  154. package/package.json +2 -2
  155. package/src/callbacks/customRevive.ts +2 -2
  156. package/src/callbacks/postCursedTeleport.ts +2 -2
  157. package/src/callbacks/postCustomDoorEnter.ts +3 -3
  158. package/src/callbacks/postDiceRoomActivated.ts +1 -1
  159. package/src/callbacks/postFlip.ts +1 -1
  160. package/src/callbacks/postGridEntity.ts +1 -1
  161. package/src/callbacks/postGridEntityCollision.ts +1 -1
  162. package/src/callbacks/postGridEntityRender.ts +1 -1
  163. package/src/callbacks/postNewRoomEarly.ts +9 -3
  164. package/src/callbacks/postPickupCollect.ts +1 -1
  165. package/src/callbacks/postPitRender.ts +1 -1
  166. package/src/callbacks/postPitUpdate.ts +1 -1
  167. package/src/callbacks/postPlayerCollectible.ts +2 -2
  168. package/src/callbacks/postPoopRender.ts +1 -1
  169. package/src/callbacks/postPoopUpdate.ts +1 -1
  170. package/src/callbacks/postPressurePlateRender.ts +1 -1
  171. package/src/callbacks/postPressurePlateUpdate.ts +1 -1
  172. package/src/callbacks/postPurchase.ts +1 -1
  173. package/src/callbacks/postRockRender.ts +1 -1
  174. package/src/callbacks/postRockUpdate.ts +1 -1
  175. package/src/callbacks/postSacrifice.ts +1 -1
  176. package/src/callbacks/postSlotInitUpdate.ts +1 -1
  177. package/src/callbacks/postSlotRender.ts +1 -1
  178. package/src/callbacks/postSpikesRender.ts +1 -1
  179. package/src/callbacks/postSpikesUpdate.ts +1 -1
  180. package/src/callbacks/postTNTRender.ts +1 -1
  181. package/src/callbacks/postTNTUpdate.ts +1 -1
  182. package/src/callbacks/preBerserkDeath.ts +1 -1
  183. package/src/callbacks/preNewLevel.ts +1 -1
  184. package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
  185. package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
  186. package/src/callbacks/subscriptions/postPitRender.ts +6 -7
  187. package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
  188. package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
  189. package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
  190. package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
  191. package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
  192. package/src/enums/private/SerializationBrand.ts +0 -4
  193. package/src/features/characterStats.ts +1 -1
  194. package/src/features/collectibleItemPoolType.ts +1 -1
  195. package/src/features/customGridEntity.ts +6 -3
  196. package/src/features/customStage/backdrop.ts +1 -1
  197. package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
  198. package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
  199. package/src/features/customStage/exports.ts +2 -2
  200. package/src/features/customStage/init.ts +1 -1
  201. package/src/features/customStage/shadows.ts +1 -1
  202. package/src/features/customStage/versusScreen.ts +2 -2
  203. package/src/features/debugDisplay/v.ts +2 -2
  204. package/src/features/deployJSONRoom.ts +11 -7
  205. package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
  206. package/src/features/extraConsoleCommands/listCommands.ts +13 -9
  207. package/src/features/pause.ts +1 -1
  208. package/src/features/persistentEntities.ts +2 -2
  209. package/src/features/preventCollectibleRotation.ts +1 -1
  210. package/src/features/saveDataManager/exports.ts +7 -4
  211. package/src/features/saveDataManager/merge.ts +3 -3
  212. package/src/features/sirenHelpers.ts +1 -1
  213. package/src/functions/ambush.ts +2 -2
  214. package/src/functions/array.ts +5 -2
  215. package/src/functions/bitwise.ts +2 -2
  216. package/src/functions/{boss.ts → bosses.ts} +29 -21
  217. package/src/functions/collectibleTag.ts +1 -1
  218. package/src/functions/collectibles.ts +2 -2
  219. package/src/functions/deepCopy.ts +98 -19
  220. package/src/functions/deepCopyTests.ts +75 -19
  221. package/src/functions/{entity.ts → entities.ts} +23 -21
  222. package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
  223. package/src/functions/familiars.ts +1 -1
  224. package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
  225. package/src/functions/gridEntitiesSpecific.ts +490 -0
  226. package/src/functions/log.ts +19 -10
  227. package/src/functions/mergeTests.ts +152 -4
  228. package/src/functions/{npc.ts → npcs.ts} +42 -11
  229. package/src/functions/pickups.ts +8 -475
  230. package/src/functions/pickupsSpecific.ts +613 -0
  231. package/src/functions/playerHealth.ts +1 -1
  232. package/src/functions/{player.ts → players.ts} +0 -0
  233. package/src/functions/pocketItems.ts +1 -1
  234. package/src/functions/positionVelocity.ts +3 -3
  235. package/src/functions/pressurePlate.ts +29 -0
  236. package/src/functions/revive.ts +2 -2
  237. package/src/functions/rooms.ts +1 -1
  238. package/src/functions/saveFile.ts +1 -1
  239. package/src/functions/spawnCollectible.ts +2 -2
  240. package/src/functions/{sprite.ts → sprites.ts} +0 -0
  241. package/src/functions/table.ts +1 -1
  242. package/src/functions/transformations.ts +1 -1
  243. package/src/functions/trinketGive.ts +4 -4
  244. package/src/functions/trinkets.ts +3 -3
  245. package/src/functions/tstlClass.ts +1 -1
  246. package/src/functions/ui.ts +3 -3
  247. package/src/functions/utils.ts +32 -13
  248. package/src/index.ts +10 -8
  249. package/src/types/AnyGridEntity.ts +9 -0
  250. package/dist/features/customStage/gridEntities.d.ts.map +0 -1
  251. package/dist/features/customStage/util.d.ts.map +0 -1
  252. package/dist/functions/boss.d.ts.map +0 -1
  253. package/dist/functions/entity.d.ts.map +0 -1
  254. package/dist/functions/entitySpecific.d.ts.map +0 -1
  255. package/dist/functions/gridEntity.d.ts.map +0 -1
  256. package/dist/functions/gridEntitySpecific.d.ts +0 -29
  257. package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
  258. package/dist/functions/gridEntitySpecific.lua +0 -114
  259. package/dist/functions/npc.d.ts.map +0 -1
  260. package/dist/functions/player.d.ts.map +0 -1
  261. package/dist/functions/sprite.d.ts.map +0 -1
  262. package/src/functions/gridEntitySpecific.ts +0 -143
@@ -12,13 +12,13 @@ local MAX_TAINTED_SAMSON_BERSERK_CHARGE = ____constants.MAX_TAINTED_SAMSON_BERSE
12
12
  local TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = ____constants.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE
13
13
  local ____character = require("functions.character")
14
14
  local getCharacterDeathAnimationName = ____character.getCharacterDeathAnimationName
15
- local ____player = require("functions.player")
16
- local getPlayerMaxHeartContainers = ____player.getPlayerMaxHeartContainers
17
- local getPlayerNumHitsRemaining = ____player.getPlayerNumHitsRemaining
18
- local hasLostCurse = ____player.hasLostCurse
19
- local isKeeper = ____player.isKeeper
20
- local ____sprite = require("functions.sprite")
21
- local getLastFrameOfAnimation = ____sprite.getLastFrameOfAnimation
15
+ local ____players = require("functions.players")
16
+ local getPlayerMaxHeartContainers = ____players.getPlayerMaxHeartContainers
17
+ local getPlayerNumHitsRemaining = ____players.getPlayerNumHitsRemaining
18
+ local hasLostCurse = ____players.hasLostCurse
19
+ local isKeeper = ____players.isKeeper
20
+ local ____sprites = require("functions.sprites")
21
+ local getLastFrameOfAnimation = ____sprites.getLastFrameOfAnimation
22
22
  local ____trinketGive = require("functions.trinketGive")
23
23
  local giveTrinketsBack = ____trinketGive.giveTrinketsBack
24
24
  local temporarilyRemoveTrinket = ____trinketGive.temporarilyRemoveTrinket
@@ -40,8 +40,8 @@ local closeAllDoors = ____doors.closeAllDoors
40
40
  local getDoors = ____doors.getDoors
41
41
  local isHiddenSecretRoomDoor = ____doors.isHiddenSecretRoomDoor
42
42
  local openDoorFast = ____doors.openDoorFast
43
- local ____entity = require("functions.entity")
44
- local getEntities = ____entity.getEntities
43
+ local ____entities = require("functions.entities")
44
+ local getEntities = ____entities.getEntities
45
45
  local ____flag = require("functions.flag")
46
46
  local hasFlag = ____flag.hasFlag
47
47
  local ____positionVelocity = require("functions.positionVelocity")
@@ -11,14 +11,14 @@ local ____cachedClasses = require("cachedClasses")
11
11
  local game = ____cachedClasses.game
12
12
  local ____collectibleSet = require("functions.collectibleSet")
13
13
  local getCollectibleSet = ____collectibleSet.getCollectibleSet
14
- local ____player = require("functions.player")
15
- local anyPlayerHasCollectible = ____player.anyPlayerHasCollectible
16
- local getPlayersOfType = ____player.getPlayersOfType
17
14
  local ____playerDataStructures = require("functions.playerDataStructures")
18
15
  local mapGetPlayer = ____playerDataStructures.mapGetPlayer
19
16
  local mapSetPlayer = ____playerDataStructures.mapSetPlayer
20
17
  local ____playerIndex = require("functions.playerIndex")
21
18
  local getPlayers = ____playerIndex.getPlayers
19
+ local ____players = require("functions.players")
20
+ local anyPlayerHasCollectible = ____players.anyPlayerHasCollectible
21
+ local getPlayersOfType = ____players.getPlayersOfType
22
22
  local ____utils = require("functions.utils")
23
23
  local ____repeat = ____utils["repeat"]
24
24
  local COLLECTIBLES_THAT_AFFECT_ITEM_POOLS = {CollectibleType.CHAOS, CollectibleType.SACRED_ORB, CollectibleType.TMTRAINER}
@@ -13,10 +13,10 @@ local ____collectibles = require("functions.collectibles")
13
13
  local setCollectibleEmpty = ____collectibles.setCollectibleEmpty
14
14
  local ____collectibleTag = require("functions.collectibleTag")
15
15
  local isQuestCollectible = ____collectibleTag.isQuestCollectible
16
- local ____entitySpecific = require("functions.entitySpecific")
17
- local spawnPickupWithSeed = ____entitySpecific.spawnPickupWithSeed
18
- local ____player = require("functions.player")
19
- local anyPlayerIs = ____player.anyPlayerIs
16
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
17
+ local spawnPickupWithSeed = ____entitiesSpecific.spawnPickupWithSeed
18
+ local ____players = require("functions.players")
19
+ local anyPlayerIs = ____players.anyPlayerIs
20
20
  local ____rng = require("functions.rng")
21
21
  local getRandomSeed = ____rng.getRandomSeed
22
22
  local isRNG = ____rng.isRNG
@@ -36,4 +36,4 @@ export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: stri
36
36
  export declare function spriteEquals(sprite1: Sprite, sprite2: Sprite, layerID: int, xStart: int, xFinish: int, xIncrement: int, yStart: int, yFinish: int, yIncrement: int): boolean;
37
37
  /** Helper function to check if two texels on a sprite are equivalent to each other. */
38
38
  export declare function texelEquals(sprite1: Sprite, sprite2: Sprite, position: Vector, layerID: int): boolean;
39
- //# sourceMappingURL=sprite.d.ts.map
39
+ //# sourceMappingURL=sprites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sprites.d.ts","sourceRoot":"","sources":["../../src/functions/sprites.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,CAWpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,GAAG,CAmBL;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,GAAG,EACZ,UAAU,EAAE,GAAG,EACf,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,GAAG,EACZ,UAAU,EAAE,GAAG,GACd,OAAO,CAaT;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,GAAG,GACX,OAAO,CAIT"}
File without changes
@@ -34,7 +34,7 @@ export declare function getStringsFromTable(luaTable: LuaTable<string, unknown>,
34
34
  * This function will sort the table entries based on the value of the key.
35
35
  *
36
36
  * This function will only work on tables that have number keys or string keys. It will throw a
37
- * runtime error if it encounters a key of another type.
37
+ * run-time error if it encounters a key of another type.
38
38
  *
39
39
  * @param luaTable The table to iterate over.
40
40
  * @param func The function to run for each iteration.
@@ -96,7 +96,7 @@ end
96
96
  -- This function will sort the table entries based on the value of the key.
97
97
  --
98
98
  -- This function will only work on tables that have number keys or string keys. It will throw a
99
- -- runtime error if it encounters a key of another type.
99
+ -- run-time error if it encounters a key of another type.
100
100
  --
101
101
  -- @param luaTable The table to iterate over.
102
102
  -- @param func The function to run for each iteration.
@@ -18,8 +18,8 @@ local ____enums = require("functions.enums")
18
18
  local getEnumValues = ____enums.getEnumValues
19
19
  local ____flag = require("functions.flag")
20
20
  local hasFlag = ____flag.hasFlag
21
- local ____player = require("functions.player")
22
- local getPlayerCollectibleCount = ____player.getPlayerCollectibleCount
21
+ local ____players = require("functions.players")
22
+ local getPlayerCollectibleCount = ____players.getPlayerCollectibleCount
23
23
  local TRANSFORMATION_TO_TAG_MAP = __TS__New(Map, {
24
24
  {PlayerForm.GUPPY, ItemConfigTag.GUPPY},
25
25
  {PlayerForm.BEELZEBUB, ItemConfigTag.FLY},
@@ -3,8 +3,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
3
3
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
4
4
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
5
5
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
6
- local ____player = require("functions.player")
7
- local useActiveItemTemp = ____player.useActiveItemTemp
6
+ local ____players = require("functions.players")
7
+ local useActiveItemTemp = ____players.useActiveItemTemp
8
8
  local ____trinkets = require("functions.trinkets")
9
9
  local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
10
10
  local ____utils = require("functions.utils")
@@ -16,16 +16,16 @@ local TRINKET_DESCRIPTION_MAP = ____trinketDescriptionMap.TRINKET_DESCRIPTION_MA
16
16
  local ____trinketNameMap = require("maps.trinketNameMap")
17
17
  local DEFAULT_TRINKET_NAME = ____trinketNameMap.DEFAULT_TRINKET_NAME
18
18
  local TRINKET_NAME_MAP = ____trinketNameMap.TRINKET_NAME_MAP
19
- local ____entity = require("functions.entity")
20
- local getEntityID = ____entity.getEntityID
19
+ local ____entities = require("functions.entities")
20
+ local getEntityID = ____entities.getEntityID
21
21
  local ____flag = require("functions.flag")
22
22
  local hasFlag = ____flag.hasFlag
23
23
  local ____pickupVariants = require("functions.pickupVariants")
24
24
  local isTrinket = ____pickupVariants.isTrinket
25
- local ____player = require("functions.player")
26
- local isCharacter = ____player.isCharacter
27
- local ____sprite = require("functions.sprite")
28
- local clearSprite = ____sprite.clearSprite
25
+ local ____players = require("functions.players")
26
+ local isCharacter = ____players.isCharacter
27
+ local ____sprites = require("functions.sprites")
28
+ local clearSprite = ____sprites.clearSprite
29
29
  local ____utils = require("functions.utils")
30
30
  local irange = ____utils.irange
31
31
  --- Add this to a `TrinketType` to get the corresponding golden trinket type.
@@ -1,5 +1,6 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
+ /// <reference types="isaac-typescript-definitions" />
3
4
  /**
4
5
  * Helper function to return an array with the elements from start to end. It is inclusive at the
5
6
  * start and exclusive at the end. (The "e" stands for exclusive.)
@@ -20,6 +21,12 @@ export declare function getTraversalDescription(key: unknown, traversalDescripti
20
21
  *
21
22
  * @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
22
23
  */
24
+ export declare function hexToColor(hexString: string, alpha: float): Color;
25
+ /**
26
+ * Converts a hex string like "#33aa33" to a Color object.
27
+ *
28
+ * @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
29
+ */
23
30
  export declare function hexToKColor(hexString: string, alpha: float): KColor;
24
31
  /**
25
32
  * Helper function to return an array with the elements from start to end, inclusive. (The "i"
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/functions/utils.ts"],"names":[],"mappings":";;AAMA;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAYnD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAQR;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CA2BnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAYnD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAGxE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AAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAGxE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAI3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAAG;AAE/B;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAYhE"}
@@ -1,14 +1,37 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__StringReplace = ____lualib.__TS__StringReplace
3
- local __TS__StringSubstr = ____lualib.__TS__StringSubstr
3
+ local __TS__StringSubstring = ____lualib.__TS__StringSubstring
4
4
  local ____exports = {}
5
+ local hexToRGB, HEX_STRING_LENGTH
5
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
7
  local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
7
8
  local ____cachedClasses = require("cachedClasses")
8
9
  local game = ____cachedClasses.game
9
10
  local ____consoleCommandsSet = require("sets.consoleCommandsSet")
10
11
  local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
11
- local HEX_STRING_LENGTH = 6
12
+ function hexToRGB(self, hexString)
13
+ hexString = __TS__StringReplace(hexString, "#", "")
14
+ if #hexString ~= HEX_STRING_LENGTH then
15
+ error("Hex strings must be of length: " .. tostring(HEX_STRING_LENGTH))
16
+ end
17
+ local rString = __TS__StringSubstring(hexString, 0, 2)
18
+ local r = tonumber("0x" .. rString)
19
+ if r == nil then
20
+ error(("Failed to convert `0x" .. rString) .. "` to a number.")
21
+ end
22
+ local gString = __TS__StringSubstring(hexString, 2, 2)
23
+ local g = tonumber("0x" .. gString)
24
+ if g == nil then
25
+ error(("Failed to convert `0x" .. gString) .. "` to a number.")
26
+ end
27
+ local bString = __TS__StringSubstring(hexString, 4, 2)
28
+ local b = tonumber("0x" .. bString)
29
+ if b == nil then
30
+ error(("Failed to convert `0x" .. bString) .. "` to a number.")
31
+ end
32
+ return {r, g, b}
33
+ end
34
+ HEX_STRING_LENGTH = 6
12
35
  --- Helper function to return an array with the elements from start to end. It is inclusive at the
13
36
  -- start and exclusive at the end. (The "e" stands for exclusive.)
14
37
  --
@@ -43,28 +66,18 @@ end
43
66
  --- Converts a hex string like "#33aa33" to a KColor object.
44
67
  --
45
68
  -- @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
69
+ function ____exports.hexToColor(self, hexString, alpha)
70
+ local r, g, b = table.unpack(hexToRGB(nil, hexString))
71
+ local base = 255
72
+ return Color(r / base, g / base, b / base, alpha)
73
+ end
74
+ --- Converts a hex string like "#33aa33" to a Color object.
75
+ --
76
+ -- @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
46
77
  function ____exports.hexToKColor(self, hexString, alpha)
47
- hexString = __TS__StringReplace(hexString, "#", "")
48
- if #hexString ~= HEX_STRING_LENGTH then
49
- error(("Hex strings must be of length " .. tostring(HEX_STRING_LENGTH)) .. ".")
50
- end
51
- local rString = __TS__StringSubstr(hexString, 0, 2)
52
- local R = tonumber("0x" .. rString)
53
- if R == nil then
54
- error(("Failed to convert `0x" .. rString) .. "` to a number.")
55
- end
56
- local gString = __TS__StringSubstr(hexString, 2, 2)
57
- local G = tonumber("0x" .. gString)
58
- if G == nil then
59
- error(("Failed to convert `0x" .. gString) .. "` to a number.")
60
- end
61
- local bString = __TS__StringSubstr(hexString, 4, 2)
62
- local B = tonumber("0x" .. bString)
63
- if B == nil then
64
- error(("Failed to convert `0x" .. bString) .. "` to a number.")
65
- end
78
+ local r, g, b = table.unpack(hexToRGB(nil, hexString))
66
79
  local base = 255
67
- return KColor(R / base, G / base, B / base, alpha)
80
+ return KColor(r / base, g / base, b / base, alpha)
68
81
  end
69
82
  --- Helper function to return an array with the elements from start to end, inclusive. (The "i"
70
83
  -- stands for inclusive.)
package/dist/index.d.ts CHANGED
@@ -38,7 +38,7 @@ export * from "./functions/array";
38
38
  export * from "./functions/benchmark";
39
39
  export * from "./functions/bitwise";
40
40
  export * from "./functions/bombs";
41
- export * from "./functions/boss";
41
+ export * from "./functions/bosses";
42
42
  export * from "./functions/cacheFlag";
43
43
  export * from "./functions/cards";
44
44
  export * from "./functions/challenges";
@@ -58,16 +58,16 @@ export * from "./functions/doors";
58
58
  export * from "./functions/easing";
59
59
  export * from "./functions/eden";
60
60
  export * from "./functions/effects";
61
- export * from "./functions/entity";
62
- export * from "./functions/entitySpecific";
61
+ export * from "./functions/entities";
62
+ export * from "./functions/entitiesSpecific";
63
63
  export * from "./functions/entityTypes";
64
64
  export * from "./functions/enums";
65
65
  export * from "./functions/familiars";
66
66
  export * from "./functions/flag";
67
67
  export * from "./functions/flying";
68
68
  export * from "./functions/globals";
69
- export * from "./functions/gridEntity";
70
- export * from "./functions/gridEntitySpecific";
69
+ export * from "./functions/gridEntities";
70
+ export * from "./functions/gridEntitiesSpecific";
71
71
  export * from "./functions/input";
72
72
  export * from "./functions/isaacAPIClass";
73
73
  export * from "./functions/jsonHelpers";
@@ -81,17 +81,19 @@ export * from "./functions/math";
81
81
  export * from "./functions/mergeTests";
82
82
  export * from "./functions/minimap";
83
83
  export * from "./functions/nextStage";
84
- export * from "./functions/npc";
84
+ export * from "./functions/npcs";
85
85
  export * from "./functions/pickups";
86
+ export * from "./functions/pickupsSpecific";
86
87
  export * from "./functions/pickupVariants";
87
88
  export * from "./functions/pills";
88
- export * from "./functions/player";
89
89
  export * from "./functions/playerCenter";
90
90
  export * from "./functions/playerDataStructures";
91
91
  export * from "./functions/playerHealth";
92
92
  export * from "./functions/playerIndex";
93
+ export * from "./functions/players";
93
94
  export * from "./functions/pocketItems";
94
95
  export * from "./functions/positionVelocity";
96
+ export * from "./functions/pressurePlate";
95
97
  export * from "./functions/random";
96
98
  export * from "./functions/revive";
97
99
  export * from "./functions/rng";
@@ -106,7 +108,7 @@ export * from "./functions/serialization";
106
108
  export * from "./functions/set";
107
109
  export * from "./functions/sound";
108
110
  export * from "./functions/spawnCollectible";
109
- export * from "./functions/sprite";
111
+ export * from "./functions/sprites";
110
112
  export * from "./functions/stage";
111
113
  export * from "./functions/string";
112
114
  export * from "./functions/table";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAChF,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,SAAS,GACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EACL,gBAAgB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;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC"}
package/dist/index.lua CHANGED
@@ -304,7 +304,7 @@ do
304
304
  end
305
305
  end
306
306
  do
307
- local ____export = require("functions.boss")
307
+ local ____export = require("functions.bosses")
308
308
  for ____exportKey, ____exportValue in pairs(____export) do
309
309
  if ____exportKey ~= "default" then
310
310
  ____exports[____exportKey] = ____exportValue
@@ -464,7 +464,7 @@ do
464
464
  end
465
465
  end
466
466
  do
467
- local ____export = require("functions.entity")
467
+ local ____export = require("functions.entities")
468
468
  for ____exportKey, ____exportValue in pairs(____export) do
469
469
  if ____exportKey ~= "default" then
470
470
  ____exports[____exportKey] = ____exportValue
@@ -472,7 +472,7 @@ do
472
472
  end
473
473
  end
474
474
  do
475
- local ____export = require("functions.entitySpecific")
475
+ local ____export = require("functions.entitiesSpecific")
476
476
  for ____exportKey, ____exportValue in pairs(____export) do
477
477
  if ____exportKey ~= "default" then
478
478
  ____exports[____exportKey] = ____exportValue
@@ -528,7 +528,7 @@ do
528
528
  end
529
529
  end
530
530
  do
531
- local ____export = require("functions.gridEntity")
531
+ local ____export = require("functions.gridEntities")
532
532
  for ____exportKey, ____exportValue in pairs(____export) do
533
533
  if ____exportKey ~= "default" then
534
534
  ____exports[____exportKey] = ____exportValue
@@ -536,7 +536,7 @@ do
536
536
  end
537
537
  end
538
538
  do
539
- local ____export = require("functions.gridEntitySpecific")
539
+ local ____export = require("functions.gridEntitiesSpecific")
540
540
  for ____exportKey, ____exportValue in pairs(____export) do
541
541
  if ____exportKey ~= "default" then
542
542
  ____exports[____exportKey] = ____exportValue
@@ -648,7 +648,7 @@ do
648
648
  end
649
649
  end
650
650
  do
651
- local ____export = require("functions.npc")
651
+ local ____export = require("functions.npcs")
652
652
  for ____exportKey, ____exportValue in pairs(____export) do
653
653
  if ____exportKey ~= "default" then
654
654
  ____exports[____exportKey] = ____exportValue
@@ -664,7 +664,7 @@ do
664
664
  end
665
665
  end
666
666
  do
667
- local ____export = require("functions.pickupVariants")
667
+ local ____export = require("functions.pickupsSpecific")
668
668
  for ____exportKey, ____exportValue in pairs(____export) do
669
669
  if ____exportKey ~= "default" then
670
670
  ____exports[____exportKey] = ____exportValue
@@ -672,7 +672,7 @@ do
672
672
  end
673
673
  end
674
674
  do
675
- local ____export = require("functions.pills")
675
+ local ____export = require("functions.pickupVariants")
676
676
  for ____exportKey, ____exportValue in pairs(____export) do
677
677
  if ____exportKey ~= "default" then
678
678
  ____exports[____exportKey] = ____exportValue
@@ -680,7 +680,7 @@ do
680
680
  end
681
681
  end
682
682
  do
683
- local ____export = require("functions.player")
683
+ local ____export = require("functions.pills")
684
684
  for ____exportKey, ____exportValue in pairs(____export) do
685
685
  if ____exportKey ~= "default" then
686
686
  ____exports[____exportKey] = ____exportValue
@@ -719,6 +719,14 @@ do
719
719
  end
720
720
  end
721
721
  end
722
+ do
723
+ local ____export = require("functions.players")
724
+ for ____exportKey, ____exportValue in pairs(____export) do
725
+ if ____exportKey ~= "default" then
726
+ ____exports[____exportKey] = ____exportValue
727
+ end
728
+ end
729
+ end
722
730
  do
723
731
  local ____export = require("functions.pocketItems")
724
732
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -735,6 +743,14 @@ do
735
743
  end
736
744
  end
737
745
  end
746
+ do
747
+ local ____export = require("functions.pressurePlate")
748
+ for ____exportKey, ____exportValue in pairs(____export) do
749
+ if ____exportKey ~= "default" then
750
+ ____exports[____exportKey] = ____exportValue
751
+ end
752
+ end
753
+ end
738
754
  do
739
755
  local ____export = require("functions.random")
740
756
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -848,7 +864,7 @@ do
848
864
  end
849
865
  end
850
866
  do
851
- local ____export = require("functions.sprite")
867
+ local ____export = require("functions.sprites")
852
868
  for ____exportKey, ____exportValue in pairs(____export) do
853
869
  if ____exportKey ~= "default" then
854
870
  ____exports[____exportKey] = ____exportValue
@@ -0,0 +1,10 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /// <reference types="isaac-typescript-definitions" />
3
+ /// <reference types="isaac-typescript-definitions" />
4
+ /// <reference types="isaac-typescript-definitions" />
5
+ /// <reference types="isaac-typescript-definitions" />
6
+ /// <reference types="isaac-typescript-definitions" />
7
+ /// <reference types="isaac-typescript-definitions" />
8
+ /// <reference types="isaac-typescript-definitions" />
9
+ export declare type AnyGridEntity = GridEntity | GridEntityDoor | GridEntityPit | GridEntityPoop | GridEntityPressurePlate | GridEntityRock | GridEntitySpikes | GridEntityTNT;
10
+ //# sourceMappingURL=AnyGridEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnyGridEntity.d.ts","sourceRoot":"","sources":["../../src/types/AnyGridEntity.ts"],"names":[],"mappings":";;;;;;;;AAAA,oBAAY,aAAa,GACrB,UAAU,GACV,cAAc,GACd,aAAa,GACb,cAAc,GACd,uBAAuB,GACvB,cAAc,GACd,gBAAgB,GAChB,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ local ____exports = {}
2
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "6.6.3",
3
+ "version": "6.7.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "dist/index",
23
23
  "types": "dist/index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^3.0.27"
25
+ "isaac-typescript-definitions": "^3.0.30"
26
26
  }
27
27
  }
@@ -15,10 +15,10 @@ import { ModCallbackCustom } from "../enums/ModCallbackCustom";
15
15
  import { runNextGameFrame } from "../features/runInNFrames";
16
16
  import { saveDataManager } from "../features/saveDataManager/exports";
17
17
  import { removeCollectibleFromItemTracker } from "../functions/collectibles";
18
- import { removeAllFamiliars } from "../functions/entitySpecific";
18
+ import { removeAllFamiliars } from "../functions/entitiesSpecific";
19
19
  import { log, logError } from "../functions/log";
20
- import { isCharacter } from "../functions/player";
21
20
  import { getPlayerFromIndex, getPlayerIndex } from "../functions/playerIndex";
21
+ import { isCharacter } from "../functions/players";
22
22
  import { PlayerIndex } from "../types/PlayerIndex";
23
23
  import {
24
24
  postCustomReviveFire,
@@ -10,8 +10,8 @@ import {
10
10
  import { game } from "../cachedClasses";
11
11
  import { saveDataManager } from "../features/saveDataManager/exports";
12
12
  import { hasFlag } from "../functions/flag";
13
- import { getPlayerNumHitsRemaining } from "../functions/player";
14
13
  import { mapGetPlayer, mapSetPlayer } from "../functions/playerDataStructures";
14
+ import { getPlayerNumHitsRemaining } from "../functions/players";
15
15
  import { PlayerIndex } from "../types/PlayerIndex";
16
16
  import {
17
17
  postCursedTeleportFire,
@@ -119,7 +119,7 @@ function incrementNumSacrifices(damageFlags: BitFlags<DamageFlag>) {
119
119
  const isSpikeDamage = hasFlag(damageFlags, DamageFlag.SPIKES);
120
120
 
121
121
  if (roomType === RoomType.SACRIFICE && isSpikeDamage) {
122
- v.level.numSacrifices += 1;
122
+ v.level.numSacrifices++;
123
123
  }
124
124
  }
125
125
 
@@ -13,8 +13,8 @@ import { ModCallbackCustom } from "../enums/ModCallbackCustom";
13
13
  import { saveDataManager } from "../features/saveDataManager/exports";
14
14
  import { directionToVector } from "../functions/direction";
15
15
  import { doorSlotToDirection } from "../functions/doors";
16
- import { getEffects, spawnEffect } from "../functions/entitySpecific";
17
- import { getClosestPlayer } from "../functions/player";
16
+ import { getEffects, spawnEffect } from "../functions/entitiesSpecific";
17
+ import { getClosestPlayer } from "../functions/players";
18
18
  import {
19
19
  postCustomDoorEnterFire,
20
20
  postCustomDoorEnterHasSubscriptions,
@@ -219,7 +219,7 @@ function postRoomClearChanged(
219
219
  * The custom door is an `EntityEffect`. You can manually open or close the door by modifying its
220
220
  * state. (The values to use correspond to the `DoorState` enum.)
221
221
  *
222
- * This function will throw a runtime error if:
222
+ * This function will throw a run-time error if:
223
223
  * - the door slot already has a vanilla door
224
224
  * - the door slot already has a custom door
225
225
  * - the tile at the door slot does not have a wall
@@ -5,7 +5,7 @@ import {
5
5
  } from "isaac-typescript-definitions";
6
6
  import { saveDataManager } from "../features/saveDataManager/exports";
7
7
  import { isCloseEnoughToTriggerDiceFloor } from "../functions/effects";
8
- import { getClosestPlayer } from "../functions/player";
8
+ import { getClosestPlayer } from "../functions/players";
9
9
  import {
10
10
  postDiceRoomActivatedFire,
11
11
  postDiceRoomActivatedHasSubscriptions,
@@ -9,7 +9,7 @@ import {
9
9
  UseFlag,
10
10
  } from "isaac-typescript-definitions";
11
11
  import { saveDataManager } from "../features/saveDataManager/exports";
12
- import { getPlayersOfType, isTaintedLazarus } from "../functions/player";
12
+ import { getPlayersOfType, isTaintedLazarus } from "../functions/players";
13
13
  import {
14
14
  postFirstFlipFire,
15
15
  postFirstFlipHasSubscriptions,
@@ -12,7 +12,7 @@ import { saveDataManager } from "../features/saveDataManager/exports";
12
12
  import {
13
13
  getGridEntitiesMap,
14
14
  isGridEntityBroken,
15
- } from "../functions/gridEntity";
15
+ } from "../functions/gridEntities";
16
16
  import {
17
17
  postGridEntityBrokenFire,
18
18
  postGridEntityBrokenHasSubscriptions,
@@ -4,7 +4,7 @@ import { saveDataManager } from "../features/saveDataManager/exports";
4
4
  import {
5
5
  getCollidingEntitiesWithGridEntity,
6
6
  getGridEntities,
7
- } from "../functions/gridEntity";
7
+ } from "../functions/gridEntities";
8
8
  import {
9
9
  postGridEntityCollisionFire,
10
10
  postGridEntityCollisionHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getGridEntities } from "../functions/gridEntity";
2
+ import { getGridEntities } from "../functions/gridEntities";
3
3
  import {
4
4
  postGridEntityRenderFire,
5
5
  postGridEntityRenderHasSubscriptions,
@@ -4,7 +4,10 @@ import {
4
4
  ModCallback,
5
5
  } from "isaac-typescript-definitions";
6
6
  import { game } from "../cachedClasses";
7
- import { getTopLeftWallGridIndex, spawnGrid } from "../functions/gridEntity";
7
+ import {
8
+ getTopLeftWallGridIndex,
9
+ spawnGridEntity,
10
+ } from "../functions/gridEntities";
8
11
  import { logError } from "../functions/log";
9
12
  import {
10
13
  postNewRoomEarlyFire,
@@ -61,7 +64,7 @@ function checkRoomChanged() {
61
64
  // spawned, which means that the top-left wall will not exist. If ths is the case, then simply
62
65
  // spawn the top-left wall early.
63
66
  if (topLeftWall === undefined) {
64
- topLeftWall = spawnGrid(GridEntityType.WALL, topLeftWallGridIndex);
67
+ topLeftWall = spawnGridEntity(GridEntityType.WALL, topLeftWallGridIndex);
65
68
  if (topLeftWall === undefined) {
66
69
  logError(
67
70
  "Failed to spawn a new wall (1) for the PostNewRoomEarly callback.",
@@ -73,7 +76,10 @@ function checkRoomChanged() {
73
76
  // For some reason, the above check will rarely fail. We duplicate the check with another wall
74
77
  // segment to go from 99% to 100% reliability.
75
78
  if (topLeftWall2 === undefined) {
76
- topLeftWall2 = spawnGrid(GridEntityType.WALL, rightOfTopWallGridIndex);
79
+ topLeftWall2 = spawnGridEntity(
80
+ GridEntityType.WALL,
81
+ rightOfTopWallGridIndex,
82
+ );
77
83
  if (topLeftWall2 === undefined) {
78
84
  logError(
79
85
  "Failed to spawn a new wall (2) for the PostNewRoomEarly callback.",