isaacscript-common 6.11.0 → 6.12.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 (253) hide show
  1. package/dist/callbacks/postFlip.lua +2 -2
  2. package/dist/callbacks/postGridEntityCustomRender.d.ts +2 -0
  3. package/dist/callbacks/postGridEntityCustomRender.d.ts.map +1 -0
  4. package/dist/callbacks/postGridEntityCustomRender.lua +36 -0
  5. package/dist/callbacks/postGridEntityCustomUpdate.d.ts +2 -0
  6. package/dist/callbacks/postGridEntityCustomUpdate.d.ts.map +1 -0
  7. package/dist/callbacks/postGridEntityCustomUpdate.lua +36 -0
  8. package/dist/callbacks/postNewRoomEarly.lua +2 -2
  9. package/dist/callbacks/postPickupInitFirst.lua +1 -20
  10. package/dist/callbacks/postPlayerFatalDamage.lua +1 -1
  11. package/dist/callbacks/postPlayerInitFirst.d.ts +2 -0
  12. package/dist/callbacks/postPlayerInitFirst.d.ts.map +1 -0
  13. package/dist/callbacks/postPlayerInitFirst.lua +42 -0
  14. package/dist/callbacks/postPlayerInitLate.lua +5 -5
  15. package/dist/callbacks/postPlayerReorderedCallbacks.d.ts +2 -0
  16. package/dist/callbacks/postPlayerReorderedCallbacks.d.ts.map +1 -0
  17. package/dist/callbacks/{postPlayerReordered.lua → postPlayerReorderedCallbacks.lua} +11 -37
  18. package/dist/callbacks/reorderedCallbacks.d.ts +5 -5
  19. package/dist/callbacks/reorderedCallbacks.d.ts.map +1 -1
  20. package/dist/callbacks/reorderedCallbacks.lua +5 -5
  21. package/dist/callbacks/subscriptions/postFirstFlip.d.ts +1 -1
  22. package/dist/callbacks/subscriptions/postFirstFlip.d.ts.map +1 -1
  23. package/dist/callbacks/subscriptions/postFirstFlip.lua +2 -2
  24. package/dist/callbacks/subscriptions/postFlip.d.ts +1 -1
  25. package/dist/callbacks/subscriptions/postFlip.d.ts.map +1 -1
  26. package/dist/callbacks/subscriptions/postFlip.lua +2 -2
  27. package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts +6 -0
  28. package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts.map +1 -0
  29. package/dist/callbacks/subscriptions/postGridEntityCustomRender.lua +29 -0
  30. package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts +6 -0
  31. package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts.map +1 -0
  32. package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.lua +29 -0
  33. package/dist/callbacks/subscriptions/{postPlayerInitReordered.d.ts → postPlayerInitFirst.d.ts} +2 -2
  34. package/dist/callbacks/subscriptions/postPlayerInitFirst.d.ts.map +1 -0
  35. package/dist/callbacks/subscriptions/{postPlayerInitReordered.lua → postPlayerInitFirst.lua} +3 -3
  36. package/dist/constants.d.ts +1 -5
  37. package/dist/constants.d.ts.map +1 -1
  38. package/dist/constants.lua +0 -7
  39. package/dist/constantsFirstLast.d.ts +5 -1
  40. package/dist/constantsFirstLast.d.ts.map +1 -1
  41. package/dist/constantsFirstLast.lua +6 -0
  42. package/dist/enums/ModCallbackCustom.d.ts +106 -81
  43. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  44. package/dist/enums/ModCallbackCustom.lua +63 -59
  45. package/dist/enums/private/StageTravelState.d.ts +9 -0
  46. package/dist/enums/private/StageTravelState.d.ts.map +1 -0
  47. package/dist/enums/private/StageTravelState.lua +15 -0
  48. package/dist/enums/private/TrapdoorAnimation.d.ts +6 -0
  49. package/dist/enums/private/TrapdoorAnimation.d.ts.map +1 -0
  50. package/dist/enums/private/TrapdoorAnimation.lua +6 -0
  51. package/dist/features/customGridEntity.d.ts +17 -5
  52. package/dist/features/customGridEntity.d.ts.map +1 -1
  53. package/dist/features/customGridEntity.lua +86 -17
  54. package/dist/features/customStage/exports.d.ts.map +1 -1
  55. package/dist/features/customStage/exports.lua +0 -13
  56. package/dist/features/customStage/init.d.ts.map +1 -1
  57. package/dist/features/customStage/init.lua +24 -2
  58. package/dist/features/customStage/streakText.d.ts +6 -0
  59. package/dist/features/customStage/streakText.d.ts.map +1 -1
  60. package/dist/features/customStage/streakText.lua +16 -12
  61. package/dist/features/customStage/versusScreen.d.ts +6 -0
  62. package/dist/features/customStage/versusScreen.d.ts.map +1 -1
  63. package/dist/features/customStage/versusScreen.lua +10 -5
  64. package/dist/features/customTrapdoor/blackSprite.d.ts +2 -0
  65. package/dist/features/customTrapdoor/blackSprite.d.ts.map +1 -0
  66. package/dist/features/customTrapdoor/blackSprite.lua +19 -0
  67. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +15 -0
  68. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -0
  69. package/dist/features/customTrapdoor/customTrapdoorConstants.lua +16 -0
  70. package/dist/features/customTrapdoor/exports.d.ts +29 -0
  71. package/dist/features/customTrapdoor/exports.d.ts.map +1 -0
  72. package/dist/features/customTrapdoor/exports.lua +93 -0
  73. package/dist/features/customTrapdoor/init.d.ts +3 -0
  74. package/dist/features/customTrapdoor/init.d.ts.map +1 -0
  75. package/dist/features/customTrapdoor/init.lua +174 -0
  76. package/dist/features/customTrapdoor/openClose.d.ts +5 -0
  77. package/dist/features/customTrapdoor/openClose.d.ts.map +1 -0
  78. package/dist/features/customTrapdoor/openClose.lua +60 -0
  79. package/dist/features/customTrapdoor/touched.d.ts +4 -0
  80. package/dist/features/customTrapdoor/touched.d.ts.map +1 -0
  81. package/dist/features/customTrapdoor/touched.lua +159 -0
  82. package/dist/features/customTrapdoor/v.d.ts +18 -0
  83. package/dist/features/customTrapdoor/v.d.ts.map +1 -0
  84. package/dist/features/customTrapdoor/v.lua +17 -0
  85. package/dist/features/deployJSONRoom.d.ts +2 -2
  86. package/dist/features/deployJSONRoom.d.ts.map +1 -1
  87. package/dist/features/deployJSONRoom.lua +3 -3
  88. package/dist/features/extraConsoleCommands/init.d.ts.map +1 -1
  89. package/dist/features/extraConsoleCommands/init.lua +3 -1
  90. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  91. package/dist/features/extraConsoleCommands/listCommands.lua +6 -6
  92. package/dist/features/pause.d.ts +1 -1
  93. package/dist/features/pause.d.ts.map +1 -1
  94. package/dist/features/pause.lua +87 -8
  95. package/dist/features/persistentEntities.d.ts.map +1 -1
  96. package/dist/features/persistentEntities.lua +7 -7
  97. package/dist/features/pickupIndex.d.ts +19 -0
  98. package/dist/features/pickupIndex.d.ts.map +1 -0
  99. package/dist/features/pickupIndex.lua +197 -0
  100. package/dist/features/roomHistory.d.ts +24 -0
  101. package/dist/features/roomHistory.d.ts.map +1 -0
  102. package/dist/features/roomHistory.lua +89 -0
  103. package/dist/features/taintedLazarusPlayers.d.ts.map +1 -1
  104. package/dist/features/taintedLazarusPlayers.lua +13 -21
  105. package/dist/functions/{character.d.ts → characters.d.ts} +3 -1
  106. package/dist/functions/characters.d.ts.map +1 -0
  107. package/dist/functions/{character.lua → characters.lua} +12 -0
  108. package/dist/functions/collectibles.d.ts +26 -13
  109. package/dist/functions/collectibles.d.ts.map +1 -1
  110. package/dist/functions/collectibles.lua +26 -13
  111. package/dist/functions/entities.d.ts +3 -3
  112. package/dist/functions/entities.d.ts.map +1 -1
  113. package/dist/functions/entities.lua +8 -3
  114. package/dist/functions/gridEntities.d.ts +2 -2
  115. package/dist/functions/gridEntities.lua +2 -2
  116. package/dist/functions/isaacAPIClass.d.ts +64 -0
  117. package/dist/functions/isaacAPIClass.d.ts.map +1 -1
  118. package/dist/functions/isaacAPIClass.lua +84 -1
  119. package/dist/functions/log.lua +3 -3
  120. package/dist/functions/pickupVariants.d.ts +2 -2
  121. package/dist/functions/pickupVariants.d.ts.map +1 -1
  122. package/dist/functions/pickupVariants.lua +2 -2
  123. package/dist/functions/playerCenter.lua +2 -2
  124. package/dist/functions/playerIndex.d.ts +11 -5
  125. package/dist/functions/playerIndex.d.ts.map +1 -1
  126. package/dist/functions/playerIndex.lua +19 -26
  127. package/dist/functions/players.lua +4 -4
  128. package/dist/functions/revive.lua +2 -2
  129. package/dist/functions/roomData.d.ts +3 -2
  130. package/dist/functions/roomData.d.ts.map +1 -1
  131. package/dist/functions/roomData.lua +3 -2
  132. package/dist/functions/rooms.d.ts +6 -6
  133. package/dist/functions/rooms.lua +6 -6
  134. package/dist/functions/stage.d.ts +1 -0
  135. package/dist/functions/stage.d.ts.map +1 -1
  136. package/dist/functions/stage.lua +4 -0
  137. package/dist/functions/table.d.ts +1 -1
  138. package/dist/functions/table.d.ts.map +1 -1
  139. package/dist/index.d.ts +6 -2
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.lua +33 -2
  142. package/dist/initCustomCallbacks.d.ts.map +1 -1
  143. package/dist/initCustomCallbacks.lua +11 -2
  144. package/dist/initFeatures.d.ts +1 -2
  145. package/dist/initFeatures.d.ts.map +1 -1
  146. package/dist/initFeatures.lua +16 -2
  147. package/dist/interfaces/AddCallbackParameterCustom.d.ts +6 -2
  148. package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
  149. package/dist/interfaces/CustomGridEntityData.d.ts +6 -2
  150. package/dist/interfaces/CustomGridEntityData.d.ts.map +1 -1
  151. package/dist/interfaces/RoomDescription.d.ts +14 -0
  152. package/dist/interfaces/RoomDescription.d.ts.map +1 -0
  153. package/dist/interfaces/RoomDescription.lua +2 -0
  154. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +7 -0
  155. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -0
  156. package/dist/interfaces/private/CustomTrapdoorDescription.lua +2 -0
  157. package/dist/lib/jsonLua.lua +2 -0
  158. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  159. package/dist/objects/callbackRegisterFunctions.lua +9 -3
  160. package/dist/objects/characterDamageMultipliers.d.ts +6 -0
  161. package/dist/objects/characterDamageMultipliers.d.ts.map +1 -0
  162. package/dist/objects/characterDamageMultipliers.lua +49 -0
  163. package/dist/types/CollectibleIndex.d.ts +1 -1
  164. package/dist/types/PickupIndex.d.ts +17 -0
  165. package/dist/types/PickupIndex.d.ts.map +1 -0
  166. package/dist/types/PickupIndex.lua +2 -0
  167. package/dist/types/PlayerIndex.d.ts +1 -1
  168. package/dist/upgradeMod.lua +2 -4
  169. package/package.json +2 -2
  170. package/src/callbacks/customRevive.ts +3 -3
  171. package/src/callbacks/itemPickup.ts +3 -3
  172. package/src/callbacks/postAmbush.ts +3 -3
  173. package/src/callbacks/postEsauJr.ts +3 -3
  174. package/src/callbacks/postFlip.ts +6 -5
  175. package/src/callbacks/postGridEntity.ts +5 -5
  176. package/src/callbacks/postGridEntityCustomRender.ts +44 -0
  177. package/src/callbacks/postGridEntityCustomUpdate.ts +44 -0
  178. package/src/callbacks/postNewRoomEarly.ts +2 -2
  179. package/src/callbacks/postPickupInitFirst.ts +1 -32
  180. package/src/callbacks/postPlayerCollectible.ts +2 -2
  181. package/src/callbacks/postPlayerFatalDamage.ts +5 -0
  182. package/src/callbacks/postPlayerInitFirst.ts +57 -0
  183. package/src/callbacks/postPlayerInitLate.ts +9 -5
  184. package/src/callbacks/{postPlayerReordered.ts → postPlayerReorderedCallbacks.ts} +12 -32
  185. package/src/callbacks/postSlotInitUpdate.ts +5 -2
  186. package/src/callbacks/postSlotRender.ts +2 -2
  187. package/src/callbacks/reorderedCallbacks.ts +10 -9
  188. package/src/callbacks/subscriptions/postFirstFlip.ts +6 -3
  189. package/src/callbacks/subscriptions/postFlip.ts +6 -3
  190. package/src/callbacks/subscriptions/postGridEntityCustomRender.ts +41 -0
  191. package/src/callbacks/subscriptions/postGridEntityCustomUpdate.ts +41 -0
  192. package/src/callbacks/subscriptions/{postPlayerInitReordered.ts → postPlayerInitFirst.ts} +6 -6
  193. package/src/constants.ts +1 -9
  194. package/src/constantsFirstLast.ts +16 -0
  195. package/src/enums/ModCallbackCustom.ts +52 -25
  196. package/src/enums/private/StageTravelState.ts +8 -0
  197. package/src/enums/private/TrapdoorAnimation.ts +5 -0
  198. package/src/features/customGridEntity.ts +118 -12
  199. package/src/features/customStage/exports.ts +3 -22
  200. package/src/features/customStage/init.ts +30 -1
  201. package/src/features/customStage/streakText.ts +13 -5
  202. package/src/features/customStage/versusScreen.ts +20 -12
  203. package/src/features/customTrapdoor/blackSprite.ts +16 -0
  204. package/src/features/customTrapdoor/customTrapdoorConstants.ts +23 -0
  205. package/src/features/customTrapdoor/exports.ts +99 -0
  206. package/src/features/customTrapdoor/init.ts +217 -0
  207. package/src/features/customTrapdoor/openClose.ts +103 -0
  208. package/src/features/customTrapdoor/touched.ts +195 -0
  209. package/src/features/customTrapdoor/v.ts +26 -0
  210. package/src/features/deployJSONRoom.ts +10 -5
  211. package/src/features/extraConsoleCommands/init.ts +5 -2
  212. package/src/features/extraConsoleCommands/listCommands.ts +6 -8
  213. package/src/features/pause.ts +97 -7
  214. package/src/features/persistentEntities.ts +9 -8
  215. package/src/features/pickupIndex.ts +257 -0
  216. package/src/features/playerInventory.ts +2 -2
  217. package/src/features/roomHistory.ts +113 -0
  218. package/src/features/saveDataManager/main.ts +3 -3
  219. package/src/features/taintedLazarusPlayers.ts +37 -36
  220. package/src/functions/{character.ts → characters.ts} +13 -0
  221. package/src/functions/collectibles.ts +26 -13
  222. package/src/functions/deepCopy.ts +2 -2
  223. package/src/functions/entities.ts +7 -4
  224. package/src/functions/gridEntities.ts +2 -2
  225. package/src/functions/isaacAPIClass.ts +106 -1
  226. package/src/functions/pickupVariants.ts +2 -2
  227. package/src/functions/playerCenter.ts +2 -2
  228. package/src/functions/playerIndex.ts +26 -23
  229. package/src/functions/players.ts +1 -1
  230. package/src/functions/revive.ts +1 -1
  231. package/src/functions/rng.ts +1 -1
  232. package/src/functions/roomData.ts +3 -2
  233. package/src/functions/rooms.ts +6 -6
  234. package/src/functions/stage.ts +10 -1
  235. package/src/functions/table.ts +2 -2
  236. package/src/index.ts +9 -2
  237. package/src/initCustomCallbacks.ts +7 -1
  238. package/src/initFeatures.ts +13 -2
  239. package/src/interfaces/AddCallbackParameterCustom.ts +6 -2
  240. package/src/interfaces/CustomGridEntityData.ts +7 -2
  241. package/src/interfaces/RoomDescription.ts +19 -0
  242. package/src/interfaces/private/CustomTrapdoorDescription.ts +7 -0
  243. package/src/lib/jsonLua.lua +2 -0
  244. package/src/objects/callbackRegisterFunctions.ts +8 -3
  245. package/src/objects/characterDamageMultipliers.ts +49 -0
  246. package/src/types/CollectibleIndex.ts +1 -1
  247. package/src/types/PickupIndex.ts +15 -0
  248. package/src/types/PlayerIndex.ts +1 -1
  249. package/src/upgradeMod.ts +4 -4
  250. package/dist/callbacks/postPlayerReordered.d.ts +0 -2
  251. package/dist/callbacks/postPlayerReordered.d.ts.map +0 -1
  252. package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts.map +0 -1
  253. package/dist/functions/character.d.ts.map +0 -1
