isaacscript-common 13.3.4 → 14.1.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 (668) hide show
  1. package/dist/index.d.ts +1644 -441
  2. package/dist/isaacscript-common.lua +19643 -16276
  3. package/dist/src/callbacks/customRevive.lua +10 -1
  4. package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
  5. package/dist/src/callbacks/postAmbush.lua +7 -12
  6. package/dist/src/callbacks/postBombExploded.lua +3 -3
  7. package/dist/src/callbacks/postDoorRender.lua +2 -2
  8. package/dist/src/callbacks/postEffectStateChanged.lua +3 -3
  9. package/dist/src/callbacks/postFamiliarStateChanged.lua +3 -3
  10. package/dist/src/callbacks/postFlip.lua +1 -1
  11. package/dist/src/callbacks/postGridEntity.lua +2 -2
  12. package/dist/src/callbacks/postNPCStateChanged.lua +3 -3
  13. package/dist/src/callbacks/postPickupStateChanged.lua +3 -3
  14. package/dist/src/callbacks/postPlayerCollectible.d.ts.map +1 -1
  15. package/dist/src/callbacks/postPlayerCollectible.lua +5 -9
  16. package/dist/src/callbacks/postRoomClearChanged.d.ts.map +1 -1
  17. package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
  18. package/dist/src/callbacks/reorderedCallbacks.lua +7 -7
  19. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
  20. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
  21. package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
  22. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
  23. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
  24. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
  25. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
  26. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
  27. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
  28. package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
  29. package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts +1 -1
  30. package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts.map +1 -1
  31. package/dist/src/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
  32. package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts +1 -1
  33. package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts.map +1 -1
  34. package/dist/src/callbacks/subscriptions/postGridEntityInit.lua +3 -3
  35. package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts +3 -3
  36. package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts.map +1 -1
  37. package/dist/src/callbacks/subscriptions/postGridEntityRemove.lua +4 -4
  38. package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts +1 -1
  39. package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts.map +1 -1
  40. package/dist/src/callbacks/subscriptions/postGridEntityRender.lua +3 -3
  41. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts +1 -1
  42. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts.map +1 -1
  43. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.lua +3 -3
  44. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts +1 -1
  45. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts.map +1 -1
  46. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
  47. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -1
  48. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
  49. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
  50. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
  51. package/dist/src/callbacks/subscriptions/postRockRender.d.ts +1 -1
  52. package/dist/src/callbacks/subscriptions/postRockRender.d.ts.map +1 -1
  53. package/dist/src/callbacks/subscriptions/postRockRender.lua +3 -3
  54. package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts +1 -1
  55. package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts.map +1 -1
  56. package/dist/src/callbacks/subscriptions/postRockUpdate.lua +3 -3
  57. package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts +1 -1
  58. package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts.map +1 -1
  59. package/dist/src/callbacks/subscriptions/postSpikesRender.lua +3 -3
  60. package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts +1 -1
  61. package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts.map +1 -1
  62. package/dist/src/callbacks/subscriptions/postSpikesUpdate.lua +3 -3
  63. package/dist/src/callbacks/subscriptions/postTNTRender.d.ts +1 -1
  64. package/dist/src/callbacks/subscriptions/postTNTRender.d.ts.map +1 -1
  65. package/dist/src/callbacks/subscriptions/postTNTRender.lua +3 -3
  66. package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts +1 -1
  67. package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts.map +1 -1
  68. package/dist/src/callbacks/subscriptions/postTNTUpdate.lua +3 -3
  69. package/dist/src/callbacks.d.ts +106 -0
  70. package/dist/src/callbacks.d.ts.map +1 -0
  71. package/dist/src/callbacks.lua +176 -0
  72. package/dist/src/classes/DefaultMap.d.ts.map +1 -1
  73. package/dist/src/classes/ModFeature.d.ts +11 -0
  74. package/dist/src/classes/ModFeature.d.ts.map +1 -0
  75. package/dist/src/classes/ModFeature.lua +13 -0
  76. package/dist/src/classes/ModUpgraded.d.ts +49 -11
  77. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  78. package/dist/src/classes/ModUpgraded.lua +118 -16
  79. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
  80. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
  81. package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
  82. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
  83. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
  84. package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
  85. package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
  86. package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
  87. package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
  88. package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
  89. package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
  90. package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
  91. package/dist/src/classes/callbacks/PostBoneSwing.d.ts +14 -0
  92. package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
  93. package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
  94. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
  95. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
  96. package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
  97. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
  98. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
  99. package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
  100. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +20 -0
  101. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
  102. package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
  103. package/dist/src/classes/callbacks/PostCustomRevive.d.ts +6 -0
  104. package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -0
  105. package/dist/src/classes/callbacks/PostCustomRevive.lua +17 -0
  106. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts +15 -0
  107. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -0
  108. package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +44 -0
  109. package/dist/src/classes/callbacks/PostDoorRender.d.ts +7 -0
  110. package/dist/src/classes/callbacks/PostDoorRender.d.ts.map +1 -0
  111. package/dist/src/classes/callbacks/PostDoorRender.lua +24 -0
  112. package/dist/src/classes/callbacks/PostDoorUpdate.d.ts +7 -0
  113. package/dist/src/classes/callbacks/PostDoorUpdate.d.ts.map +1 -0
  114. package/dist/src/classes/callbacks/PostDoorUpdate.lua +24 -0
  115. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts +12 -0
  116. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts.map +1 -0
  117. package/dist/src/classes/callbacks/PostEffectInitLate.lua +27 -0
  118. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts +13 -0
  119. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts.map +1 -0
  120. package/dist/src/classes/callbacks/PostEffectStateChanged.lua +33 -0
  121. package/dist/src/classes/callbacks/PostEsauJr.d.ts +6 -0
  122. package/dist/src/classes/callbacks/PostEsauJr.d.ts.map +1 -0
  123. package/dist/src/classes/callbacks/PostEsauJr.lua +17 -0
  124. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts +12 -0
  125. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts.map +1 -0
  126. package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +27 -0
  127. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts +13 -0
  128. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts.map +1 -0
  129. package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +33 -0
  130. package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts +6 -0
  131. package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts.map +1 -0
  132. package/dist/src/classes/callbacks/PostFirstEsauJr.lua +17 -0
  133. package/dist/src/classes/callbacks/PostFirstFlip.d.ts +6 -0
  134. package/dist/src/classes/callbacks/PostFirstFlip.d.ts.map +1 -0
  135. package/dist/src/classes/callbacks/PostFirstFlip.lua +17 -0
  136. package/dist/src/classes/callbacks/PostFlip.d.ts +6 -0
  137. package/dist/src/classes/callbacks/PostFlip.d.ts.map +1 -0
  138. package/dist/src/classes/callbacks/PostFlip.lua +17 -0
  139. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts +6 -0
  140. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts.map +1 -0
  141. package/dist/src/classes/callbacks/PostGameStartedReordered.lua +17 -0
  142. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts +6 -0
  143. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts.map +1 -0
  144. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.lua +17 -0
  145. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts +12 -0
  146. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -0
  147. package/dist/src/classes/callbacks/PostGreedModeWave.lua +34 -0
  148. package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts +6 -0
  149. package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts.map +1 -0
  150. package/dist/src/classes/callbacks/PostGridEntityBroken.lua +17 -0
  151. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +9 -0
  152. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -0
  153. package/dist/src/classes/callbacks/PostGridEntityCollision.lua +36 -0
  154. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts +6 -0
  155. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts.map +1 -0
  156. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.lua +17 -0
  157. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +9 -0
  158. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -0
  159. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.lua +31 -0
  160. package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts +6 -0
  161. package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts.map +1 -0
  162. package/dist/src/classes/callbacks/PostGridEntityCustomInit.lua +17 -0
  163. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts +9 -0
  164. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -0
  165. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.lua +25 -0
  166. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts +6 -0
  167. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts.map +1 -0
  168. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.lua +17 -0
  169. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts +6 -0
  170. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts.map +1 -0
  171. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.lua +17 -0
  172. package/dist/src/classes/callbacks/PostGridEntityInit.d.ts +6 -0
  173. package/dist/src/classes/callbacks/PostGridEntityInit.d.ts.map +1 -0
  174. package/dist/src/classes/callbacks/PostGridEntityInit.lua +17 -0
  175. package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts +9 -0
  176. package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -0
  177. package/dist/src/classes/callbacks/PostGridEntityRemove.lua +28 -0
  178. package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts +6 -0
  179. package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts.map +1 -0
  180. package/dist/src/classes/callbacks/PostGridEntityStateChanged.lua +17 -0
  181. package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts +6 -0
  182. package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts.map +1 -0
  183. package/dist/src/classes/callbacks/PostGridEntityUpdate.lua +17 -0
  184. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts +14 -0
  185. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -0
  186. package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +35 -0
  187. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +12 -0
  188. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
  189. package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
  190. package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts +6 -0
  191. package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts.map +1 -0
  192. package/dist/src/classes/callbacks/PostNewLevelReordered.lua +17 -0
  193. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +13 -0
  194. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
  195. package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
  196. package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts +6 -0
  197. package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts.map +1 -0
  198. package/dist/src/classes/callbacks/PostNewRoomReordered.lua +17 -0
  199. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts +6 -0
  200. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts.map +1 -0
  201. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.lua +17 -0
  202. package/dist/src/classes/callbacks/PostPitRender.d.ts +7 -0
  203. package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
  204. package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
  205. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts +15 -0
  206. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -0
  207. package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +87 -0
  208. package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts +6 -0
  209. package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts.map +1 -0
  210. package/dist/src/classes/callbacks/PostPlayerRenderReordered.lua +17 -0
  211. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts +6 -0
  212. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts.map +1 -0
  213. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.lua +17 -0
  214. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +13 -0
  215. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
  216. package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
  217. package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
  218. package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
  219. package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
  220. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts +7 -0
  221. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts.map +1 -0
  222. package/dist/src/classes/callbacks/PreBerserkDeath.lua +36 -0
  223. package/dist/src/classes/callbacks/PreCustomRevive.d.ts +6 -0
  224. package/dist/src/classes/callbacks/PreCustomRevive.d.ts.map +1 -0
  225. package/dist/src/classes/callbacks/PreCustomRevive.lua +17 -0
  226. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +10 -0
  227. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
  228. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
  229. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
  230. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
  231. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
  232. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
  233. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
  234. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
  235. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts +10 -0
  236. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts.map +1 -0
  237. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.lua +20 -0
  238. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts +11 -0
  239. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts.map +1 -0
  240. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.lua +19 -0
  241. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts +11 -0
  242. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts.map +1 -0
  243. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.lua +19 -0
  244. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts +11 -0
  245. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts.map +1 -0
  246. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.lua +24 -0
  247. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts +10 -0
  248. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts.map +1 -0
  249. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.lua +19 -0
  250. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +10 -0
  251. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
  252. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
  253. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
  254. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
  255. package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
  256. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
  257. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
  258. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
  259. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts +11 -0
  260. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts.map +1 -0
  261. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.lua +19 -0
  262. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +10 -0
  263. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
  264. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
  265. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +134 -0
  266. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -0
  267. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +220 -0
  268. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +39 -0
  269. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -0
  270. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +140 -0
  271. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts +19 -0
  272. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -0
  273. package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +52 -0
  274. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts +16 -0
  275. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -0
  276. package/dist/src/classes/features/callbackLogic/FlipDetection.lua +58 -0
  277. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +27 -0
  278. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -0
  279. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +108 -0
  280. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts +19 -0
  281. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -0
  282. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +69 -0
  283. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts +46 -0
  284. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts.map +1 -0
  285. package/dist/src/classes/features/callbackLogic/GridEntityDetection.lua +126 -0
  286. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts +24 -0
  287. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -0
  288. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +72 -0
  289. package/dist/src/classes/features/other/RunInNFrames.d.ts +123 -0
  290. package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -0
  291. package/dist/src/classes/features/other/RunInNFrames.lua +109 -0
  292. package/dist/src/classes/private/CustomCallback.d.ts +26 -0
  293. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
  294. package/dist/src/classes/private/CustomCallback.lua +63 -0
  295. package/dist/src/classes/private/Feature.d.ts +19 -0
  296. package/dist/src/classes/private/Feature.d.ts.map +1 -0
  297. package/dist/src/classes/private/Feature.lua +16 -0
  298. package/dist/src/core/upgradeMod.d.ts +18 -1
  299. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  300. package/dist/src/core/upgradeMod.lua +44 -9
  301. package/dist/src/decorators.d.ts +9 -0
  302. package/dist/src/decorators.d.ts.map +1 -0
  303. package/dist/src/decorators.lua +12 -0
  304. package/dist/src/enums/ISCFeature.d.ts +12 -0
  305. package/dist/src/enums/ISCFeature.d.ts.map +1 -0
  306. package/dist/src/enums/ISCFeature.lua +12 -0
  307. package/dist/src/enums/LadderSubTypeCustom.d.ts +17 -0
  308. package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
  309. package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
  310. package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
  311. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  312. package/dist/src/enums/ModCallbackCustom.lua +85 -87
  313. package/dist/src/enums/ModCallbackCustom2.d.ts +53 -0
  314. package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
  315. package/dist/src/enums/ModCallbackCustom2.lua +102 -0
  316. package/dist/src/features/customGridEntity.d.ts.map +1 -1
  317. package/dist/src/features/customGridEntity.lua +6 -8
  318. package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
  319. package/dist/src/features/customHotkeys.d.ts.map +1 -0
  320. package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
  321. package/dist/src/features/customPickup.d.ts.map +1 -1
  322. package/dist/src/features/customPickup.lua +6 -2
  323. package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
  324. package/dist/src/features/customStage/backdrop.lua +3 -1
  325. package/dist/src/features/customStage/shadows.d.ts.map +1 -1
  326. package/dist/src/features/customStage/shadows.lua +3 -1
  327. package/dist/src/features/customTrapdoor/init.lua +1 -7
  328. package/dist/src/features/customTrapdoor/touched.lua +1 -1
  329. package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
  330. package/dist/src/features/deployJSONRoom.lua +6 -8
  331. package/dist/src/features/firstLast.d.ts.map +1 -1
  332. package/dist/src/features/firstLast.lua +3 -3
  333. package/dist/src/features/saveDataManager/constants.d.ts +1 -1
  334. package/dist/src/features/saveDataManager/constants.d.ts.map +1 -1
  335. package/dist/src/features/saveDataManager/exports.d.ts +5 -0
  336. package/dist/src/features/saveDataManager/exports.d.ts.map +1 -1
  337. package/dist/src/features/saveDataManager/exports.lua +16 -0
  338. package/dist/src/features/saveDataManager/main.d.ts +8 -2
  339. package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
  340. package/dist/src/features/saveDataManager/main.lua +3 -5
  341. package/dist/src/features/saveDataManager/save.lua +2 -3
  342. package/dist/src/features.d.ts +34 -0
  343. package/dist/src/features.d.ts.map +1 -0
  344. package/dist/src/features.lua +68 -0
  345. package/dist/src/functions/ambush.d.ts +6 -0
  346. package/dist/src/functions/ambush.d.ts.map +1 -1
  347. package/dist/src/functions/ambush.lua +31 -0
  348. package/dist/src/functions/characters.lua +3 -3
  349. package/dist/src/functions/charge.d.ts +30 -8
  350. package/dist/src/functions/charge.d.ts.map +1 -1
  351. package/dist/src/functions/charge.lua +38 -2
  352. package/dist/src/functions/chargeBar.d.ts +6 -0
  353. package/dist/src/functions/chargeBar.d.ts.map +1 -1
  354. package/dist/src/functions/chargeBar.lua +6 -0
  355. package/dist/src/functions/decorators.d.ts +19 -0
  356. package/dist/src/functions/decorators.d.ts.map +1 -0
  357. package/dist/src/functions/decorators.lua +32 -0
  358. package/dist/src/functions/flying.lua +4 -4
  359. package/dist/src/functions/gridEntities.lua +5 -5
  360. package/dist/src/functions/gridEntitiesSpecific.lua +12 -12
  361. package/dist/src/functions/itemPool.lua +2 -2
  362. package/dist/src/functions/minimap.d.ts +4 -0
  363. package/dist/src/functions/minimap.d.ts.map +1 -1
  364. package/dist/src/functions/minimap.lua +4 -0
  365. package/dist/src/functions/playerHealth.lua +6 -6
  366. package/dist/src/functions/playerIndex.lua +2 -2
  367. package/dist/src/functions/players.d.ts +14 -3
  368. package/dist/src/functions/players.d.ts.map +1 -1
  369. package/dist/src/functions/players.lua +35 -16
  370. package/dist/src/functions/pocketItems.lua +1 -1
  371. package/dist/src/functions/roomTransition.d.ts +3 -4
  372. package/dist/src/functions/roomTransition.d.ts.map +1 -1
  373. package/dist/src/functions/roomTransition.lua +4 -32
  374. package/dist/src/functions/rooms.d.ts +1 -1
  375. package/dist/src/functions/rooms.d.ts.map +1 -1
  376. package/dist/src/functions/rooms.lua +1 -1
  377. package/dist/src/functions/run.d.ts +5 -0
  378. package/dist/src/functions/run.d.ts.map +1 -1
  379. package/dist/src/functions/run.lua +6 -0
  380. package/dist/src/functions/spawnCollectible.d.ts +24 -5
  381. package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
  382. package/dist/src/functions/spawnCollectible.lua +44 -4
  383. package/dist/src/functions/table.d.ts +2 -0
  384. package/dist/src/functions/table.d.ts.map +1 -1
  385. package/dist/src/functions/table.lua +7 -0
  386. package/dist/src/functions/trinkets.lua +1 -1
  387. package/dist/src/functions/tstlClass.d.ts +21 -9
  388. package/dist/src/functions/tstlClass.d.ts.map +1 -1
  389. package/dist/src/functions/tstlClass.lua +49 -24
  390. package/dist/src/functions/utils.d.ts +44 -2
  391. package/dist/src/functions/utils.d.ts.map +1 -1
  392. package/dist/src/functions/utils.lua +43 -2
  393. package/dist/src/index.d.ts +15 -2
  394. package/dist/src/index.d.ts.map +1 -1
  395. package/dist/src/index.lua +42 -10
  396. package/dist/src/initCustomCallbacks.d.ts.map +1 -1
  397. package/dist/src/initCustomCallbacks.lua +0 -3
  398. package/dist/src/initFeatures.lua +3 -3
  399. package/dist/src/interfaces/SaveData.d.ts.map +1 -1
  400. package/dist/src/interfaces/{private/TSTLClassMetatable.d.ts → TSTLClassMetatable.d.ts} +0 -0
  401. package/dist/src/interfaces/TSTLClassMetatable.d.ts.map +1 -0
  402. package/dist/src/interfaces/{private/TSTLClassMetatable.lua → TSTLClassMetatable.lua} +0 -0
  403. package/dist/src/interfaces/private/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
  404. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
  405. package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +3 -0
  406. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +201 -0
  407. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
  408. package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +7 -0
  409. package/dist/src/maps/characterNameToTypeMap.lua +12 -12
  410. package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
  411. package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
  412. package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
  413. package/dist/src/objects/characterDamageMultipliers.lua +6 -6
  414. package/dist/src/objects/characterNames.lua +6 -6
  415. package/dist/src/objects/playerNamePNGFileNames.lua +6 -6
  416. package/dist/src/objects/playerPortraitPNGFileNames.lua +6 -6
  417. package/dist/src/sets/charactersThatStartWithAnActiveItemSet.lua +1 -1
  418. package/dist/src/sets/charactersWithFreeDevilDealsSet.d.ts.map +1 -1
  419. package/dist/src/sets/charactersWithFreeDevilDealsSet.lua +1 -1
  420. package/dist/src/sets/charactersWithNoRedHeartsSet.lua +3 -3
  421. package/dist/src/sets/charactersWithNoSoulHeartsSet.lua +2 -2
  422. package/dist/src/sets/lostStyleCharactersSet.lua +4 -4
  423. package/dist/src/types/AllButFirst.d.ts +5 -0
  424. package/dist/src/types/AllButFirst.d.ts.map +1 -0
  425. package/dist/src/types/AllButFirst.lua +2 -0
  426. package/dist/src/types/AllButLast.d.ts +2 -0
  427. package/dist/src/types/AllButLast.d.ts.map +1 -0
  428. package/dist/src/types/AllButLast.lua +2 -0
  429. package/dist/src/types/Constructor.d.ts +2 -0
  430. package/dist/src/types/Constructor.d.ts.map +1 -0
  431. package/dist/src/types/Constructor.lua +2 -0
  432. package/dist/src/types/FunctionTuple.d.ts +5 -0
  433. package/dist/src/types/FunctionTuple.d.ts.map +1 -0
  434. package/dist/src/types/FunctionTuple.lua +2 -0
  435. package/dist/src/types/HasAllEnumKeys.d.ts +26 -0
  436. package/dist/src/types/HasAllEnumKeys.d.ts.map +1 -0
  437. package/dist/src/types/HasAllEnumKeys.lua +2 -0
  438. package/dist/src/types/LowercaseKeys.d.ts +3 -0
  439. package/dist/src/types/LowercaseKeys.d.ts.map +1 -0
  440. package/dist/src/types/LowercaseKeys.lua +2 -0
  441. package/dist/src/types/StartsWithLowercase.d.ts +2 -0
  442. package/dist/src/types/StartsWithLowercase.d.ts.map +1 -0
  443. package/dist/src/types/StartsWithLowercase.lua +2 -0
  444. package/dist/src/types/StartsWithUppercase.d.ts +2 -0
  445. package/dist/src/types/StartsWithUppercase.d.ts.map +1 -0
  446. package/dist/src/types/StartsWithUppercase.lua +2 -0
  447. package/dist/src/types/UnionToIntersection.d.ts +3 -0
  448. package/dist/src/types/UnionToIntersection.d.ts.map +1 -0
  449. package/dist/src/types/UnionToIntersection.lua +2 -0
  450. package/dist/src/types/UppercaseKeys.d.ts +3 -0
  451. package/dist/src/types/UppercaseKeys.d.ts.map +1 -0
  452. package/dist/src/types/UppercaseKeys.lua +2 -0
  453. package/dist/src/types/private/AllButFirst.d.ts +5 -0
  454. package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
  455. package/dist/src/types/private/AllButFirst.lua +2 -0
  456. package/dist/src/types/private/CallbackTuple.d.ts +20 -0
  457. package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
  458. package/dist/src/types/private/CallbackTuple.lua +2 -0
  459. package/dist/src/types/private/MatchingCallbackCustom.d.ts +16 -0
  460. package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
  461. package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
  462. package/package.json +2 -2
  463. package/src/callbacks/customRevive.ts +13 -1
  464. package/src/callbacks/postAmbush.ts +7 -14
  465. package/src/callbacks/postBombExploded.ts +1 -1
  466. package/src/callbacks/postBoneSwing.ts +2 -1
  467. package/src/callbacks/postCollectibleEmpty.ts +2 -0
  468. package/src/callbacks/postCollectibleInitFirst.ts +2 -0
  469. package/src/callbacks/postDoorRender.ts +2 -2
  470. package/src/callbacks/postEffectStateChanged.ts +3 -6
  471. package/src/callbacks/postFamiliarStateChanged.ts +3 -3
  472. package/src/callbacks/postFlip.ts +2 -2
  473. package/src/callbacks/postGridEntity.ts +3 -7
  474. package/src/callbacks/postNPCStateChanged.ts +3 -3
  475. package/src/callbacks/postNewRoomEarly.ts +1 -1
  476. package/src/callbacks/postPickupStateChanged.ts +3 -6
  477. package/src/callbacks/postPlayerCollectible.ts +8 -12
  478. package/src/callbacks/postRoomClearChanged.ts +3 -7
  479. package/src/callbacks/reorderedCallbacks.ts +6 -6
  480. package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
  481. package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
  482. package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
  483. package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
  484. package/src/callbacks/subscriptions/postGridEntityBroken.ts +4 -7
  485. package/src/callbacks/subscriptions/postGridEntityCollision.ts +4 -4
  486. package/src/callbacks/subscriptions/postGridEntityInit.ts +4 -7
  487. package/src/callbacks/subscriptions/postGridEntityRemove.ts +10 -9
  488. package/src/callbacks/subscriptions/postGridEntityRender.ts +4 -7
  489. package/src/callbacks/subscriptions/postGridEntityStateChanged.ts +4 -7
  490. package/src/callbacks/subscriptions/postGridEntityUpdate.ts +4 -7
  491. package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +9 -2
  492. package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
  493. package/src/callbacks/subscriptions/postRockRender.ts +6 -7
  494. package/src/callbacks/subscriptions/postRockUpdate.ts +6 -7
  495. package/src/callbacks/subscriptions/postSpikesRender.ts +4 -7
  496. package/src/callbacks/subscriptions/postSpikesUpdate.ts +4 -7
  497. package/src/callbacks/subscriptions/postTNTRender.ts +4 -7
  498. package/src/callbacks/subscriptions/postTNTUpdate.ts +4 -7
  499. package/src/callbacks.ts +134 -0
  500. package/src/classes/DefaultMap.ts +3 -3
  501. package/src/classes/ModFeature.ts +14 -0
  502. package/src/classes/ModUpgraded.ts +205 -45
  503. package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
  504. package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
  505. package/src/classes/callbacks/PostBombExploded.ts +21 -0
  506. package/src/classes/callbacks/PostBombInitLate.ts +28 -0
  507. package/src/classes/callbacks/PostBoneSwing.ts +61 -0
  508. package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
  509. package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
  510. package/src/classes/callbacks/PostCursedTeleport.ts +186 -0
  511. package/src/classes/callbacks/PostCustomRevive.ts +11 -0
  512. package/src/classes/callbacks/PostDiceRoomActivated.ts +68 -0
  513. package/src/classes/callbacks/PostDoorRender.ts +19 -0
  514. package/src/classes/callbacks/PostDoorUpdate.ts +19 -0
  515. package/src/classes/callbacks/PostEffectInitLate.ts +28 -0
  516. package/src/classes/callbacks/PostEffectStateChanged.ts +35 -0
  517. package/src/classes/callbacks/PostEsauJr.ts +11 -0
  518. package/src/classes/callbacks/PostFamiliarInitLate.ts +28 -0
  519. package/src/classes/callbacks/PostFamiliarStateChanged.ts +35 -0
  520. package/src/classes/callbacks/PostFirstEsauJr.ts +11 -0
  521. package/src/classes/callbacks/PostFirstFlip.ts +11 -0
  522. package/src/classes/callbacks/PostFlip.ts +11 -0
  523. package/src/classes/callbacks/PostGameStartedReordered.ts +11 -0
  524. package/src/classes/callbacks/PostGameStartedReorderedLast.ts +11 -0
  525. package/src/classes/callbacks/PostGreedModeWave.ts +37 -0
  526. package/src/classes/callbacks/PostGridEntityBroken.ts +11 -0
  527. package/src/classes/callbacks/PostGridEntityCollision.ts +65 -0
  528. package/src/classes/callbacks/PostGridEntityCustomBroken.ts +11 -0
  529. package/src/classes/callbacks/PostGridEntityCustomCollision.ts +53 -0
  530. package/src/classes/callbacks/PostGridEntityCustomInit.ts +11 -0
  531. package/src/classes/callbacks/PostGridEntityCustomRemove.ts +32 -0
  532. package/src/classes/callbacks/PostGridEntityCustomStateChanged.ts +11 -0
  533. package/src/classes/callbacks/PostGridEntityCustomUpdate.ts +11 -0
  534. package/src/classes/callbacks/PostGridEntityInit.ts +11 -0
  535. package/src/classes/callbacks/PostGridEntityRemove.ts +39 -0
  536. package/src/classes/callbacks/PostGridEntityStateChanged.ts +11 -0
  537. package/src/classes/callbacks/PostGridEntityUpdate.ts +11 -0
  538. package/src/classes/callbacks/PostHolyMantleRemoved.ts +45 -0
  539. package/src/classes/callbacks/PostKnifeInitLate.ts +28 -0
  540. package/src/classes/callbacks/PostNewLevelReordered.ts +11 -0
  541. package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
  542. package/src/classes/callbacks/PostNewRoomReordered.ts +11 -0
  543. package/src/classes/callbacks/PostPEffectUpdateReordered.ts +11 -0
  544. package/src/classes/callbacks/PostPitRender.ts +21 -0
  545. package/src/classes/callbacks/PostPlayerFatalDamage.ts +127 -0
  546. package/src/classes/callbacks/PostPlayerRenderReordered.ts +11 -0
  547. package/src/classes/callbacks/PostPlayerUpdateReordered.ts +11 -0
  548. package/src/classes/callbacks/PostRoomClearChanged.ts +40 -0
  549. package/src/classes/callbacks/PostSpikesRender.ts +21 -0
  550. package/src/classes/callbacks/PreBerserkDeath.ts +42 -0
  551. package/src/classes/callbacks/PreCustomRevive.ts +11 -0
  552. package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
  553. package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
  554. package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
  555. package/src/classes/callbacks/validation/CustomCallbackDoor.ts +28 -0
  556. package/src/classes/callbacks/validation/CustomCallbackEffect.ts +29 -0
  557. package/src/classes/callbacks/validation/CustomCallbackFamiliar.ts +30 -0
  558. package/src/classes/callbacks/validation/CustomCallbackGridEntity.ts +42 -0
  559. package/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.ts +36 -0
  560. package/src/classes/callbacks/validation/CustomCallbackKnife.ts +27 -0
  561. package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
  562. package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +47 -0
  563. package/src/classes/callbacks/validation/CustomCallbackRevive.ts +27 -0
  564. package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
  565. package/src/classes/features/callbackLogic/CustomGridEntities.ts +398 -0
  566. package/src/classes/features/callbackLogic/CustomRevive.ts +214 -0
  567. package/src/classes/features/callbackLogic/EsauJrDetection.ts +98 -0
  568. package/src/classes/features/callbackLogic/FlipDetection.ts +82 -0
  569. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +160 -0
  570. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +90 -0
  571. package/src/classes/features/callbackLogic/GridEntityDetection.ts +231 -0
  572. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +126 -0
  573. package/src/classes/features/other/RunInNFrames.ts +256 -0
  574. package/src/classes/private/CustomCallback.ts +82 -0
  575. package/src/classes/private/Feature.ts +24 -0
  576. package/src/core/upgradeMod.ts +77 -17
  577. package/src/decorators.ts +13 -0
  578. package/src/enums/ISCFeature.ts +47 -0
  579. package/src/enums/LadderSubTypeCustom.ts +17 -0
  580. package/src/enums/ModCallbackCustom.ts +314 -243
  581. package/src/enums/ModCallbackCustom2.ts +57 -0
  582. package/src/features/customGridEntity.ts +3 -7
  583. package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
  584. package/src/features/customPickup.ts +4 -2
  585. package/src/features/customStage/backdrop.ts +2 -1
  586. package/src/features/customStage/shadows.ts +2 -1
  587. package/src/features/customTrapdoor/init.ts +0 -1
  588. package/src/features/customTrapdoor/touched.ts +1 -1
  589. package/src/features/deployJSONRoom.ts +3 -7
  590. package/src/features/extraConsoleCommands/listCommands.ts +1 -1
  591. package/src/features/firstLast.ts +3 -7
  592. package/src/features/saveDataManager/constants.ts +1 -1
  593. package/src/features/saveDataManager/exports.ts +27 -0
  594. package/src/features/saveDataManager/main.ts +30 -21
  595. package/src/features/saveDataManager/save.ts +2 -2
  596. package/src/features.ts +90 -0
  597. package/src/functions/ambush.ts +26 -1
  598. package/src/functions/characters.ts +3 -3
  599. package/src/functions/charge.ts +30 -8
  600. package/src/functions/chargeBar.ts +6 -0
  601. package/src/functions/decorators.ts +45 -0
  602. package/src/functions/flying.ts +4 -4
  603. package/src/functions/gridEntities.ts +5 -5
  604. package/src/functions/gridEntitiesSpecific.ts +12 -12
  605. package/src/functions/itemPool.ts +2 -2
  606. package/src/functions/minimap.ts +4 -0
  607. package/src/functions/playerHealth.ts +6 -6
  608. package/src/functions/playerIndex.ts +2 -2
  609. package/src/functions/players.ts +26 -7
  610. package/src/functions/pocketItems.ts +1 -1
  611. package/src/functions/roomTransition.ts +3 -27
  612. package/src/functions/rooms.ts +1 -1
  613. package/src/functions/run.ts +12 -0
  614. package/src/functions/spawnCollectible.ts +44 -4
  615. package/src/functions/table.ts +11 -0
  616. package/src/functions/trinkets.ts +1 -1
  617. package/src/functions/tstlClass.ts +48 -24
  618. package/src/functions/utils.ts +56 -2
  619. package/src/index.ts +15 -2
  620. package/src/initCustomCallbacks.ts +1 -2
  621. package/src/initFeatures.ts +2 -2
  622. package/src/interfaces/SaveData.ts +4 -2
  623. package/src/interfaces/{private/TSTLClassMetatable.ts → TSTLClassMetatable.ts} +0 -0
  624. package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +4 -23
  625. package/src/interfaces/private/AddCallbackParametersCustom2.ts +343 -0
  626. package/src/maps/characterNameToTypeMap.ts +12 -12
  627. package/src/objects/callbackRegisterFunctions.ts +2 -4
  628. package/src/objects/characterDamageMultipliers.ts +6 -6
  629. package/src/objects/characterNames.ts +6 -6
  630. package/src/objects/playerNamePNGFileNames.ts +6 -6
  631. package/src/objects/playerPortraitPNGFileNames.ts +6 -6
  632. package/src/sets/charactersThatStartWithAnActiveItemSet.ts +1 -1
  633. package/src/sets/charactersWithFreeDevilDealsSet.ts +1 -1
  634. package/src/sets/charactersWithNoRedHeartsSet.ts +3 -3
  635. package/src/sets/charactersWithNoSoulHeartsSet.ts +2 -2
  636. package/src/sets/lostStyleCharactersSet.ts +4 -4
  637. package/src/types/AllButFirst.ts +6 -0
  638. package/src/types/AllButLast.ts +3 -0
  639. package/src/types/Constructor.ts +2 -0
  640. package/src/types/FunctionTuple.ts +4 -0
  641. package/src/types/HasAllEnumKeys.ts +25 -0
  642. package/src/types/LowercaseKeys.ts +3 -0
  643. package/src/types/StartsWithLowercase.ts +3 -0
  644. package/src/types/StartsWithUppercase.ts +3 -0
  645. package/src/types/UnionToIntersection.ts +6 -0
  646. package/src/types/UppercaseKeys.ts +3 -0
  647. package/src/types/private/AllButFirst.ts +6 -0
  648. package/src/types/private/CallbackTuple.ts +21 -0
  649. package/src/types/private/MatchingCallbackCustom.ts +32 -0
  650. package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
  651. package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
  652. package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
  653. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
  654. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
  655. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
  656. package/dist/src/classes/CustomCallback.d.ts +0 -8
  657. package/dist/src/classes/CustomCallback.d.ts.map +0 -1
  658. package/dist/src/classes/CustomCallback.lua +0 -28
  659. package/dist/src/features/customDoor.d.ts +0 -51
  660. package/dist/src/features/customDoor.d.ts.map +0 -1
  661. package/dist/src/features/customDoor.lua +0 -53
  662. package/dist/src/features/setHotkey.d.ts.map +0 -1
  663. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
  664. package/dist/src/interfaces/private/TSTLClassMetatable.d.ts.map +0 -1
  665. package/src/callbacks/postCustomDoorEnter.ts +0 -250
  666. package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
  667. package/src/classes/CustomCallback.ts +0 -23
  668. package/src/features/customDoor.ts +0 -66
