isaacscript-common 6.6.4 → 6.7.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 (250) 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/sirenHelpers.lua +2 -2
  81. package/dist/functions/ambush.lua +5 -5
  82. package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
  83. package/dist/functions/bosses.d.ts.map +1 -0
  84. package/dist/functions/{boss.lua → bosses.lua} +38 -13
  85. package/dist/functions/collectibleTag.lua +2 -2
  86. package/dist/functions/collectibles.lua +5 -5
  87. package/dist/functions/deepCopy.d.ts +8 -5
  88. package/dist/functions/deepCopy.d.ts.map +1 -1
  89. package/dist/functions/deepCopy.lua +142 -38
  90. package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
  91. package/dist/functions/entities.d.ts.map +1 -0
  92. package/dist/functions/{entity.lua → entities.lua} +25 -20
  93. package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
  94. package/dist/functions/entitiesSpecific.d.ts.map +1 -0
  95. package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
  96. package/dist/functions/familiars.lua +2 -2
  97. package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
  98. package/dist/functions/gridEntities.d.ts.map +1 -0
  99. package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
  100. package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
  101. package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
  102. package/dist/functions/gridEntitiesSpecific.lua +366 -0
  103. package/dist/functions/log.d.ts +1 -1
  104. package/dist/functions/log.lua +9 -9
  105. package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
  106. package/dist/functions/npcs.d.ts.map +1 -0
  107. package/dist/functions/{npc.lua → npcs.lua} +44 -9
  108. package/dist/functions/pickups.d.ts +4 -119
  109. package/dist/functions/pickups.d.ts.map +1 -1
  110. package/dist/functions/pickups.lua +10 -439
  111. package/dist/functions/pickupsSpecific.d.ts +229 -0
  112. package/dist/functions/pickupsSpecific.d.ts.map +1 -0
  113. package/dist/functions/pickupsSpecific.lua +560 -0
  114. package/dist/functions/playerHealth.lua +6 -6
  115. package/dist/functions/{player.d.ts → players.d.ts} +1 -1
  116. package/dist/functions/players.d.ts.map +1 -0
  117. package/dist/functions/{player.lua → players.lua} +0 -0
  118. package/dist/functions/pocketItems.lua +2 -2
  119. package/dist/functions/positionVelocity.lua +6 -6
  120. package/dist/functions/pressurePlate.d.ts +10 -0
  121. package/dist/functions/pressurePlate.d.ts.map +1 -0
  122. package/dist/functions/pressurePlate.lua +29 -0
  123. package/dist/functions/revive.lua +7 -7
  124. package/dist/functions/rooms.lua +2 -2
  125. package/dist/functions/saveFile.lua +3 -3
  126. package/dist/functions/spawnCollectible.lua +4 -4
  127. package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
  128. package/dist/functions/sprites.d.ts.map +1 -0
  129. package/dist/functions/{sprite.lua → sprites.lua} +0 -0
  130. package/dist/functions/table.d.ts +1 -1
  131. package/dist/functions/table.lua +1 -1
  132. package/dist/functions/transformations.lua +2 -2
  133. package/dist/functions/trinketGive.lua +2 -2
  134. package/dist/functions/trinkets.lua +6 -6
  135. package/dist/functions/utils.d.ts +7 -0
  136. package/dist/functions/utils.d.ts.map +1 -1
  137. package/dist/functions/utils.lua +35 -22
  138. package/dist/index.d.ts +10 -8
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.lua +26 -10
  141. package/dist/types/AnyGridEntity.d.ts +10 -0
  142. package/dist/types/AnyGridEntity.d.ts.map +1 -0
  143. package/dist/types/AnyGridEntity.lua +2 -0
  144. package/package.json +2 -2
  145. package/src/callbacks/customRevive.ts +2 -2
  146. package/src/callbacks/postCursedTeleport.ts +2 -2
  147. package/src/callbacks/postCustomDoorEnter.ts +3 -3
  148. package/src/callbacks/postDiceRoomActivated.ts +1 -1
  149. package/src/callbacks/postFlip.ts +1 -1
  150. package/src/callbacks/postGridEntity.ts +1 -1
  151. package/src/callbacks/postGridEntityCollision.ts +1 -1
  152. package/src/callbacks/postGridEntityRender.ts +1 -1
  153. package/src/callbacks/postNewRoomEarly.ts +9 -3
  154. package/src/callbacks/postPickupCollect.ts +1 -1
  155. package/src/callbacks/postPitRender.ts +1 -1
  156. package/src/callbacks/postPitUpdate.ts +1 -1
  157. package/src/callbacks/postPlayerCollectible.ts +2 -2
  158. package/src/callbacks/postPoopRender.ts +1 -1
  159. package/src/callbacks/postPoopUpdate.ts +1 -1
  160. package/src/callbacks/postPressurePlateRender.ts +1 -1
  161. package/src/callbacks/postPressurePlateUpdate.ts +1 -1
  162. package/src/callbacks/postPurchase.ts +1 -1
  163. package/src/callbacks/postRockRender.ts +1 -1
  164. package/src/callbacks/postRockUpdate.ts +1 -1
  165. package/src/callbacks/postSacrifice.ts +1 -1
  166. package/src/callbacks/postSlotInitUpdate.ts +1 -1
  167. package/src/callbacks/postSlotRender.ts +1 -1
  168. package/src/callbacks/postSpikesRender.ts +1 -1
  169. package/src/callbacks/postSpikesUpdate.ts +1 -1
  170. package/src/callbacks/postTNTRender.ts +1 -1
  171. package/src/callbacks/postTNTUpdate.ts +1 -1
  172. package/src/callbacks/preBerserkDeath.ts +1 -1
  173. package/src/callbacks/preNewLevel.ts +1 -1
  174. package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
  175. package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
  176. package/src/callbacks/subscriptions/postPitRender.ts +6 -7
  177. package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
  178. package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
  179. package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
  180. package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
  181. package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
  182. package/src/enums/private/SerializationBrand.ts +0 -4
  183. package/src/features/characterStats.ts +1 -1
  184. package/src/features/collectibleItemPoolType.ts +1 -1
  185. package/src/features/customGridEntity.ts +6 -3
  186. package/src/features/customStage/backdrop.ts +1 -1
  187. package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
  188. package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
  189. package/src/features/customStage/exports.ts +2 -2
  190. package/src/features/customStage/init.ts +1 -1
  191. package/src/features/customStage/shadows.ts +1 -1
  192. package/src/features/customStage/versusScreen.ts +2 -2
  193. package/src/features/debugDisplay/v.ts +2 -2
  194. package/src/features/deployJSONRoom.ts +11 -7
  195. package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
  196. package/src/features/extraConsoleCommands/listCommands.ts +13 -9
  197. package/src/features/pause.ts +1 -1
  198. package/src/features/persistentEntities.ts +2 -2
  199. package/src/features/preventCollectibleRotation.ts +1 -1
  200. package/src/features/saveDataManager/exports.ts +7 -4
  201. package/src/features/sirenHelpers.ts +1 -1
  202. package/src/functions/ambush.ts +2 -2
  203. package/src/functions/array.ts +1 -1
  204. package/src/functions/bitwise.ts +2 -2
  205. package/src/functions/{boss.ts → bosses.ts} +29 -21
  206. package/src/functions/collectibleTag.ts +1 -1
  207. package/src/functions/collectibles.ts +2 -2
  208. package/src/functions/deepCopy.ts +98 -19
  209. package/src/functions/deepCopyTests.ts +6 -4
  210. package/src/functions/{entity.ts → entities.ts} +23 -21
  211. package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
  212. package/src/functions/familiars.ts +1 -1
  213. package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
  214. package/src/functions/gridEntitiesSpecific.ts +490 -0
  215. package/src/functions/log.ts +6 -6
  216. package/src/functions/{npc.ts → npcs.ts} +42 -11
  217. package/src/functions/pickups.ts +8 -475
  218. package/src/functions/pickupsSpecific.ts +613 -0
  219. package/src/functions/playerHealth.ts +1 -1
  220. package/src/functions/{player.ts → players.ts} +0 -0
  221. package/src/functions/pocketItems.ts +1 -1
  222. package/src/functions/positionVelocity.ts +3 -3
  223. package/src/functions/pressurePlate.ts +29 -0
  224. package/src/functions/revive.ts +2 -2
  225. package/src/functions/rooms.ts +1 -1
  226. package/src/functions/saveFile.ts +1 -1
  227. package/src/functions/spawnCollectible.ts +2 -2
  228. package/src/functions/{sprite.ts → sprites.ts} +0 -0
  229. package/src/functions/table.ts +1 -1
  230. package/src/functions/transformations.ts +1 -1
  231. package/src/functions/trinketGive.ts +4 -4
  232. package/src/functions/trinkets.ts +3 -3
  233. package/src/functions/tstlClass.ts +1 -1
  234. package/src/functions/ui.ts +3 -3
  235. package/src/functions/utils.ts +32 -13
  236. package/src/index.ts +10 -8
  237. package/src/types/AnyGridEntity.ts +9 -0
  238. package/dist/features/customStage/gridEntities.d.ts.map +0 -1
  239. package/dist/features/customStage/util.d.ts.map +0 -1
  240. package/dist/functions/boss.d.ts.map +0 -1
  241. package/dist/functions/entity.d.ts.map +0 -1
  242. package/dist/functions/entitySpecific.d.ts.map +0 -1
  243. package/dist/functions/gridEntity.d.ts.map +0 -1
  244. package/dist/functions/gridEntitySpecific.d.ts +0 -29
  245. package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
  246. package/dist/functions/gridEntitySpecific.lua +0 -114
  247. package/dist/functions/npc.d.ts.map +0 -1
  248. package/dist/functions/player.d.ts.map +0 -1
  249. package/dist/functions/sprite.d.ts.map +0 -1
  250. package/src/functions/gridEntitySpecific.ts +0 -143
