isaacscript-common 18.3.0 → 18.3.2

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 (352) hide show
  1. package/dist/index.d.ts +29 -20
  2. package/dist/isaacscript-common.lua +329 -319
  3. package/dist/src/classes/ModFeature.d.ts +2 -2
  4. package/dist/src/classes/ModFeature.d.ts.map +1 -1
  5. package/dist/src/classes/ModFeature.lua +18 -17
  6. package/dist/src/classes/ModUpgradedBase.d.ts.map +1 -1
  7. package/dist/src/classes/ModUpgradedBase.lua +10 -10
  8. package/dist/src/classes/callbacks/EntityTakeDmgFilter.lua +1 -1
  9. package/dist/src/classes/callbacks/EntityTakeDmgPlayer.d.ts.map +1 -1
  10. package/dist/src/classes/callbacks/EntityTakeDmgPlayer.lua +1 -1
  11. package/dist/src/classes/callbacks/InputActionFilter.lua +1 -1
  12. package/dist/src/classes/callbacks/InputActionPlayer.lua +1 -1
  13. package/dist/src/classes/callbacks/PostAmbushFinished.lua +1 -1
  14. package/dist/src/classes/callbacks/PostAmbushStarted.lua +1 -1
  15. package/dist/src/classes/callbacks/PostBombExploded.lua +1 -1
  16. package/dist/src/classes/callbacks/PostBombInitLate.lua +1 -1
  17. package/dist/src/classes/callbacks/PostBoneSwing.lua +1 -1
  18. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
  19. package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +1 -1
  20. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -1
  21. package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +1 -1
  22. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +2 -2
  23. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -1
  24. package/dist/src/classes/callbacks/PostCursedTeleport.lua +19 -21
  25. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -1
  26. package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +1 -1
  27. package/dist/src/classes/callbacks/PostDoorRender.lua +1 -1
  28. package/dist/src/classes/callbacks/PostDoorUpdate.lua +1 -1
  29. package/dist/src/classes/callbacks/PostEffectInitLate.lua +1 -1
  30. package/dist/src/classes/callbacks/PostEffectStateChanged.lua +1 -1
  31. package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +1 -1
  32. package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +1 -1
  33. package/dist/src/classes/callbacks/PostGreedModeWave.lua +1 -1
  34. package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +1 -1
  35. package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
  36. package/dist/src/classes/callbacks/PostItemDischarge.lua +2 -2
  37. package/dist/src/classes/callbacks/PostKnifeInitLate.lua +1 -1
  38. package/dist/src/classes/callbacks/PostLaserInitLate.lua +1 -1
  39. package/dist/src/classes/callbacks/PostNPCDeathFilter.lua +1 -1
  40. package/dist/src/classes/callbacks/PostNPCInitFilter.lua +1 -1
  41. package/dist/src/classes/callbacks/PostNPCInitLate.lua +1 -1
  42. package/dist/src/classes/callbacks/PostNPCRenderFilter.lua +1 -1
  43. package/dist/src/classes/callbacks/PostNPCStateChanged.lua +1 -1
  44. package/dist/src/classes/callbacks/PostNPCUpdateFilter.lua +1 -1
  45. package/dist/src/classes/callbacks/PostNewRoomEarly.lua +1 -1
  46. package/dist/src/classes/callbacks/PostPickupCollect.lua +1 -1
  47. package/dist/src/classes/callbacks/PostPickupInitFirst.lua +1 -1
  48. package/dist/src/classes/callbacks/PostPickupInitLate.lua +1 -1
  49. package/dist/src/classes/callbacks/PostPickupStateChanged.lua +1 -1
  50. package/dist/src/classes/callbacks/PostPitRender.lua +1 -1
  51. package/dist/src/classes/callbacks/PostPitUpdate.lua +1 -1
  52. package/dist/src/classes/callbacks/PostPlayerChangeHealth.lua +1 -1
  53. package/dist/src/classes/callbacks/PostPlayerChangeStat.lua +1 -1
  54. package/dist/src/classes/callbacks/PostPlayerChangeType.lua +1 -1
  55. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts +1 -1
  56. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -1
  57. package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +19 -21
  58. package/dist/src/classes/callbacks/PostPlayerInitFirst.lua +1 -1
  59. package/dist/src/classes/callbacks/PostPlayerInitLate.lua +1 -1
  60. package/dist/src/classes/callbacks/PostPoopRender.lua +1 -1
  61. package/dist/src/classes/callbacks/PostPoopUpdate.lua +1 -1
  62. package/dist/src/classes/callbacks/PostPressurePlateRender.lua +1 -1
  63. package/dist/src/classes/callbacks/PostPressurePlateUpdate.lua +1 -1
  64. package/dist/src/classes/callbacks/PostProjectileInitLate.lua +1 -1
  65. package/dist/src/classes/callbacks/PostPurchase.lua +1 -1
  66. package/dist/src/classes/callbacks/PostRockRender.lua +1 -1
  67. package/dist/src/classes/callbacks/PostRockUpdate.lua +1 -1
  68. package/dist/src/classes/callbacks/PostRoomClearChanged.lua +2 -2
  69. package/dist/src/classes/callbacks/PostSacrifice.d.ts.map +1 -1
  70. package/dist/src/classes/callbacks/PostSacrifice.lua +4 -8
  71. package/dist/src/classes/callbacks/PostSlotCollision.lua +1 -1
  72. package/dist/src/classes/callbacks/PostSlotDestroyed.d.ts.map +1 -1
  73. package/dist/src/classes/callbacks/PostSlotDestroyed.lua +2 -2
  74. package/dist/src/classes/callbacks/PostSpikesRender.lua +1 -1
  75. package/dist/src/classes/callbacks/PostSpikesUpdate.lua +1 -1
  76. package/dist/src/classes/callbacks/PostTNTRender.lua +1 -1
  77. package/dist/src/classes/callbacks/PostTNTUpdate.lua +1 -1
  78. package/dist/src/classes/callbacks/PostTearInitLate.lua +1 -1
  79. package/dist/src/classes/callbacks/PostTearInitVeryLate.lua +1 -1
  80. package/dist/src/classes/callbacks/PostTransformation.lua +1 -1
  81. package/dist/src/classes/callbacks/PostTrinketBreak.d.ts.map +1 -1
  82. package/dist/src/classes/callbacks/PostTrinketBreak.lua +5 -11
  83. package/dist/src/classes/callbacks/PreBerserkDeath.lua +1 -1
  84. package/dist/src/classes/callbacks/PreGetPedestal.d.ts.map +1 -1
  85. package/dist/src/classes/callbacks/PreGetPedestal.lua +1 -1
  86. package/dist/src/classes/callbacks/PreNPCCollisionFilter.lua +1 -1
  87. package/dist/src/classes/callbacks/PreNPCUpdateFilter.lua +1 -1
  88. package/dist/src/classes/callbacks/PreNewLevel.lua +1 -1
  89. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  90. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +2 -2
  91. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +2 -2
  92. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
  93. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +5 -5
  94. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -1
  95. package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +1 -1
  96. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -1
  97. package/dist/src/classes/features/callbackLogic/FlipDetection.lua +1 -1
  98. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
  99. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +1 -1
  100. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -1
  101. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +1 -1
  102. package/dist/src/classes/features/callbackLogic/GridEntityRenderDetection.d.ts.map +1 -1
  103. package/dist/src/classes/features/callbackLogic/GridEntityRenderDetection.lua +1 -1
  104. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
  105. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.lua +2 -2
  106. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts +1 -1
  107. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts.map +1 -1
  108. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.lua +4 -3
  109. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts +8 -3
  110. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts.map +1 -1
  111. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.lua +16 -21
  112. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -1
  113. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +2 -2
  114. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts.map +1 -1
  115. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.lua +1 -1
  116. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.d.ts.map +1 -1
  117. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.lua +2 -2
  118. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts.map +1 -1
  119. package/dist/src/classes/features/other/CharacterHealthConversion.lua +2 -2
  120. package/dist/src/classes/features/other/CharacterStats.lua +1 -1
  121. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
  122. package/dist/src/classes/features/other/CollectibleItemPoolType.lua +1 -1
  123. package/dist/src/classes/features/other/CustomHotkeys.lua +1 -1
  124. package/dist/src/classes/features/other/CustomItemPools.lua +1 -1
  125. package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
  126. package/dist/src/classes/features/other/CustomPickups.lua +1 -1
  127. package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
  128. package/dist/src/classes/features/other/CustomStages.lua +2 -2
  129. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  130. package/dist/src/classes/features/other/CustomTrapdoors.lua +2 -2
  131. package/dist/src/classes/features/other/DisableAllSound.lua +1 -1
  132. package/dist/src/classes/features/other/DisableInputs.d.ts.map +1 -1
  133. package/dist/src/classes/features/other/DisableInputs.lua +1 -1
  134. package/dist/src/classes/features/other/ExtraConsoleCommands.d.ts +1 -1
  135. package/dist/src/classes/features/other/ExtraConsoleCommands.d.ts.map +1 -1
  136. package/dist/src/classes/features/other/ExtraConsoleCommands.lua +17 -16
  137. package/dist/src/classes/features/other/FadeInRemover.lua +1 -1
  138. package/dist/src/classes/features/other/FastReset.lua +1 -1
  139. package/dist/src/classes/features/other/ModdedElementDetection.lua +1 -1
  140. package/dist/src/classes/features/other/NoSirenSteal.d.ts.map +1 -1
  141. package/dist/src/classes/features/other/NoSirenSteal.lua +1 -1
  142. package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
  143. package/dist/src/classes/features/other/Pause.lua +1 -1
  144. package/dist/src/classes/features/other/PersistentEntities.lua +2 -2
  145. package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
  146. package/dist/src/classes/features/other/PickupIndexCreation.lua +1 -1
  147. package/dist/src/classes/features/other/PlayerInventory.lua +1 -1
  148. package/dist/src/classes/features/other/PonyDetection.lua +1 -1
  149. package/dist/src/classes/features/other/PressInput.d.ts.map +1 -1
  150. package/dist/src/classes/features/other/PressInput.lua +1 -1
  151. package/dist/src/classes/features/other/PreventChildEntities.lua +1 -1
  152. package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
  153. package/dist/src/classes/features/other/PreventCollectibleRotation.lua +1 -1
  154. package/dist/src/classes/features/other/PreventGridEntityRespawn.d.ts.map +1 -1
  155. package/dist/src/classes/features/other/PreventGridEntityRespawn.lua +2 -2
  156. package/dist/src/classes/features/other/RoomClearFrame.lua +1 -1
  157. package/dist/src/classes/features/other/RoomHistory.lua +1 -1
  158. package/dist/src/classes/features/other/RunInNFrames.lua +1 -1
  159. package/dist/src/classes/features/other/RunNextRoom.lua +1 -1
  160. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
  161. package/dist/src/classes/features/other/SaveDataManager.lua +2 -2
  162. package/dist/src/classes/features/other/StageHistory.d.ts.map +1 -1
  163. package/dist/src/classes/features/other/StageHistory.lua +1 -1
  164. package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +1 -1
  165. package/dist/src/classes/features/other/debugDisplay/DebugDisplayBomb.lua +1 -1
  166. package/dist/src/classes/features/other/debugDisplay/DebugDisplayDoor.lua +1 -1
  167. package/dist/src/classes/features/other/debugDisplay/DebugDisplayEffect.lua +1 -1
  168. package/dist/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.lua +1 -1
  169. package/dist/src/classes/features/other/debugDisplay/DebugDisplayKnife.lua +1 -1
  170. package/dist/src/classes/features/other/debugDisplay/DebugDisplayLaser.lua +1 -1
  171. package/dist/src/classes/features/other/debugDisplay/DebugDisplayNPC.lua +1 -1
  172. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPickup.lua +1 -1
  173. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPit.lua +1 -1
  174. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPlayer.lua +1 -1
  175. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPoop.lua +1 -1
  176. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPressurePlate.lua +1 -1
  177. package/dist/src/classes/features/other/debugDisplay/DebugDisplayProjectile.lua +1 -1
  178. package/dist/src/classes/features/other/debugDisplay/DebugDisplayRock.lua +1 -1
  179. package/dist/src/classes/features/other/debugDisplay/DebugDisplaySlot.lua +1 -1
  180. package/dist/src/classes/features/other/debugDisplay/DebugDisplaySpikes.lua +1 -1
  181. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTNT.lua +1 -1
  182. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTear.lua +1 -1
  183. package/dist/src/classes/private/CustomCallback.d.ts +2 -2
  184. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
  185. package/dist/src/classes/private/CustomCallback.lua +7 -10
  186. package/dist/src/functions/array.d.ts +5 -1
  187. package/dist/src/functions/array.d.ts.map +1 -1
  188. package/dist/src/functions/array.lua +17 -8
  189. package/dist/src/functions/decorators.d.ts.map +1 -1
  190. package/dist/src/functions/decorators.lua +12 -22
  191. package/dist/src/functions/direction.d.ts +3 -1
  192. package/dist/src/functions/direction.d.ts.map +1 -1
  193. package/dist/src/functions/direction.lua +10 -0
  194. package/dist/src/functions/logMisc.d.ts +1 -0
  195. package/dist/src/functions/logMisc.d.ts.map +1 -1
  196. package/dist/src/functions/logMisc.lua +2 -1
  197. package/dist/src/objects/directionToMoveAction.d.ts +9 -0
  198. package/dist/src/objects/directionToMoveAction.d.ts.map +1 -0
  199. package/dist/src/objects/directionToMoveAction.lua +12 -0
  200. package/dist/src/objects/directionToShootAction.d.ts +9 -0
  201. package/dist/src/objects/directionToShootAction.d.ts.map +1 -0
  202. package/dist/src/objects/directionToShootAction.lua +12 -0
  203. package/dist/src/types/ModUpgraded.d.ts +1 -1
  204. package/dist/src/types/ModUpgraded.d.ts.map +1 -1
  205. package/dist/src/types/private/CallbackTuple.d.ts +17 -8
  206. package/dist/src/types/private/CallbackTuple.d.ts.map +1 -1
  207. package/package.json +1 -1
  208. package/src/classes/ModFeature.ts +43 -21
  209. package/src/classes/ModUpgradedBase.ts +18 -10
  210. package/src/classes/callbacks/EntityTakeDmgFilter.ts +1 -1
  211. package/src/classes/callbacks/EntityTakeDmgPlayer.ts +2 -1
  212. package/src/classes/callbacks/InputActionFilter.ts +1 -1
  213. package/src/classes/callbacks/InputActionPlayer.ts +1 -1
  214. package/src/classes/callbacks/PostAmbushFinished.ts +1 -1
  215. package/src/classes/callbacks/PostAmbushStarted.ts +1 -1
  216. package/src/classes/callbacks/PostBombExploded.ts +1 -1
  217. package/src/classes/callbacks/PostBombInitLate.ts +1 -1
  218. package/src/classes/callbacks/PostBoneSwing.ts +1 -1
  219. package/src/classes/callbacks/PostCollectibleEmpty.ts +2 -1
  220. package/src/classes/callbacks/PostCollectibleInitFirst.ts +2 -1
  221. package/src/classes/callbacks/PostCursedTeleport.ts +52 -60
  222. package/src/classes/callbacks/PostDiceRoomActivated.ts +2 -1
  223. package/src/classes/callbacks/PostDoorRender.ts +1 -1
  224. package/src/classes/callbacks/PostDoorUpdate.ts +1 -1
  225. package/src/classes/callbacks/PostEffectInitLate.ts +1 -1
  226. package/src/classes/callbacks/PostEffectStateChanged.ts +1 -1
  227. package/src/classes/callbacks/PostFamiliarInitLate.ts +1 -1
  228. package/src/classes/callbacks/PostFamiliarStateChanged.ts +1 -1
  229. package/src/classes/callbacks/PostGreedModeWave.ts +1 -1
  230. package/src/classes/callbacks/PostHolyMantleRemoved.ts +1 -1
  231. package/src/classes/callbacks/PostItemDischarge.ts +3 -2
  232. package/src/classes/callbacks/PostKnifeInitLate.ts +1 -1
  233. package/src/classes/callbacks/PostLaserInitLate.ts +1 -1
  234. package/src/classes/callbacks/PostNPCDeathFilter.ts +1 -1
  235. package/src/classes/callbacks/PostNPCInitFilter.ts +1 -1
  236. package/src/classes/callbacks/PostNPCInitLate.ts +1 -1
  237. package/src/classes/callbacks/PostNPCRenderFilter.ts +1 -1
  238. package/src/classes/callbacks/PostNPCStateChanged.ts +1 -1
  239. package/src/classes/callbacks/PostNPCUpdateFilter.ts +1 -1
  240. package/src/classes/callbacks/PostNewRoomEarly.ts +2 -2
  241. package/src/classes/callbacks/PostPickupCollect.ts +1 -1
  242. package/src/classes/callbacks/PostPickupInitFirst.ts +1 -1
  243. package/src/classes/callbacks/PostPickupInitLate.ts +1 -1
  244. package/src/classes/callbacks/PostPickupStateChanged.ts +1 -1
  245. package/src/classes/callbacks/PostPitRender.ts +1 -1
  246. package/src/classes/callbacks/PostPitUpdate.ts +1 -1
  247. package/src/classes/callbacks/PostPlayerChangeHealth.ts +1 -1
  248. package/src/classes/callbacks/PostPlayerChangeStat.ts +1 -1
  249. package/src/classes/callbacks/PostPlayerChangeType.ts +1 -1
  250. package/src/classes/callbacks/PostPlayerFatalDamage.ts +39 -48
  251. package/src/classes/callbacks/PostPlayerInitFirst.ts +2 -2
  252. package/src/classes/callbacks/PostPlayerInitLate.ts +1 -1
  253. package/src/classes/callbacks/PostPoopRender.ts +1 -1
  254. package/src/classes/callbacks/PostPoopUpdate.ts +1 -1
  255. package/src/classes/callbacks/PostPressurePlateRender.ts +1 -1
  256. package/src/classes/callbacks/PostPressurePlateUpdate.ts +1 -1
  257. package/src/classes/callbacks/PostProjectileInitLate.ts +1 -1
  258. package/src/classes/callbacks/PostPurchase.ts +1 -1
  259. package/src/classes/callbacks/PostRockRender.ts +1 -1
  260. package/src/classes/callbacks/PostRockUpdate.ts +1 -1
  261. package/src/classes/callbacks/PostRoomClearChanged.ts +2 -2
  262. package/src/classes/callbacks/PostSacrifice.ts +5 -20
  263. package/src/classes/callbacks/PostSlotCollision.ts +1 -1
  264. package/src/classes/callbacks/PostSlotDestroyed.ts +3 -2
  265. package/src/classes/callbacks/PostSpikesRender.ts +1 -1
  266. package/src/classes/callbacks/PostSpikesUpdate.ts +1 -1
  267. package/src/classes/callbacks/PostTNTRender.ts +1 -1
  268. package/src/classes/callbacks/PostTNTUpdate.ts +1 -1
  269. package/src/classes/callbacks/PostTearInitLate.ts +1 -1
  270. package/src/classes/callbacks/PostTearInitVeryLate.ts +1 -1
  271. package/src/classes/callbacks/PostTransformation.ts +1 -1
  272. package/src/classes/callbacks/PostTrinketBreak.ts +4 -18
  273. package/src/classes/callbacks/PreBerserkDeath.ts +1 -1
  274. package/src/classes/callbacks/PreGetPedestal.ts +2 -1
  275. package/src/classes/callbacks/PreNPCCollisionFilter.ts +1 -1
  276. package/src/classes/callbacks/PreNPCUpdateFilter.ts +1 -1
  277. package/src/classes/callbacks/PreNewLevel.ts +1 -1
  278. package/src/classes/features/callbackLogic/CustomGridEntities.ts +5 -3
  279. package/src/classes/features/callbackLogic/CustomRevive.ts +19 -18
  280. package/src/classes/features/callbackLogic/EsauJrDetection.ts +6 -2
  281. package/src/classes/features/callbackLogic/FlipDetection.ts +2 -1
  282. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +13 -5
  283. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +2 -1
  284. package/src/classes/features/callbackLogic/GridEntityRenderDetection.ts +2 -1
  285. package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +3 -2
  286. package/src/classes/features/callbackLogic/ItemPickupDetection.ts +8 -5
  287. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +67 -71
  288. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +10 -5
  289. package/src/classes/features/callbackLogic/SlotRenderDetection.ts +2 -1
  290. package/src/classes/features/callbackLogic/SlotUpdateDetection.ts +3 -2
  291. package/src/classes/features/other/CharacterHealthConversion.ts +3 -2
  292. package/src/classes/features/other/CharacterStats.ts +1 -1
  293. package/src/classes/features/other/CollectibleItemPoolType.ts +2 -1
  294. package/src/classes/features/other/CustomHotkeys.ts +1 -1
  295. package/src/classes/features/other/CustomItemPools.ts +1 -1
  296. package/src/classes/features/other/CustomPickups.ts +3 -2
  297. package/src/classes/features/other/CustomStages.ts +7 -6
  298. package/src/classes/features/other/CustomTrapdoors.ts +4 -6
  299. package/src/classes/features/other/DisableAllSound.ts +1 -1
  300. package/src/classes/features/other/DisableInputs.ts +6 -3
  301. package/src/classes/features/other/ExtraConsoleCommands.ts +32 -31
  302. package/src/classes/features/other/FadeInRemover.ts +1 -1
  303. package/src/classes/features/other/FastReset.ts +1 -1
  304. package/src/classes/features/other/ModdedElementDetection.ts +1 -1
  305. package/src/classes/features/other/NoSirenSteal.ts +2 -1
  306. package/src/classes/features/other/Pause.ts +3 -2
  307. package/src/classes/features/other/PersistentEntities.ts +2 -2
  308. package/src/classes/features/other/PickupIndexCreation.ts +3 -2
  309. package/src/classes/features/other/PlayerInventory.ts +2 -2
  310. package/src/classes/features/other/PonyDetection.ts +1 -1
  311. package/src/classes/features/other/PressInput.ts +2 -1
  312. package/src/classes/features/other/PreventChildEntities.ts +1 -1
  313. package/src/classes/features/other/PreventCollectibleRotation.ts +4 -2
  314. package/src/classes/features/other/PreventGridEntityRespawn.ts +3 -2
  315. package/src/classes/features/other/RoomClearFrame.ts +1 -1
  316. package/src/classes/features/other/RoomHistory.ts +1 -1
  317. package/src/classes/features/other/RunInNFrames.ts +2 -2
  318. package/src/classes/features/other/RunNextRoom.ts +1 -1
  319. package/src/classes/features/other/SaveDataManager.ts +6 -5
  320. package/src/classes/features/other/StageHistory.ts +1 -4
  321. package/src/classes/features/other/TaintedLazarusPlayers.ts +1 -1
  322. package/src/classes/features/other/debugDisplay/DebugDisplayBomb.ts +1 -1
  323. package/src/classes/features/other/debugDisplay/DebugDisplayDoor.ts +1 -1
  324. package/src/classes/features/other/debugDisplay/DebugDisplayEffect.ts +1 -1
  325. package/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.ts +1 -1
  326. package/src/classes/features/other/debugDisplay/DebugDisplayKnife.ts +1 -1
  327. package/src/classes/features/other/debugDisplay/DebugDisplayLaser.ts +1 -1
  328. package/src/classes/features/other/debugDisplay/DebugDisplayNPC.ts +1 -1
  329. package/src/classes/features/other/debugDisplay/DebugDisplayPickup.ts +1 -1
  330. package/src/classes/features/other/debugDisplay/DebugDisplayPit.ts +1 -1
  331. package/src/classes/features/other/debugDisplay/DebugDisplayPlayer.ts +1 -1
  332. package/src/classes/features/other/debugDisplay/DebugDisplayPoop.ts +1 -1
  333. package/src/classes/features/other/debugDisplay/DebugDisplayPressurePlate.ts +1 -1
  334. package/src/classes/features/other/debugDisplay/DebugDisplayProjectile.ts +1 -1
  335. package/src/classes/features/other/debugDisplay/DebugDisplayRock.ts +1 -1
  336. package/src/classes/features/other/debugDisplay/DebugDisplaySlot.ts +1 -1
  337. package/src/classes/features/other/debugDisplay/DebugDisplaySpikes.ts +1 -1
  338. package/src/classes/features/other/debugDisplay/DebugDisplayTNT.ts +1 -1
  339. package/src/classes/features/other/debugDisplay/DebugDisplayTear.ts +1 -1
  340. package/src/classes/private/CustomCallback.ts +19 -15
  341. package/src/functions/array.ts +14 -5
  342. package/src/functions/decorators.ts +14 -20
  343. package/src/functions/direction.ts +15 -1
  344. package/src/functions/logMisc.ts +4 -1
  345. package/src/objects/directionToMoveAction.ts +10 -0
  346. package/src/objects/directionToShootAction.ts +10 -0
  347. package/src/types/ModUpgraded.ts +1 -1
  348. package/src/types/private/CallbackTuple.ts +17 -8
  349. package/dist/src/types/private/AllButFirst.d.ts +0 -5
  350. package/dist/src/types/private/AllButFirst.d.ts.map +0 -1
  351. package/dist/src/types/private/AllButFirst.lua +0 -2
  352. package/src/types/private/AllButFirst.ts +0 -6
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 18.3.0
3
+ isaacscript-common 18.3.2
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -15408,7 +15408,11 @@ local validateInterfaceMatchesEnum = ____utils.validateInterfaceMatchesEnum
15408
15408
  validateInterfaceMatchesEnum(nil)