@@ -17,8 +17,8 @@ export declare function getAllGridIndexes(): int[];
17
17
  * Gets the entities that have a hitbox that overlaps with any part of the square that the grid
18
18
  * entity is on.
19
19
  *
20
- * Note that this function will not work properly in the PostNewRoom callback, since entities do not
21
- * have collision yet in that callback.
20
+ * Note that this function will not work properly in the `POST_NEW_ROOM` callback, since entities do
21
+ * not have collision yet in that callback.
22
22
  */
23
23
  export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntity): Entity[];
24
24
  /**
@@ -200,8 +200,8 @@ end
200
200
  --- Gets the entities that have a hitbox that overlaps with any part of the square that the grid
201
201
  -- entity is on.
202
202
  --
203
- -- Note that this function will not work properly in the PostNewRoom callback, since entities do not
204
- -- have collision yet in that callback.
203
+ -- Note that this function will not work properly in the `POST_NEW_ROOM` callback, since entities do
204
+ -- not have collision yet in that callback.
205
205
  function ____exports.getCollidingEntitiesWithGridEntity(self, gridEntity)
206
206
  local gridEntityCollisionTopLeft = Vector(gridEntity.Position.X - DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y - DISTANCE_OF_GRID_TILE / 2)
207
207
  local gridEntityCollisionBottomRight = Vector(gridEntity.Position.X + DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y + DISTANCE_OF_GRID_TILE / 2)
@@ -1,3 +1,22 @@
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
+ /// <reference types="isaac-typescript-definitions" />
10
+ /// <reference types="isaac-typescript-definitions" />
11
+ /// <reference types="isaac-typescript-definitions" />
12
+ /// <reference types="isaac-typescript-definitions" />
13
+ /// <reference types="isaac-typescript-definitions" />
14
+ /// <reference types="isaac-typescript-definitions" />
15
+ /// <reference types="isaac-typescript-definitions" />
16
+ /// <reference types="isaac-typescript-definitions" />
17
+ /// <reference types="isaac-typescript-definitions" />
18
+ /// <reference types="isaac-typescript-definitions" />
19
+ /// <reference types="isaac-typescript-definitions" />
1
20
  import { IsaacAPIClass } from "../types/private/IsaacAPIClass";
2
21
  /**
3
22
  * Helper function to get the name of a class from the Isaac API. This is contained within the
@@ -7,8 +26,27 @@ import { IsaacAPIClass } from "../types/private/IsaacAPIClass";
7
26
  *
8
27
  * Returns undefined if the object is not of type `userdata` or if the "__type" metatable key does
9
28
  * not exist.
29
+ *
30
+ * In some cases, Isaac classes can be a read-only. If this is the case, the "__type" field will be
31
+ * prepended with "const ". This function will always strip this prefix, if it exists. For example,
32
+ * the class name returned for "const Vector" will be "Vector".
10
33
  */