@@ -3,7 +3,7 @@
3
3
 
4
4
  import { ModCallback } from "isaac-typescript-definitions";
5
5
  import { saveDataManager } from "../features/saveDataManager/exports";
6
- import { getClosestPlayer } from "../functions/player";
6
+ import { getClosestPlayer } from "../functions/players";
7
7
  import {
8
8
  postPickupCollectFire,
9
9
  postPickupCollectHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getPits } from "../functions/gridEntitySpecific";
2
+ import { getPits } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postPitRenderFire,
5
5
  postPitRenderHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getPits } from "../functions/gridEntitySpecific";
2
+ import { getPits } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postPitUpdateFire,
5
5
  postPitUpdateHasSubscriptions,
@@ -5,12 +5,12 @@
5
5
  import { CollectibleType, ModCallback } from "isaac-typescript-definitions";
6
6
  import { DefaultMap } from "../classes/DefaultMap";
7
7
  import { saveDataManager } from "../features/saveDataManager/exports";
8
- import { getPlayerCollectibleMap } from "../functions/player";
9
8
  import {
10
9
  defaultMapGetPlayer,
11
10
  mapGetPlayer,
12
11
  mapSetPlayer,
13
12
  } from "../functions/playerDataStructures";
13
+ import { getPlayerCollectibleMap } from "../functions/players";
14
14
  import { repeat } from "../functions/utils";