@@ -27,13 +27,16 @@ local getRoomShapeCharges = ____roomShape.getRoomShapeCharges
27
27
  -- - AAA Battery
28
28
  --
29
29
  -- @param player The player to grant the charges to.
30
- -- @param activeSlot The slot to grant the charges to.
30
+ -- @param activeSlot Optional. The slot to grant the charges to. Default is `ActiveSlot.PRIMARY`.
31
31
  -- @param numCharges Optional. The amount of charges to grant. Default is 1.
32
32
  -- @param playSoundEffect Optional. Whether to play a charge-related sound effect. Default is true.
33
33
  -- @returns The amount of charges that were actually granted. For example, if the active item was
34
34
  -- only one away from a full charge, but the `numCharges` provided to this function was 2,
35
35
  -- then this function would return 1.
36
36
  function ____exports.addCharge(self, player, activeSlot, numCharges, playSoundEffect)
37
+ if activeSlot == nil then
38
+ activeSlot = ActiveSlot.PRIMARY
39
+ end
37
40
  if numCharges == nil then
38
41
  numCharges = 1
39
42
  end
@@ -66,12 +69,16 @@ end
66
69
  -- - Not charging active items with `chargetype="special"`
67
70
  --
68
71
  -- @param player The player to grant the charges to.
69
- -- @param activeSlot The active item slot to grant the charges to.
72
+ -- @param activeSlot Optional. The active item slot to grant the charges to. Default is
73
+ -- `ActiveSlot.PRIMARY`.
70
74
  -- @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