11
34
  export declare function getIsaacAPIClassName(object: unknown): string | undefined;
35
+ /** Helper function to detect if a variable is of type `EntityBomb`. */
36
+ export declare function isBomb(variable: unknown): variable is EntityBomb;
37
+ /** Helper function to detect if a variable is of type `GridEntityDoor`. */
38
+ export declare function isDoor(variable: unknown): variable is GridEntityDoor;
39
+ /** Helper function to detect if a variable is of type `EntityEffect`. */
40
+ export declare function isEffect(variable: unknown): variable is EntityEffect;
41
+ /**
42
+ * Helper function to detect if a variable is of type `Entity`. This will return false for child
43
+ * classes such as `EntityPlayer` or `EntityTear`.
44
+ */
45
+ export declare function isEntity(variable: unknown): variable is Entity;
46
+ /** Helper function to detect if a variable is of type `EntityEffect`. */
47
+ export declare function isFamiliar(variable: unknown): variable is EntityFamiliar;
48
+ /** Helper function to detect if a variable is of type `GridEntity`. */
49
+ export declare function isGridEntity(variable: unknown): variable is GridEntity;
12
50
  /**
13
51
  * Helper function to check if something is an instantiated class from the Isaac API. (All classes
14
52
  * from the Isaac API have a type of "userdata" in Lua with a metatable key of "__type" equal to the
@@ -16,6 +54,32 @@ export declare function getIsaacAPIClassName(object: unknown): string | undefine
16
54
  */