15
15
  import { PlayerIndex } from "../types/PlayerIndex";
16
16
  import {
@@ -102,7 +102,7 @@ function collectibleCountChanged(
102
102
  } else {
103
103
  postPlayerCollectibleRemovedFire(player, collectibleType);
104
104
  }
105
- numFired += 1;
105
+ numFired++;
106
106
  });
107
107
 
108
108
  if (numFired === numCollectiblesChanged) {
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getPoops } from "../functions/gridEntitySpecific";
2
+ import { getPoops } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postPoopRenderFire,
5
5
  postPoopRenderHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getPoops } from "../functions/gridEntitySpecific";
2
+ import { getPoops } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postPoopUpdateFire,
5
5
  postPoopUpdateHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getPressurePlates } from "../functions/gridEntitySpecific";
2
+ import { getPressurePlates } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postPressurePlateRenderFire,
5
5
  postPressurePlateRenderHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getPressurePlates } from "../functions/gridEntitySpecific";
2
+ import { getPressurePlates } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postPressurePlateUpdateFire,
5
5
  postPressurePlateUpdateHasSubscriptions,
@@ -2,7 +2,7 @@ import { DefaultMap } from "../classes/DefaultMap";
2
2
  import { ModUpgraded } from "../classes/ModUpgraded";
3
3
  import { ModCallbackCustom } from "../enums/ModCallbackCustom";
4
4
  import { saveDataManager } from "../features/saveDataManager/exports";
5
- import { getPickups } from "../functions/entitySpecific";
5
+ import { getPickups } from "../functions/entitiesSpecific";
6
6
  import {
7
7
  defaultMapGetPlayer,
8
8
  mapSetPlayer,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getRocks } from "../functions/gridEntitySpecific";
2
+ import { getRocks } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postRockRenderFire,
5
5
  postRockRenderHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getRocks } from "../functions/gridEntitySpecific";
2
+ import { getRocks } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postRockUpdateFire,
5
5
  postRockUpdateHasSubscriptions,