15409
15409
  return ____exports
15410
15410
  end,
15411
- ["src.types.private.AllButFirst"] = function(...)
15411
+ ["src.types.AllButFirst"] = function(...)
15412
+ local ____exports = {}
15413
+ return ____exports
15414
+ end,
15415
+ ["src.types.AnyFunction"] = function(...)
15412
15416
  local ____exports = {}
15413
15417
  return ____exports
15414
15418
  end,
@@ -16348,6 +16352,34 @@ ____exports.DIRECTION_TO_DEGREES = {
16348
16352
  [Direction.RIGHT] = 0,
16349
16353
  [Direction.DOWN] = 90
16350
16354
  }
16355
+ return ____exports
16356
+ end,
16357
+ ["src.objects.directionToMoveAction"] = function(...)
16358
+ local ____exports = {}
16359
+ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
16360
+ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
16361
+ local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
16362
+ ____exports.DIRECTION_TO_MOVE_ACTION = {
16363
+ [Direction.NO_DIRECTION] = nil,
16364
+ [Direction.LEFT] = ButtonAction.LEFT,
16365
+ [Direction.UP] = ButtonAction.UP,
16366
+ [Direction.RIGHT] = ButtonAction.RIGHT,
16367
+ [Direction.DOWN] = ButtonAction.DOWN
16368
+ }
16369
+ return ____exports
16370
+ end,
16371
+ ["src.objects.directionToShootAction"] = function(...)
16372
+ local ____exports = {}
16373
+ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
16374
+ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
16375
+ local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
16376
+ ____exports.DIRECTION_TO_SHOOT_ACTION = {
16377
+ [Direction.NO_DIRECTION] = nil,
16378
+ [Direction.LEFT] = ButtonAction.SHOOT_LEFT,
16379
+ [Direction.UP] = ButtonAction.SHOOT_UP,
16380
+ [Direction.RIGHT] = ButtonAction.SHOOT_RIGHT,
16381
+ [Direction.DOWN] = ButtonAction.SHOOT_DOWN
16382
+ }
16351
16383
  return ____exports
16352
16384
  end,
16353
16385
  ["src.functions.array"] = function(...)
@@ -16631,7 +16663,10 @@ function ____exports.getRandomArrayElementAndRemove(self, array, seedOrRNG, exce
16631
16663
  ____exports.arrayRemoveInPlace(nil, array, randomArrayElement)
16632
16664
  return randomArrayElement
16633
16665
  end
16634
- function ____exports.isArray(self, object)
16666
+ function ____exports.isArray(self, object, ensureContiguousValues)
16667
+ if ensureContiguousValues == nil then
16668
+ ensureContiguousValues = true
16669
+ end
16635
16670
  if not isTable(nil, object) then
16636
16671
  return false
16637
16672
  end
@@ -16650,14 +16685,16 @@ function ____exports.isArray(self, object)
16650
16685
  if not hasAllNumberKeys then
16651
16686
  return false
16652
16687
  end
16653
- do
16654
- local i = 1
16655
- while i <= #keys do
16656
- local element = object[i]
16657
- if element == nil then
16658
- return false
16688
+ if ensureContiguousValues then
16689
+ do
16690
+ local i = 1
16691
+ while i <= #keys do
16692
+ local element = object[i]
16693
+ if element == nil then
16694
+ return false
16695
+ end
16696
+ i = i + 1
16659
16697
  end
16660
- i = i + 1
16661
16698
  end
16662
16699
  end
16663
16700
  return true
@@ -16986,6 +17023,10 @@ local ____directionNames = require("src.objects.directionNames")
16986
17023
  local DIRECTION_NAMES = ____directionNames.DIRECTION_NAMES
16987
17024
  local ____directionToDegrees = require("src.objects.directionToDegrees")
16988
17025
  local DIRECTION_TO_DEGREES = ____directionToDegrees.DIRECTION_TO_DEGREES
17026
+ local ____directionToMoveAction = require("src.objects.directionToMoveAction")
17027
+ local DIRECTION_TO_MOVE_ACTION = ____directionToMoveAction.DIRECTION_TO_MOVE_ACTION
17028
+ local ____directionToShootAction = require("src.objects.directionToShootAction")
17029
+ local DIRECTION_TO_SHOOT_ACTION = ____directionToShootAction.DIRECTION_TO_SHOOT_ACTION
16989
17030
  local ____directionToVector = require("src.objects.directionToVector")
16990
17031
  local DIRECTION_TO_VECTOR = ____directionToVector.DIRECTION_TO_VECTOR
16991
17032
  function ____exports.angleToDirection(self, angleDegrees)
@@ -17011,6 +17052,12 @@ end
17011
17052
  function ____exports.directionToDegrees(self, direction)
17012
17053
  return DIRECTION_TO_DEGREES[direction]
17013
17054
  end
17055
+ function ____exports.directionToMoveAction(self, direction)
17056
+ return DIRECTION_TO_MOVE_ACTION[direction]
17057
+ end
17058
+ function ____exports.directionToShootAction(self, direction)
17059
+ return DIRECTION_TO_SHOOT_ACTION[direction]
17060
+ end
17014
17061
  function ____exports.directionToVector(self, direction)
17015
17062
  return DIRECTION_TO_VECTOR[direction]
17016
17063
  end
@@ -17276,7 +17323,6 @@ local ____lualib = require("lualib_bundle")
17276
17323
  local __TS__Class = ____lualib.__TS__Class
17277
17324
  local __TS__ClassExtends = ____lualib.__TS__ClassExtends
17278
17325
  local __TS__Spread = ____lualib.__TS__Spread
17279
- local __TS__ArraySlice = ____lualib.__TS__ArraySlice
17280
17326
  local __TS__ArrayFindIndex = ____lualib.__TS__ArrayFindIndex
17281
17327
  local __TS__ArraySplice = ____lualib.__TS__ArraySplice
17282
17328
  local ____exports = {}
@@ -17291,13 +17337,10 @@ function CustomCallback.prototype.____constructor(self, ...)
17291
17337
  self.subscriptions = {}
17292
17338
  self.fire = function(____, ...)
17293
17339
  local fireArgs = {...}
17294
- for ____, ____value in ipairs(self.subscriptions) do
17295
- local callback = ____value[1]
17296
- local optionalArgsArray = __TS__ArraySlice(____value, 1)
17297
- local optionalArgs = optionalArgsArray
17340
+ for ____, subscription in ipairs(self.subscriptions) do
17341
+ local callbackFunc, optionalArgs = table.unpack(subscription)
17298
17342
  if self:shouldFire(fireArgs, optionalArgs) then
17299
- local callbackCasted = callback
17300
- local value = callbackCasted(
17343
+ local value = callbackFunc(
17301
17344
  nil,
17302
17345
  __TS__Spread(fireArgs)
17303
17346
  )
@@ -17310,10 +17353,11 @@ function CustomCallback.prototype.____constructor(self, ...)
17310
17353
  end
17311
17354
  self.shouldFire = function() return true end
17312
17355
  end
17313
- function CustomCallback.prototype.addSubscriber(self, ...)
17314
- local args = {...}
17356
+ function CustomCallback.prototype.addSubscriber(self, callbackFunc, ...)
17357
+ local optionalArgs = {...}
17358
+ local subscription = {callbackFunc, optionalArgs}
17315
17359
  local ____self_subscriptions_0 = self.subscriptions
17316
- ____self_subscriptions_0[#____self_subscriptions_0 + 1] = args
17360
+ ____self_subscriptions_0[#____self_subscriptions_0 + 1] = subscription
17317
17361
  end
17318
17362
  function CustomCallback.prototype.removeSubscriber(self, callback)
17319
17363
  local subscriptionIndexMatchingCallback = __TS__ArrayFindIndex(
@@ -17354,7 +17398,7 @@ function EntityTakeDmgFilter.prototype.____constructor(self)
17354
17398
  source,
17355
17399
  countdownFrames
17356
17400
  ) end
17357
- self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmg}}}
17401
+ self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, self.entityTakeDmg}}
17358
17402
  end