17
55
  export declare function isIsaacAPIClass(object: unknown): object is IsaacAPIClass;
18
56
  export declare function isIsaacAPIClassOfType(object: unknown, classType: string): boolean;
57
+ /** Helper function to detect if a variable is of type `EntityKnife`. */
58
+ export declare function isKnife(variable: unknown): variable is EntityKnife;
59
+ /** Helper function to detect if a variable is of type `EntityLaser`. */
60
+ export declare function isLaser(variable: unknown): variable is EntityLaser;
61
+ /** Helper function to detect if a variable is of type `EntityNPC`. */
62
+ export declare function isNPC(variable: unknown): variable is EntityNPC;
63
+ /** Helper function to detect if a variable is of type `EntityPickup`. */
64
+ export declare function isPickup(variable: unknown): variable is EntityPickup;
65
+ /** Helper function to detect if a variable is of type `GridEntityPit`. */
66
+ export declare function isPit(variable: unknown): variable is GridEntityPit;
67
+ /** Helper function to detect if a variable is of type `EntityPlayer`. */
68
+ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
69
+ /** Helper function to detect if a variable is of type `GridEntityPoop`. */
70
+ export declare function isPoop(variable: unknown): variable is GridEntityPoop;
71
+ /** Helper function to detect if a variable is of type `GridEntityPressurePlate`. */
72
+ export declare function isPressurePlate(variable: unknown): variable is GridEntityPressurePlate;
73
+ /** Helper function to detect if a variable is of type `EntityProjectile`. */
74
+ export declare function isProjectile(variable: unknown): variable is EntityProjectile;
75
+ /** Helper function to detect if a variable is of type `GridEntityRock`. */
76
+ export declare function isRock(variable: unknown): variable is GridEntityRock;
77
+ /** Helper function to detect if a variable is of type `GridEntitySpikes`. */
78
+ export declare function isSpikes(variable: unknown): variable is GridEntitySpikes;
79
+ /** Helper function to detect if a variable is of type `GridEntityTNT`. */
80
+ export declare function isTNT(variable: unknown): variable is GridEntityTNT;
81
+ /** Helper function to detect if a variable is of type `EntityTear`. */
82
+ export declare function isTear(variable: unknown): variable is EntityTear;
19
83
  /**
20
84
  * Helper function to check if an instantiated Isaac API class is equal to another one of the same
21
85
  * type. You must provide the list of keys to check for.
@@ -1 +1 @@
1
- {"version":3,"file":"isaacAPIClass.d.ts","sourceRoot":"","sources":["../../src/functions/isaacAPIClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAkBxE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAGxE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAMT;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAKT"}
1
+ {"version":3,"file":"isaacAPIClass.d.ts","sourceRoot":"","sources":["../../src/functions/isaacAPIClass.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAkBxE;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ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ED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAEpE;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,uBAAuB,CAErC;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,gBAAgB,CAE5E;AAED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAEpE;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,gBAAgB,CAExE;AAED,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,aAAa,CAElE;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,UAAU,CAEhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAKT"}
@@ -1,6 +1,8 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
3
3
  local ____exports = {}
4
+ local ____string = require("functions.string")
5
+ local trimPrefix = ____string.trimPrefix
4
6
  local ____types = require("functions.types")
5
7
  local isString = ____types.isString
6
8
  local isUserdata = ____types.isUserdata
@@ -11,6 +13,10 @@ local isUserdata = ____types.isUserdata
11
13
  --
12
14
  -- Returns undefined if the object is not of type `userdata` or if the "__type" metatable key does
13
15
  -- not exist.
16
+ --
17
+ -- In some cases, Isaac classes can be a read-only. If this is the case, the "__type" field will be
18
+ -- prepended with "const ". This function will always strip this prefix, if it exists. For example,
19
+ -- the class name returned for "const Vector" will be "Vector".
14
20
  function ____exports.getIsaacAPIClassName(self, object)
15
21
  if not isUserdata(nil, object) then
16
22
  return nil
@@ -23,7 +29,32 @@ function ____exports.getIsaacAPIClassName(self, object)
23
29
  if not isString(nil, classType) then
24
30
  return nil
25
31
  end
26
- return classType
32
+ return trimPrefix(nil, classType, "const ")
33
+ end
34
+ --- Helper function to detect if a variable is of type `EntityBomb`.
35
+ function ____exports.isBomb(self, variable)
36
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityBomb"
37
+ end
38
+ --- Helper function to detect if a variable is of type `GridEntityDoor`.
39
+ function ____exports.isDoor(self, variable)
40
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityDoor"
41
+ end
42
+ --- Helper function to detect if a variable is of type `EntityEffect`.
43
+ function ____exports.isEffect(self, variable)
44
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityEffect"
45
+ end
46
+ --- Helper function to detect if a variable is of type `Entity`. This will return false for child
47
+ -- classes such as `EntityPlayer` or `EntityTear`.
48
+ function ____exports.isEntity(self, variable)
49
+ return ____exports.getIsaacAPIClassName(nil, variable) == "Entity"
50
+ end
51
+ --- Helper function to detect if a variable is of type `EntityEffect`.
52
+ function ____exports.isFamiliar(self, variable)
53
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityEffect"
54
+ end
55
+ --- Helper function to detect if a variable is of type `GridEntity`.
56
+ function ____exports.isGridEntity(self, variable)
57
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntity"
27
58
  end
28
59
  --- Helper function to check if something is an instantiated class from the Isaac API. (All classes
29
60
  -- from the Isaac API have a type of "userdata" in Lua with a metatable key of "__type" equal to the
@@ -36,6 +67,58 @@ function ____exports.isIsaacAPIClassOfType(self, object, classType)
36
67
  local isaacAPIClassType = ____exports.getIsaacAPIClassName(nil, object)
37
68
  return isaacAPIClassType == classType or isaacAPIClassType == "const " .. classType
38
69
  end
70
+ --- Helper function to detect if a variable is of type `EntityKnife`.
71
+ function ____exports.isKnife(self, variable)
72
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityKnife"
73
+ end
74
+ --- Helper function to detect if a variable is of type `EntityLaser`.
75
+ function ____exports.isLaser(self, variable)
76
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityLaser"
77
+ end
78
+ --- Helper function to detect if a variable is of type `EntityNPC`.
79
+ function ____exports.isNPC(self, variable)
80
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityNPC"
81
+ end
82
+ --- Helper function to detect if a variable is of type `EntityPickup`.
83
+ function ____exports.isPickup(self, variable)
84
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityPickup"
85
+ end
86
+ --- Helper function to detect if a variable is of type `GridEntityPit`.
87
+ function ____exports.isPit(self, variable)
88
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityPit"
89
+ end
90
+ --- Helper function to detect if a variable is of type `EntityPlayer`.
91
+ function ____exports.isPlayer(self, variable)
92
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityPlayer"
93
+ end
94
+ --- Helper function to detect if a variable is of type `GridEntityPoop`.
95
+ function ____exports.isPoop(self, variable)
96
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityPoop"
97
+ end
98
+ --- Helper function to detect if a variable is of type `GridEntityPressurePlate`.
99
+ function ____exports.isPressurePlate(self, variable)
100
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityPressurePlate"
101
+ end
102
+ --- Helper function to detect if a variable is of type `EntityProjectile`.
103
+ function ____exports.isProjectile(self, variable)
104
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityProjectile"
105
+ end
106
+ --- Helper function to detect if a variable is of type `GridEntityRock`.
107
+ function ____exports.isRock(self, variable)
108
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityRock"
109
+ end
110
+ --- Helper function to detect if a variable is of type `GridEntitySpikes`.
111
+ function ____exports.isSpikes(self, variable)
112
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntitySpikes"
113
+ end
114
+ --- Helper function to detect if a variable is of type `GridEntityTNT`.
115
+ function ____exports.isTNT(self, variable)
116
+ return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityTNT"
117
+ end
118
+ --- Helper function to detect if a variable is of type `EntityTear`.
119
+ function ____exports.isTear(self, variable)
120
+ return ____exports.getIsaacAPIClassName(nil, variable) == "EntityTear"
121
+ end
39
122
  --- Helper function to check if an instantiated Isaac API class is equal to another one of the same
40
123
  -- type. You must provide the list of keys to check for.
41
124
  function ____exports.isaacAPIClassEquals(self, object1, object2, keys)
@@ -550,14 +550,14 @@ function ____exports.logTableDifferences(table1, table2)
550
550
  __TS__ArraySort(keys)
551
551
  for ____, key in ipairs(keys) do
552
552
  if not table1KeysSet:has(key) then
553
- ____exports.log(" Table 1 is missing key: " .. key)
553
+ ____exports.log(" Table 1 is missing key: " .. tostring(key))
554
554
  elseif not table2KeysSet:has(key) then
555
- ____exports.log(" Table 2 is missing key: " .. key)
555
+ ____exports.log(" Table 2 is missing key: " .. tostring(key))
556
556
  else
557
557
  local value1 = table1[key]
558
558
  local value2 = table2[key]
559
559
  if value1 ~= value2 then
560
- ____exports.log((((((" " .. key) .. " --> \"") .. tostring(value1)) .. "\" versus \"") .. tostring(value2)) .. "\"")
560
+ ____exports.log((((((" " .. tostring(key)) .. " --> \"") .. tostring(value1)) .. "\" versus \"") .. tostring(value2)) .. "\"")
561
561
  end
562
562
  end
563
563
  end
@@ -6,9 +6,9 @@ export declare function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin
6
6
  /** For `PickupVariant.KEY` (30) */