@@ -56,7 +56,7 @@ function entityTakeDmgPlayer(
56
56
  const isSpikeDamage = hasFlag(damageFlags, DamageFlag.SPIKES);
57
57
 
58
58
  if (roomType === RoomType.SACRIFICE && isSpikeDamage) {
59
- v.level.numSacrifices += 1;
59
+ v.level.numSacrifices++;
60
60
  postSacrificeFire(player, v.level.numSacrifices);
61
61
  }
62
62
 
@@ -5,7 +5,7 @@ import { ModCallback } from "isaac-typescript-definitions";
5
5
  import { ModUpgraded } from "../classes/ModUpgraded";
6
6
  import { ModCallbackCustom } from "../enums/ModCallbackCustom";
7
7
  import { saveDataManager } from "../features/saveDataManager/exports";
8
- import { getSlots } from "../functions/entitySpecific";
8
+ import { getSlots } from "../functions/entitiesSpecific";
9
9
  import {
10
10
  postSlotInitFire,
11
11
  postSlotInitHasSubscriptions,
@@ -5,7 +5,7 @@
5
5
  import { ModCallback } from "isaac-typescript-definitions";
6
6
  import { DefaultMap } from "../classes/DefaultMap";
7
7
  import { saveDataManager } from "../features/saveDataManager/exports";
8
- import { getSlots } from "../functions/entitySpecific";
8
+ import { getSlots } from "../functions/entitiesSpecific";
9
9
  import {
10
10
  postSlotAnimationChangedFire,
11
11
  postSlotAnimationChangedHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getSpikes } from "../functions/gridEntitySpecific";
2
+ import { getSpikes } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postSpikesRenderFire,
5
5
  postSpikesRenderHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getSpikes } from "../functions/gridEntitySpecific";
2
+ import { getSpikes } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postSpikesUpdateFire,
5
5
  postSpikesUpdateHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getTNT } from "../functions/gridEntitySpecific";
2
+ import { getTNT } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postTNTRenderFire,
5
5
  postTNTRenderHasSubscriptions,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getTNT } from "../functions/gridEntitySpecific";