17359
17403
  return ____exports
17360
17404
  end,
@@ -17390,7 +17434,7 @@ function EntityTakeDmgPlayer.prototype.____constructor(self)
17390
17434
  countdownFrames
17391
17435
  )
17392
17436
  end
17393
- self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}}
17437
+ self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, self.entityTakeDmgPlayer, {EntityType.PLAYER}}}
17394
17438
  end
17395
17439
  return ____exports
17396
17440
  end,
@@ -17415,7 +17459,7 @@ function InputActionFilter.prototype.____constructor(self)
17415
17459
  return (callbackInputHook == nil or callbackInputHook == inputHook) and (callbackButtonAction == nil or callbackButtonAction == buttonAction)
17416
17460
  end
17417
17461
  self.inputAction = function(____, entity, inputHook, buttonAction) return self:fire(entity, inputHook, buttonAction) end
17418
- self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.inputAction}}}
17462
+ self.callbacksUsed = {{ModCallback.INPUT_ACTION, self.inputAction}}
17419
17463
  end
17420
17464
  return ____exports
17421
17465
  end,
@@ -17450,7 +17494,7 @@ function InputActionPlayer.prototype.____constructor(self)
17450
17494
  end
17451
17495
  return self:fire(player, inputHook, buttonAction)
17452
17496
  end
17453
- self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.inputAction}}}
17497
+ self.callbacksUsed = {{ModCallback.INPUT_ACTION, self.inputAction}}
17454
17498
  end
17455
17499
  return ____exports
17456
17500
  end,
@@ -17526,7 +17570,7 @@ function PostAmbushFinished.prototype.____constructor(self)
17526
17570
  self:fire(ambushType)
17527
17571
  end
17528
17572
  end
17529
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
17573
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
17530
17574
  end
17531
17575
  return ____exports
17532
17576
  end,
@@ -17568,7 +17612,7 @@ function PostAmbushStarted.prototype.____constructor(self)
17568
17612
  self:fire(ambushType)
17569
17613
  end
17570
17614
  end
17571
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
17615
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
17572
17616
  end
17573
17617
  return ____exports
17574
17618
  end,
@@ -17597,7 +17641,7 @@ function PostBombExploded.prototype.____constructor(self)
17597
17641
  self:fire(bomb)
17598
17642
  end
17599
17643
  end
17600
- self.callbacksUsed = {{ModCallback.POST_BOMB_UPDATE, {self.postBombUpdate}}}
17644
+ self.callbacksUsed = {{ModCallback.POST_BOMB_UPDATE, self.postBombUpdate}}
17601
17645
  end
17602
17646
  return ____exports
17603
17647
  end,
@@ -17629,7 +17673,7 @@ function PostBombInitLate.prototype.____constructor(self)
17629
17673
  self:fire(bomb)
17630
17674
  end
17631
17675
  end
17632
- self.callbacksUsed = {{ModCallback.POST_BOMB_UPDATE, {self.postBombUpdate}}}
17676
+ self.callbacksUsed = {{ModCallback.POST_BOMB_UPDATE, self.postBombUpdate}}
17633
17677
  end
17634
17678
  return ____exports
17635
17679
  end,
@@ -17659,7 +17703,7 @@ function PostBoneSwing.prototype.____constructor(self)
17659
17703
  self:postKnifeRenderBoneClub(knife)
17660
17704
  end
17661
17705
  end
17662
- self.callbacksUsed = {{ModCallback.POST_KNIFE_RENDER, {self.postKnifeRender}}}
17706
+ self.callbacksUsed = {{ModCallback.POST_KNIFE_RENDER, self.postKnifeRender}}
17663
17707
  end
17664
17708
  function PostBoneSwing.prototype.postKnifeRenderBoneClub(self, knife)
17665
17709
  local sprite = knife:GetSprite()
@@ -17715,7 +17759,7 @@ function PostCollectibleEmpty.prototype.____constructor(self)
17715
17759
  self:collectibleTypeChanged(collectible, oldCollectibleType)
17716
17760
  end
17717
17761
  end
17718
- self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, {self.postPickupUpdateCollectible, PickupVariant.COLLECTIBLE}}}
17762
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, self.postPickupUpdateCollectible, {PickupVariant.COLLECTIBLE}}}
17719
17763
  end
17720
17764
  function PostCollectibleEmpty.prototype.collectibleTypeChanged(self, collectible, oldCollectibleType)
17721
17765
  if collectible.SubType == CollectibleType.NULL then
@@ -21013,7 +21057,7 @@ function PostCollectibleInitFirst.prototype.____constructor(self)
21013
21057
  self.v.run.seenCollectibles:add(collectibleIndex)
21014
21058
  self:fire(collectible)
21015
21059
  end
21016
- self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInitCollectible, PickupVariant.COLLECTIBLE}}}
21060
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, self.postPickupInitCollectible, {PickupVariant.COLLECTIBLE}}}
21017
21061
  end
21018
21062
  return ____exports
21019
21063
  end,
@@ -22040,13 +22084,14 @@ local playerIsTeleportingFromCursedTeleport
22040
22084
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
22041
22085
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
22042
22086
  local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
22043
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
22044
22087
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
22045
22088
  local PlayerVariant = ____isaac_2Dtypescript_2Ddefinitions.PlayerVariant
22046
22089
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
22047
22090
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
22048
22091
  local ____cachedClasses = require("src.core.cachedClasses")
22049
22092
  local game = ____cachedClasses.game
22093
+ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
22094
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
22050
22095
  local ____flag = require("src.functions.flag")
22051
22096
  local hasFlag = ____flag.hasFlag
22052
22097
  local ____playerDataStructures = require("src.functions.playerDataStructures")
@@ -22087,11 +22132,6 @@ function PostCursedTeleport.prototype.____constructor(self)
22087
22132
  level = {numSacrifices = 0}
22088
22133
  }
22089
22134
  self.shouldFire = shouldFirePlayer
22090
- self.entityTakeDmgPlayer = function(____, entity, _amount, damageFlags, _source, _countdownFrames)
22091
- self:incrementNumSacrifices(damageFlags)
22092
- self:setDamageFrame(entity, damageFlags)
22093
- return nil
22094
- end
22095
22135
  self.postPlayerRenderPlayer = function(____, player, _renderOffset)
22096
22136
  local trackingArray = mapGetPlayer(nil, self.v.run.playersDamageFrameMap, player)
22097
22137
  if trackingArray == nil then
@@ -22109,14 +22149,25 @@ function PostCursedTeleport.prototype.____constructor(self)
22109
22149
  mapSetPlayer(nil, self.v.run.playersDamageFrameMap, player, newTrackingArray)
22110
22150
  self:fire(player)
22111
22151
  end
22112
- self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}, {ModCallback.POST_PLAYER_RENDER, {self.postPlayerRenderPlayer, PlayerVariant.PLAYER}}}
22152
+ self.entityTakeDmgPlayer = function(____, player, _amount, damageFlags, _source, _countdownFrames)
22153
+ self:incrementNumSacrifices(damageFlags)
22154
+ self:setDamageFrame(player, damageFlags)
22155
+ return nil
22156
+ end
22157
+ self.callbacksUsed = {{ModCallback.POST_PLAYER_RENDER, self.postPlayerRenderPlayer, {PlayerVariant.PLAYER}}}
22158
+ self.customCallbacksUsed = {{ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER, self.entityTakeDmgPlayer}}
22113
22159
  end
22114
- function PostCursedTeleport.prototype.setDamageFrame(self, entity, damageFlags)
22115
- local gameFrameCount = game:GetFrameCount()
22116
- local player = entity:ToPlayer()
22117
- if player == nil then
22118
- return
22160
+ function PostCursedTeleport.prototype.incrementNumSacrifices(self, damageFlags)
22161
+ local room = game:GetRoom()
22162
+ local roomType = room:GetType()
22163
+ local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
22164
+ if roomType == RoomType.SACRIFICE and isSpikeDamage then
22165
+ local ____self_v_level_0, ____numSacrifices_1 = self.v.level, "numSacrifices"
22166
+ ____self_v_level_0[____numSacrifices_1] = ____self_v_level_0[____numSacrifices_1] + 1
22119
22167
  end
22168
+ end
22169
+ function PostCursedTeleport.prototype.setDamageFrame(self, player, damageFlags)
22170
+ local gameFrameCount = game:GetFrameCount()
22120
22171
  local trackingArray = mapGetPlayer(nil, self.v.run.playersDamageFrameMap, player)
22121
22172
  if trackingArray ~= nil then
22122
22173
  local lastDamageFrame, callbackFiredOnThisFrame = table.unpack(trackingArray)
@@ -22136,15 +22187,6 @@ function PostCursedTeleport.prototype.isPotentialNaturalTeleportFromSacrificeRoo
22136
22187
  local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
22137
22188
  return roomType == RoomType.SACRIFICE and isSpikeDamage and (self.v.level.numSacrifices == 6 or self.v.level.numSacrifices >= 12)
22138
22189
  end
22139
- function PostCursedTeleport.prototype.incrementNumSacrifices(self, damageFlags)
22140
- local room = game:GetRoom()
22141
- local roomType = room:GetType()
22142
- local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
22143
- if roomType == RoomType.SACRIFICE and isSpikeDamage then
22144
- local ____self_v_level_0, ____numSacrifices_1 = self.v.level, "numSacrifices"
22145
- ____self_v_level_0[____numSacrifices_1] = ____self_v_level_0[____numSacrifices_1] + 1
22146
- end
22147
- end
22148
22190
  return ____exports
22149
22191
  end,
22150
22192
  ["src.classes.callbacks.PostCustomRevive"] = function(...)
@@ -22316,7 +22358,7 @@ function PostDiceRoomActivated.prototype.____constructor(self)
22316
22358
  self:fire(closestPlayer, effect.SubType)
22317
22359
  end
22318
22360
  end
22319
- self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, {self.postEffectUpdateDiceFloor, EffectVariant.DICE_FLOOR}}}
22361
+ self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, self.postEffectUpdateDiceFloor, {EffectVariant.DICE_FLOOR}}}
22320
22362
  end
22321
22363
  return ____exports
22322
22364
  end,
@@ -22345,7 +22387,7 @@ function PostDoorRender.prototype.____constructor(self)
22345
22387
  self:fire(door)
22346
22388
  end
22347
22389
  end
22348
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
22390
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
22349
22391
  end
22350
22392
  return ____exports
22351
22393
  end,
@@ -22374,7 +22416,7 @@ function PostDoorUpdate.prototype.____constructor(self)
22374
22416
  self:fire(door)
22375
22417
  end
22376
22418
  end
22377
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
22419
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
22378
22420
  end
22379
22421
  return ____exports
22380
22422
  end,
@@ -22406,7 +22448,7 @@ function PostEffectInitLate.prototype.____constructor(self)
22406
22448
  self:fire(effect)
22407
22449
  end
22408
22450
  end
22409
- self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, {self.postEffectUpdate}}}
22451
+ self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, self.postEffectUpdate}}
22410
22452
  end
22411
22453
  return ____exports
22412
22454
  end,
@@ -22444,7 +22486,7 @@ function PostEffectStateChanged.prototype.____constructor(self)
22444
22486
  self:fire(effect, previousState, currentState)
22445
22487
  end
22446
22488
  end
22447
- self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, {self.postEffectUpdate}}}
22489
+ self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, self.postEffectUpdate}}
22448
22490
  end
22449
22491
  return ____exports
22450
22492
  end,
@@ -22495,7 +22537,7 @@ function PostFamiliarInitLate.prototype.____constructor(self)
22495
22537
  self:fire(familiar)
22496
22538
  end
22497
22539
  end
22498
- self.callbacksUsed = {{ModCallback.POST_FAMILIAR_UPDATE, {self.postFamiliarUpdate}}}
22540
+ self.callbacksUsed = {{ModCallback.POST_FAMILIAR_UPDATE, self.postFamiliarUpdate}}
22499
22541
  end
22500
22542
  return ____exports
22501
22543
  end,
@@ -22533,7 +22575,7 @@ function PostFamiliarStateChanged.prototype.____constructor(self)
22533
22575
  self:fire(familiar, previousState, currentState)
22534
22576
  end
22535
22577
  end
22536
- self.callbacksUsed = {{ModCallback.POST_FAMILIAR_UPDATE, {self.postFamiliarUpdate}}}
22578
+ self.callbacksUsed = {{ModCallback.POST_FAMILIAR_UPDATE, self.postFamiliarUpdate}}
22537
22579
  end
22538
22580
  return ____exports
22539
22581
  end,
@@ -23460,7 +23502,7 @@ function PostGreedModeWave.prototype.____constructor(self)
23460
23502
  self:fire(oldWave, newWave)
23461
23503
  end
23462
23504
  end
23463
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
23505
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
23464
23506
  end
23465
23507
  return ____exports
23466
23508
  end,
@@ -23818,7 +23860,7 @@ function PostHolyMantleRemoved.prototype.____constructor(self)
23818
23860
  self:fire(player, oldNumHolyMantles, newNumHolyMantles)
23819
23861
  end
23820
23862
  end
23821
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
23863
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
23822
23864
  end
23823
23865
  return ____exports
23824
23866
  end,
@@ -24728,8 +24770,8 @@ function PostItemDischarge.prototype.____constructor(self)
24728
24770
  ::__continue9::
24729
24771
  end
24730
24772
  end
24731
- self.callbacksUsed = {{ModCallback.PRE_NPC_COLLISION, {self.preNPCCollisionSucker, EntityType.SUCKER}}}
24732
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
24773
+ self.callbacksUsed = {{ModCallback.PRE_NPC_COLLISION, self.preNPCCollisionSucker, {EntityType.SUCKER}}}
24774
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
24733
24775
  end
24734
24776
  function PostItemDischarge.prototype.preNPCCollisionBulb(self, _npc, collider)
24735
24777
  self:checkPlayerCollidedWithBulb(collider)
@@ -24802,7 +24844,7 @@ function PostKnifeInitLate.prototype.____constructor(self)
24802
24844
  self:fire(knife)
24803
24845
  end
24804
24846
  end
24805
- self.callbacksUsed = {{ModCallback.POST_KNIFE_UPDATE, {self.postKnifeUpdate}}}
24847
+ self.callbacksUsed = {{ModCallback.POST_KNIFE_UPDATE, self.postKnifeUpdate}}
24806
24848
  end
24807
24849
  return ____exports
24808
24850
  end,
@@ -24834,7 +24876,7 @@ function PostLaserInitLate.prototype.____constructor(self)
24834
24876
  self:fire(laser)
24835
24877
  end
24836
24878
  end
24837
- self.callbacksUsed = {{ModCallback.POST_LASER_UPDATE, {self.postLaserUpdate}}}
24879
+ self.callbacksUsed = {{ModCallback.POST_LASER_UPDATE, self.postLaserUpdate}}
24838
24880
  end
24839
24881
  return ____exports
24840
24882
  end,
@@ -27487,7 +27529,7 @@ function ____exports.logFlags(self, flags, flagEnum, description)
27487
27529
  end
27488
27530
  end
27489
27531
  function ____exports.logArray(self, array)
27490
- if not isArray(nil, array) then
27532
+ if not isArray(nil, array, false) then
27491
27533
  log(nil, "Tried to log an array, but the given object was not an array.")
27492
27534
  return
27493
27535
  end
@@ -27938,7 +27980,7 @@ function PostNewRoomEarly.prototype.____constructor(self)
27938
27980
  self:checkRoomChanged()
27939
27981
  return nil
27940
27982
  end
27941
- self.callbacksUsed = {{ModCallback.POST_NEW_ROOM, {self.postNewRoom}}, {ModCallback.PRE_ENTITY_SPAWN, {self.preEntitySpawn}}}
27983
+ self.callbacksUsed = {{ModCallback.POST_NEW_ROOM, self.postNewRoom}, {ModCallback.PRE_ENTITY_SPAWN, self.preEntitySpawn}}
27942
27984
  end
27943
27985
  function PostNewRoomEarly.prototype.checkRoomChanged(self)
27944
27986
  if self:isNewRoom() then
@@ -28013,7 +28055,7 @@ function PostNPCDeathFilter.prototype.____constructor(self)
28013
28055
  self.postNPCDeath = function(____, npc)
28014
28056
  self:fire(npc)
28015
28057
  end
28016
- self.callbacksUsed = {{ModCallback.POST_NPC_DEATH, {self.postNPCDeath}}}
28058
+ self.callbacksUsed = {{ModCallback.POST_NPC_DEATH, self.postNPCDeath}}
28017
28059
  end
28018
28060
  return ____exports
28019
28061
  end,