7
7
  export declare function isKey(pickup: EntityPickup): pickup is EntityPickupKey;
8
8
  /** For `PickupVariant.BOMB` (40) */
9
- export declare function isBomb(pickup: EntityPickup): pickup is EntityPickupBomb;
9
+ export declare function isBombPickup(pickup: EntityPickup): pickup is EntityPickupBomb;
10
10
  /** For `PickupVariant.POOP` (42) */
11
- export declare function isPoop(pickup: EntityPickup): pickup is EntityPickupPoop;
11
+ export declare function isPoopPickup(pickup: EntityPickup): pickup is EntityPickupPoop;
12
12
  /** For `PickupVariant.SACK` (69) */
13
13
  export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
14
14
  /** For `PickupVariant.PILL` (70) */
@@ -1 +1 @@
1
- {"version":3,"file":"pickupVariants.d.ts","sourceRoot":"","sources":["../../src/functions/pickupVariants.ts"],"names":[],"mappings":";AAIA,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAEzE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,mCAAmC;AACnC,wBAAgB,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,eAAe,CAErE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E;AAED,4CAA4C;AAC5C,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,GACnB,MAAM,IAAI,uBAAuB,CAEnC;AAED,2CAA2C;AAC3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,wCAAwC;AACxC,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E"}
1
+ {"version":3,"file":"pickupVariants.d.ts","sourceRoot":"","sources":["../../src/functions/pickupVariants.ts"],"names":[],"mappings":";AAIA,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAEzE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,mCAAmC;AACnC,wBAAgB,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,eAAe,CAErE;AAED,oCAAoC;AACpC,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,oCAAoC;AACpC,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E;AAED,4CAA4C;AAC5C,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,GACnB,MAAM,IAAI,uBAAuB,CAEnC;AAED,2CAA2C;AAC3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,wCAAwC;AACxC,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E"}
@@ -14,11 +14,11 @@ function ____exports.isKey(self, pickup)
14
14
  return pickup.Variant == PickupVariant.KEY