2
+ import { getTNT } from "../functions/gridEntitiesSpecific";
3
3
  import {
4
4
  postTNTUpdateFire,
5
5
  postTNTUpdateHasSubscriptions,
@@ -1,8 +1,8 @@
1
1
  import { CollectibleType } from "isaac-typescript-definitions";
2
2
  import { ModUpgraded } from "../classes/ModUpgraded";
3
3
  import { ModCallbackCustom } from "../enums/ModCallbackCustom";
4
- import { getPlayerNumHitsRemaining } from "../functions/player";
5
4
  import { isChildPlayer } from "../functions/playerIndex";
5
+ import { getPlayerNumHitsRemaining } from "../functions/players";
6
6
  import { willPlayerRevive } from "../functions/revive";
7
7
  import {
8
8
  preBerserkDeathFire,
@@ -1,5 +1,5 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
- import { getLastFrameOfAnimation } from "../functions/sprite";
2
+ import { getLastFrameOfAnimation } from "../functions/sprites";
3
3
  import { getEffectiveStage } from "../functions/stage";
4
4
  import {
5
5
  preNewLevelFire,
@@ -1,6 +1,8 @@
1
+ import { DoorVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostDoorRenderRegisterParameters = [
2
4
  callback: (door: GridEntityDoor) => void,
3
- gridEntityVariant?: int,
5
+ doorVariant?: DoorVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostDoorRenderRegisterParameters[] = [];
@@ -19,13 +21,13 @@ export function postDoorRenderRegister(
19
21
 
20
22
  /** @internal */
21
23
  export function postDoorRenderFire(door: GridEntityDoor): void {
22
- const gridEntityVariant = door.GetVariant();
24
+ const doorVariant = door.GetVariant();
23
25
 
24
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
26
+ for (const [callback, callbackDoorVariant] of subscriptions) {
25
27
  // Handle the optional 2nd callback argument.
26
28
  if (
27
- callbackGridEntityVariant !== undefined &&
28
- callbackGridEntityVariant !== gridEntityVariant
29
+ callbackDoorVariant !== undefined &&
30
+ callbackDoorVariant !== doorVariant
29
31
  ) {
30
32
  continue;
31
33
  }
@@ -1,6 +1,8 @@
1
+ import { DoorVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostDoorUpdateRegisterParameters = [
2
4
  callback: (door: GridEntityDoor) => void,
3
- gridEntityVariant?: int,
5
+ doorVariant?: DoorVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostDoorUpdateRegisterParameters[] = [];
@@ -19,13 +21,13 @@ export function postDoorUpdateRegister(
19
21
 
20
22
  /** @internal */
21
23
  export function postDoorUpdateFire(door: GridEntityDoor): void {
22
- const gridEntityVariant = door.GetVariant();
24
+ const doorVariant = door.GetVariant();
23
25
 
24
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
26
+ for (const [callback, callbackDoorVariant] of subscriptions) {
25
27
  // Handle the optional 2nd callback argument.
26
28
  if (
27
- callbackGridEntityVariant !== undefined &&
28
- callbackGridEntityVariant !== gridEntityVariant
29
+ callbackDoorVariant !== undefined &&
30
+ callbackDoorVariant !== doorVariant
29
31
  ) {
30
32
  continue;
31
33
  }
@@ -1,6 +1,8 @@
1
+ import { PitVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostPitRenderRegisterParameters = [
2
4
  callback: (pit: GridEntityPit) => void,
3
- gridEntityVariant?: int,
5
+ pitVariant?: PitVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostPitRenderRegisterParameters[] = [];
@@ -19,14 +21,11 @@ export function postPitRenderRegister(
19
21
 
20
22
  /** @internal */
21
23
  export function postPitRenderFire(pit: GridEntityPit): void {
22
- const gridEntityVariant = pit.GetVariant();
24
+ const pitVariant = pit.GetVariant();
23
25
 
24
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
26
+ for (const [callback, callbackPitVariant] of subscriptions) {
25
27
  // Handle the optional 2nd callback argument.
26
- if (
27
- callbackGridEntityVariant !== undefined &&
28
- callbackGridEntityVariant !== gridEntityVariant
29
- ) {
28
+ if (callbackPitVariant !== undefined && callbackPitVariant !== pitVariant) {
30
29
  continue;
31
30
  }
32
31
 
@@ -1,6 +1,8 @@
1
+ import { PitVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostPitUpdateRegisterParameters = [
2
4
  callback: (pit: GridEntityPit) => void,
3
- gridEntityVariant?: int,
5
+ pitVariant?: PitVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostPitUpdateRegisterParameters[] = [];
@@ -19,14 +21,11 @@ export function postPitUpdateRegister(
19
21
 
20
22
  /** @internal */
21
23
  export function postPitUpdateFire(pit: GridEntityPit): void {
22
- const gridEntityVariant = pit.GetVariant();
24
+ const pitVariant = pit.GetVariant();
23
25
 
24
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
26
+ for (const [callback, callbackPitVariant] of subscriptions) {
25
27
  // Handle the optional 2nd callback argument.
26
- if (
27
- callbackGridEntityVariant !== undefined &&
28
- callbackGridEntityVariant !== gridEntityVariant
29
- ) {
28
+ if (callbackPitVariant !== undefined && callbackPitVariant !== pitVariant) {
30
29
  continue;
31
30
  }
32
31
 
@@ -1,6 +1,8 @@
1
+ import { PoopGridEntityVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostPoopRenderRegisterParameters = [
2
4
  callback: (poop: GridEntityPoop) => void,
3
- gridEntityVariant?: int,
5
+ poopVariant?: PoopGridEntityVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostPoopRenderRegisterParameters[] = [];
@@ -19,13 +21,13 @@ export function postPoopRenderRegister(
19
21
 
20
22
  /** @internal */
21
23
  export function postPoopRenderFire(poop: GridEntityPoop): void {
22
- const gridEntityVariant = poop.GetVariant();
24
+ const poopVariant = poop.GetVariant();
23
25
 
24
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
26
+ for (const [callback, callbackPoopVariant] of subscriptions) {
25
27
  // Handle the optional 2nd callback argument.
26
28
  if (
27
- callbackGridEntityVariant !== undefined &&
28
- callbackGridEntityVariant !== gridEntityVariant
29
+ callbackPoopVariant !== undefined &&
30
+ callbackPoopVariant !== poopVariant
29
31
  ) {
30
32
  continue;
31
33
  }
@@ -1,6 +1,8 @@
1
+ import { PoopGridEntityVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostPoopUpdateRegisterParameters = [
2
4
  callback: (poop: GridEntityPoop) => void,
3
- gridEntityVariant?: int,
5
+ poopVariant?: PoopGridEntityVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostPoopUpdateRegisterParameters[] = [];
@@ -19,13 +21,13 @@ export function postPoopUpdateRegister(
19
21
 
20
22
  /** @internal */
21
23
  export function postPoopUpdateFire(poop: GridEntityPoop): void {
22
- const gridEntityVariant = poop.GetVariant();
24
+ const poopVariant = poop.GetVariant();
23
25
 
24
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
26
+ for (const [callback, callbackPoopVariant] of subscriptions) {
25
27
  // Handle the optional 2nd callback argument.
26
28
  if (
27
- callbackGridEntityVariant !== undefined &&
28
- callbackGridEntityVariant !== gridEntityVariant
29
+ callbackPoopVariant !== undefined &&
30
+ callbackPoopVariant !== poopVariant
29
31
  ) {
30
32
  continue;
31
33
  }
@@ -1,6 +1,8 @@
1
+ import { PressurePlateVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostPressurePlateRenderRegisterParameters = [
2
4
  callback: (pressurePlate: GridEntityPressurePlate) => void,
3
- gridEntityVariant?: int,
5
+ pressurePlateVariant?: PressurePlateVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostPressurePlateRenderRegisterParameters[] = [];
@@ -21,13 +23,13 @@ export function postPressurePlateRenderRegister(
21
23
  export function postPressurePlateRenderFire(
22
24
  pressurePlate: GridEntityPressurePlate,
23
25
  ): void {
24
- const gridEntityVariant = pressurePlate.GetVariant();
26
+ const pressurePlateVariant = pressurePlate.GetVariant();
25
27
 
26
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
28
+ for (const [callback, callbackPressurePlateVariant] of subscriptions) {
27
29
  // Handle the optional 2nd callback argument.
28
30
  if (
29
- callbackGridEntityVariant !== undefined &&
30
- callbackGridEntityVariant !== gridEntityVariant
31
+ callbackPressurePlateVariant !== undefined &&
32
+ callbackPressurePlateVariant !== pressurePlateVariant
31
33
  ) {
32
34
  continue;
33
35
  }
@@ -1,6 +1,8 @@
1
+ import { PressurePlateVariant } from "isaac-typescript-definitions";
2
+
1
3
  export type PostPressurePlateUpdateRegisterParameters = [
2
4
  callback: (pressurePlate: GridEntityPressurePlate) => void,
3
- gridEntityVariant?: int,
5
+ pressurePlateVariant?: PressurePlateVariant,
4
6
  ];
5
7
 
6
8
  const subscriptions: PostPressurePlateUpdateRegisterParameters[] = [];
@@ -21,13 +23,13 @@ export function postPressurePlateUpdateRegister(
21
23
  export function postPressurePlateUpdateFire(
22
24
  pressurePlate: GridEntityPressurePlate,
23
25
  ): void {
24
- const gridEntityVariant = pressurePlate.GetVariant();
26
+ const pressurePlateVariant = pressurePlate.GetVariant();
25
27
 
26
- for (const [callback, callbackGridEntityVariant] of subscriptions) {
28
+ for (const [callback, callbackPressurePlateVariant] of subscriptions) {
27
29
  // Handle the optional 2nd callback argument.
28
30
  if (
29
- callbackGridEntityVariant !== undefined &&
30
- callbackGridEntityVariant !== gridEntityVariant
31
+ callbackPressurePlateVariant !== undefined &&
32
+ callbackPressurePlateVariant !== pressurePlateVariant
31
33
  ) {
32
34
  continue;
33
35
  }
@@ -20,10 +20,6 @@ export enum SerializationBrand {
20
20
  /**
21
21
  * This is set to the value that represents the default value (instead of an empty string like the
22
22
  * other brands are).
23
- *
24
- * Default maps that use a factory function are unserializable, but do not throw runtime errors
25
- * because the merge function can derive the factory function from the already-instantiated
26
- * object.
27
23
  */
28
24
  DEFAULT_MAP_VALUE = "__TSTL_DEFAULT_MAP_VALUE",
29
25
 
@@ -11,7 +11,7 @@ import {
11
11
  } from "isaac-typescript-definitions";
12
12
  import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
13
13
  import { getDefaultPlayerStat } from "../functions/cacheFlag";
14
- import { addStat } from "../functions/player";
14
+ import { addStat } from "../functions/players";
15
15
 
16
16
  const FEATURE_NAME = "characterStats";
17
17
 
@@ -9,7 +9,7 @@ import {
9
9
  } from "isaac-typescript-definitions";
10
10
  import { game } from "../cachedClasses";
11
11
  import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
12
- import { getEntityID } from "../functions/entity";
12
+ import { getEntityID } from "../functions/entities";
13
13
  import { isCollectible } from "../functions/pickupVariants";
14
14
  import { getRoomItemPoolType } from "../functions/rooms";
15
15
  import { saveDataManager } from "./saveDataManager/exports";
@@ -8,7 +8,10 @@ import { ModUpgraded } from "../classes/ModUpgraded";
8
8
  import { DecorationVariant } from "../enums/DecorationVariant";
9
9
  import { ModCallbackCustom } from "../enums/ModCallbackCustom";
10
10
  import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
11
- import { removeGrid, spawnGridWithVariant } from "../functions/gridEntity";
11
+ import {
12
+ removeGridEntity,
13
+ spawnGridEntityWithVariant,
14
+ } from "../functions/gridEntities";
12
15
  import { getRoomListIndex } from "../functions/roomData";
13
16
  import { isVector } from "../functions/vector";
14
17
  import { CustomGridEntityData } from "../interfaces/CustomGridEntityData";
@@ -105,7 +108,7 @@ export function spawnCustomGrid(
105
108
  (DecorationVariant.CUSTOM_GRID_ENTITY as int);
106
109
  const decoration = isExistingDecoration
107
110
  ? existingGridEntity
108
- : spawnGridWithVariant(
111
+ : spawnGridEntityWithVariant(
109
112
  GridEntityType.DECORATION,
110
113
  DecorationVariant.CUSTOM_GRID_ENTITY,
111
114
  gridIndexOrPosition,
@@ -186,7 +189,7 @@ export function removeCustomGrid(
186
189
  }
187
190
 
188
191
  roomCustomGridEntities.delete(gridIndex);
189
- removeGrid(decoration, updateRoom);
192
+ removeGridEntity(decoration, updateRoom);
190
193
 
191
194
  return decoration;
192
195
  }
@@ -11,7 +11,7 @@ import {
11
11
  import { game } from "../../cachedClasses";
12
12
  import { VectorZero } from "../../constants";
13
13
  import { getRandomArrayElement } from "../../functions/array";
14
- import { spawnEffectWithSeed } from "../../functions/entitySpecific";
14
+ import { spawnEffectWithSeed } from "../../functions/entitiesSpecific";
15
15
  import { newRNG } from "../../functions/rng";
16
16
  import { isLRoom, isNarrowRoom } from "../../functions/roomShape";
17
17
  import { trimPrefix } from "../../functions/string";
@@ -4,13 +4,13 @@ import {
4
4
  TrinketType,
5
5
  } from "isaac-typescript-definitions";
6
6
  import { DecorationVariant } from "../../enums/DecorationVariant";
7
- import { removeEntities } from "../../functions/entity";
8
- import { getNPCs } from "../../functions/entitySpecific";
7
+ import { removeEntities } from "../../functions/entities";
8
+ import { getNPCs } from "../../functions/entitiesSpecific";
9
9
  import {
10
10
  getCoins,
11
11
  getCollectibles,
12
12
  getTrinkets,
13
- } from "../../functions/pickups";
13
+ } from "../../functions/pickupsSpecific";
14
14
  import { vectorEquals } from "../../functions/vector";
15
15
  import { CustomStage } from "../../interfaces/CustomStage";
16
16
 
@@ -10,7 +10,7 @@ import {
10
10
  } from "isaac-typescript-definitions";
11
11
  import { game } from "../../cachedClasses";
12
12
  import { reorderedCallbacksSetStage } from "../../callbacks/reorderedCallbacks";
13
- import { getEntityIDFromConstituents } from "../../functions/entity";
13
+ import { getEntityIDFromConstituents } from "../../functions/entities";
14
14
  import { log, logError } from "../../functions/log";
15
15
  import { movePlayersToCenter } from "../../functions/playerCenter";
16
16
  import { newRNG } from "../../functions/rng";
@@ -18,7 +18,7 @@ import { getRoomData } from "../../functions/roomData";
18
18
  import { getRooms } from "../../functions/rooms";
19
19
  import { getGotoCommand, setStage } from "../../functions/stage";
20
20
  import { runNextRoom } from "../runNextRoom";
21
- import { getRandomCustomStageRoom } from "./util";
21
+ import { getRandomCustomStageRoom } from "./customStageUtils";
22
22
  import v, {
23
23
  customBossPNGPaths,
24
24
  customStageCachedRoomData,
@@ -21,7 +21,7 @@ import {
21
21
  setCustomDoorGraphics,
22
22
  setCustomPitGraphics,
23
23
  setCustomRockGraphics,
24
- } from "./gridEntities";
24
+ } from "./customStageGridEntities";
25
25
  import * as metadataJSON from "./metadata.json"; // This will correspond to "metadata.lua" at run-time.
26
26
  import { setShadows } from "./shadows";
27
27
  import { streakTextGetShaderParams, streakTextPostRender } from "./streakText";
@@ -1,7 +1,7 @@
1
1
  import { EffectVariant, RoomShape } from "isaac-typescript-definitions";
2
2
  import { game } from "../../cachedClasses";
3
3
  import { getRandomArrayElement } from "../../functions/array";
4
- import { spawnEffectWithSeed } from "../../functions/entitySpecific";
4
+ import { spawnEffectWithSeed } from "../../functions/entitiesSpecific";
5
5
  import { CustomStage } from "../../interfaces/CustomStage";
6
6
  import { ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH } from "./customStageConstants";
7
7
  import v from "./v";
@@ -7,8 +7,8 @@ import {
7
7
  } from "isaac-typescript-definitions";
8
8
  import { game, sfxManager } from "../../cachedClasses";
9
9
  import { arrayRemove } from "../../functions/array";
10
- import { getBosses } from "../../functions/boss";
11
- import { getEntityID } from "../../functions/entity";
10
+ import { getBosses } from "../../functions/bosses";
11
+ import { getEntityID } from "../../functions/entities";
12
12
  import { erange } from "../../functions/utils";
13
13
  import { CustomStage } from "../../interfaces/CustomStage";
14
14
  import { BOSS_NAME_PNG_FILE_NAMES } from "../../objects/bossNamePNGFileNames";
@@ -1,5 +1,5 @@
1
- import { getEntityID } from "../../functions/entity";
2
- import { getGridEntityID } from "../../functions/gridEntity";
1
+ import { getEntityID } from "../../functions/entities";
2
+ import { getGridEntityID } from "../../functions/gridEntities";
3
3
 
4
4
  let debugDisplayEnabled = false;
5
5
 
@@ -28,22 +28,22 @@ import {
28
28
  removeAllMatchingEntities,
29
29
  spawn,
30
30
  spawnWithSeed,
31
- } from "../functions/entity";
31
+ } from "../functions/entities";
32
32
  import {
33
33
  getNPCs,
34
34
  removeAllBombs,
35
35
  removeAllPickups,
36
- } from "../functions/entitySpecific";
36
+ } from "../functions/entitiesSpecific";
37
37
  import {
38
38
  convertXMLGridEntityType,
39
39
  getAllGridIndexes,
40
40
  getGridEntities,
41
41
  getGridEntityIDFromConstituents,
42
42
  removeAllGridExcept,
43
- removeGrid,
43
+ removeGridEntity,
44
44
  setGridEntityInvisible,
45
- spawnGridWithVariant,
46
- } from "../functions/gridEntity";
45
+ spawnGridEntityWithVariant,
46
+ } from "../functions/gridEntities";
47
47
  import { getRandomJSONRoom } from "../functions/jsonRoom";
48
48
  import { log } from "../functions/log";
49
49
  import { getRandomSeed, isRNG, newRNG } from "../functions/rng";
@@ -131,7 +131,7 @@ function preUseItemWeNeedToGoDeeper(
131
131
  // of the shovel to happen.)
132
132
  const decorations = getGridEntities(GridEntityType.DECORATION);
133
133
  for (const decoration of decorations) {
134
- removeGrid(decoration, false);
134
+ removeGridEntity(decoration, false);
135
135
  }
136
136
 
137
137
  const playerPtr = EntityPtr(player);
@@ -549,7 +549,11 @@ function spawnGridEntityForJSONRoom(
549
549
  const position = gridCoordinatesToWorldPosition(x, y);
550
550
  const gridIndex = room.GetGridIndex(position);
551
551
 
552
- const gridEntity = spawnGridWithVariant(gridEntityType, variant, gridIndex);
552
+ const gridEntity = spawnGridEntityWithVariant(
553
+ gridEntityType,
554
+ variant,
555
+ gridIndex,
556
+ );
553
557
  if (gridEntity === undefined) {
554
558
  return gridEntity;
555
559
  }