@@ -28038,7 +28080,7 @@ function PostNPCInitFilter.prototype.____constructor(self)
28038
28080
  self.postNPCInit = function(____, npc)
28039
28081
  self:fire(npc)
28040
28082
  end
28041
- self.callbacksUsed = {{ModCallback.POST_NPC_INIT, {self.postNPCInit}}}
28083
+ self.callbacksUsed = {{ModCallback.POST_NPC_INIT, self.postNPCInit}}
28042
28084
  end
28043
28085
  return ____exports
28044
28086
  end,
@@ -28070,7 +28112,7 @@ function PostNPCInitLate.prototype.____constructor(self)
28070
28112
  self:fire(npc)
28071
28113
  end
28072
28114
  end
28073
- self.callbacksUsed = {{ModCallback.POST_NPC_UPDATE, {self.postNPCUpdate}}}
28115
+ self.callbacksUsed = {{ModCallback.POST_NPC_UPDATE, self.postNPCUpdate}}
28074
28116
  end
28075
28117
  return ____exports
28076
28118
  end,
@@ -28095,7 +28137,7 @@ function PostNPCRenderFilter.prototype.____constructor(self)
28095
28137
  self.postNPCRender = function(____, npc, renderOffset)
28096
28138
  self:fire(npc, renderOffset)
28097
28139
  end
28098
- self.callbacksUsed = {{ModCallback.POST_NPC_RENDER, {self.postNPCRender}}}
28140
+ self.callbacksUsed = {{ModCallback.POST_NPC_RENDER, self.postNPCRender}}
28099
28141
  end
28100
28142
  return ____exports
28101
28143
  end,
@@ -28133,7 +28175,7 @@ function PostNPCStateChanged.prototype.____constructor(self)
28133
28175
  self:fire(npc, previousState, currentState)
28134
28176
  end
28135
28177
  end
28136
- self.callbacksUsed = {{ModCallback.POST_NPC_UPDATE, {self.postNPCUpdate}}}
28178
+ self.callbacksUsed = {{ModCallback.POST_NPC_UPDATE, self.postNPCUpdate}}
28137
28179
  end
28138
28180
  return ____exports
28139
28181
  end,
@@ -28158,7 +28200,7 @@ function PostNPCUpdateFilter.prototype.____constructor(self)
28158
28200
  self.postNPCUpdate = function(____, npc)
28159
28201
  self:fire(npc)
28160
28202
  end
28161
- self.callbacksUsed = {{ModCallback.POST_NPC_UPDATE, {self.postNPCUpdate}}}
28203
+ self.callbacksUsed = {{ModCallback.POST_NPC_UPDATE, self.postNPCUpdate}}
28162
28204
  end
28163
28205
  return ____exports
28164
28206
  end,
@@ -28220,7 +28262,7 @@ function PostPickupCollect.prototype.____constructor(self)
28220
28262
  self:fire(pickup, player)
28221
28263
  end
28222
28264
  end
28223
- self.callbacksUsed = {{ModCallback.POST_PICKUP_RENDER, {self.postPickupRender}}}
28265
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_RENDER, self.postPickupRender}}
28224
28266
  end
28225
28267
  return ____exports
28226
28268
  end,
@@ -28257,7 +28299,7 @@ function PostPickupInitFirst.prototype.____constructor(self)
28257
28299
  self:fire(pickup)
28258
28300
  end
28259
28301
  end
28260
- self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInit}}}
28302
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, self.postPickupInit}}
28261
28303
  end
28262
28304
  return ____exports
28263
28305
  end,
@@ -28289,7 +28331,7 @@ function PostPickupInitLate.prototype.____constructor(self)
28289
28331
  self:fire(pickup)
28290
28332
  end
28291
28333
  end
28292
- self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, {self.postPickupUpdate}}}
28334
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, self.postPickupUpdate}}
28293
28335
  end
28294
28336
  return ____exports
28295
28337
  end,
@@ -28327,7 +28369,7 @@ function PostPickupStateChanged.prototype.____constructor(self)
28327
28369
  self:fire(pickup, previousState, currentState)
28328
28370
  end
28329
28371
  end
28330
- self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, {self.postPickupUpdate}}}
28372
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, self.postPickupUpdate}}
28331
28373
  end
28332
28374
  return ____exports
28333
28375
  end,
@@ -28704,7 +28746,7 @@ function PostPitRender.prototype.____constructor(self)
28704
28746
  self:fire(pit)
28705
28747
  end
28706
28748
  end
28707
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
28749
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
28708
28750
  end
28709
28751
  return ____exports
28710
28752
  end,
@@ -28733,7 +28775,7 @@ function PostPitUpdate.prototype.____constructor(self)
28733
28775
  self:fire(pit)
28734
28776
  end
28735
28777
  end
28736
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
28778
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
28737
28779
  end
28738
28780
  return ____exports
28739
28781
  end,
@@ -28790,7 +28832,7 @@ function PostPlayerChangeHealth.prototype.____constructor(self)
28790
28832
  end
28791
28833
  end
28792
28834
  end
28793
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectReordered}}}
28835
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectReordered}}
28794
28836
  end
28795
28837
  return ____exports
28796
28838
  end,
@@ -28912,7 +28954,7 @@ function PostPlayerChangeStat.prototype.____constructor(self)
28912
28954
  ::__continue5::
28913
28955
  end
28914
28956
  end
28915
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectReordered}}}
28957
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectReordered}}
28916
28958
  end
28917
28959
  return ____exports
28918
28960
  end,
@@ -28952,7 +28994,7 @@ function PostPlayerChangeType.prototype.____constructor(self)
28952
28994
  self:fire(player, storedCharacter, character)
28953
28995
  end
28954
28996
  end
28955
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectReordered}}}
28997
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectReordered}}
28956
28998
  end
28957
28999
  return ____exports
28958
29000
  end,
@@ -29218,10 +29260,11 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
29218
29260
  local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
29219
29261
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
29220
29262
  local DamageFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DamageFlagZero
29221
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
29222
29263
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
29223
29264
  local ____cachedClasses = require("src.core.cachedClasses")
29224
29265
  local game = ____cachedClasses.game
29266
+ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
29267
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
29225
29268
  local ____playerDataStructures = require("src.functions.playerDataStructures")
29226
29269
  local mapGetPlayer = ____playerDataStructures.mapGetPlayer
29227
29270
  local mapSetPlayer = ____playerDataStructures.mapSetPlayer
@@ -29244,11 +29287,23 @@ function PostPlayerFatalDamage.prototype.____constructor(self)
29244
29287
  CustomCallback.prototype.____constructor(self)
29245
29288
  self.v = {run = {playersLastDamageGameFrame = __TS__New(Map)}}
29246
29289
  self.shouldFire = shouldFirePlayer
29247
- self.entityTakeDmgPlayer = function(____, entity, amount, damageFlags, source, countdownFrames)
29248
- local player = entity:ToPlayer()
29249
- if player == nil then
29290
+ self.preUseItemBible = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
29291
+ if not inBossRoomOf(nil, BossID.SATAN) then
29250
29292
  return nil
29251
29293
  end
29294
+ local shouldSustainDeath = self:fire(
29295
+ player,
29296
+ 0,
29297
+ DamageFlagZero,
29298
+ EntityRef(player),
29299
+ 0
29300
+ )
29301
+ if shouldSustainDeath ~= nil then
29302
+ return not shouldSustainDeath
29303
+ end
29304
+ return nil
29305
+ end
29306
+ self.entityTakeDmgPlayer = function(____, player, amount, damageFlags, source, countdownFrames)
29252
29307
  if isChildPlayer(nil, player) then
29253
29308
  return nil
29254
29309
  end
@@ -29279,23 +29334,8 @@ function PostPlayerFatalDamage.prototype.____constructor(self)
29279
29334
  end
29280
29335
  return nil
29281
29336
  end
29282
- self.preUseItemBible = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
29283
- if not inBossRoomOf(nil, BossID.SATAN) then
29284
- return nil
29285
- end
29286
- local shouldSustainDeath = self:fire(
29287
- player,
29288
- 0,
29289
- DamageFlagZero,
29290
- EntityRef(player),
29291
- 0
29292
- )
29293
- if shouldSustainDeath ~= nil then
29294
- return not shouldSustainDeath
29295
- end
29296
- return nil
29297
- end
29298
- self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}, {ModCallback.PRE_USE_ITEM, {self.preUseItemBible, CollectibleType.BIBLE}}}
29337
+ self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, self.preUseItemBible, {CollectibleType.BIBLE}}}
29338
+ self.customCallbacksUsed = {{ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER, self.entityTakeDmgPlayer}}
29299
29339
  end
29300
29340
  return ____exports
29301
29341
  end,
@@ -29336,7 +29376,7 @@ function PostPlayerInitFirst.prototype.____constructor(self)
29336
29376
  end
29337
29377
  self:fire(player)
29338
29378
  end
29339
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}, {ModCallbackCustom.POST_PLAYER_INIT_LATE, {self.postPlayerInitLate}}}
29379
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}, {ModCallbackCustom.POST_PLAYER_INIT_LATE, self.postPlayerInitLate}}
29340
29380
  end
29341
29381
  return ____exports
29342
29382
  end,
@@ -29370,7 +29410,7 @@ function PostPlayerInitLate.prototype.____constructor(self)
29370
29410
  self:fire(player)
29371
29411
  end
29372
29412
  end
29373
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
29413
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
29374
29414
  end
29375
29415
  return ____exports
29376
29416
  end,
@@ -29443,7 +29483,7 @@ function PostPoopRender.prototype.____constructor(self)
29443
29483
  self:fire(poop)
29444
29484
  end
29445
29485
  end
29446
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
29486
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
29447
29487
  end
29448
29488
  return ____exports
29449
29489
  end,
@@ -29472,7 +29512,7 @@ function PostPoopUpdate.prototype.____constructor(self)
29472
29512
  self:fire(poop)
29473
29513
  end
29474
29514
  end
29475
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
29515
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
29476
29516
  end
29477
29517
  return ____exports
29478
29518
  end,
@@ -29501,7 +29541,7 @@ function PostPressurePlateRender.prototype.____constructor(self)
29501
29541
  self:fire(pressurePlate)
29502
29542
  end
29503
29543
  end
29504
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
29544
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
29505
29545
  end
29506
29546
  return ____exports
29507
29547
  end,
@@ -29530,7 +29570,7 @@ function PostPressurePlateUpdate.prototype.____constructor(self)
29530
29570
  self:fire(pressurePlate)
29531
29571
  end
29532
29572
  end
29533
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
29573
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
29534
29574
  end
29535
29575
  return ____exports
29536
29576
  end,
@@ -29562,7 +29602,7 @@ function PostProjectileInitLate.prototype.____constructor(self)
29562
29602
  self:fire(projectile)
29563
29603
  end
29564
29604
  end
29565
- self.callbacksUsed = {{ModCallback.POST_PROJECTILE_UPDATE, {self.postProjectileUpdate}}}
29605
+ self.callbacksUsed = {{ModCallback.POST_PROJECTILE_UPDATE, self.postProjectileUpdate}}
29566
29606
  end
29567
29607
  return ____exports
29568
29608
  end,
@@ -29604,7 +29644,7 @@ function PostPurchase.prototype.____constructor(self)
29604
29644
  self:playerPickedUpNewItem(player)
29605
29645
  end
29606
29646
  end
29607
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
29647
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
29608
29648
  end
29609
29649
  function PostPurchase.prototype.playerPickedUpNewItem(self, player)
29610
29650
  local pickups = getPickups(nil)
@@ -29643,7 +29683,7 @@ function PostRockRender.prototype.____constructor(self)
29643
29683
  self:fire(rock)
29644
29684
  end
29645
29685
  end
29646
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
29686
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
29647
29687
  end
29648
29688
  return ____exports
29649
29689
  end,
@@ -29672,7 +29712,7 @@ function PostRockUpdate.prototype.____constructor(self)
29672
29712
  self:fire(rock)
29673
29713
  end
29674
29714
  end
29675
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
29715
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
29676
29716
  end
29677
29717
  return ____exports
29678
29718
  end,
@@ -29714,8 +29754,8 @@ function PostRoomClearChanged.prototype.____constructor(self)
29714
29754
  local roomClear = room:IsClear()
29715
29755
  self.v.room.cleared = roomClear
29716
29756
  end
29717
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
29718
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
29757
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
29758
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
29719
29759
  end
29720
29760
  return ____exports
29721
29761
  end,
@@ -29726,11 +29766,11 @@ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
29726
29766
  local ____exports = {}
29727
29767
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
29728
29768
  local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
29729
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
29730
- local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
29731
29769
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
29732
29770
  local ____cachedClasses = require("src.core.cachedClasses")
29733
29771
  local game = ____cachedClasses.game
29772
+ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
29773
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
29734
29774
  local ____flag = require("src.functions.flag")
29735
29775
  local hasFlag = ____flag.hasFlag
29736
29776
  local ____shouldFire = require("src.shouldFire")
@@ -29745,11 +29785,7 @@ function PostSacrifice.prototype.____constructor(self)
29745
29785
  CustomCallback.prototype.____constructor(self)
29746
29786
  self.v = {level = {numSacrifices = 0}}
29747
29787
  self.shouldFire = shouldFirePlayer
29748
- self.entityTakeDmgPlayer = function(____, entity, _amount, damageFlags, _source, _countdownFrames)
29749
- local player = entity:ToPlayer()
29750
- if player == nil then
29751
- return nil
29752
- end
29788
+ self.entityTakeDmgPlayer = function(____, player, _amount, damageFlags, _source, _countdownFrames)
29753
29789
  local room = game:GetRoom()
29754
29790
  local roomType = room:GetType()
29755
29791
  local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
@@ -29760,7 +29796,7 @@ function PostSacrifice.prototype.____constructor(self)
29760
29796
  end
29761
29797
  return nil
29762
29798
  end
29763
- self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}}
29799
+ self.customCallbacksUsed = {{ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER, self.entityTakeDmgPlayer}}
29764
29800
  end
29765
29801
  return ____exports
29766
29802
  end,
@@ -29821,7 +29857,7 @@ function PostSlotCollision.prototype.____constructor(self)
29821
29857
  end
29822
29858
  return nil
29823
29859
  end
29824
- self.callbacksUsed = {{ModCallback.PRE_PLAYER_COLLISION, {self.prePlayerCollision}}}
29860
+ self.callbacksUsed = {{ModCallback.PRE_PLAYER_COLLISION, self.prePlayerCollision}}
29825
29861
  end
29826
29862
  return ____exports
29827
29863
  end,
@@ -29890,8 +29926,8 @@ function PostSlotDestroyed.prototype.____constructor(self)
29890
29926
  self.v.room.slotPrizeAnimationGameFrame:delete(ptrHash)
29891
29927
  end
29892
29928
  end
29893
- self.callbacksUsed = {{ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemoveSlot, EntityType.SLOT}}}
29894
- self.customCallbacksUsed = {{ModCallbackCustom.POST_SLOT_ANIMATION_CHANGED, {self.postSlotAnimationChanged}}}
29929
+ self.callbacksUsed = {{ModCallback.POST_ENTITY_REMOVE, self.postEntityRemoveSlot, {EntityType.SLOT}}}
29930
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_SLOT_ANIMATION_CHANGED, self.postSlotAnimationChanged}}
29895
29931
  end
29896
29932
  return ____exports
29897
29933
  end,
@@ -29986,7 +30022,7 @@ function PostSpikesRender.prototype.____constructor(self)
29986
30022
  self:fire(spikes)
29987
30023
  end
29988
30024
  end
29989
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
30025
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
29990
30026
  end
29991
30027
  return ____exports
29992
30028
  end,
@@ -30015,7 +30051,7 @@ function PostSpikesUpdate.prototype.____constructor(self)
30015
30051
  self:fire(spikes)
30016
30052
  end
30017
30053
  end
30018
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
30054
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
30019
30055
  end
30020
30056
  return ____exports
30021
30057
  end,
@@ -30047,7 +30083,7 @@ function PostTearInitLate.prototype.____constructor(self)
30047
30083
  self:fire(tear)
30048
30084
  end
30049
30085
  end
30050
- self.callbacksUsed = {{ModCallback.POST_TEAR_UPDATE, {self.postTearUpdate}}}
30086
+ self.callbacksUsed = {{ModCallback.POST_TEAR_UPDATE, self.postTearUpdate}}
30051
30087
  end
30052
30088
  return ____exports
30053
30089
  end,
@@ -30082,7 +30118,7 @@ function PostTearInitVeryLate.prototype.____constructor(self)
30082
30118
  self:fire(tear)
30083
30119
  end
30084
30120
  end
30085
- self.callbacksUsed = {{ModCallback.POST_TEAR_UPDATE, {self.postTearUpdate}}}
30121
+ self.callbacksUsed = {{ModCallback.POST_TEAR_UPDATE, self.postTearUpdate}}
30086
30122
  end