15
15
  end
16
16
  --- For `PickupVariant.BOMB` (40)
17
- function ____exports.isBomb(self, pickup)
17
+ function ____exports.isBombPickup(self, pickup)
18
18
  return pickup.Variant == PickupVariant.BOMB
19
19
  end
20
20
  --- For `PickupVariant.POOP` (42)
21
- function ____exports.isPoop(self, pickup)
21
+ function ____exports.isPoopPickup(self, pickup)
22
22
  return pickup.Variant == PickupVariant.POOP
23
23
  end
24
24
  --- For `PickupVariant.SACK` (69)
@@ -12,7 +12,7 @@ local getPlayerFamiliars = ____familiars.getPlayerFamiliars
12
12
  local ____math = require("functions.math")
13
13
  local getCircleDiscretizedPoints = ____math.getCircleDiscretizedPoints
14
14
  local ____playerIndex = require("functions.playerIndex")
15
- local getPlayers = ____playerIndex.getPlayers
15
+ local getAllPlayers = ____playerIndex.getAllPlayers
16
16
  function movePlayerAndTheirFamiliars(self, player, position)
17
17
  player.Position = position
18
18
  local familiars = getPlayerFamiliars(nil, player)
@@ -31,7 +31,7 @@ local CIRCLE_RADIUS_BETWEEN_PLAYERS = 50
31
31
  function ____exports.movePlayersToCenter(self)
32
32
  local isGreedMode = game:IsGreedMode()
33
33
  local startingPosition = isGreedMode and NEW_FLOOR_STARTING_POSITION_GREED_MODE or NEW_FLOOR_STARTING_POSITION_NORMAL_MODE
34
- local players = getPlayers(nil)
34
+ local players = getAllPlayers(nil)
35
35
  local firstPlayer = players[1]
36
36
  if firstPlayer == nil then
37
37
  return
@@ -10,6 +10,15 @@ import { PlayerIndex } from "../types/PlayerIndex";
10
10
  * helper function instead to get a filtered list of players.
11
11
  */
12
12
  export declare function getAllPlayers(): EntityPlayer[];
13
+ /**
14
+ * Helper function to get all of the other players in the room besides the one provided. (This
15
+ * includes "child" players.)
16
+ */
17
+ export declare function getOtherPlayers(player: EntityPlayer): EntityPlayer[];
18
+ /**
19
+ * Helper function to get the corresponding `EntityPlayer` object that corresponds to a
20
+ * `PlayerIndex`.
21
+ */
13
22
  export declare function getPlayerFromIndex(playerIndex: PlayerIndex): EntityPlayer | undefined;
14
23
  /**
15
24
  * Mods often have to track variables relating to the player. In naive mods, information will only
@@ -32,9 +41,6 @@ export declare function getPlayerFromIndex(playerIndex: PlayerIndex): EntityPlay
32
41
  * Instead, we use the `EntityPlayer.GetCollectibleRNG` method with an arbitrary value of Sad Onion
33
42
  * (1). This works even if the player does not have any Sad Onions.
34
43
  *
35
- * Since the RNG value is the same for both Tainted Lazarus and Dead Tainted Lazarus, we revert to
36
- * using the RNG of The Inner Eye (2) for Dead Tainted Lazarus.
37
- *
38
44
  * Note that by default, this returns the same index for both The Forgotten and The Soul. (Even
39
45
  * though they are technically different characters, they share the same inventory and InitSeed.) If
40
46
  * this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
@@ -71,8 +77,8 @@ export declare function getPlayers(performCharacterExclusions?: boolean): Entity
71
77
  */
72
78
  export declare function getSubPlayerParent(subPlayer: EntitySubPlayer): EntityPlayer | undefined;
73
79
  /**
74
- * Some players are "child" players, meaning that they have a non-undefined Parent property. (For
75
- * example, the Strawman Keeper.)
80
+ * Helper function to detect if a particular player is a "child" player, meaning that they have a
81
+ * non-undefined `EntityPlayer.Parent` property. (For example, the Strawman Keeper.)
76
82
  */
77
83
  export declare function isChildPlayer(player: EntityPlayer): boolean;
78
84
  //# sourceMappingURL=playerIndex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"playerIndex.d.ts","sourceRoot":"","sources":["../../src/functions/playerIndex.ts"],"names":[],"mappings":";;;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAU9C;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,GACvB,YAAY,GAAG,SAAS,CAG1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,6BAA6B,UAAQ,GACpC,WAAW,CA4Bb;AA2BD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,YAAY,GACzB,GAAG,GAAG,SAAS,CAajB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,0BAA0B,UAAQ,GAAG,YAAY,EAAE,CAS7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,GACzB,YAAY,GAAG,SAAS,CAa1B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE3D"}
