isaacscript-common 6.6.5 → 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 (232) hide show
  1. package/dist/callbacks/customRevive.lua +4 -4
  2. package/dist/callbacks/postCursedTeleport.lua +2 -2
  3. package/dist/callbacks/postCustomDoorEnter.lua +5 -5
  4. package/dist/callbacks/postDiceRoomActivated.lua +2 -2
  5. package/dist/callbacks/postFlip.lua +3 -3
  6. package/dist/callbacks/postGridEntity.lua +3 -3
  7. package/dist/callbacks/postGridEntityCollision.lua +3 -3
  8. package/dist/callbacks/postGridEntityRender.lua +2 -2
  9. package/dist/callbacks/postNewRoomEarly.lua +5 -5
  10. package/dist/callbacks/postPickupCollect.lua +2 -2
  11. package/dist/callbacks/postPitRender.lua +2 -2
  12. package/dist/callbacks/postPitUpdate.lua +2 -2
  13. package/dist/callbacks/postPlayerCollectible.lua +2 -2
  14. package/dist/callbacks/postPoopRender.lua +2 -2
  15. package/dist/callbacks/postPoopUpdate.lua +2 -2
  16. package/dist/callbacks/postPressurePlateRender.lua +2 -2
  17. package/dist/callbacks/postPressurePlateUpdate.lua +2 -2
  18. package/dist/callbacks/postPurchase.lua +2 -2
  19. package/dist/callbacks/postRockRender.lua +2 -2
  20. package/dist/callbacks/postRockUpdate.lua +2 -2
  21. package/dist/callbacks/postSlotInitUpdate.lua +2 -2
  22. package/dist/callbacks/postSlotRender.lua +2 -2
  23. package/dist/callbacks/postSpikesRender.lua +2 -2
  24. package/dist/callbacks/postSpikesUpdate.lua +2 -2
  25. package/dist/callbacks/postTNTRender.lua +2 -2
  26. package/dist/callbacks/postTNTUpdate.lua +2 -2
  27. package/dist/callbacks/preBerserkDeath.lua +2 -2
  28. package/dist/callbacks/preNewLevel.lua +2 -2
  29. package/dist/callbacks/subscriptions/postDoorRender.d.ts +2 -3
  30. package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -1
  31. package/dist/callbacks/subscriptions/postDoorRender.lua +3 -3
  32. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +2 -3
  33. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -1
  34. package/dist/callbacks/subscriptions/postDoorUpdate.lua +3 -3
  35. package/dist/callbacks/subscriptions/postPitRender.d.ts +2 -3
  36. package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -1
  37. package/dist/callbacks/subscriptions/postPitRender.lua +3 -3
  38. package/dist/callbacks/subscriptions/postPitUpdate.d.ts +2 -3
  39. package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -1
  40. package/dist/callbacks/subscriptions/postPitUpdate.lua +3 -3
  41. package/dist/callbacks/subscriptions/postPoopRender.d.ts +2 -3
  42. package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -1
  43. package/dist/callbacks/subscriptions/postPoopRender.lua +3 -3
  44. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +2 -3
  45. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -1
  46. package/dist/callbacks/subscriptions/postPoopUpdate.lua +3 -3
  47. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +2 -3
  48. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -1
  49. package/dist/callbacks/subscriptions/postPressurePlateRender.lua +3 -3
  50. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +2 -3
  51. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -1
  52. package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +3 -3
  53. package/dist/features/characterStats.lua +2 -2
  54. package/dist/features/collectibleItemPoolType.lua +2 -2
  55. package/dist/features/customGridEntity.d.ts.map +1 -1
  56. package/dist/features/customGridEntity.lua +5 -5
  57. package/dist/features/customStage/backdrop.lua +2 -2
  58. package/dist/features/customStage/{gridEntities.d.ts → customStageGridEntities.d.ts} +1 -1
  59. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -0
  60. package/dist/features/customStage/{gridEntities.lua → customStageGridEntities.lua} +8 -8
  61. package/dist/features/customStage/{util.d.ts → customStageUtils.d.ts} +1 -1
  62. package/dist/features/customStage/customStageUtils.d.ts.map +1 -0
  63. package/dist/features/customStage/{util.lua → customStageUtils.lua} +0 -0
  64. package/dist/features/customStage/exports.lua +4 -4
  65. package/dist/features/customStage/init.lua +6 -6
  66. package/dist/features/customStage/shadows.lua +2 -2
  67. package/dist/features/customStage/versusScreen.lua +4 -4
  68. package/dist/features/debugDisplay/v.lua +4 -4
  69. package/dist/features/deployJSONRoom.lua +20 -20
  70. package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
  71. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  72. package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
  73. package/dist/features/pause.lua +2 -2
  74. package/dist/features/persistentEntities.lua +2 -2
  75. package/dist/features/preventCollectibleRotation.lua +2 -2
  76. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  77. package/dist/features/sirenHelpers.lua +2 -2
  78. package/dist/functions/ambush.lua +5 -5
  79. package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
  80. package/dist/functions/bosses.d.ts.map +1 -0
  81. package/dist/functions/{boss.lua → bosses.lua} +38 -13
  82. package/dist/functions/collectibleTag.lua +2 -2
  83. package/dist/functions/collectibles.lua +5 -5
  84. package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
  85. package/dist/functions/entities.d.ts.map +1 -0
  86. package/dist/functions/{entity.lua → entities.lua} +25 -20
  87. package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
  88. package/dist/functions/entitiesSpecific.d.ts.map +1 -0
  89. package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
  90. package/dist/functions/familiars.lua +2 -2
  91. package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
  92. package/dist/functions/gridEntities.d.ts.map +1 -0
  93. package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
  94. package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
  95. package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
  96. package/dist/functions/gridEntitiesSpecific.lua +366 -0
  97. package/dist/functions/log.lua +8 -8
  98. package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
  99. package/dist/functions/npcs.d.ts.map +1 -0
  100. package/dist/functions/{npc.lua → npcs.lua} +44 -9
  101. package/dist/functions/pickups.d.ts +4 -119
  102. package/dist/functions/pickups.d.ts.map +1 -1
  103. package/dist/functions/pickups.lua +10 -439
  104. package/dist/functions/pickupsSpecific.d.ts +229 -0
  105. package/dist/functions/pickupsSpecific.d.ts.map +1 -0
  106. package/dist/functions/pickupsSpecific.lua +560 -0
  107. package/dist/functions/playerHealth.lua +6 -6
  108. package/dist/functions/{player.d.ts → players.d.ts} +1 -1
  109. package/dist/functions/players.d.ts.map +1 -0
  110. package/dist/functions/{player.lua → players.lua} +0 -0
  111. package/dist/functions/pocketItems.lua +2 -2
  112. package/dist/functions/positionVelocity.lua +6 -6
  113. package/dist/functions/pressurePlate.d.ts +10 -0
  114. package/dist/functions/pressurePlate.d.ts.map +1 -0
  115. package/dist/functions/pressurePlate.lua +29 -0
  116. package/dist/functions/revive.lua +7 -7
  117. package/dist/functions/rooms.lua +2 -2
  118. package/dist/functions/saveFile.lua +3 -3
  119. package/dist/functions/spawnCollectible.lua +4 -4
  120. package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
  121. package/dist/functions/sprites.d.ts.map +1 -0
  122. package/dist/functions/{sprite.lua → sprites.lua} +0 -0
  123. package/dist/functions/transformations.lua +2 -2
  124. package/dist/functions/trinketGive.lua +2 -2
  125. package/dist/functions/trinkets.lua +6 -6
  126. package/dist/functions/utils.d.ts +7 -0
  127. package/dist/functions/utils.d.ts.map +1 -1
  128. package/dist/functions/utils.lua +35 -22
  129. package/dist/index.d.ts +10 -8
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.lua +26 -10
  132. package/dist/types/AnyGridEntity.d.ts +10 -0
  133. package/dist/types/AnyGridEntity.d.ts.map +1 -0
  134. package/dist/types/AnyGridEntity.lua +2 -0
  135. package/package.json +2 -2
  136. package/src/callbacks/customRevive.ts +2 -2
  137. package/src/callbacks/postCursedTeleport.ts +1 -1
  138. package/src/callbacks/postCustomDoorEnter.ts +2 -2
  139. package/src/callbacks/postDiceRoomActivated.ts +1 -1
  140. package/src/callbacks/postFlip.ts +1 -1
  141. package/src/callbacks/postGridEntity.ts +1 -1
  142. package/src/callbacks/postGridEntityCollision.ts +1 -1
  143. package/src/callbacks/postGridEntityRender.ts +1 -1
  144. package/src/callbacks/postNewRoomEarly.ts +9 -3
  145. package/src/callbacks/postPickupCollect.ts +1 -1
  146. package/src/callbacks/postPitRender.ts +1 -1
  147. package/src/callbacks/postPitUpdate.ts +1 -1
  148. package/src/callbacks/postPlayerCollectible.ts +1 -1
  149. package/src/callbacks/postPoopRender.ts +1 -1
  150. package/src/callbacks/postPoopUpdate.ts +1 -1
  151. package/src/callbacks/postPressurePlateRender.ts +1 -1
  152. package/src/callbacks/postPressurePlateUpdate.ts +1 -1
  153. package/src/callbacks/postPurchase.ts +1 -1
  154. package/src/callbacks/postRockRender.ts +1 -1
  155. package/src/callbacks/postRockUpdate.ts +1 -1
  156. package/src/callbacks/postSlotInitUpdate.ts +1 -1
  157. package/src/callbacks/postSlotRender.ts +1 -1
  158. package/src/callbacks/postSpikesRender.ts +1 -1
  159. package/src/callbacks/postSpikesUpdate.ts +1 -1
  160. package/src/callbacks/postTNTRender.ts +1 -1
  161. package/src/callbacks/postTNTUpdate.ts +1 -1
  162. package/src/callbacks/preBerserkDeath.ts +1 -1
  163. package/src/callbacks/preNewLevel.ts +1 -1
  164. package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
  165. package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
  166. package/src/callbacks/subscriptions/postPitRender.ts +6 -7
  167. package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
  168. package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
  169. package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
  170. package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
  171. package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
  172. package/src/features/characterStats.ts +1 -1
  173. package/src/features/collectibleItemPoolType.ts +1 -1
  174. package/src/features/customGridEntity.ts +6 -3
  175. package/src/features/customStage/backdrop.ts +1 -1
  176. package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
  177. package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
  178. package/src/features/customStage/exports.ts +2 -2
  179. package/src/features/customStage/init.ts +1 -1
  180. package/src/features/customStage/shadows.ts +1 -1
  181. package/src/features/customStage/versusScreen.ts +2 -2
  182. package/src/features/debugDisplay/v.ts +2 -2
  183. package/src/features/deployJSONRoom.ts +11 -7
  184. package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
  185. package/src/features/extraConsoleCommands/listCommands.ts +10 -6
  186. package/src/features/pause.ts +1 -1
  187. package/src/features/persistentEntities.ts +1 -1
  188. package/src/features/preventCollectibleRotation.ts +1 -1
  189. package/src/features/saveDataManager/exports.ts +7 -4
  190. package/src/features/sirenHelpers.ts +1 -1
  191. package/src/functions/ambush.ts +2 -2
  192. package/src/functions/{boss.ts → bosses.ts} +29 -21
  193. package/src/functions/collectibleTag.ts +1 -1
  194. package/src/functions/collectibles.ts +2 -2
  195. package/src/functions/{entity.ts → entities.ts} +23 -21
  196. package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
  197. package/src/functions/familiars.ts +1 -1
  198. package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
  199. package/src/functions/gridEntitiesSpecific.ts +490 -0
  200. package/src/functions/log.ts +3 -3
  201. package/src/functions/{npc.ts → npcs.ts} +42 -11
  202. package/src/functions/pickups.ts +8 -475
  203. package/src/functions/pickupsSpecific.ts +613 -0
  204. package/src/functions/playerHealth.ts +1 -1
  205. package/src/functions/{player.ts → players.ts} +0 -0
  206. package/src/functions/pocketItems.ts +1 -1
  207. package/src/functions/positionVelocity.ts +3 -3
  208. package/src/functions/pressurePlate.ts +29 -0
  209. package/src/functions/revive.ts +2 -2
  210. package/src/functions/rooms.ts +1 -1
  211. package/src/functions/saveFile.ts +1 -1
  212. package/src/functions/spawnCollectible.ts +2 -2
  213. package/src/functions/{sprite.ts → sprites.ts} +0 -0
  214. package/src/functions/transformations.ts +1 -1
  215. package/src/functions/trinketGive.ts +1 -1
  216. package/src/functions/trinkets.ts +3 -3
  217. package/src/functions/utils.ts +32 -13
  218. package/src/index.ts +10 -8
  219. package/src/types/AnyGridEntity.ts +9 -0
  220. package/dist/features/customStage/gridEntities.d.ts.map +0 -1
  221. package/dist/features/customStage/util.d.ts.map +0 -1
  222. package/dist/functions/boss.d.ts.map +0 -1
  223. package/dist/functions/entity.d.ts.map +0 -1
  224. package/dist/functions/entitySpecific.d.ts.map +0 -1
  225. package/dist/functions/gridEntity.d.ts.map +0 -1
  226. package/dist/functions/gridEntitySpecific.d.ts +0 -29
  227. package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
  228. package/dist/functions/gridEntitySpecific.lua +0 -114
  229. package/dist/functions/npc.d.ts.map +0 -1
  230. package/dist/functions/player.d.ts.map +0 -1
  231. package/dist/functions/sprite.d.ts.map +0 -1
  232. package/src/functions/gridEntitySpecific.ts +0 -143