71
75
  -- room for the purposes of calculating how much charge to grant. Default
72
76
  -- is true.
73
77
  -- @param playSoundEffect Optional. Whether to play a charge-related sound effect. Default is true.
74
78
  function ____exports.addRoomClearChargeToSlot(self, player, activeSlot, bigRoomDoubleCharge, playSoundEffect)
79
+ if activeSlot == nil then
80
+ activeSlot = ActiveSlot.PRIMARY
81
+ end
75
82
  if bigRoomDoubleCharge == nil then
76
83
  bigRoomDoubleCharge = true
77
84
  end
@@ -115,7 +122,13 @@ end
115
122
  -- This function accounts for The Battery. For example, if the player has 2/6 charges on a D6, this
116
123
  -- function will return 10 (because there are 4 charges remaining on the base charge and 6 charges
117
124
  -- remaining on The Battery charge).
125
+ --
126
+ -- @param player The player to get the charges from.
127
+ -- @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
118
128
  function ____exports.getChargesAwayFromMax(self, player, activeSlot)
129
+ if activeSlot == nil then
130
+ activeSlot = ActiveSlot.PRIMARY
131
+ end
119
132
  local totalCharge = ____exports.getTotalCharge(nil, player, activeSlot)
120
133
  local activeItem = player:GetActiveItem(activeSlot)