1
+ {"version":3,"file":"playerIndex.d.ts","sourceRoot":"","sources":["../../src/functions/playerIndex.ts"],"names":[],"mappings":";;;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAU9C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,EAAE,CAMpE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,GACvB,YAAY,GAAG,SAAS,CAG1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,6BAA6B,UAAQ,GACpC,WAAW,CA4Bb;AAiBD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,YAAY,GACzB,GAAG,GAAG,SAAS,CAajB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,0BAA0B,UAAQ,GAAG,YAAY,EAAE,CAS7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,GACzB,YAAY,GAAG,SAAS,CAa1B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE3D"}
@@ -1,8 +1,8 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
- local __TS__ArrayFind = ____lualib.__TS__ArrayFind
5
4
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
5
+ local __TS__ArrayFind = ____lualib.__TS__ArrayFind
6
6
  local ____exports = {}
7
7
  local getPlayerIndexCollectibleType, DEFAULT_COLLECTIBLE_TYPE, EXCLUDED_CHARACTERS
8
8
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
@@ -48,9 +48,6 @@ end
48
48
  -- Instead, we use the `EntityPlayer.GetCollectibleRNG` method with an arbitrary value of Sad Onion
49
49
  -- (1). This works even if the player does not have any Sad Onions.
50
50
  --
51
- -- Since the RNG value is the same for both Tainted Lazarus and Dead Tainted Lazarus, we revert to
52
- -- using the RNG of The Inner Eye (2) for Dead Tainted Lazarus.
53
- --
54
51
  -- Note that by default, this returns the same index for both The Forgotten and The Soul. (Even
55
52
  -- though they are technically different characters, they share the same inventory and InitSeed.) If
56
53
  -- this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
@@ -78,26 +75,10 @@ function ____exports.getPlayerIndex(self, player, differentiateForgottenAndSoul)
78
75
  end
79
76
  function getPlayerIndexCollectibleType(self, player, differentiateForgottenAndSoul)
80
77
  local character = player:GetPlayerType()
81
- repeat
82
- local ____switch10 = character
83
- local ____cond10 = ____switch10 == PlayerType.THE_SOUL
84
- if ____cond10 then
85
- do
86
- return differentiateForgottenAndSoul and CollectibleType.SPOON_BENDER or DEFAULT_COLLECTIBLE_TYPE
87
- end
88
- end
89
- ____cond10 = ____cond10 or ____switch10 == PlayerType.LAZARUS_2_B
90
- if ____cond10 then
91
- do
92
- return CollectibleType.INNER_EYE
93
- end
94
- end
95
- do
96
- do
97
- return DEFAULT_COLLECTIBLE_TYPE
98
- end
99
- end
100
- until true
78
+ if character == PlayerType.THE_SOUL then
79
+ return differentiateForgottenAndSoul and CollectibleType.INNER_EYE or DEFAULT_COLLECTIBLE_TYPE
80
+ end
81
+ return DEFAULT_COLLECTIBLE_TYPE
101
82
  end
102
83
  --- This function always excludes players with a non-undefined parent, since they are not real
103
84
  -- players (e.g. the Strawman Keeper).
@@ -143,13 +124,25 @@ function ____exports.getSubPlayerParent(self, subPlayer)
143
124
  end
144
125
  )
145
126
  end
146
- --- Some players are "child" players, meaning that they have a non-undefined Parent property. (For
147
- -- example, the Strawman Keeper.)
127
+ --- Helper function to detect if a particular player is a "child" player, meaning that they have a
128
+ -- non-undefined `EntityPlayer.Parent` property. (For example, the Strawman Keeper.)
148
129
  function ____exports.isChildPlayer(self, player)
149
130
  return player.Parent ~= nil
150
131
  end
151
132
  DEFAULT_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
152
133
  EXCLUDED_CHARACTERS = __TS__New(Set, {PlayerType.ESAU, PlayerType.THE_SOUL_B})
134
+ --- Helper function to get all of the other players in the room besides the one provided. (This
135
+ -- includes "child" players.)
136
+ function ____exports.getOtherPlayers(self, player)
137
+ local playerPtrHash = GetPtrHash(player)
138
+ local players = ____exports.getAllPlayers(nil)
139
+ return __TS__ArrayFilter(
140
+ players,
141
+ function(____, otherPlayer) return GetPtrHash(otherPlayer) ~= playerPtrHash end
142
+ )
143
+ end
144
+ --- Helper function to get the corresponding `EntityPlayer` object that corresponds to a
145
+ -- `PlayerIndex`.
153
146
  function ____exports.getPlayerFromIndex(self, playerIndex)
154
147
  local players = ____exports.getPlayers(nil)