30087
30123
  return ____exports
30088
30124
  end,
@@ -30111,7 +30147,7 @@ function PostTNTRender.prototype.____constructor(self)
30111
30147
  self:fire(tnt)
30112
30148
  end
30113
30149
  end
30114
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
30150
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
30115
30151
  end
30116
30152
  return ____exports
30117
30153
  end,
@@ -30140,7 +30176,7 @@ function PostTNTUpdate.prototype.____constructor(self)
30140
30176
  self:fire(tnt)
30141
30177
  end
30142
30178
  end
30143
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
30179
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
30144
30180
  end
30145
30181
  return ____exports
30146
30182
  end,
@@ -30192,7 +30228,7 @@ function PostTransformation.prototype.____constructor(self)
30192
30228
  end
30193
30229
  end
30194
30230
  end
30195
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
30231
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
30196
30232
  end
30197
30233
  return ____exports
30198
30234
  end,
@@ -30205,7 +30241,6 @@ local __TS__New = ____lualib.__TS__New
30205
30241
  local ____exports = {}
30206
30242
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
30207
30243
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
30208
- local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
30209
30244
  local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
30210
30245
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
30211
30246
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
@@ -30230,11 +30265,7 @@ function PostTrinketBreak.prototype.____constructor(self)
30230
30265
  function() return __TS__New(Map) end
30231
30266
  )}}
30232
30267
  self.shouldFire = shouldFireTrinketType
30233
- self.entityTakeDmgPlayer = function(____, entity, _amount, _damageFlags, _source, _countdownFrames)
30234
- local player = entity:ToPlayer()
30235
- if player == nil then
30236
- return nil
30237
- end
30268
+ self.entityTakeDmgPlayer = function(____, player, _amount, _damageFlags, _source, _countdownFrames)
30238
30269
  local trinketMap = defaultMapGetPlayer(nil, self.v.run.playersTrinketMap, player)
30239
30270
  for ____, trinketType in ipairs(TRINKETS_THAT_CAN_BREAK) do
30240
30271
  do
@@ -30244,16 +30275,16 @@ function PostTrinketBreak.prototype.____constructor(self)
30244
30275
  oldNumTrinketsHeld = 0
30245
30276
  end
30246
30277
  if numTrinketsHeld >= oldNumTrinketsHeld then
30247
- goto __continue6
30278
+ goto __continue5
30248
30279
  end
30249
30280
  trinketMap:set(trinketType, numTrinketsHeld)
30250
30281
  local numTrinketsOnGround = Isaac.CountEntities(nil, EntityType.PICKUP, PickupVariant.TRINKET, trinketType)
30251
30282
  if numTrinketsOnGround > 0 then
30252
- goto __continue6
30283
+ goto __continue5
30253
30284
  end
30254
30285
  self:fire(player, trinketType)
30255
30286
  end
30256
- ::__continue6::
30287
+ ::__continue5::
30257
30288
  end
30258
30289
  return nil
30259
30290
  end
@@ -30264,8 +30295,7 @@ function PostTrinketBreak.prototype.____constructor(self)
30264
30295
  trinketMap:set(trinketType, numTrinkets)
30265
30296
  end
30266
30297
  end
30267
- self.callbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}}
30268
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
30298
+ self.customCallbacksUsed = {{ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER, self.entityTakeDmgPlayer}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
30269
30299
  end
30270
30300
  return ____exports
30271
30301
  end,
@@ -30306,7 +30336,7 @@ function PreBerserkDeath.prototype.____constructor(self)
30306
30336
  self:fire(player)
30307
30337
  end
30308
30338
  end
30309
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
30339
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
30310
30340
  end
30311
30341
  return ____exports
30312
30342
  end,
@@ -30373,7 +30403,7 @@ function PreGetPedestal.prototype.____constructor(self)
30373
30403
  end
30374
30404
  return self:fire(player, collectible)
30375
30405
  end
30376
- self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, {self.prePickupCollision, PickupVariant.COLLECTIBLE}}}
30406
+ self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, self.prePickupCollision, {PickupVariant.COLLECTIBLE}}}
30377
30407
  end
30378
30408
  return ____exports
30379
30409
  end,
@@ -30439,7 +30469,7 @@ function PreNewLevel.prototype.____constructor(self)
30439
30469
  self:fire(player)
30440
30470
  end
30441
30471
  end
30442
- self.callbacksUsed = {{ModCallback.POST_PLAYER_RENDER, {self.postPlayerRender}}}
30472
+ self.callbacksUsed = {{ModCallback.POST_PLAYER_RENDER, self.postPlayerRender}}
30443
30473
  end
30444
30474
  return ____exports
30445
30475
  end,
@@ -30462,7 +30492,7 @@ function PreNPCCollisionFilter.prototype.____constructor(self)
30462
30492
  CustomCallback.prototype.____constructor(self)
30463
30493
  self.shouldFire = shouldFireNPC
30464
30494
  self.preNPCCollision = function(____, npc, collider, low) return self:fire(npc, collider, low) end
30465
- self.callbacksUsed = {{ModCallback.PRE_NPC_COLLISION, {self.preNPCCollision}}}
30495
+ self.callbacksUsed = {{ModCallback.PRE_NPC_COLLISION, self.preNPCCollision}}
30466
30496
  end
30467
30497
  return ____exports
30468
30498
  end,
@@ -30485,7 +30515,7 @@ function PreNPCUpdateFilter.prototype.____constructor(self)
30485
30515
  CustomCallback.prototype.____constructor(self)
30486
30516
  self.shouldFire = shouldFireNPC
30487
30517
  self.preNPCUpdate = function(____, npc) return self:fire(npc) end
30488
- self.callbacksUsed = {{ModCallback.PRE_NPC_UPDATE, {self.preNPCUpdate}}}
30518
+ self.callbacksUsed = {{ModCallback.PRE_NPC_UPDATE, self.preNPCUpdate}}
30489
30519
  end
30490
30520
  return ____exports
30491
30521
  end,
@@ -31226,7 +31256,7 @@ function RunInNFrames.prototype.____constructor(self)
31226
31256
  checkExecuteQueuedFunctions(nil, renderFrameCount, self.v.run.queuedRenderFunctionTuples)
31227
31257
  checkExecuteIntervalFunctions(nil, renderFrameCount, self.v.run.intervalRenderFunctionTuples)
31228
31258
  end
31229
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}, {ModCallback.POST_RENDER, {self.postRender}}}
31259
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}, {ModCallback.POST_RENDER, self.postRender}}
31230
31260
  end
31231
31261
  function RunInNFrames.prototype.restartNextRenderFrame(self, character)
31232
31262
  self:runNextRenderFrame(function()
@@ -31391,8 +31421,8 @@ function CustomGridEntities.prototype.____constructor(self, runInNFrames)
31391
31421
  end
31392
31422
  end
31393
31423
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
31394
- self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, {self.preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER}}}
31395
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
31424
+ self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, self.preUseItemWeNeedToGoDeeper, {CollectibleType.WE_NEED_TO_GO_DEEPER}}}
31425
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
31396
31426
  self.runInNFrames = runInNFrames
31397
31427
  end
31398
31428
  function CustomGridEntities.prototype.spawnCustomGridEntity(self, gridEntityTypeCustom, gridIndexOrPosition, gridCollisionClass, anm2Path, defaultAnimation, baseGridEntityType, baseGridEntityVariant)
@@ -31565,9 +31595,6 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
31565
31595
  end
31566
31596
  sfxManager:Stop(SoundEffect.ONE_UP)
31567
31597
  end
31568
- self.postPEffectUpdate = function(____, player)
31569
- self:checkWaitingForItemAnimation(player)
31570
- end
31571
31598
  self.postNewRoomReordered = function()
31572
31599
  if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
31573
31600
  return
@@ -31575,6 +31602,9 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
31575
31602
  self.v.run.state = CustomReviveState.WAITING_FOR_ITEM_ANIMATION
31576
31603
  self:logStateChanged()
31577
31604
  end
31605
+ self.postPEffectUpdateReordered = function(____, player)
31606
+ self:checkWaitingForItemAnimation(player)
31607
+ end
31578
31608
  self.postPlayerFatalDamage = function(____, player)
31579
31609
  self:playerIsAboutToDie(player)
31580
31610
  return nil
@@ -31583,8 +31613,8 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
31583
31613
  self:playerIsAboutToDie(player)
31584
31614
  end
31585
31615
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
31586
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}, {ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}}
31587
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}, {ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, {self.postPlayerFatalDamage}}, {ModCallbackCustom.PRE_BERSERK_DEATH, {self.preBerserkDeath}}}
31616
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
31617
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}, {ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, self.postPlayerFatalDamage}, {ModCallbackCustom.PRE_BERSERK_DEATH, self.preBerserkDeath}}
31588
31618
  self.preCustomRevive = preCustomRevive
31589
31619
  self.postCustomRevive = postCustomRevive
31590
31620
  self.runInNFrames = runInNFrames
@@ -31701,7 +31731,7 @@ function EsauJrDetection.prototype.____constructor(self, postEsauJr, postFirstEs
31701
31731
  self.v.run.usedEsauJrControllerIndex = player.ControllerIndex
31702
31732
  return nil
31703
31733
  end
31704
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}, {ModCallback.POST_USE_ITEM, {self.useItemEsauJr, CollectibleType.ESAU_JR}}}
31734
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}, {ModCallback.POST_USE_ITEM, self.useItemEsauJr, {CollectibleType.ESAU_JR}}}
31705
31735
  self.postEsauJr = postEsauJr
31706
31736
  self.postFirstEsauJr = postFirstEsauJr
31707
31737
  end
@@ -31761,7 +31791,7 @@ function FlipDetection.prototype.____constructor(self, postFlip, postFirstFlip)
31761
31791
  self.postFlip:fire(newLazarus, player)
31762
31792
  return nil
31763
31793
  end
31764
- self.callbacksUsed = {{ModCallback.POST_USE_ITEM, {self.useItemFlip, CollectibleType.FLIP}}}
31794
+ self.callbacksUsed = {{ModCallback.POST_USE_ITEM, self.useItemFlip, {CollectibleType.FLIP}}}
31765
31795
  self.postFlip = postFlip
31766
31796
  self.postFirstFlip = postFirstFlip
31767
31797
  end
@@ -31834,7 +31864,7 @@ function GameReorderedCallbacks.prototype.____constructor(self, postGameStartedR
31834
31864
  self.forceNewRoom = false
31835
31865
  self.postNewRoomReordered:fire()
31836
31866
  end
31837
- self.callbacksUsed = {{ModCallback.POST_USE_ITEM, {self.useItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS}}, {ModCallback.POST_GAME_STARTED, {self.postGameStarted}}, {ModCallback.POST_NEW_LEVEL, {self.postNewLevel}}, {ModCallback.POST_NEW_ROOM, {self.postNewRoom}}}
31867
+ self.callbacksUsed = {{ModCallback.POST_USE_ITEM, self.useItemGlowingHourGlass, {CollectibleType.GLOWING_HOUR_GLASS}}, {ModCallback.POST_GAME_STARTED, self.postGameStarted}, {ModCallback.POST_NEW_LEVEL, self.postNewLevel}, {ModCallback.POST_NEW_ROOM, self.postNewRoom}}
31838
31868
  self.postGameStartedReordered = postGameStartedReordered
31839
31869
  self.postNewLevelReordered = postNewLevelReordered
31840
31870
  self.postNewRoomReordered = postNewRoomReordered
@@ -31926,7 +31956,7 @@ function GridEntityCollisionDetection.prototype.____constructor(self, postGridEn
31926
31956
  end
31927
31957
  end
31928
31958
  end
31929
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
31959
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
31930
31960
  self.postGridEntityCollision = postGridEntityCollision
31931
31961
  self.postGridEntityCustomCollision = postGridEntityCustomCollision
31932
31962
  self.customGridEntities = customGridEntities
@@ -31961,7 +31991,7 @@ function GridEntityRenderDetection.prototype.____constructor(self, postGridEntit
31961
31991
  end
31962
31992
  end
31963
31993
  end
31964
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
31994
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
31965
31995
  self.postGridEntityRender = postGridEntityRender
31966
31996
  self.postGridEntityCustomRender = postGridEntityCustomRender
31967
31997
  self.customGridEntities = customGridEntities
@@ -32019,8 +32049,8 @@ function GridEntityUpdateDetection.prototype.____constructor(self, postGridEntit
32019
32049
  end
32020
32050
  end
32021
32051
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
32022
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
32023
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
32052
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
32053
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
32024
32054
  self.postGridEntityInit = postGridEntityInit
32025
32055
  self.postGridEntityCustomInit = postGridEntityCustomInit
32026
32056
  self.postGridEntityUpdate = postGridEntityUpdate
@@ -32104,7 +32134,8 @@ local __TS__New = ____lualib.__TS__New
32104
32134
  local ____exports = {}
32105
32135
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
32106
32136
  local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
32107
- local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
32137
+ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
32138
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
32108
32139
  local ____playerDataStructures = require("src.functions.playerDataStructures")
32109
32140
  local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
32110
32141
  local ____types = require("src.functions.types")
@@ -32126,7 +32157,7 @@ function ItemPickupDetection.prototype.____constructor(self, postItemPickup, pre
32126
32157
  DefaultMap,
32127
32158
  function() return newPickingUpItem(nil) end
32128
32159
  )}}
32129
- self.postPEffectUpdate = function(____, player)
32160
+ self.postPEffectUpdateReordered = function(____, player)
32130
32161
  local pickingUpItem = defaultMapGetPlayer(nil, self.v.run.playersPickingUpItemMap, player)
32131
32162
  if player:IsItemQueueEmpty() then
32132
32163
  self:queueEmpty(player, pickingUpItem)
@@ -32134,7 +32165,7 @@ function ItemPickupDetection.prototype.____constructor(self, postItemPickup, pre
32134
32165
  self:queueNotEmpty(player, pickingUpItem)
32135
32166
  end
32136
32167
  end
32137
- self.callbacksUsed = {{ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}}
32168
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
32138
32169
  self.postItemPickup = postItemPickup
32139
32170
  self.preItemPickup = preItemPickup
32140
32171
  end
@@ -32523,7 +32554,7 @@ function ModdedElementDetection.prototype.____constructor(self)
32523
32554
  self.postPlayerInit = function(____, _player)
32524
32555
  self.atLeastOneCallbackFired = true
32525
32556
  end
32526
- self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, {self.postPlayerInit}}}
32557
+ self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, self.postPlayerInit}}
32527
32558
  end
32528
32559
  function ModdedElementDetection.prototype.errorIfNoCallbacksFired(self, constantType)
32529
32560
  if not self.atLeastOneCallbackFired then
@@ -33398,7 +33429,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
33398
33429
  local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
33399
33430
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
33400
33431
  local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
33401
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
33402
33432
  local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