@@ -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 {
@@ -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,
@@ -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
  }
@@ -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
  }
@@ -8,7 +8,7 @@ import {
8
8
  import { game } from "../../cachedClasses";
9
9
  import { HealthType } from "../../enums/HealthType";
10
10
  import { directionToVector } from "../../functions/direction";
11
- import { spawnGridWithVariant } from "../../functions/gridEntity";
11
+ import { spawnGridEntityWithVariant } from "../../functions/gridEntities";
12
12
  import { logEntities, logGridEntities } from "../../functions/log";
13
13
  import { addPlayerHealthType } from "../../functions/playerHealth";
14
14
  import { getRoomData, getRoomDescriptor } from "../../functions/roomData";
@@ -118,7 +118,7 @@ export function spawnTrapdoorOrCrawlSpace(trapdoor: boolean): void {
118
118
  ? GridEntityType.TRAPDOOR
119
119
  : GridEntityType.CRAWL_SPACE;
120
120
 
121
- spawnGridWithVariant(gridEntityType, 0, gridIndex);
121
+ spawnGridEntityWithVariant(gridEntityType, 0, gridIndex);
122
122
  }
123
123
 
124
124
  export function warpToRoomType(roomType: RoomType): void {
@@ -53,10 +53,10 @@ import { getCardName } from "../../functions/cards";
53
53
  import { getCharacterName } from "../../functions/character";
54
54
  import { addCharge } from "../../functions/charge";
55
55
  import { isValidCollectibleType } from "../../functions/collectibles";
56
- import { getNPCs } from "../../functions/entitySpecific";
56
+ import { getNPCs } from "../../functions/entitiesSpecific";
57
57
  import { getEnumValues } from "../../functions/enums";
58
58
  import { addFlag } from "../../functions/flag";
59
- import { spawnGrid } from "../../functions/gridEntity";
59
+ import { spawnGridEntity } from "../../functions/gridEntities";
60
60
  import {
61
61
  logEffects,
62
62
  logRoom,
@@ -64,15 +64,19 @@ import {
64
64
  logSounds,
65
65
  } from "../../functions/log";
66
66
  import { getMapPartialMatch } from "../../functions/map";
67
- import { spawnCard, spawnPill, spawnTrinket } from "../../functions/pickups";
67
+ import {
68
+ spawnCard,
69
+ spawnPill,
70
+ spawnTrinket,
71
+ } from "../../functions/pickupsSpecific";
68
72
  import { getPillEffectName } from "../../functions/pills";
73
+ import { getPlayers } from "../../functions/playerIndex";
69
74
  import {
70
75
  addCollectibleCostume,
71
76
  getPlayerName,
72
77
  removeCollectibleCostume,
73
78
  useActiveItemTemp,
74
- } from "../../functions/player";
75
- import { getPlayers } from "../../functions/playerIndex";
79
+ } from "../../functions/players";
76
80
  import { gridCoordinatesToWorldPosition } from "../../functions/roomGrid";
77
81
  import { changeRoom, getRoomGridIndexesForType } from "../../functions/rooms";
78
82
  import { onSetSeed, restart, setUnseeded } from "../../functions/run";
@@ -654,7 +658,7 @@ export function gridEntities(): void {
654
658
  }
655
659
 
656
660
  const position = gridCoordinatesToWorldPosition(x, y);
657
- spawnGrid(gridEntityType, position);
661
+ spawnGridEntity(gridEntityType, position);
658
662
  }
659
663
  }
660
664
  }