155
148
  return __TS__ArrayFind(
@@ -31,10 +31,10 @@ local ____bitwise = require("functions.bitwise")
31
31
  local countSetBits = ____bitwise.countSetBits
32
32
  local getKBitOfN = ____bitwise.getKBitOfN
33
33
  local getNumBitsOfN = ____bitwise.getNumBitsOfN
34
- local ____character = require("functions.character")
35
- local getCharacterMaxHeartContainers = ____character.getCharacterMaxHeartContainers
36
- local getCharacterName = ____character.getCharacterName
37
- local isVanillaCharacter = ____character.isVanillaCharacter
34
+ local ____characters = require("functions.characters")
35
+ local getCharacterMaxHeartContainers = ____characters.getCharacterMaxHeartContainers
36
+ local getCharacterName = ____characters.getCharacterName
37
+ local isVanillaCharacter = ____characters.isVanillaCharacter
38
38
  local ____collectibles = require("functions.collectibles")
39
39
  local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
40
40
  local ____collectibleSet = require("functions.collectibleSet")
@@ -10,8 +10,8 @@ local game = ____cachedClasses.game
10
10
  local ____constants = require("constants")
11
11
  local MAX_TAINTED_SAMSON_BERSERK_CHARGE = ____constants.MAX_TAINTED_SAMSON_BERSERK_CHARGE
12
12
  local TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = ____constants.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE
13
- local ____character = require("functions.character")
14
- local getCharacterDeathAnimationName = ____character.getCharacterDeathAnimationName
13
+ local ____characters = require("functions.characters")
14
+ local getCharacterDeathAnimationName = ____characters.getCharacterDeathAnimationName
15
15
  local ____players = require("functions.players")
16
16
  local getPlayerMaxHeartContainers = ____players.getPlayerMaxHeartContainers
17
17
  local getPlayerNumHitsRemaining = ____players.getPlayerNumHitsRemaining
@@ -99,9 +99,10 @@ export declare function getRoomType(roomGridIndex?: int): RoomType;
99
99
  */
100
100
  export declare function getRoomVariant(roomGridIndex?: int): int;
101
101
  /**
102
- * Note that the room visited count will be inaccurate during the period before the PostNewRoom
102
+ * Note that the room visited count will be inaccurate during the period before the `POST_NEW_ROOM`
103
103
  * callback has fired (i.e. when entities are initializing and performing their first update). This
104
- * is because the variable is only incremented immediately before the PostNewRoom callback fires.
104
+ * is because the variable is only incremented immediately before the `POST_NEW_ROOM` callback
105
+ * fires.
105
106
  *
106
107
  * @param roomGridIndex Optional. Default is the current room index.
107
108
  */
@@ -1 +1 @@
1
- {"version":3,"file":"roomData.d.ts","sourceRoot":"","sources":["../../src/functions/roomData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAMtC;;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il, roomGridIndex)
149
149
  return roomData == nil and -1 or roomData.Variant
150
150
  end
151
- --- Note that the room visited count will be inaccurate during the period before the PostNewRoom
151
+ --- Note that the room visited count will be inaccurate during the period before the `POST_NEW_ROOM`
152
152
  -- callback has fired (i.e. when entities are initializing and performing their first update). This
153
- -- is because the variable is only incremented immediately before the PostNewRoom callback fires.
153
+ -- is because the variable is only incremented immediately before the `POST_NEW_ROOM` callback
154
+ -- fires.
154
155
  --
155
156
  -- @param roomGridIndex Optional. Default is the current room index.
156
157
  function ____exports.getRoomVisitedCount(self, roomGridIndex)
@@ -171,16 +171,16 @@ export declare function roomExists(roomGridIndex: int): boolean;
171
171
  */
172
172
  export declare function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int];
173
173
  /**
174
- * If the `Room.Update` method is called in a PostNewRoom callback, then some entities will slide
175
- * around (such as the player). Since those entity velocities are already at zero, setting them to
176
- * zero will have no effect. Thus, a generic solution is to record all of the entity
174
+ * If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
175
+ * slide around (such as the player). Since those entity velocities are already at zero, setting
176
+ * them to zero will have no effect. Thus, a generic solution is to record all of the entity
177
177
  * positions/velocities before updating the room, and then restore those positions/velocities.
178
178
  */
179
179
  export declare function roomUpdateSafe(): void;
180
180
  /**
181
- * Helper function to convert an uncleared room to a cleared room in the PostNewRoom callback. This
182
- * is useful because if enemies are removed in this callback, a room drop will be awarded and the
183
- * doors will start closed and then open.
181
+ * Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
182
+ * This is useful because if enemies are removed in this callback, a room drop will be awarded and
183
+ * the doors will start closed and then open.
184
184
  */
185
185
  export declare function setRoomCleared(): void;
186
186
  /**
@@ -422,9 +422,9 @@ function ____exports.roomGridIndexToXY(self, roomGridIndex)
422
422
  local y = math.floor(roomGridIndex / LEVEL_GRID_ROW_WIDTH)
423
423
  return {x, y}
424
424
  end
425
- --- If the `Room.Update` method is called in a PostNewRoom callback, then some entities will slide
426
- -- around (such as the player). Since those entity velocities are already at zero, setting them to
427
- -- zero will have no effect. Thus, a generic solution is to record all of the entity
425
+ --- If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
426
+ -- slide around (such as the player). Since those entity velocities are already at zero, setting
427
+ -- them to zero will have no effect. Thus, a generic solution is to record all of the entity
428
428
  -- positions/velocities before updating the room, and then restore those positions/velocities.
429
429
  function ____exports.roomUpdateSafe(self)
430
430
  local room = game:GetRoom()
@@ -435,9 +435,9 @@ function ____exports.roomUpdateSafe(self)
435
435
  setEntityPositions(nil, entityPositions, entities)
436
436
  setEntityVelocities(nil, entityVelocities, entities)
437
437
  end
438
- --- Helper function to convert an uncleared room to a cleared room in the PostNewRoom callback. This
439
- -- is useful because if enemies are removed in this callback, a room drop will be awarded and the
440
- -- doors will start closed and then open.
438
+ --- Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
439
+ -- This is useful because if enemies are removed in this callback, a room drop will be awarded and
440
+ -- the doors will start closed and then open.
441
441
  function ____exports.setRoomCleared(self)
442
442
  local room = game:GetRoom()
443
443
  local roomClear = room:IsClear()
@@ -27,6 +27,7 @@ export declare function getStageType(): StageType;
27
27
  /** Helper function to directly warp to a specific stage using the "stage" console command. */
28
28
  export declare function goToStage(stage: LevelStage, stageType: StageType): void;
29
29
  export declare function isRepentanceStage(stageType: StageType): boolean;
30
+ export declare function onAscent(): boolean;
30
31
  export declare function onCathedral(): boolean;
31
32
  export declare function onChest(): boolean;
32
33
  export declare function onDarkRoom(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAM/E;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAA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;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CASvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAG3E;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED,iDAAiD;AACjD,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAIvE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAI/D;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED,wBAAgB,OAAO,IAAI,OAAO,CASjC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAQpC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C;AAED,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
@@ -1,5 +1,6 @@
1
1
  local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
3
4
  local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
4
5
  local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
5
6
  local ____cachedClasses = require("cachedClasses")
@@ -86,6 +87,9 @@ function ____exports.goToStage(self, stage, stageType)
86
87
  local command = ("stage " .. tostring(stage)) .. stageTypeLetterSuffix
87
88
  Isaac.ExecuteCommand(command)
88
89
  end
90
+ function ____exports.onAscent(self)
91
+ return game:GetStateFlag(GameStateFlag.BACKWARDS_PATH)
92
+ end
89
93
  function ____exports.onCathedral(self)
90
94
  local level = game:GetLevel()
91
95
  local stage = level:GetStage()
@@ -3,7 +3,7 @@
3
3
  * In a `Map`, you can use the `clear` method to delete every element. However, in a `LuaMap`, the
4
4
  * `clear` method does not exist. Use this helper function as a drop-in replacement for this.
5
5
  */
6
- export declare function clearTable(luaMap: LuaMap): void;
6
+ export declare function clearTable(luaMap: LuaMap<AnyNotNil, unknown>): void;
7
7
  /** Helper function to copy specific values from a object to a table. */
8
8
  export declare function copyValuesToTable(object: unknown, keys: string[], luaMap: LuaMap<string, unknown>): void;
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/functions/table.ts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI/C;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,EAAE,CAoBX;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CA4BV;AAED;;;;;GAKG;AACH,wBAAgB,mBAA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