33403
33433
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
33404
33434
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
@@ -33444,27 +33474,10 @@ function PlayerCollectibleDetection.prototype.____constructor(self, postPlayerCo
33444
33474
  self:updateCollectibleMapAndFire(player, nil)
33445
33475
  return nil
33446
33476
  end
33447
- self.postPEffectUpdate = function(____, player)
33448
- local oldCollectibleCount = defaultMapGetPlayer(nil, self.v.run.playersCollectibleCount, player)
33449
- local newCollectibleCount = player:GetCollectibleCount()
33450
- mapSetPlayer(nil, self.v.run.playersCollectibleCount, player, newCollectibleCount)
33451
- local difference = newCollectibleCount - oldCollectibleCount
33452
- if difference > 0 then
33453
- self:updateCollectibleMapAndFire(player, difference)
33454
- elseif difference < 0 then
33455
- self:updateCollectibleMapAndFire(player, difference * -1)
33456
- elseif difference == 0 then
33457
- self:checkActiveItemsChanged(player)
33458
- end
33459
- end
33460
- self.entityTakeDmgPlayer = function(____, entity, _amount, damageFlags, _source, _countdownFrames)
33477
+ self.entityTakeDmgPlayer = function(____, player, _amount, damageFlags, _source, _countdownFrames)
33461
33478
  if hasFlag(nil, damageFlags, DamageFlag.FAKE) then
33462
33479
  return nil
33463
33480
  end
33464
- local player = entity:ToPlayer()
33465
- if player == nil then
33466
- return nil
33467
- end
33468
33481
  local character = player:GetPlayerType()
33469
33482
  if character ~= PlayerType.EDEN_B then
33470
33483
  return nil
@@ -33486,9 +33499,22 @@ function PlayerCollectibleDetection.prototype.____constructor(self, postPlayerCo
33486
33499
  mapSetPlayer(nil, self.v.run.playersCollectibleCount, player, newCollectibleCount)
33487
33500
  self:updateCollectibleMapAndFire(player, 1)
33488
33501
  end
33502
+ self.postPEffectUpdateReordered = function(____, player)
33503
+ local oldCollectibleCount = defaultMapGetPlayer(nil, self.v.run.playersCollectibleCount, player)
33504
+ local newCollectibleCount = player:GetCollectibleCount()
33505
+ mapSetPlayer(nil, self.v.run.playersCollectibleCount, player, newCollectibleCount)
33506
+ local difference = newCollectibleCount - oldCollectibleCount
33507
+ if difference > 0 then
33508
+ self:updateCollectibleMapAndFire(player, difference)
33509
+ elseif difference < 0 then
33510
+ self:updateCollectibleMapAndFire(player, difference * -1)
33511
+ elseif difference == 0 then
33512
+ self:checkActiveItemsChanged(player)
33513
+ end
33514
+ end
33489
33515
  self.featuresUsed = {ISCFeature.MODDED_ELEMENT_SETS, ISCFeature.RUN_IN_N_FRAMES}
33490
- self.callbacksUsed = {{ModCallback.POST_USE_ITEM, {self.useItemD4, CollectibleType.D4}}, {ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}, {ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}}
33491
- self.customCallbacksUsed = {{ModCallbackCustom.POST_ITEM_PICKUP, {self.postItemPickup}}}
33516
+ self.callbacksUsed = {{ModCallback.POST_USE_ITEM, self.useItemD4, {CollectibleType.D4}}}
33517
+ self.customCallbacksUsed = {{ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER, self.entityTakeDmgPlayer}, {ModCallbackCustom.POST_ITEM_PICKUP, self.postItemPickup}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
33492
33518
  self.postPlayerCollectibleAdded = postPlayerCollectibleAdded
33493
33519
  self.postPlayerCollectibleRemoved = postPlayerCollectibleRemoved
33494
33520
  self.moddedElementSets = moddedElementSets
@@ -33617,8 +33643,8 @@ function PlayerReorderedCallbacks.prototype.____constructor(self, postPEffectUpd
33617
33643
  dequeue(nil, self.v.run.postPlayerUpdateQueue, self.postPlayerUpdateReordered.fire)
33618
33644
  dequeue(nil, self.v.run.postPlayerRenderQueue, self.postPlayerRenderReordered.fire)
33619
33645
  end
33620
- self.callbacksUsed = {{ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}, {ModCallback.POST_PLAYER_UPDATE, {self.postPlayerUpdate}}, {ModCallback.POST_PLAYER_RENDER, {self.postPlayerRender}}}
33621
- self.customCallbacksUsed = {{ModCallbackCustom.POST_GAME_STARTED_REORDERED_LAST, {self.postGameStartedReorderedLast}}}
33646
+ self.callbacksUsed = {{ModCallback.POST_PEFFECT_UPDATE, self.postPEffectUpdate}, {ModCallback.POST_PLAYER_UPDATE, self.postPlayerUpdate}, {ModCallback.POST_PLAYER_RENDER, self.postPlayerRender}}
33647
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_GAME_STARTED_REORDERED_LAST, self.postGameStartedReorderedLast}}
33622
33648
  self.postPEffectUpdateReordered = postPEffectUpdateReordered
33623
33649
  self.postPlayerRenderReordered = postPlayerRenderReordered
33624
33650
  self.postPlayerUpdateReordered = postPlayerUpdateReordered
@@ -33662,7 +33688,7 @@ function SlotRenderDetection.prototype.____constructor(self, postSlotRender, pos
33662
33688
  self:checkSlotAnimationChanged(slot)
33663
33689
  end
33664
33690
  end
33665
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
33691
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
33666
33692
  self.postSlotRender = postSlotRender
33667
33693
  self.postSlotAnimationChanged = postSlotAnimationChanged
33668
33694
  end
@@ -33711,8 +33737,8 @@ function SlotUpdateDetection.prototype.____constructor(self, postSlotInit, postS
33711
33737
  self:checkNewEntity(slot)
33712
33738
  end
33713
33739
  end
33714
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
33715
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
33740
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}}
33741
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
33716
33742
  self.postSlotInit = postSlotInit
33717
33743
  self.postSlotUpdate = postSlotUpdate
33718
33744
  end
@@ -34336,8 +34362,8 @@ function CharacterHealthConversion.prototype.____constructor(self)
34336
34362
  convertRedHeartContainers(nil, player, conversionHeartSubType)
34337
34363
  removeRedHearts(nil, player)
34338
34364
  end
34339
- self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, {self.prePickupCollisionHeart, PickupVariant.HEART}}}
34340
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
34365
+ self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, self.prePickupCollisionHeart, {PickupVariant.HEART}}}
34366
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
34341
34367
  end
34342
34368
  function CharacterHealthConversion.prototype.registerCharacterHealthConversion(self, playerType, conversionHeartSubType)
34343
34369
  if self.characterHealthReplacementMap:has(playerType) then
@@ -34522,7 +34548,7 @@ function CharacterStats.prototype.____constructor(self)
34522
34548
  local delta = stat - defaultStat
34523
34549
  addStat(nil, player, cacheFlag, delta)
34524
34550
  end
34525
- self.callbacksUsed = {{ModCallback.EVALUATE_CACHE, {self.evaluateCache}}}
34551
+ self.callbacksUsed = {{ModCallback.EVALUATE_CACHE, self.evaluateCache}}
34526
34552
  end
34527
34553
  function CharacterStats.prototype.registerCharacterStats(self, playerType, statMap)
34528
34554
  self.charactersStatMap:set(playerType, statMap)
@@ -34601,7 +34627,7 @@ function RoomHistory.prototype.____constructor(self)
34601
34627
  local ____self_v_run_roomHistory_0 = self.v.run.roomHistory
34602
34628
  ____self_v_run_roomHistory_0[#____self_v_run_roomHistory_0 + 1] = roomDescription
34603
34629
  end
34604
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, {self.postNewRoomEarly}}}
34630
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, self.postNewRoomEarly}}
34605
34631
  end
34606
34632
  function RoomHistory.prototype.getRoomHistory(self)
34607
34633
  return self.v.run.roomHistory
@@ -36354,8 +36380,8 @@ function SaveDataManager.prototype.____constructor(self, mod)
36354
36380
  makeGlowingHourGlassBackup(nil, self.saveDataMap, self.saveDataConditionalFuncMap, self.saveDataGlowingHourGlassMap)
36355
36381
  end
36356
36382
  end
36357
- self.callbacksUsed = {{ModCallback.POST_USE_ITEM, {self.postUseItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS}}, {ModCallback.POST_PLAYER_INIT, {self.postPlayerInit}}, {ModCallback.PRE_GAME_EXIT, {self.preGameExit}}, {ModCallback.POST_NEW_LEVEL, {self.postNewLevel}}}
36358
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, {self.postNewRoomEarly}}}
36383
+ self.callbacksUsed = {{ModCallback.POST_USE_ITEM, self.postUseItemGlowingHourGlass, {CollectibleType.GLOWING_HOUR_GLASS}}, {ModCallback.POST_PLAYER_INIT, self.postPlayerInit}, {ModCallback.PRE_GAME_EXIT, self.preGameExit}, {ModCallback.POST_NEW_LEVEL, self.postNewLevel}}
36384
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, self.postNewRoomEarly}}
36359
36385
  self.mod = mod
36360
36386
  end
36361
36387
  function SaveDataManager.prototype.saveDataManager(self, key, v, conditionalFunc)
@@ -36518,7 +36544,7 @@ function PickupIndexCreation.prototype.____constructor(self, roomHistory, saveDa
36518
36544
  self:checkDespawningFromPlayerLeavingRoom(entity)
36519
36545
  end
36520
36546
  self.featuresUsed = {ISCFeature.ROOM_HISTORY, ISCFeature.SAVE_DATA_MANAGER}
36521
- self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInit}}, {ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemovePickup, EntityType.PICKUP}}}
36547
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, self.postPickupInit}, {ModCallback.POST_ENTITY_REMOVE, self.postEntityRemovePickup, {EntityType.PICKUP}}}
36522
36548
  self.roomHistory = roomHistory
36523
36549
  self.saveDataManager = saveDataManager
36524
36550
  end
@@ -36686,7 +36712,7 @@ function CollectibleItemPoolType.prototype.____constructor(self, pickupIndexCrea
36686
36712
  self.v.run.collectibleItemPoolTypeMap:set(pickupIndex, lastItemPoolType)
36687
36713
  end
36688
36714
  self.featuresUsed = {ISCFeature.PICKUP_INDEX_CREATION}
36689
- self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInitCollectible, PickupVariant.COLLECTIBLE}}}
36715
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, self.postPickupInitCollectible, {PickupVariant.COLLECTIBLE}}}
36690
36716
  self.pickupIndexCreation = pickupIndexCreation
36691
36717
  end
36692
36718
  function CollectibleItemPoolType.prototype.getCollectibleItemPoolType(self, collectible)
@@ -36954,7 +36980,7 @@ function CustomHotkeys.prototype.____constructor(self)
36954
36980
  end
36955
36981
  end
36956
36982
  end
36957
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
36983
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
36958
36984
  end
36959
36985
  function CustomHotkeys.prototype.checkIfTriggered(self, keyboard, triggerFunc)
36960
36986
  local isPressed = isKeyboardPressed(nil, keyboard)
@@ -37133,7 +37159,7 @@ function CustomItemPools.prototype.____constructor(self)
37133
37159
  end
37134
37160
  self.v.run.customItemPools = copyMap(nil, self.customItemPoolMap)
37135
37161
  end
37136
- self.customCallbacksUsed = {{ModCallbackCustom.POST_GAME_STARTED_REORDERED, {self.postGameStartedReordered}}}
37162
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_GAME_STARTED_REORDERED, self.postGameStartedReordered}}
37137
37163
  end
37138
37164
  function CustomItemPools.prototype.registerCustomItemPool(self, itemPoolTypeCustom, collectibles)
37139
37165
  if self.customItemPoolMap:has(itemPoolTypeCustom) then
@@ -37249,7 +37275,7 @@ function CustomPickups.prototype.____constructor(self)
37249
37275
  effect:Remove()
37250
37276
  end
37251
37277
  end
37252
- self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, {self.prePickupCollision}}, {ModCallback.POST_EFFECT_RENDER, {self.postEffectRenderPickupEffect, PICKUP_EFFECT_VARIANT}}}
37278
+ self.callbacksUsed = {{ModCallback.PRE_PICKUP_COLLISION, self.prePickupCollision}, {ModCallback.POST_EFFECT_RENDER, self.postEffectRenderPickupEffect, {PICKUP_EFFECT_VARIANT}}}
37253
37279
  end
37254
37280
  function CustomPickups.prototype.registerCustomPickup(self, pickupVariantCustom, subType, collectFunc, collisionFunc)
37255
37281
  if collisionFunc == nil then
@@ -37962,7 +37988,7 @@ function DisableInputs.prototype.____constructor(self)
37962
37988
  self.isActionPressed = function(____, _entity, _inputHook, buttonAction) return self:getReturnValue(buttonAction, true) end
37963
37989
  self.isActionTriggered = function(____, _entity, _inputHook, buttonAction) return self:getReturnValue(buttonAction, true) end
37964
37990
  self.getActionValue = function(____, _entity, _inputHook, buttonAction) return self:getReturnValue(buttonAction, false) end
37965
- self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionPressed, InputHook.IS_ACTION_PRESSED}}, {ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}, {ModCallback.INPUT_ACTION, {self.getActionValue, InputHook.GET_ACTION_VALUE}}}
37991
+ self.callbacksUsed = {{ModCallback.INPUT_ACTION, self.isActionPressed, {InputHook.IS_ACTION_PRESSED}}, {ModCallback.INPUT_ACTION, self.isActionTriggered, {InputHook.IS_ACTION_TRIGGERED}}, {ModCallback.INPUT_ACTION, self.getActionValue, {InputHook.GET_ACTION_VALUE}}}
37966
37992
  end
37967
37993
  function DisableInputs.prototype.getReturnValue(self, buttonAction, booleanCallback)
37968
37994
  local ____booleanCallback_0
@@ -38081,7 +38107,7 @@ function PonyDetection.prototype.____constructor(self)
38081
38107
  setDeletePlayer(nil, self.v.run.playersIsPonyActive, player)
38082
38108
  end
38083
38109
  end
38084
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
38110
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
38085
38111
  end
38086
38112
  function PonyDetection.prototype.isPlayerUsingPony(self, player)
38087
38113
  return setHasPlayer(nil, self.v.run.playersIsPonyActive, player)
@@ -38125,7 +38151,7 @@ function RoomClearFrame.prototype.____constructor(self)
38125
38151
  self.v.room.roomClearGameFrame = gameFrameCount
38126
38152
  self.v.room.roomClearRoomFrame = roomFrameCount
38127
38153
  end
38128
- self.customCallbacksUsed = {{ModCallbackCustom.POST_ROOM_CLEAR_CHANGED, {self.postRoomClearChangedTrue}}}
38154
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_ROOM_CLEAR_CHANGED, self.postRoomClearChangedTrue}}
38129
38155
  end
38130
38156
  function RoomClearFrame.prototype.getRoomClearGameFrame(self)
38131
38157
  return self.v.room.roomClearGameFrame
@@ -38164,7 +38190,7 @@ function RunNextRoom.prototype.____constructor(self)
38164
38190
  end
38165
38191
  emptyArray(nil, self.v.run.queuedFunctions)
38166
38192
  end
38167
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
38193
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
38168
38194
  end
38169
38195
  function RunNextRoom.prototype.runNextRoom(self, func)
38170
38196
  local ____self_v_run_queuedFunctions_0 = self.v.run.queuedFunctions
@@ -38340,7 +38366,7 @@ function StageHistory.prototype.____constructor(self)
38340
38366
  local ____self_v_run_stageHistory_0 = self.v.run.stageHistory
38341
38367
  ____self_v_run_stageHistory_0[#____self_v_run_stageHistory_0 + 1] = {stage, stageType}
38342
38368
  end
38343
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_LEVEL_REORDERED, {self.postNewLevelReordered}}}
38369
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_LEVEL_REORDERED, self.postNewLevelReordered}}
38344
38370
  end
38345
38371
  function StageHistory.prototype.getNextStageTypeWithHistory(self, upwards)
38346
38372
  if upwards == nil then
@@ -38663,8 +38689,8 @@ function CustomTrapdoors.prototype.____constructor(self, customGridEntities, dis
38663
38689
  ISCFeature.RUN_NEXT_ROOM,
38664
38690
  ISCFeature.STAGE_HISTORY
38665
38691
  }
38666
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
38667
- self.customCallbacksUsed = {{ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE, {self.postGridEntityCustomUpdateTrapdoor, GridEntityTypeCustom.TRAPDOOR_CUSTOM}}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}}
38692
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
38693
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE, self.postGridEntityCustomUpdateTrapdoor, {GridEntityTypeCustom.TRAPDOOR_CUSTOM}}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
38668
38694
  self.customGridEntities = customGridEntities
38669
38695
  self.disableInputs = disableInputs
38670
38696
  self.ponyDetection = ponyDetection
@@ -41035,7 +41061,7 @@ function DisableAllSound.prototype.____constructor(self)
41035
41061
  end
41036
41062
  stopAllSoundEffects(nil)
41037
41063
  end
41038
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
41064
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
41039
41065
  end
41040
41066
  function DisableAllSound.prototype.enableAllSound(self, key)
41041
41067
  if not self.v.run.disableSoundSet:has(key) then
@@ -41125,7 +41151,7 @@ function Pause.prototype.____constructor(self, disableInputs)
41125
41151
  self.v.run.shouldUnpause = false
41126
41152
  return 1
41127
41153
  end
41128
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}, {ModCallback.INPUT_ACTION, {self.inputActionGetActionValue, InputHook.GET_ACTION_VALUE}}}
41154
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}, {ModCallback.INPUT_ACTION, self.inputActionGetActionValue, {InputHook.GET_ACTION_VALUE}}}
41129
41155
  self.disableInputs = disableInputs
41130
41156
  end
41131
41157
  function Pause.prototype.stopTearsAndProjectilesFromMoving(self)
@@ -41686,8 +41712,8 @@ function CustomStages.prototype.____constructor(self, customGridEntities, custom
41686
41712
  ISCFeature.PAUSE,
41687
41713
  ISCFeature.RUN_IN_N_FRAMES
41688
41714
  }