121
134
  local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
@@ -126,12 +139,27 @@ end
126
139
  --- Helper function to get the combined normal charge and the battery charge for the player's active
127
140
  -- item. This is useful because you have to add these two values together when setting the active
128
141
  -- charge.
142
+ --
143
+ -- @param player The player to get the charges from.
144
+ -- @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
129
145
  function ____exports.getTotalCharge(self, player, activeSlot)
146
+ if activeSlot == nil then
147
+ activeSlot = ActiveSlot.PRIMARY
148
+ end
130
149
  local activeCharge = player:GetActiveCharge(activeSlot)
131
150
  local batteryCharge = player:GetBatteryCharge(activeSlot)
132
151
  return activeCharge + batteryCharge
133
152
  end
153
+ --- Helper function to play the appropriate sound effect for a player after getting one or more
154
+ -- charges on their active item. (There is a different sound depending on whether the item is fully
155
+ -- charged or not.)
156
+ --
157
+ -- @param player The player to play the sound effect for.
158
+ -- @param activeSlot Optional. The slot that was just charged. Default is `ActiveSlot.PRIMARY`.
134
159
  function ____exports.playChargeSoundEffect(self, player, activeSlot)
160
+ if activeSlot == nil then
161
+ activeSlot = ActiveSlot.PRIMARY
162
+ end
135
163
  for ____, soundEffect in ipairs({SoundEffect.BATTERY_CHARGE, SoundEffect.BEEP}) do