41689
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}, {ModCallback.POST_CURSE_EVAL, {self.postCurseEval}}, {ModCallback.GET_SHADER_PARAMS, {self.getShaderParams}}}
41690
- self.customCallbacksUsed = {{ModCallbackCustom.POST_GRID_ENTITY_BROKEN, {self.postGridEntityBrokenRockAlt, GridEntityType.ROCK_ALT}}, {ModCallbackCustom.POST_GRID_ENTITY_INIT, {self.postGridEntityInit}}, {ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
41715
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}, {ModCallback.POST_CURSE_EVAL, self.postCurseEval}, {ModCallback.GET_SHADER_PARAMS, self.getShaderParams}}
41716
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_GRID_ENTITY_BROKEN, self.postGridEntityBrokenRockAlt, {GridEntityType.ROCK_ALT}}, {ModCallbackCustom.POST_GRID_ENTITY_INIT, self.postGridEntityInit}, {ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
41691
41717
  self.customGridEntities = customGridEntities
41692
41718
  self.customTrapdoors = customTrapdoors
41693
41719
  self.disableAllSound = disableAllSound
@@ -41901,7 +41927,7 @@ function DebugDisplayBomb.prototype.____constructor(self)
41901
41927
  local text = self:textCallback(bomb)
41902
41928
  renderTextOnEntity(nil, bomb, text)
41903
41929
  end
41904
- self.callbacksUsed = {{ModCallback.POST_BOMB_RENDER, {self.postBombRender}}}
41930
+ self.callbacksUsed = {{ModCallback.POST_BOMB_RENDER, self.postBombRender}}
41905
41931
  end
41906
41932
  return ____exports
41907
41933
  end,
@@ -41928,7 +41954,7 @@ function DebugDisplayDoor.prototype.____constructor(self)
41928
41954
  local text = self:textCallback(door)
41929
41955
  renderTextOnEntity(nil, door, text)
41930
41956
  end
41931
- self.customCallbacksUsed = {{ModCallbackCustom.POST_DOOR_RENDER, {self.postDoorRender}}}
41957
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_DOOR_RENDER, self.postDoorRender}}
41932
41958
  end
41933
41959
  return ____exports
41934
41960
  end,
@@ -41955,7 +41981,7 @@ function DebugDisplayEffect.prototype.____constructor(self)
41955
41981
  local text = self:textCallback(effect)
41956
41982
  renderTextOnEntity(nil, effect, text)
41957
41983
  end
41958
- self.callbacksUsed = {{ModCallback.POST_EFFECT_RENDER, {self.postEffectRender}}}
41984
+ self.callbacksUsed = {{ModCallback.POST_EFFECT_RENDER, self.postEffectRender}}
41959
41985
  end
41960
41986
  return ____exports
41961
41987
  end,
@@ -41982,7 +42008,7 @@ function DebugDisplayFamiliar.prototype.____constructor(self)
41982
42008
  local text = self:textCallback(familiar)
41983
42009
  renderTextOnEntity(nil, familiar, text)
41984
42010
  end
41985
- self.callbacksUsed = {{ModCallback.POST_FAMILIAR_RENDER, {self.postFamiliarRender}}}
42011
+ self.callbacksUsed = {{ModCallback.POST_FAMILIAR_RENDER, self.postFamiliarRender}}
41986
42012
  end
41987
42013
  return ____exports
41988
42014
  end,
@@ -42009,7 +42035,7 @@ function DebugDisplayKnife.prototype.____constructor(self)
42009
42035
  local text = self:textCallback(knife)
42010
42036
  renderTextOnEntity(nil, knife, text)
42011
42037
  end
42012
- self.callbacksUsed = {{ModCallback.POST_KNIFE_RENDER, {self.postKnifeRender}}}
42038
+ self.callbacksUsed = {{ModCallback.POST_KNIFE_RENDER, self.postKnifeRender}}
42013
42039
  end
42014
42040
  return ____exports
42015
42041
  end,
@@ -42036,7 +42062,7 @@ function DebugDisplayLaser.prototype.____constructor(self)
42036
42062
  local text = self:textCallback(laser)
42037
42063
  renderTextOnEntity(nil, laser, text)
42038
42064
  end
42039
- self.callbacksUsed = {{ModCallback.POST_LASER_RENDER, {self.postLaserRender}}}
42065
+ self.callbacksUsed = {{ModCallback.POST_LASER_RENDER, self.postLaserRender}}
42040
42066
  end
42041
42067
  return ____exports
42042
42068
  end,
@@ -42063,7 +42089,7 @@ function DebugDisplayNPC.prototype.____constructor(self)
42063
42089
  local text = self:textCallback(npc)
42064
42090
  renderTextOnEntity(nil, npc, text)
42065
42091
  end
42066
- self.callbacksUsed = {{ModCallback.POST_NPC_RENDER, {self.postNPCRender}}}
42092
+ self.callbacksUsed = {{ModCallback.POST_NPC_RENDER, self.postNPCRender}}
42067
42093
  end
42068
42094
  return ____exports
42069
42095
  end,
@@ -42090,7 +42116,7 @@ function DebugDisplayPickup.prototype.____constructor(self)
42090
42116
  local text = self:textCallback(pickup)
42091
42117
  renderTextOnEntity(nil, pickup, text)
42092
42118
  end
42093
- self.callbacksUsed = {{ModCallback.POST_PICKUP_RENDER, {self.postPickupRender}}}
42119
+ self.callbacksUsed = {{ModCallback.POST_PICKUP_RENDER, self.postPickupRender}}
42094
42120
  end
42095
42121
  return ____exports
42096
42122
  end,
@@ -42117,7 +42143,7 @@ function DebugDisplayPit.prototype.____constructor(self)
42117
42143
  local text = self:textCallback(pit)
42118
42144
  renderTextOnEntity(nil, pit, text)
42119
42145
  end
42120
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PIT_RENDER, {self.postPitRender}}}
42146
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PIT_RENDER, self.postPitRender}}
42121
42147
  end
42122
42148
  return ____exports
42123
42149
  end,
@@ -42144,7 +42170,7 @@ function DebugDisplayPlayer.prototype.____constructor(self)
42144
42170
  local text = self:textCallback(player)
42145
42171
  renderTextOnEntity(nil, player, text)
42146
42172
  end
42147
- self.callbacksUsed = {{ModCallback.POST_PLAYER_RENDER, {self.postPlayerRender}}}
42173
+ self.callbacksUsed = {{ModCallback.POST_PLAYER_RENDER, self.postPlayerRender}}
42148
42174
  end
42149
42175
  return ____exports
42150
42176
  end,
@@ -42171,7 +42197,7 @@ function DebugDisplayPoop.prototype.____constructor(self)
42171
42197
  local text = self:textCallback(poop)
42172
42198
  renderTextOnEntity(nil, poop, text)
42173
42199
  end
42174
- self.customCallbacksUsed = {{ModCallbackCustom.POST_POOP_RENDER, {self.postPoopRender}}}
42200
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_POOP_RENDER, self.postPoopRender}}
42175
42201
  end
42176
42202
  return ____exports
42177
42203
  end,
@@ -42198,7 +42224,7 @@ function DebugDisplayPressurePlate.prototype.____constructor(self)
42198
42224
  local text = self:textCallback(pressurePlate)
42199
42225
  renderTextOnEntity(nil, pressurePlate, text)
42200
42226
  end
42201
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PRESSURE_PLATE_RENDER, {self.postPressurePlateRender}}}
42227
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PRESSURE_PLATE_RENDER, self.postPressurePlateRender}}
42202
42228
  end
42203
42229
  return ____exports
42204
42230
  end,
@@ -42225,7 +42251,7 @@ function DebugDisplayProjectile.prototype.____constructor(self)
42225
42251
  local text = self:textCallback(projectile)
42226
42252
  renderTextOnEntity(nil, projectile, text)
42227
42253
  end
42228
- self.callbacksUsed = {{ModCallback.POST_PROJECTILE_RENDER, {self.postProjectileRender}}}
42254
+ self.callbacksUsed = {{ModCallback.POST_PROJECTILE_RENDER, self.postProjectileRender}}
42229
42255
  end
42230
42256
  return ____exports
42231
42257
  end,
@@ -42252,7 +42278,7 @@ function DebugDisplayRock.prototype.____constructor(self)
42252
42278
  local text = self:textCallback(rock)
42253
42279
  renderTextOnEntity(nil, rock, text)
42254
42280
  end
42255
- self.customCallbacksUsed = {{ModCallbackCustom.POST_ROCK_RENDER, {self.postRockRender}}}
42281
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_ROCK_RENDER, self.postRockRender}}
42256
42282
  end
42257
42283
  return ____exports
42258
42284
  end,
@@ -42279,7 +42305,7 @@ function DebugDisplaySlot.prototype.____constructor(self)
42279
42305
  local text = self:textCallback(slot)
42280
42306
  renderTextOnEntity(nil, slot, text)
42281
42307
  end
42282
- self.customCallbacksUsed = {{ModCallbackCustom.POST_SLOT_RENDER, {self.postSlotRender}}}
42308
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_SLOT_RENDER, self.postSlotRender}}
42283
42309
  end
42284
42310
  return ____exports
42285
42311
  end,
@@ -42306,7 +42332,7 @@ function DebugDisplaySpikes.prototype.____constructor(self)
42306
42332
  local text = self:textCallback(spikes)
42307
42333
  renderTextOnEntity(nil, spikes, text)
42308
42334
  end
42309
- self.customCallbacksUsed = {{ModCallbackCustom.POST_SPIKES_RENDER, {self.postSpikesRender}}}
42335
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_SPIKES_RENDER, self.postSpikesRender}}
42310
42336
  end
42311
42337
  return ____exports
42312
42338
  end,
@@ -42333,7 +42359,7 @@ function DebugDisplayTear.prototype.____constructor(self)
42333
42359
  local text = self:textCallback(tear)
42334
42360
  renderTextOnEntity(nil, tear, text)
42335
42361
  end
42336
- self.callbacksUsed = {{ModCallback.POST_TEAR_RENDER, {self.postTearRender}}}
42362
+ self.callbacksUsed = {{ModCallback.POST_TEAR_RENDER, self.postTearRender}}
42337
42363
  end
42338
42364
  return ____exports
42339
42365
  end,
@@ -42360,7 +42386,7 @@ function DebugDisplayTNT.prototype.____constructor(self)
42360
42386
  local text = self:textCallback(tnt)
42361
42387
  renderTextOnEntity(nil, tnt, text)
42362
42388
  end
42363
- self.customCallbacksUsed = {{ModCallbackCustom.POST_TNT_RENDER, {self.postTNTRender}}}
42389
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_TNT_RENDER, self.postTNTRender}}
42364
42390
  end
42365
42391
  return ____exports
42366
42392
  end,
@@ -43320,8 +43346,8 @@ function PreventGridEntityRespawn.prototype.____constructor(self, runInNFrames)
43320
43346
  self:setDecorationsInvisible()
43321
43347
  end
43322
43348
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
43323
- self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, {self.preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER}}}
43324
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
43349
+ self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, self.preUseItemWeNeedToGoDeeper, {CollectibleType.WE_NEED_TO_GO_DEEPER}}}
43350
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
43325
43351
  self.runInNFrames = runInNFrames
43326
43352
  end
43327
43353
  function PreventGridEntityRespawn.prototype.setDecorationsInvisible(self)
@@ -43473,7 +43499,7 @@ function PreventCollectibleRotation.prototype.____constructor(self)
43473
43499
  local collectible = pickup
43474
43500
  self:checkCollectibleRotated(collectible)
43475
43501
  end
43476
- self.callbacksUsed = {{ModCallback.POST_USE_CARD, {self.useCardSoulOfIsaac, CardType.SOUL_ISAAC}}, {ModCallback.POST_PICKUP_UPDATE, {self.postPickupUpdateCollectible, PickupVariant.COLLECTIBLE}}}
43502
+ self.callbacksUsed = {{ModCallback.POST_USE_CARD, self.useCardSoulOfIsaac, {CardType.SOUL_ISAAC}}, {ModCallback.POST_PICKUP_UPDATE, self.postPickupUpdateCollectible, {PickupVariant.COLLECTIBLE}}}
43477
43503
  end
43478
43504
  function PreventCollectibleRotation.prototype.checkCollectibleRotated(self, collectible)
43479
43505
  if collectible.SubType == CollectibleType.NULL then
@@ -47228,12 +47254,13 @@ local ____exports = {}
47228
47254
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
47229
47255
  local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
47230
47256
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
47231
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
47232
47257
  local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
47233
47258
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
47234
47259
  local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
47235
47260
  local ____decorators = require("src.decorators")
47236
47261
  local Exported = ____decorators.Exported
47262
+ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
47263
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
47237
47264
  local ____flag = require("src.functions.flag")
47238
47265
  local addFlag = ____flag.addFlag
47239
47266
  local bitFlags = ____flag.bitFlags
@@ -47281,12 +47308,6 @@ function ExtraConsoleCommands.prototype.____constructor(self)
47281
47308
  player.CanFly = true
47282
47309
  end
47283
47310
  end
47284
- self.entityTakeDmgPlayer = function(____, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
47285
- if self.v.persistent.spamBloodRights then
47286
- return false
47287
- end
47288
- return nil
47289
- end
47290
47311
  self.postCurseEval = function(____, curses)
47291
47312
  if self.v.persistent.disableCurses then
47292
47313
  return bitFlags(nil, LevelCurse.NONE)
@@ -47339,17 +47360,23 @@ function ExtraConsoleCommands.prototype.____constructor(self)
47339
47360
  tear:ChangeVariant(TearVariant.CHAOS_CARD)
47340
47361
  end
47341
47362
  end
47363
+ self.entityTakeDmgPlayer = function(____, _player, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
47364
+ if self.v.persistent.spamBloodRights then
47365
+ return false
47366
+ end
47367
+ return nil
47368
+ end
47342
47369
  self.callbacksUsed = {
47343
- {ModCallback.POST_UPDATE, {self.postUpdate}},
47344
- {ModCallback.EVALUATE_CACHE, {self.evaluateCacheDamage, CacheFlag.DAMAGE}},
47345
- {ModCallback.EVALUATE_CACHE, {self.evaluateCacheFireDelay, CacheFlag.FIRE_DELAY}},
47346
- {ModCallback.EVALUATE_CACHE, {self.evaluateCacheSpeed, CacheFlag.SPEED}},
47347
- {ModCallback.EVALUATE_CACHE, {self.evaluateCacheFlying, CacheFlag.FLYING}},
47348
- {ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}},
47349
- {ModCallback.POST_CURSE_EVAL, {self.postCurseEval}},
47350
- {ModCallback.EXECUTE_CMD, {self.executeCmd}},
47351
- {ModCallback.POST_FIRE_TEAR, {self.postFireTear}}
47370
+ {ModCallback.POST_UPDATE, self.postUpdate},
47371
+ {ModCallback.EVALUATE_CACHE, self.evaluateCacheDamage, {CacheFlag.DAMAGE}},
47372
+ {ModCallback.EVALUATE_CACHE, self.evaluateCacheFireDelay, {CacheFlag.FIRE_DELAY}},
47373
+ {ModCallback.EVALUATE_CACHE, self.evaluateCacheSpeed, {CacheFlag.SPEED}},
47374
+ {ModCallback.EVALUATE_CACHE, self.evaluateCacheFlying, {CacheFlag.FLYING}},
47375
+ {ModCallback.POST_CURSE_EVAL, self.postCurseEval},
47376
+ {ModCallback.EXECUTE_CMD, self.executeCmd},
47377
+ {ModCallback.POST_FIRE_TEAR, self.postFireTear}
47352
47378
  }
47379
+ self.customCallbacksUsed = {{ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER, self.entityTakeDmgPlayer}}
47353
47380
  for ____, ____value in ipairs(__TS__ObjectEntries(commands)) do
47354
47381
  local funcName = ____value[1]
47355
47382
  local func = ____value[2]
@@ -47402,7 +47429,7 @@ function FadeInRemover.prototype.____constructor(self)
47402
47429
  game:Fadein(FADE_IN_SPEED)
47403
47430
  end
47404
47431
  end
47405
- self.callbacksUsed = {{ModCallback.POST_GAME_STARTED, {self.postGameStarted}}}
47432
+ self.callbacksUsed = {{ModCallback.POST_GAME_STARTED, self.postGameStarted}}
47406
47433
  end
47407
47434
  function FadeInRemover.prototype.removeFadeIn(self)
47408
47435
  self.enabled = true
@@ -47463,7 +47490,7 @@ function FastReset.prototype.____constructor(self)
47463
47490
  end
47464
47491
  checkResetInput(nil)
47465
47492
  end
47466
- self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
47493
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
47467
47494
  end
47468
47495
  function FastReset.prototype.enableFastReset(self)
47469
47496
  self.enabled = true
@@ -47570,7 +47597,7 @@ function PressInput.prototype.____constructor(self)
47570
47597
  end
47571
47598
  return nil
47572
47599
  end
47573
- self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}}
47600
+ self.callbacksUsed = {{ModCallback.INPUT_ACTION, self.isActionTriggered, {InputHook.IS_ACTION_TRIGGERED}}}
47574
47601
  end
47575
47602
  function PressInput.prototype.pressInput(self, player, buttonAction)
47576
47603
  local playerIndex = getPlayerIndex(nil, player)
@@ -47782,7 +47809,7 @@ function NoSirenSteal.prototype.____constructor(self)
47782
47809
  self.postNPCInitSirenHelper = function(____, npc)
47783
47810
  self:checkReturnFamiliarToPlayer(npc)
47784
47811
  end
47785
- self.callbacksUsed = {{ModCallback.POST_NPC_INIT, {self.postNPCInitSirenHelper, EntityType.SIREN_HELPER}}}
47812
+ self.callbacksUsed = {{ModCallback.POST_NPC_INIT, self.postNPCInitSirenHelper, {EntityType.SIREN_HELPER}}}
47786
47813
  end
47787
47814
  function NoSirenSteal.prototype.checkReturnFamiliarToPlayer(self, npc)
47788
47815
  if npc.Target == nil then
@@ -47896,8 +47923,8 @@ function PersistentEntities.prototype.____constructor(self, roomHistory)
47896
47923
  end
47897
47924
  end
47898
47925
  self.featuresUsed = {ISCFeature.ROOM_HISTORY}
47899
- self.callbacksUsed = {{ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemove}}}
47900
- self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
47926
+ self.callbacksUsed = {{ModCallback.POST_ENTITY_REMOVE, self.postEntityRemove}}
47927
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
47901
47928
  self.roomHistory = roomHistory
47902
47929
  end
47903
47930
  function PersistentEntities.prototype.trackDespawningPickupPosition(self, entity, index)
@@ -48016,7 +48043,7 @@ function PlayerInventory.prototype.____constructor(self)
48016
48043
  local inventory = defaultMapGetPlayer(nil, self.v.run.playersInventory, player, player)
48017
48044
  arrayRemoveInPlace(nil, inventory, collectibleType)
48018
48045
  end
48019
- self.customCallbacksUsed = {{ModCallbackCustom.POST_PLAYER_COLLECTIBLE_ADDED, {self.postCollectibleAdded}}, {ModCallbackCustom.POST_PLAYER_COLLECTIBLE_REMOVED, {self.postCollectibleRemoved}}}
48046
+ self.customCallbacksUsed = {{ModCallbackCustom.POST_PLAYER_COLLECTIBLE_ADDED, self.postCollectibleAdded}, {ModCallbackCustom.POST_PLAYER_COLLECTIBLE_REMOVED, self.postCollectibleRemoved}}
48020
48047
  end
48021
48048
  function PlayerInventory.prototype.getPlayerInventory(self, player, includeActiveCollectibles)
48022
48049
  if includeActiveCollectibles == nil then
@@ -48067,7 +48094,7 @@ function PreventChildEntities.prototype.____constructor(self)
48067
48094
  npc:Remove()
48068
48095
  end
48069
48096
  end
48070
- self.callbacksUsed = {{ModCallback.POST_NPC_INIT, {self.postNPCInit}}}
48097
+ self.callbacksUsed = {{ModCallback.POST_NPC_INIT, self.postNPCInit}}
48071
48098
  end
48072
48099
  function PreventChildEntities.prototype.preventChildEntities(self, entity)
48073
48100
  local ptrHash = GetPtrHash(entity)
@@ -48691,7 +48718,7 @@ function TaintedLazarusPlayers.prototype.____constructor(self)
48691
48718
  end
48692
48719
  self:checkDequeue()
48693
48720
  end
48694
- self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, {self.postPlayerInit}}}
48721
+ self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, self.postPlayerInit}}
48695
48722
  end
48696
48723
  function TaintedLazarusPlayers.prototype.checkDequeue(self)
48697
48724
  if #self.v.run.queuedTaintedLazarus == 0 or #self.v.run.queuedDeadTaintedLazarus == 0 then
@@ -48956,10 +48983,6 @@ function ____exports.getFeatures(self, mod, callbacks)
48956
48983
  }
48957
48984
  return features
48958
48985
  end
48959
- return ____exports
48960
- end,
48961
- ["src.types.AnyFunction"] = function(...)
48962
- local ____exports = {}
48963
48986
  return ____exports
48964
48987
  end,
48965
48988
  ["src.functions.debugFunctions"] = function(...)
@@ -49193,19 +49216,21 @@ function ModUpgradedBase.prototype.initFeature(self, feature)
49193
49216
  end
49194
49217
  if feature.callbacksUsed ~= nil then
49195
49218
  for ____, callbackTuple in ipairs(feature.callbacksUsed) do
49196
- local modCallback, callbackArgs = table.unpack(callbackTuple)
49219
+ local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple)
49197
49220
  self:AddCallback(
49198
49221
  modCallback,
49199
- table.unpack(callbackArgs)
49222
+ callbackFunc,
49223
+ table.unpack(optionalArgs or ({}))
49200
49224
  )
49201
49225
  end
49202
49226
  end
49203
49227
  if feature.customCallbacksUsed ~= nil then
49204
49228
  for ____, callbackTuple in ipairs(feature.customCallbacksUsed) do
49205
- local modCallback, callbackArgs = table.unpack(callbackTuple)
49229
+ local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple)
49206
49230
  self:AddCallbackCustom(
49207
49231
  modCallback,
49208
- table.unpack(callbackArgs)
49232
+ callbackFunc,
49233
+ table.unpack(optionalArgs or ({}))
49209
49234
  )
49210
49235
  end
49211
49236
  end
@@ -49240,16 +49265,14 @@ function ModUpgradedBase.prototype.uninitFeature(self, feature)
49240
49265
  end
49241
49266
  if feature.callbacksUsed ~= nil then
49242
49267
  for ____, callbackTuple in ipairs(feature.callbacksUsed) do
49243
- local modCallback, callbackArgs = table.unpack(callbackTuple)
49244
- local callback = callbackArgs[1]
49245
- self:RemoveCallback(modCallback, callback)
49268
+ local modCallback, callbackFunc = table.unpack(callbackTuple)
49269
+ self:RemoveCallback(modCallback, callbackFunc)
49246
49270
  end
49247
49271
  end
49248
49272
  if feature.customCallbacksUsed ~= nil then
49249
49273
  for ____, callbackTuple in ipairs(feature.customCallbacksUsed) do
49250
- local modCallback, callbackArgs = table.unpack(callbackTuple)
49251
- local callback = callbackArgs[1]
49252
- self:RemoveCallbackCustom(modCallback, callback)
49274
+ local modCallback, callbackFunc = table.unpack(callbackTuple)
49275
+ self:RemoveCallbackCustom(modCallback, callbackFunc)
49253
49276
  end
49254
49277
  end
49255
49278
  if feature.v ~= nil then
@@ -49294,8 +49317,6 @@ local ____exports = {}
49294
49317
  local initDecoratedCallbacks, addCallback, removeCallback, initSaveDataManager, WRAPPED_CALLBACK_METHODS_KEY, WRAPPED_CUSTOM_CALLBACK_METHODS_KEY
49295
49318
  local ____array = require("src.functions.array")
49296
49319
  local isArray = ____array.isArray
49297
- local ____deepCopy = require("src.functions.deepCopy")
49298
- local deepCopy = ____deepCopy.deepCopy
49299
49320
  local ____tstlClass = require("src.functions.tstlClass")
49300
49321
  local getTSTLClassConstructor = ____tstlClass.getTSTLClassConstructor
49301
49322
  local getTSTLClassName = ____tstlClass.getTSTLClassName
@@ -49305,26 +49326,29 @@ local isNumber = ____types.isNumber
49305
49326
  local isTable = ____types.isTable
49306
49327
  function initDecoratedCallbacks(self, modFeature, constructor, tstlClassName, vanilla, init)
49307
49328
  local modFeatureConstructor = constructor
49308
- local argsKey = vanilla and ____exports.ADD_CALLBACK_ARGS_KEY or ____exports.ADD_CALLBACK_CUSTOM_ARGS_KEY
49309
- local addCallbackArgs = modFeatureConstructor[argsKey]
49310
- if addCallbackArgs == nil then
49329
+ local callbackTuplesKey = vanilla and ____exports.MOD_FEATURE_CALLBACKS_KEY or ____exports.MOD_FEATURE_CUSTOM_CALLBACKS_KEY
49330
+ local callbackTuples = modFeatureConstructor[callbackTuplesKey]
49331
+ if callbackTuples == nil then
49311
49332
  return
49312
49333
  end
49313
- if not isArray(nil, addCallbackArgs) then
49314
- error(("Failed to initialize/uninitialize the decorated callbacks on a mod feature since the callback arguments on the key of \"" .. argsKey) .. "\" was not an array.")
49334
+ if not isArray(nil, callbackTuples) then
49335
+ error((("Failed to initialize/uninitialize the decorated callbacks on a mod feature since the callback arguments on the key of \"" .. callbackTuplesKey) .. "\" was not an array and was instead of type: ") .. type(callbackTuples))
49315
49336
  end
49316
- for ____, args in ipairs(addCallbackArgs) do
49317
- if not isArray(nil, args) then
49318
- error("Failed to initialize/uninitialize the decorated callbacks on a mod feature since one of the callback arguments was not an array.")
49337
+ for ____, callbackTuple in ipairs(callbackTuples) do
49338
+ if not isArray(nil, callbackTuple) then
49339
+ error((("Failed to initialize/uninitialize the decorated callbacks on a mod feature since one of the callback arguments on the key of \"" .. callbackTuplesKey) .. "\" was not an array and was instead of type: ") .. type(callbackTuple))
49319
49340
  end
49320
- local parameters = deepCopy(nil, args)
49321
- local modCallback = table.remove(parameters, 1)
49341
+ local modCallback = callbackTuple[1]
49322
49342
  if not isNumber(nil, modCallback) then
49323
- error("Failed to get the callback number from the parameters for class: " .. tstlClassName)
49343
+ error("Failed to get the callback number from the callback tuple for class: " .. tstlClassName)
49324
49344
  end
49325
- local callback = table.remove(parameters, 1)
49345
+ local callback = callbackTuple[2]
49326
49346
  if not isFunction(nil, callback) then
49327
- error("Failed to get the callback function from the parameters for class: " .. tstlClassName)
49347
+ error("Failed to get the callback function from the callback tuple for class: " .. tstlClassName)
49348
+ end
49349
+ local parameters = callbackTuple[3]
49350
+ if not isArray(nil, parameters, false) then
49351
+ error("Failed to get the callback parameters from the callback tuple for class: " .. tstlClassName)
49328
49352
  end
49329
49353
  local mod = modFeature.mod
49330
49354
  if init then
@@ -49435,8 +49459,8 @@ function initSaveDataManager(self, modFeature, tstlClassName, init)
49435
49459
  saveDataManagerMethod(nil, tstlClassName)
49436
49460
  end
49437
49461
  end
49438
- ____exports.ADD_CALLBACK_ARGS_KEY = "__addCallbackArgs"
49439
- ____exports.ADD_CALLBACK_CUSTOM_ARGS_KEY = "__addCallbackCustomArgs"
49462
+ ____exports.MOD_FEATURE_CALLBACKS_KEY = "__callbacks"
49463
+ ____exports.MOD_FEATURE_CUSTOM_CALLBACKS_KEY = "__customCallbacks"
49440
49464
  WRAPPED_CALLBACK_METHODS_KEY = "__wrappedCallbackMethods"
49441
49465
  WRAPPED_CUSTOM_CALLBACK_METHODS_KEY = "__wrappedCustomCallbacksMethods"
49442
49466
  ____exports.ModFeature = __TS__Class()
@@ -49868,19 +49892,13 @@ function ____exports.hasCurse(self, curse)
49868
49892
  local curses = level:GetCurses()
49869
49893
  return hasFlag(nil, curses, curse)
49870
49894
  end
49871
- return ____exports
49872
- end,
49873
- ["src.types.AllButFirst"] = function(...)
49874
- local ____exports = {}
49875
49895
  return ____exports
49876
49896
  end,
49877
49897
  ["src.functions.decorators"] = function(...)
49878
- local ____lualib = require("lualib_bundle")
49879
- local __TS__Spread = ____lualib.__TS__Spread
49880
49898
  local ____exports = {}
49881
49899
  local ____ModFeature = require("src.classes.ModFeature")
49882
- local ADD_CALLBACK_ARGS_KEY = ____ModFeature.ADD_CALLBACK_ARGS_KEY
49883
- local ADD_CALLBACK_CUSTOM_ARGS_KEY = ____ModFeature.ADD_CALLBACK_CUSTOM_ARGS_KEY
49900
+ local MOD_FEATURE_CALLBACKS_KEY = ____ModFeature.MOD_FEATURE_CALLBACKS_KEY
49901
+ local MOD_FEATURE_CUSTOM_CALLBACKS_KEY = ____ModFeature.MOD_FEATURE_CUSTOM_CALLBACKS_KEY
49884
49902
  local ____tstlClass = require("src.functions.tstlClass")
49885
49903
  local getTSTLClassName = ____tstlClass.getTSTLClassName
49886
49904
  function ____exports.Callback(self, modCallback, ...)
@@ -49888,21 +49906,17 @@ function ____exports.Callback(self, modCallback, ...)
49888
49906
  return function(____, target, propertyKey, _descriptor)
49889
49907
  local methodName = propertyKey
49890
49908
  local method = target[methodName]
49891
- local addCallbackArgs = {
49892
- modCallback,
49893
- method,
49894
- __TS__Spread(optionalArgs)
49895
- }
49909
+ local callbackTuple = {modCallback, method, optionalArgs}
49896
49910
  local constructor = target.constructor
49897
49911
  if constructor == nil then
49898
49912
  local tstlClassName = getTSTLClassName(nil, target) or "Unknown"
49899
49913
  error(("Failed to get the constructor for class \"" .. tstlClassName) .. "\". Did you decorate a static method? You can only decorate non-static class methods, because the \"Mod\" object is not present before the class is instantiated.")
49900
49914
  end
49901
- if not (constructor[ADD_CALLBACK_ARGS_KEY] ~= nil) then
49902
- constructor[ADD_CALLBACK_ARGS_KEY] = {}
49915
+ if not (constructor[MOD_FEATURE_CALLBACKS_KEY] ~= nil) then
49916
+ constructor[MOD_FEATURE_CALLBACKS_KEY] = {}
49903
49917
  end
49904
- local callbackTuples = constructor[ADD_CALLBACK_ARGS_KEY]
49905
- callbackTuples[#callbackTuples + 1] = addCallbackArgs
49918
+ local callbackTuples = constructor[MOD_FEATURE_CALLBACKS_KEY]
49919
+ callbackTuples[#callbackTuples + 1] = callbackTuple
49906
49920
  end
49907
49921
  end
49908
49922
  function ____exports.CallbackCustom(self, modCallbackCustom, ...)
@@ -49910,21 +49924,17 @@ function ____exports.CallbackCustom(self, modCallbackCustom, ...)
49910
49924
  return function(____, target, propertyKey, _descriptor)
49911
49925
  local methodName = propertyKey
49912
49926
  local method = target[methodName]
49913
- local addCallbackArgs = {
49914
- modCallbackCustom,
49915
- method,
49916
- __TS__Spread(optionalArgs)
49917
- }
49927
+ local callbackTuple = {modCallbackCustom, method, optionalArgs}
49918
49928
  local constructor = target.constructor
49919
49929
  if constructor == nil then
49920
49930
  local tstlClassName = getTSTLClassName(nil, target) or "Unknown"
49921
49931
  error(("Failed to get the constructor for class \"" .. tstlClassName) .. "\". Did you decorate a static method? You can only decorate non-static class methods, because the \"Mod\" object is not present before the class is instantiated.")
49922
49932
  end
49923
- if not (constructor[ADD_CALLBACK_CUSTOM_ARGS_KEY] ~= nil) then
49924
- constructor[ADD_CALLBACK_CUSTOM_ARGS_KEY] = {}
49933
+ if not (constructor[MOD_FEATURE_CUSTOM_CALLBACKS_KEY] ~= nil) then
49934
+ constructor[MOD_FEATURE_CUSTOM_CALLBACKS_KEY] = {}
49925
49935
  end
49926
- local callbackTuples = constructor[ADD_CALLBACK_CUSTOM_ARGS_KEY]
49927
- callbackTuples[#callbackTuples + 1] = addCallbackArgs
49936
+ local callbackTuples = constructor[MOD_FEATURE_CUSTOM_CALLBACKS_KEY]
49937
+ callbackTuples[#callbackTuples + 1] = callbackTuple
49928
49938
  end
49929
49939
  end
49930
49940
  return ____exports