136
164
  sfxManager:Stop(soundEffect)
137
165
  end
@@ -199,7 +227,15 @@ function ____exports.addRoomClearCharges(self, bigRoomDoubleCharge)
199
227
  ____exports.addRoomClearCharge(nil, player, bigRoomDoubleCharge)
200
228
  end
201
229
  end
230
+ --- Helper function to check if a player's active item is "double charged", meaning that it has both
231
+ -- a full normal charge and a full charge from The Battery.
232
+ --
233
+ -- @param player The player to check.
234
+ -- @param activeSlot Optional. The slot to check. Default is `ActiveSlot.PRIMARY`.
202
235
  function ____exports.isActiveSlotDoubleCharged(self, player, activeSlot)
236
+ if activeSlot == nil then
237
+ activeSlot = ActiveSlot.PRIMARY
238
+ end
203
239
  local collectibleType = player:GetActiveItem(activeSlot)
204
240
  local batteryCharge = player:GetBatteryCharge(activeSlot)
205
241
  local maxCharges = getCollectibleMaxCharges(nil, collectibleType)
@@ -4,11 +4,17 @@ import { ChargeBarSprites } from "../interfaces/ChargeBarSprites";
4
4
  /**
5
5
  * Constructor for a `ChargeBarSprites` object. For more information, see the `renderChargeBar`
6
6
  * helper function.
7
+ *
8
+ * Note that this is for the vertical charge bar that represents the number of charges that an
9
+ * active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
7
10
  */
8
11
  export declare function newChargeBarSprites(maxCharges: int): ChargeBarSprites;
9
12
  /**
10
13
  * Helper function to render a charge bar on the screen. First, call the `newChargeBarSprites`
11
14
  * function to initialize the sprites, and then call this function on every render frame.
15
+ *
16
+ * Note that this is for the vertical charge bar that represents the number of charges that an
17
+ * active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
12
18
  */
13
19
  export declare function renderChargeBar(sprites: ChargeBarSprites, position: Vector, normalCharges: int, batteryCharges: int): void;
14
20
  //# sourceMappingURL=chargeBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chargeBar.d.ts","sourceRoot":"","sources":["../../../src/functions/chargeBar.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIlE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,GAAG,GAAG,gBAAgB,CAwBrE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,GAAG,EAClB,cAAc,EAAE,GAAG,GAClB,IAAI,CAgBN"}
1
+ {"version":3,"file":"chargeBar.d.ts","sourceRoot":"","sources":["../../../src/functions/chargeBar.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIlE;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,GAAG,GAAG,gBAAgB,CAwBrE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,GAAG,EAClB,cAAc,EAAE,GAAG,GAClB,IAAI,CAgBN"}
@@ -8,6 +8,9 @@ end
8
8
  local CHARGE_BAR_ANM2 = "gfx/ui/ui_chargebar.anm2"
9
9
  --- Constructor for a `ChargeBarSprites` object. For more information, see the `renderChargeBar`
10
10
  -- helper function.
11
+ --
12
+ -- Note that this is for the vertical charge bar that represents the number of charges that an
13
+ -- active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
11
14
  function ____exports.newChargeBarSprites(self, maxCharges)
12
15
  local back = Sprite()
13
16
  back:Load(CHARGE_BAR_ANM2, true)
@@ -34,6 +37,9 @@ function ____exports.newChargeBarSprites(self, maxCharges)
34
37
  end
35
38
  --- Helper function to render a charge bar on the screen. First, call the `newChargeBarSprites`
36
39
  -- function to initialize the sprites, and then call this function on every render frame.
40
+ --
41
+ -- Note that this is for the vertical charge bar that represents the number of charges that an
42
+ -- active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
37
43
  function ____exports.renderChargeBar(self, sprites, position, normalCharges, batteryCharges)
38
44
  sprites.back:Render(position)
39
45
  local normalChargesClamp = getChargeBarClamp(nil, normalCharges, sprites.maxCharges)
@@ -0,0 +1,19 @@
1
+ import { ModCallback } from "isaac-typescript-definitions";
2
+ import { ModFeature } from "../classes/ModFeature";
3
+ import { ModUpgraded } from "../classes/ModUpgraded";
4
+ import { ModCallbackCustom2 } from "../enums/ModCallbackCustom2";
5
+ import { AddCallbackParametersCustom2 } from "../interfaces/private/AddCallbackParametersCustom2";
6
+ import { AllButFirst } from "../types/AllButFirst";
7
+ /**
8
+ * A decorator function that signifies that the decorated class method should be automatically
9
+ * registered with `Mod.AddCallback`.
10
+ */
11
+ export declare function Callback<T extends ModCallback>(modCallback: T, ...optionalArgs: AllButFirst<AddCallbackParameters[T]>): <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
12
+ /**
13
+ * A decorator function that signifies that the decorated class method should be automatically
14
+ * registered with `ModUpgraded.AddCallbackCustom`.
15
+ */
16
+ export declare function CallbackCustom<T extends ModCallbackCustom2>(modCallbackCustom: T, ...optionalArgs: AllButFirst<AddCallbackParametersCustom2[T]>): <Class extends {
17
+ mod: ModUpgraded;
18
+ }>(target: Class, propertyKey: string) => void;
19
+ //# sourceMappingURL=decorators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/functions/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,EAC5C,WAAW,EAAE,CAAC,EACd,GAAG,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,kGAIvC,MAAM,+CAElB,IAAI,CAMR;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,kBAAkB,EACzD,iBAAiB,EAAE,CAAC,EACpB,GAAG,YAAY,EAAE,WAAW,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;SAEhC,WAAW;+BAEzB,MAAM,KAClB,IAAI,CAMR"}
@@ -0,0 +1,32 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Spread = ____lualib.__TS__Spread
3
+ local ____exports = {}
4
+ --- A decorator function that signifies that the decorated class method should be automatically
5
+ -- registered with `Mod.AddCallback`.
6
+ function ____exports.Callback(self, modCallback, ...)
7
+ local optionalArgs = {...}
8
+ return function(____, target, propertyKey, _descriptor)
9
+ local methodName = propertyKey
10
+ local method = target[methodName]
11
+ target.mod:AddCallback(
12
+ modCallback,
13
+ method,
14
+ __TS__Spread(optionalArgs)
15
+ )
16
+ end
17
+ end
18
+ --- A decorator function that signifies that the decorated class method should be automatically
19
+ -- registered with `ModUpgraded.AddCallbackCustom`.
20
+ function ____exports.CallbackCustom(self, modCallbackCustom, ...)
21
+ local optionalArgs = {...}
22
+ return function(____, target, propertyKey)
23
+ local methodName = propertyKey
24
+ local method = target[methodName]
25
+ target.mod:AddCallbackCustom2(
26
+ modCallbackCustom,
27
+ method,
28
+ __TS__Spread(optionalArgs)
29
+ )
30
+ end
31
+ end
32
+ return ____exports
@@ -16,11 +16,11 @@ local copySet = ____set.copySet
16
16
  local deleteSetsFromSet = ____set.deleteSetsFromSet
17
17
  local FLYING_CHARACTERS = __TS__New(Set, {
18
18
  PlayerType.AZAZEL,
19
- PlayerType.THE_LOST,
20
- PlayerType.THE_SOUL,
21
- PlayerType.THE_LOST_B,
19
+ PlayerType.LOST,
20
+ PlayerType.SOUL,
21
+ PlayerType.LOST_B,
22
22
  PlayerType.JACOB_2_B,
23
- PlayerType.THE_SOUL_B
23
+ PlayerType.SOUL_B
24
24
  })
25
25
  local FLYING_TRINKETS = __TS__New(Set, {TrinketType.BAT_WING, TrinketType.AZAZELS_STUMP})
26
26
  local FLYING_NULL_ITEMS = {NullItemID.REVERSE_SUN, NullItemID.SPIRIT_SHACKLES_SOUL, NullItemID.LOST_CURSE}
@@ -169,11 +169,11 @@ function ____exports.convertXMLGridEntityType(self, gridEntityXMLType, gridEntit
169
169
  error("Failed to find an entry in the grid entity map for XML entity type: " .. tostring(gridEntityXMLType))
170
170
  end
171
171
  local gridEntityType = gridEntityArray[1]
172
- local gridEntityVariant = gridEntityArray[2]
172
+ local variant = gridEntityArray[2]
173
173
  if gridEntityType == GridEntityType.SPIKES_ON_OFF or gridEntityType == GridEntityType.PRESSURE_PLATE or gridEntityType == GridEntityType.TELEPORTER then
174
- gridEntityVariant = gridEntityXMLVariant
174
+ variant = gridEntityXMLVariant
175
175
  end
176
- return {gridEntityType, gridEntityVariant}
176
+ return {gridEntityType, variant}
177
177
  end
178
178
  --- Gets the entities that have a hitbox that overlaps with any part of the square that the grid
179
179
  -- entity is on.
@@ -322,8 +322,8 @@ end
322
322
  -- the actual collision for the entity is removed.
323
323
  function ____exports.isGridEntityBreakableByExplosion(self, gridEntity)
324
324
  local gridEntityType = gridEntity:GetType()
325
- local gridEntityVariant = gridEntity:GetVariant()
326
- local gridEntityTypeVariant = (tostring(gridEntityType) .. ".") .. tostring(gridEntityVariant)
325
+ local variant = gridEntity:GetVariant()
326
+ local gridEntityTypeVariant = (tostring(gridEntityType) .. ".") .. tostring(variant)
327
327
  return BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS:has(gridEntityType) or BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS:has(gridEntityTypeVariant)
328
328
  end
329
329
  --- Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
@@ -132,8 +132,8 @@ function ____exports.getPits(self, pitVariant)
132
132
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
133
133
  local pit = gridEntity:ToPit()
134
134
  if pit ~= nil then
135
- local gridEntityVariant = pit:GetVariant()
136
- if asNumber(nil, pitVariant) == -1 or pitVariant == gridEntityVariant then
135
+ local thisPitVariant = pit:GetVariant()
136
+ if asNumber(nil, pitVariant) == -1 or pitVariant == thisPitVariant then
137
137
  pits[#pits + 1] = pit
138
138
  end
139
139
  end
@@ -152,8 +152,8 @@ function ____exports.getPoops(self, poopVariant)
152
152
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
153
153
  local poop = gridEntity:ToPoop()
154
154
  if poop ~= nil then
155
- local gridEntityVariant = poop:GetVariant()
156
- if asNumber(nil, poopVariant) == -1 or poopVariant == gridEntityVariant then
155
+ local thisPoopVariant = poop:GetVariant()
156
+ if asNumber(nil, poopVariant) == -1 or poopVariant == thisPoopVariant then
157
157
  poops[#poops + 1] = poop
158
158
  end
159
159
  end
@@ -172,8 +172,8 @@ function ____exports.getPressurePlates(self, pressurePlateVariant)
172
172
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
173
173
  local pressurePlate = gridEntity:ToPressurePlate()
174
174
  if pressurePlate ~= nil then
175
- local gridEntityVariant = pressurePlate:GetVariant()
176
- if asNumber(nil, pressurePlateVariant) == -1 or pressurePlateVariant == gridEntityVariant then
175
+ local thisPressurePlateVariant = pressurePlate:GetVariant()
176
+ if asNumber(nil, pressurePlateVariant) == -1 or pressurePlateVariant == thisPressurePlateVariant then
177
177
  pressurePlates[#pressurePlates + 1] = pressurePlate
178
178
  end
179
179
  end
@@ -194,8 +194,8 @@ function ____exports.getRocks(self, variant)
194
194
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
195
195
  local rock = gridEntity:ToRock()
196
196
  if rock ~= nil then
197
- local gridEntityVariant = rock:GetVariant()
198
- if variant == -1 or variant == gridEntityVariant then
197
+ local thisVariant = rock:GetVariant()
198
+ if variant == -1 or variant == thisVariant then
199
199
  rocks[#rocks + 1] = rock
200
200
  end
201
201
  end
@@ -211,8 +211,8 @@ function ____exports.getSpikes(self, variant)
211
211
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
212
212
  local spike = gridEntity:ToSpikes()
213
213
  if spike ~= nil then
214
- local gridEntityVariant = spike:GetVariant()
215
- if variant == -1 or variant == gridEntityVariant then
214
+ local thisVariant = spike:GetVariant()
215
+ if variant == -1 or variant == thisVariant then
216
216
  spikes[#spikes + 1] = spike
217
217
  end
218
218
  end
@@ -228,8 +228,8 @@ function ____exports.getTNT(self, variant)
228
228
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
229
229
  local tnt = gridEntity:ToTNT()
230
230
  if tnt ~= nil then
231
- local gridEntityVariant = tnt:GetVariant()
232
- if variant == -1 or variant == gridEntityVariant then
231
+ local thisVariant = tnt:GetVariant()
232
+ if variant == -1 or variant == thisVariant then
233
233
  tntArray[#tntArray + 1] = tnt
234
234
  end
235
235
  end
@@ -36,7 +36,7 @@ function ____exports.isCollectibleInItemPool(self, collectibleType, itemPoolType
36
36
  if collectibleType == COLLECTIBLE_TYPE_THAT_IS_NOT_IN_ANY_POOLS then
37
37
  return false
38
38
  end
39
- local taintedLosts = getPlayersOfType(nil, PlayerType.THE_LOST_B)
39
+ local taintedLosts = getPlayersOfType(nil, PlayerType.LOST_B)
40
40
  local isOffensive = collectibleHasTag(nil, collectibleType, ItemConfigTag.OFFENSIVE)
41
41
  local changedPlayerTypes = false
42
42
  if not isOffensive then
@@ -60,7 +60,7 @@ function ____exports.isCollectibleInItemPool(self, collectibleType, itemPoolType
60
60
  restoreItemsAndTrinketsThatAffectItemPools(nil, removedItemsMap, removedTrinketsMap)
61
61
  if changedPlayerTypes then
62
62
  for ____, player in ipairs(taintedLosts) do
63
- player:ChangePlayerType(PlayerType.THE_LOST_B)
63
+ player:ChangePlayerType(PlayerType.LOST_B)
64
64
  end
65
65
  end
66
66
  return collectibleUnlocked
@@ -3,6 +3,8 @@ import { DisplayFlag } from "isaac-typescript-definitions";
3
3
  * Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
4
4
  * or not it is visible and so on).
5
5
  *
6
+ * This function automatically accounts for whether or not MinimapAPI is being used.
7
+ *
6
8
  * @param roomGridIndex Set to undefined to use the current room index.
7
9
  * @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
8
10
  * @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
@@ -34,6 +36,8 @@ export declare function getRoomDisplayFlags(roomGridIndex?: int): BitFlags<Displ
34
36
  * This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
35
37
  * the changes will be immediately visible.
36
38
  *
39
+ * This function automatically accounts for whether or not MinimapAPI is being used.
40
+ *
37
41
  * @param displayFlagsMap A map of the display flags that is indexed by the room's safe grid index.
38
42
  */
39
43
  export declare function setDisplayFlags(displayFlagsMap: Map<int, BitFlags<DisplayFlag>>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names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W,EAAE,WAAW,EACxB,gBAAgB,UAAO,GACtB,IAAI,CAwBN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAGvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAiBN;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAEN;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,EACnC,gBAAgB,UAAO,GACtB,IAAI,CAkBN;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,gBAAgB,UAAO,GACtB,IAAI,CAEN"}
@@ -46,6 +46,8 @@ end
46
46
  --- Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
47
47
  -- or not it is visible and so on).
48
48
  --
49
+ -- This function automatically accounts for whether or not MinimapAPI is being used.
50
+ --
49
51
  -- @param roomGridIndex Set to undefined to use the current room index.
50
52
  -- @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
51
53
  -- @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
@@ -105,6 +107,8 @@ end
105
107
  -- This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
106
108
  -- the changes will be immediately visible.
107
109
  --
110
+ -- This function automatically accounts for whether or not MinimapAPI is being used.
111
+ --
108
112
  -- @param displayFlagsMap A map of the display flags that is indexed by the room's safe grid index.
109
113
  function ____exports.setDisplayFlags(self, displayFlagsMap)
110
114
  local level = game:GetLevel()
@@ -91,7 +91,7 @@ function ____exports.removeAllPlayerHealth(self, player)
91
91
  player:AddBrokenHearts(brokenHearts * -1)
92
92
  player:AddMaxHearts(MAX_PLAYER_HEART_CONTAINERS * -2, true)
93
93
  player:AddSoulHearts(MAX_PLAYER_HEART_CONTAINERS * -2)
94
- if isCharacter(nil, player, PlayerType.THE_SOUL) then
94
+ if isCharacter(nil, player, PlayerType.SOUL) then
95
95
  local forgotten = player:GetSubPlayer()
96
96
  if forgotten ~= nil then
97
97
  local forgottenBoneHearts = forgotten:GetBoneHearts()
@@ -119,7 +119,7 @@ function ____exports.setPlayerHealth(self, player, playerHealth)
119
119
  end
120
120
  end
121
121
  end
122
- if character == PlayerType.THE_SOUL and subPlayer ~= nil then
122
+ if character == PlayerType.SOUL and subPlayer ~= nil then
123
123
  subPlayer:AddMaxHearts(playerHealth.maxHearts, false)
124
124
  else
125
125
  player:AddMaxHearts(playerHealth.maxHearts, false)
@@ -345,11 +345,11 @@ function ____exports.getPlayerHealth(self, player)
345
345
  local subPlayer = player:GetSubPlayer()
346
346
  local soulCharges = player:GetEffectiveSoulCharge()
347
347
  local bloodCharges = player:GetEffectiveBloodCharge()
348
- if character == PlayerType.THE_FORGOTTEN and subPlayer ~= nil then
348
+ if character == PlayerType.FORGOTTEN and subPlayer ~= nil then
349
349
  maxHearts = boneHearts * 2
350
350
  boneHearts = 0
351
351
  soulHearts = subPlayer:GetSoulHearts()
352
- elseif character == PlayerType.THE_SOUL and subPlayer ~= nil then
352
+ elseif character == PlayerType.SOUL and subPlayer ~= nil then
353
353
  maxHearts = subPlayer:GetBoneHearts() * 2
354
354
  hearts = subPlayer:GetHearts()
355
355
  end
@@ -360,14 +360,14 @@ function ____exports.getPlayerHealth(self, player)
360
360
  local i = 0
361
361
  while i < extraHearts do
362
362
  local isBoneHeart = player:IsBoneHeart(i)
363
- if character == PlayerType.THE_FORGOTTEN and subPlayer ~= nil then
363
+ if character == PlayerType.FORGOTTEN and subPlayer ~= nil then
364
364
  isBoneHeart = subPlayer:IsBoneHeart(i)
365
365
  end
366
366
  if isBoneHeart then
367
367
  soulHeartTypes[#soulHeartTypes + 1] = HeartSubType.BONE
368
368
  else
369
369
  local isBlackHeart = player:IsBlackHeart(currentSoulHeart + 1)
370
- if character == PlayerType.THE_FORGOTTEN and subPlayer ~= nil then
370
+ if character == PlayerType.FORGOTTEN and subPlayer ~= nil then
371
371
  isBlackHeart = subPlayer:IsBlackHeart(currentSoulHeart + 1)
372
372
  end
373
373
  if isBlackHeart then
@@ -76,7 +76,7 @@ function ____exports.getPlayerIndex(self, player, differentiateForgottenAndSoul)
76
76
  end
77
77
  function getPlayerIndexCollectibleType(self, player, differentiateForgottenAndSoul)
78
78
  local character = player:GetPlayerType()
79
- if character == PlayerType.THE_SOUL then
79
+ if character == PlayerType.SOUL then
80
80
  return differentiateForgottenAndSoul and CollectibleType.INNER_EYE or DEFAULT_COLLECTIBLE_TYPE
81
81
  end
82
82
  return DEFAULT_COLLECTIBLE_TYPE
@@ -131,7 +131,7 @@ function ____exports.isChildPlayer(self, player)
131
131
  return player.Parent ~= nil
132
132
  end
133
133
  DEFAULT_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
134
- EXCLUDED_CHARACTERS = __TS__New(Set, {PlayerType.ESAU, PlayerType.THE_SOUL_B})
134
+ EXCLUDED_CHARACTERS = __TS__New(Set, {PlayerType.ESAU, PlayerType.SOUL_B})
135
135
  --- Helper function to get all of the other players in the room besides the one provided. (This
136
136
  -- includes "child" players.)
137
137
  function ____exports.getOtherPlayers(self, player)
@@ -81,6 +81,11 @@ export declare function getPlayerCollectibleMap(player: EntityPlayer): Map<Colle
81
81
  * a last resort, it will attempt to use the `Entity.ToPlayer` method on the entity itself.
82
82
  */
83
83
  export declare function getPlayerFromEntity(entity: Entity): EntityPlayer | undefined;
84
+ /**
85
+ * Helper function to get an `EntityPlayer` object from an `EntityPtr`. Returns undefined if the
86
+ * entity has gone out of scope or if the associated entity is not a player.
87
+ */
88
+ export declare function getPlayerFromPtr(entityPtr: EntityPtr): EntityPlayer | undefined;
84
89
  /**
85
90
  * Helper function to get the proper name of the player. Use this instead of the
86
91
  * `EntityPlayer.GetName` method because it accounts for Blue Baby, Lazarus II, and Tainted
@@ -153,7 +158,13 @@ export declare function hasLostCurse(player: EntityPlayer): boolean;
153
158
  * items. (Only Tainted Forgotten can pick up items.)
154
159
  */
155
160
  export declare function hasOpenActiveItemSlot(player: EntityPlayer): boolean;
156
- export declare function isActiveSlotEmpty(player: EntityPlayer, activeSlot: ActiveSlot): boolean;
161
+ /**
162
+ * Helper function to check if the active slot of a particular player is empty.
163
+ *
164
+ * @param player The player to check.
165
+ * @param activeSlot Optional. The active slot to check. Default is `ActiveSlot.PRIMARY`.
166
+ */
167
+ export declare function isActiveSlotEmpty(player: EntityPlayer, activeSlot?: ActiveSlot): boolean;
157
168
  /**
158
169
  * Helper function for detecting when a player is Bethany or Tainted Bethany. This is useful if you
159
170
  * need to adjust UI elements to account for Bethany's soul charges or Tainted Bethany's blood
@@ -250,12 +261,12 @@ export declare function removeTrinketCostume(player: EntityPlayer, trinketType:
250
261
  *
251
262
  * @param player The player to give the item to.
252
263
  * @param collectibleType The collectible type of the item to give.
253
- * @param activeSlot The slot to set.
264
+ * @param activeSlot Optional. The slot to set. Default is `ActiveSlot.PRIMARY`.
254
265
  * @param charge Optional. The argument of charges to set. If not specified, the item will be set
255
266
  * with maximum charges.
256
267
  * @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
257
268
  */
258
- export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot: ActiveSlot, charge?: int, keepInPools?: boolean): void;
269
+ export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot?: ActiveSlot, charge?: int, keepInPools?: boolean): void;
259
270
  /**
260
271
  * Helper function to blindfold the player by using a hack with the challenge variable.
261
272
  *
@@ -1 +1 @@
1
- {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAGf,UAAU,EAEV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAetC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,UAAU,GAAG,SAAS,CAMxB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,kBAAkB,EAAE,YAAY,GAAG,KAAK,GACvC,KAAK,CAMP;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,IAAI,UAAU,EAAE,CAG5C;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAiB/D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,EAAE,CAatE;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,YAAY,CAS7C;AAED;;;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AI,CAIN;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAa/D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAalE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
1
+ {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAGf,UAAU,EAEV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAetC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,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C,MAAM,EAAE,YAAY,GAAG,IAAI,CAalE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,aAAqB,EAC/B,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
@@ -272,6 +272,15 @@ function ____exports.getPlayerFromEntity(self, entity)
272
272
  end
273
273
  return entity:ToPlayer()
274
274
  end
275
+ --- Helper function to get an `EntityPlayer` object from an `EntityPtr`. Returns undefined if the
276
+ -- entity has gone out of scope or if the associated entity is not a player.
277
+ function ____exports.getPlayerFromPtr(self, entityPtr)
278
+ local entity = entityPtr.Ref
279
+ if entity == nil then
280
+ return nil
281
+ end
282
+ return entity:ToPlayer()
283
+ end
275
284
  --- Helper function to get the proper name of the player. Use this instead of the
276
285
  -- `EntityPlayer.GetName` method because it accounts for Blue Baby, Lazarus II, and Tainted
277
286
  -- characters.
@@ -389,7 +398,7 @@ end
389
398
  -- If the player is the Tainted Soul, this always returns false, since that character cannot pick up
390
399
  -- items. (Only Tainted Forgotten can pick up items.)
391
400
  function ____exports.hasOpenActiveItemSlot(self, player)
392
- if ____exports.isCharacter(nil, player, PlayerType.THE_SOUL_B) then
401
+ if ____exports.isCharacter(nil, player, PlayerType.SOUL_B) then
393
402
  return false
394
403
  end
395
404
  local activeItemPrimary = player:GetActiveItem(ActiveSlot.PRIMARY)
@@ -400,7 +409,14 @@ function ____exports.hasOpenActiveItemSlot(self, player)
400
409
  end
401
410
  return activeItemPrimary == CollectibleType.NULL
402
411
  end
412
+ --- Helper function to check if the active slot of a particular player is empty.
413
+ --
414
+ -- @param player The player to check.
415
+ -- @param activeSlot Optional. The active slot to check. Default is `ActiveSlot.PRIMARY`.
403
416
  function ____exports.isActiveSlotEmpty(self, player, activeSlot)
417
+ if activeSlot == nil then
418
+ activeSlot = ActiveSlot.PRIMARY
419
+ end
404
420
  local activeCollectibleType = player:GetActiveItem(activeSlot)
405
421
  return activeCollectibleType == CollectibleType.NULL
406
422
  end
@@ -445,7 +461,7 @@ end
445
461
  --- Helper function for detecting when a player is The Lost or Tainted Lost.
446
462
  function ____exports.isLost(self, player)
447
463
  local character = player:GetPlayerType()
448
- return character == PlayerType.THE_LOST or character == PlayerType.THE_LOST_B
464
+ return character == PlayerType.LOST or character == PlayerType.LOST_B
449
465
  end
450
466
  --- Helper function for detecting if a player is one of the Tainted characters.
451
467
  function ____exports.isTainted(self, player)
@@ -491,7 +507,7 @@ function ____exports.removeAllActiveItems(self, player)
491
507
  do
492
508
  local collectibleType = player:GetActiveItem(activeSlot)
493
509
  if collectibleType == CollectibleType.NULL then
494
- goto __continue90
510
+ goto __continue92
495
511
  end
496
512
  local hasCollectible
497
513
  repeat
@@ -501,7 +517,7 @@ function ____exports.removeAllActiveItems(self, player)
501
517
  end
502
518
  until not hasCollectible
503
519
  end
504
- ::__continue90::
520
+ ::__continue92::
505
521
  end
506
522
  end
507
523
  --- Helper function to remove all of the held trinkets from a player.
@@ -513,7 +529,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
513
529
  do
514
530
  local trinketType = player:GetTrinket(trinketSlot)
515
531
  if trinketType == TrinketType.NULL then
516
- goto __continue95
532
+ goto __continue97
517
533
  end
518
534
  local hasTrinket
519
535
  repeat
@@ -523,7 +539,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
523
539
  end
524
540
  until not hasTrinket
525
541
  end
526
- ::__continue95::
542
+ ::__continue97::
527
543
  end
528
544
  end
529
545
  --- Helper function to remove a collectible costume from a player. Use this helper function to avoid
@@ -567,11 +583,14 @@ end
567
583
  --
568
584
  -- @param player The player to give the item to.
569
585
  -- @param collectibleType The collectible type of the item to give.
570
- -- @param activeSlot The slot to set.
586
+ -- @param activeSlot Optional. The slot to set. Default is `ActiveSlot.PRIMARY`.
571
587
  -- @param charge Optional. The argument of charges to set. If not specified, the item will be set
572
588
  -- with maximum charges.
573
589
  -- @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
574
590
  function ____exports.setActiveItem(self, player, collectibleType, activeSlot, charge, keepInPools)
591
+ if activeSlot == nil then
592
+ activeSlot = ActiveSlot.PRIMARY
593
+ end
575
594
  if keepInPools == nil then
576
595
  keepInPools = false
577
596
  end
@@ -586,9 +605,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
586
605
  itemPool:RemoveCollectible(collectibleType)
587
606
  end
588
607
  repeat
589
- local ____switch108 = activeSlot
590
- local ____cond108 = ____switch108 == ActiveSlot.PRIMARY
591
- if ____cond108 then
608
+ local ____switch110 = activeSlot
609
+ local ____cond110 = ____switch110 == ActiveSlot.PRIMARY
610
+ if ____cond110 then
592
611
  do
593
612
  if primaryCollectibleType ~= CollectibleType.NULL then
594
613
  player:RemoveCollectible(primaryCollectibleType)
@@ -597,8 +616,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
597
616
  break
598
617
  end
599
618
  end
600
- ____cond108 = ____cond108 or ____switch108 == ActiveSlot.SECONDARY
601
- if ____cond108 then
619
+ ____cond110 = ____cond110 or ____switch110 == ActiveSlot.SECONDARY
620
+ if ____cond110 then
602
621
  do
603
622
  if primaryCollectibleType ~= CollectibleType.NULL then
604
623
  player:RemoveCollectible(primaryCollectibleType)
@@ -613,16 +632,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
613
632
  break
614
633
  end
615
634
  end
616
- ____cond108 = ____cond108 or ____switch108 == ActiveSlot.POCKET
617
- if ____cond108 then
635
+ ____cond110 = ____cond110 or ____switch110 == ActiveSlot.POCKET
636
+ if ____cond110 then
618
637
  do
619
638
  player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
620
639
  player:SetActiveCharge(charge, activeSlot)
621
640
  break
622
641
  end
623
642
  end
624
- ____cond108 = ____cond108 or ____switch108 == ActiveSlot.POCKET_SINGLE_USE
625
- if ____cond108 then
643
+ ____cond110 = ____cond110 or ____switch110 == ActiveSlot.POCKET_SINGLE_USE
644
+ if ____cond110 then
626
645
  do
627
646
  player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
628
647
  break