isaacscript-common 13.3.4 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (668) hide show
  1. package/dist/index.d.ts +1644 -441
  2. package/dist/isaacscript-common.lua +19643 -16276
  3. package/dist/src/callbacks/customRevive.lua +10 -1
  4. package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
  5. package/dist/src/callbacks/postAmbush.lua +7 -12
  6. package/dist/src/callbacks/postBombExploded.lua +3 -3
  7. package/dist/src/callbacks/postDoorRender.lua +2 -2
  8. package/dist/src/callbacks/postEffectStateChanged.lua +3 -3
  9. package/dist/src/callbacks/postFamiliarStateChanged.lua +3 -3
  10. package/dist/src/callbacks/postFlip.lua +1 -1
  11. package/dist/src/callbacks/postGridEntity.lua +2 -2
  12. package/dist/src/callbacks/postNPCStateChanged.lua +3 -3
  13. package/dist/src/callbacks/postPickupStateChanged.lua +3 -3
  14. package/dist/src/callbacks/postPlayerCollectible.d.ts.map +1 -1
  15. package/dist/src/callbacks/postPlayerCollectible.lua +5 -9
  16. package/dist/src/callbacks/postRoomClearChanged.d.ts.map +1 -1
  17. package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
  18. package/dist/src/callbacks/reorderedCallbacks.lua +7 -7
  19. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
  20. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
  21. package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
  22. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
  23. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
  24. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
  25. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
  26. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
  27. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
  28. package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
  29. package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts +1 -1
  30. package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts.map +1 -1
  31. package/dist/src/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
  32. package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts +1 -1
  33. package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts.map +1 -1
  34. package/dist/src/callbacks/subscriptions/postGridEntityInit.lua +3 -3
  35. package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts +3 -3
  36. package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts.map +1 -1
  37. package/dist/src/callbacks/subscriptions/postGridEntityRemove.lua +4 -4
  38. package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts +1 -1
  39. package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts.map +1 -1
  40. package/dist/src/callbacks/subscriptions/postGridEntityRender.lua +3 -3
  41. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts +1 -1
  42. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts.map +1 -1
  43. package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.lua +3 -3
  44. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts +1 -1
  45. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts.map +1 -1
  46. package/dist/src/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
  47. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -1
  48. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
  49. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
  50. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
  51. package/dist/src/callbacks/subscriptions/postRockRender.d.ts +1 -1
  52. package/dist/src/callbacks/subscriptions/postRockRender.d.ts.map +1 -1
  53. package/dist/src/callbacks/subscriptions/postRockRender.lua +3 -3
  54. package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts +1 -1
  55. package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts.map +1 -1
  56. package/dist/src/callbacks/subscriptions/postRockUpdate.lua +3 -3
  57. package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts +1 -1
  58. package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts.map +1 -1
  59. package/dist/src/callbacks/subscriptions/postSpikesRender.lua +3 -3
  60. package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts +1 -1
  61. package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts.map +1 -1
  62. package/dist/src/callbacks/subscriptions/postSpikesUpdate.lua +3 -3
  63. package/dist/src/callbacks/subscriptions/postTNTRender.d.ts +1 -1
  64. package/dist/src/callbacks/subscriptions/postTNTRender.d.ts.map +1 -1
  65. package/dist/src/callbacks/subscriptions/postTNTRender.lua +3 -3
  66. package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts +1 -1
  67. package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts.map +1 -1
  68. package/dist/src/callbacks/subscriptions/postTNTUpdate.lua +3 -3
  69. package/dist/src/callbacks.d.ts +106 -0
  70. package/dist/src/callbacks.d.ts.map +1 -0
  71. package/dist/src/callbacks.lua +176 -0
  72. package/dist/src/classes/DefaultMap.d.ts.map +1 -1
  73. package/dist/src/classes/ModFeature.d.ts +11 -0
  74. package/dist/src/classes/ModFeature.d.ts.map +1 -0
  75. package/dist/src/classes/ModFeature.lua +13 -0
  76. package/dist/src/classes/ModUpgraded.d.ts +49 -11
  77. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  78. package/dist/src/classes/ModUpgraded.lua +118 -16
  79. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
  80. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
  81. package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
  82. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
  83. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
  84. package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
  85. package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
  86. package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
  87. package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
  88. package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
  89. package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
  90. package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
  91. package/dist/src/classes/callbacks/PostBoneSwing.d.ts +14 -0
  92. package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
  93. package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
  94. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
  95. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
  96. package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
  97. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
  98. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
  99. package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
  100. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +20 -0
  101. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
  102. package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
  103. package/dist/src/classes/callbacks/PostCustomRevive.d.ts +6 -0
  104. package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -0
  105. package/dist/src/classes/callbacks/PostCustomRevive.lua +17 -0
  106. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts +15 -0
  107. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -0
  108. package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +44 -0
  109. package/dist/src/classes/callbacks/PostDoorRender.d.ts +7 -0
  110. package/dist/src/classes/callbacks/PostDoorRender.d.ts.map +1 -0
  111. package/dist/src/classes/callbacks/PostDoorRender.lua +24 -0
  112. package/dist/src/classes/callbacks/PostDoorUpdate.d.ts +7 -0
  113. package/dist/src/classes/callbacks/PostDoorUpdate.d.ts.map +1 -0
  114. package/dist/src/classes/callbacks/PostDoorUpdate.lua +24 -0
  115. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts +12 -0
  116. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts.map +1 -0
  117. package/dist/src/classes/callbacks/PostEffectInitLate.lua +27 -0
  118. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts +13 -0
  119. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts.map +1 -0
  120. package/dist/src/classes/callbacks/PostEffectStateChanged.lua +33 -0
  121. package/dist/src/classes/callbacks/PostEsauJr.d.ts +6 -0
  122. package/dist/src/classes/callbacks/PostEsauJr.d.ts.map +1 -0
  123. package/dist/src/classes/callbacks/PostEsauJr.lua +17 -0
  124. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts +12 -0
  125. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts.map +1 -0
  126. package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +27 -0
  127. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts +13 -0
  128. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts.map +1 -0
  129. package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +33 -0
  130. package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts +6 -0
  131. package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts.map +1 -0
  132. package/dist/src/classes/callbacks/PostFirstEsauJr.lua +17 -0
  133. package/dist/src/classes/callbacks/PostFirstFlip.d.ts +6 -0
  134. package/dist/src/classes/callbacks/PostFirstFlip.d.ts.map +1 -0
  135. package/dist/src/classes/callbacks/PostFirstFlip.lua +17 -0
  136. package/dist/src/classes/callbacks/PostFlip.d.ts +6 -0
  137. package/dist/src/classes/callbacks/PostFlip.d.ts.map +1 -0
  138. package/dist/src/classes/callbacks/PostFlip.lua +17 -0
  139. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts +6 -0
  140. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts.map +1 -0
  141. package/dist/src/classes/callbacks/PostGameStartedReordered.lua +17 -0
  142. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts +6 -0
  143. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts.map +1 -0
  144. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.lua +17 -0
  145. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts +12 -0
  146. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -0
  147. package/dist/src/classes/callbacks/PostGreedModeWave.lua +34 -0
  148. package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts +6 -0
  149. package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts.map +1 -0
  150. package/dist/src/classes/callbacks/PostGridEntityBroken.lua +17 -0
  151. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +9 -0
  152. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -0
  153. package/dist/src/classes/callbacks/PostGridEntityCollision.lua +36 -0
  154. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts +6 -0
  155. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts.map +1 -0
  156. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.lua +17 -0
  157. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +9 -0
  158. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -0
  159. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.lua +31 -0
  160. package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts +6 -0
  161. package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts.map +1 -0
  162. package/dist/src/classes/callbacks/PostGridEntityCustomInit.lua +17 -0
  163. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts +9 -0
  164. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -0
  165. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.lua +25 -0
  166. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts +6 -0
  167. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts.map +1 -0
  168. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.lua +17 -0
  169. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts +6 -0
  170. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts.map +1 -0
  171. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.lua +17 -0
  172. package/dist/src/classes/callbacks/PostGridEntityInit.d.ts +6 -0
  173. package/dist/src/classes/callbacks/PostGridEntityInit.d.ts.map +1 -0
  174. package/dist/src/classes/callbacks/PostGridEntityInit.lua +17 -0
  175. package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts +9 -0
  176. package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -0
  177. package/dist/src/classes/callbacks/PostGridEntityRemove.lua +28 -0
  178. package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts +6 -0
  179. package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts.map +1 -0
  180. package/dist/src/classes/callbacks/PostGridEntityStateChanged.lua +17 -0
  181. package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts +6 -0
  182. package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts.map +1 -0
  183. package/dist/src/classes/callbacks/PostGridEntityUpdate.lua +17 -0
  184. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts +14 -0
  185. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -0
  186. package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +35 -0
  187. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +12 -0
  188. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
  189. package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
  190. package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts +6 -0
  191. package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts.map +1 -0
  192. package/dist/src/classes/callbacks/PostNewLevelReordered.lua +17 -0
  193. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +13 -0
  194. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
  195. package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
  196. package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts +6 -0
  197. package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts.map +1 -0
  198. package/dist/src/classes/callbacks/PostNewRoomReordered.lua +17 -0
  199. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts +6 -0
  200. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts.map +1 -0
  201. package/dist/src/classes/callbacks/PostPEffectUpdateReordered.lua +17 -0
  202. package/dist/src/classes/callbacks/PostPitRender.d.ts +7 -0
  203. package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
  204. package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
  205. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts +15 -0
  206. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -0
  207. package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +87 -0
  208. package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts +6 -0
  209. package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts.map +1 -0
  210. package/dist/src/classes/callbacks/PostPlayerRenderReordered.lua +17 -0
  211. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts +6 -0
  212. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts.map +1 -0
  213. package/dist/src/classes/callbacks/PostPlayerUpdateReordered.lua +17 -0
  214. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +13 -0
  215. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
  216. package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
  217. package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
  218. package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
  219. package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
  220. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts +7 -0
  221. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts.map +1 -0
  222. package/dist/src/classes/callbacks/PreBerserkDeath.lua +36 -0
  223. package/dist/src/classes/callbacks/PreCustomRevive.d.ts +6 -0
  224. package/dist/src/classes/callbacks/PreCustomRevive.d.ts.map +1 -0
  225. package/dist/src/classes/callbacks/PreCustomRevive.lua +17 -0
  226. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +10 -0
  227. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
  228. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
  229. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
  230. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
  231. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
  232. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
  233. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
  234. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
  235. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts +10 -0
  236. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts.map +1 -0
  237. package/dist/src/classes/callbacks/validation/CustomCallbackDoor.lua +20 -0
  238. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts +11 -0
  239. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts.map +1 -0
  240. package/dist/src/classes/callbacks/validation/CustomCallbackEffect.lua +19 -0
  241. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts +11 -0
  242. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts.map +1 -0
  243. package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.lua +19 -0
  244. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts +11 -0
  245. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts.map +1 -0
  246. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.lua +24 -0
  247. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts +10 -0
  248. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts.map +1 -0
  249. package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.lua +19 -0
  250. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +10 -0
  251. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
  252. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
  253. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
  254. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
  255. package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
  256. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
  257. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
  258. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
  259. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts +11 -0
  260. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts.map +1 -0
  261. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.lua +19 -0
  262. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +10 -0
  263. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
  264. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
  265. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +134 -0
  266. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -0
  267. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +220 -0
  268. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +39 -0
  269. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -0
  270. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +140 -0
  271. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts +19 -0
  272. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -0
  273. package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +52 -0
  274. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts +16 -0
  275. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -0
  276. package/dist/src/classes/features/callbackLogic/FlipDetection.lua +58 -0
  277. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +27 -0
  278. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -0
  279. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +108 -0
  280. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts +19 -0
  281. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -0
  282. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +69 -0
  283. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts +46 -0
  284. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts.map +1 -0
  285. package/dist/src/classes/features/callbackLogic/GridEntityDetection.lua +126 -0
  286. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts +24 -0
  287. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -0
  288. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +72 -0
  289. package/dist/src/classes/features/other/RunInNFrames.d.ts +123 -0
  290. package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -0
  291. package/dist/src/classes/features/other/RunInNFrames.lua +109 -0
  292. package/dist/src/classes/private/CustomCallback.d.ts +26 -0
  293. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
  294. package/dist/src/classes/private/CustomCallback.lua +63 -0
  295. package/dist/src/classes/private/Feature.d.ts +19 -0
  296. package/dist/src/classes/private/Feature.d.ts.map +1 -0
  297. package/dist/src/classes/private/Feature.lua +16 -0
  298. package/dist/src/core/upgradeMod.d.ts +18 -1
  299. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  300. package/dist/src/core/upgradeMod.lua +44 -9
  301. package/dist/src/decorators.d.ts +9 -0
  302. package/dist/src/decorators.d.ts.map +1 -0
  303. package/dist/src/decorators.lua +12 -0
  304. package/dist/src/enums/ISCFeature.d.ts +12 -0
  305. package/dist/src/enums/ISCFeature.d.ts.map +1 -0
  306. package/dist/src/enums/ISCFeature.lua +12 -0
  307. package/dist/src/enums/LadderSubTypeCustom.d.ts +17 -0
  308. package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
  309. package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
  310. package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
  311. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  312. package/dist/src/enums/ModCallbackCustom.lua +85 -87
  313. package/dist/src/enums/ModCallbackCustom2.d.ts +53 -0
  314. package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
  315. package/dist/src/enums/ModCallbackCustom2.lua +102 -0
  316. package/dist/src/features/customGridEntity.d.ts.map +1 -1
  317. package/dist/src/features/customGridEntity.lua +6 -8
  318. package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
  319. package/dist/src/features/customHotkeys.d.ts.map +1 -0
  320. package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
  321. package/dist/src/features/customPickup.d.ts.map +1 -1
  322. package/dist/src/features/customPickup.lua +6 -2
  323. package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
  324. package/dist/src/features/customStage/backdrop.lua +3 -1
  325. package/dist/src/features/customStage/shadows.d.ts.map +1 -1
  326. package/dist/src/features/customStage/shadows.lua +3 -1
  327. package/dist/src/features/customTrapdoor/init.lua +1 -7
  328. package/dist/src/features/customTrapdoor/touched.lua +1 -1
  329. package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
  330. package/dist/src/features/deployJSONRoom.lua +6 -8
  331. package/dist/src/features/firstLast.d.ts.map +1 -1
  332. package/dist/src/features/firstLast.lua +3 -3
  333. package/dist/src/features/saveDataManager/constants.d.ts +1 -1
  334. package/dist/src/features/saveDataManager/constants.d.ts.map +1 -1
  335. package/dist/src/features/saveDataManager/exports.d.ts +5 -0
  336. package/dist/src/features/saveDataManager/exports.d.ts.map +1 -1
  337. package/dist/src/features/saveDataManager/exports.lua +16 -0
  338. package/dist/src/features/saveDataManager/main.d.ts +8 -2
  339. package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
  340. package/dist/src/features/saveDataManager/main.lua +3 -5
  341. package/dist/src/features/saveDataManager/save.lua +2 -3
  342. package/dist/src/features.d.ts +34 -0
  343. package/dist/src/features.d.ts.map +1 -0
  344. package/dist/src/features.lua +68 -0
  345. package/dist/src/functions/ambush.d.ts +6 -0
  346. package/dist/src/functions/ambush.d.ts.map +1 -1
  347. package/dist/src/functions/ambush.lua +31 -0
  348. package/dist/src/functions/characters.lua +3 -3
  349. package/dist/src/functions/charge.d.ts +30 -8
  350. package/dist/src/functions/charge.d.ts.map +1 -1
  351. package/dist/src/functions/charge.lua +38 -2
  352. package/dist/src/functions/chargeBar.d.ts +6 -0
  353. package/dist/src/functions/chargeBar.d.ts.map +1 -1
  354. package/dist/src/functions/chargeBar.lua +6 -0
  355. package/dist/src/functions/decorators.d.ts +19 -0
  356. package/dist/src/functions/decorators.d.ts.map +1 -0
  357. package/dist/src/functions/decorators.lua +32 -0
  358. package/dist/src/functions/flying.lua +4 -4
  359. package/dist/src/functions/gridEntities.lua +5 -5
  360. package/dist/src/functions/gridEntitiesSpecific.lua +12 -12
  361. package/dist/src/functions/itemPool.lua +2 -2
  362. package/dist/src/functions/minimap.d.ts +4 -0
  363. package/dist/src/functions/minimap.d.ts.map +1 -1
  364. package/dist/src/functions/minimap.lua +4 -0
  365. package/dist/src/functions/playerHealth.lua +6 -6
  366. package/dist/src/functions/playerIndex.lua +2 -2
  367. package/dist/src/functions/players.d.ts +14 -3
  368. package/dist/src/functions/players.d.ts.map +1 -1
  369. package/dist/src/functions/players.lua +35 -16
  370. package/dist/src/functions/pocketItems.lua +1 -1
  371. package/dist/src/functions/roomTransition.d.ts +3 -4
  372. package/dist/src/functions/roomTransition.d.ts.map +1 -1
  373. package/dist/src/functions/roomTransition.lua +4 -32
  374. package/dist/src/functions/rooms.d.ts +1 -1
  375. package/dist/src/functions/rooms.d.ts.map +1 -1
  376. package/dist/src/functions/rooms.lua +1 -1
  377. package/dist/src/functions/run.d.ts +5 -0
  378. package/dist/src/functions/run.d.ts.map +1 -1
  379. package/dist/src/functions/run.lua +6 -0
  380. package/dist/src/functions/spawnCollectible.d.ts +24 -5
  381. package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
  382. package/dist/src/functions/spawnCollectible.lua +44 -4
  383. package/dist/src/functions/table.d.ts +2 -0
  384. package/dist/src/functions/table.d.ts.map +1 -1
  385. package/dist/src/functions/table.lua +7 -0
  386. package/dist/src/functions/trinkets.lua +1 -1
  387. package/dist/src/functions/tstlClass.d.ts +21 -9
  388. package/dist/src/functions/tstlClass.d.ts.map +1 -1
  389. package/dist/src/functions/tstlClass.lua +49 -24
  390. package/dist/src/functions/utils.d.ts +44 -2
  391. package/dist/src/functions/utils.d.ts.map +1 -1
  392. package/dist/src/functions/utils.lua +43 -2
  393. package/dist/src/index.d.ts +15 -2
  394. package/dist/src/index.d.ts.map +1 -1
  395. package/dist/src/index.lua +42 -10
  396. package/dist/src/initCustomCallbacks.d.ts.map +1 -1
  397. package/dist/src/initCustomCallbacks.lua +0 -3
  398. package/dist/src/initFeatures.lua +3 -3
  399. package/dist/src/interfaces/SaveData.d.ts.map +1 -1
  400. package/dist/src/interfaces/{private/TSTLClassMetatable.d.ts → TSTLClassMetatable.d.ts} +0 -0
  401. package/dist/src/interfaces/TSTLClassMetatable.d.ts.map +1 -0
  402. package/dist/src/interfaces/{private/TSTLClassMetatable.lua → TSTLClassMetatable.lua} +0 -0
  403. package/dist/src/interfaces/private/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
  404. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
  405. package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +3 -0
  406. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +201 -0
  407. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
  408. package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +7 -0
  409. package/dist/src/maps/characterNameToTypeMap.lua +12 -12
  410. package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
  411. package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
  412. package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
  413. package/dist/src/objects/characterDamageMultipliers.lua +6 -6
  414. package/dist/src/objects/characterNames.lua +6 -6
  415. package/dist/src/objects/playerNamePNGFileNames.lua +6 -6
  416. package/dist/src/objects/playerPortraitPNGFileNames.lua +6 -6
  417. package/dist/src/sets/charactersThatStartWithAnActiveItemSet.lua +1 -1
  418. package/dist/src/sets/charactersWithFreeDevilDealsSet.d.ts.map +1 -1
  419. package/dist/src/sets/charactersWithFreeDevilDealsSet.lua +1 -1
  420. package/dist/src/sets/charactersWithNoRedHeartsSet.lua +3 -3
  421. package/dist/src/sets/charactersWithNoSoulHeartsSet.lua +2 -2
  422. package/dist/src/sets/lostStyleCharactersSet.lua +4 -4
  423. package/dist/src/types/AllButFirst.d.ts +5 -0
  424. package/dist/src/types/AllButFirst.d.ts.map +1 -0
  425. package/dist/src/types/AllButFirst.lua +2 -0
  426. package/dist/src/types/AllButLast.d.ts +2 -0
  427. package/dist/src/types/AllButLast.d.ts.map +1 -0
  428. package/dist/src/types/AllButLast.lua +2 -0
  429. package/dist/src/types/Constructor.d.ts +2 -0
  430. package/dist/src/types/Constructor.d.ts.map +1 -0
  431. package/dist/src/types/Constructor.lua +2 -0
  432. package/dist/src/types/FunctionTuple.d.ts +5 -0
  433. package/dist/src/types/FunctionTuple.d.ts.map +1 -0
  434. package/dist/src/types/FunctionTuple.lua +2 -0
  435. package/dist/src/types/HasAllEnumKeys.d.ts +26 -0
  436. package/dist/src/types/HasAllEnumKeys.d.ts.map +1 -0
  437. package/dist/src/types/HasAllEnumKeys.lua +2 -0
  438. package/dist/src/types/LowercaseKeys.d.ts +3 -0
  439. package/dist/src/types/LowercaseKeys.d.ts.map +1 -0
  440. package/dist/src/types/LowercaseKeys.lua +2 -0
  441. package/dist/src/types/StartsWithLowercase.d.ts +2 -0
  442. package/dist/src/types/StartsWithLowercase.d.ts.map +1 -0
  443. package/dist/src/types/StartsWithLowercase.lua +2 -0
  444. package/dist/src/types/StartsWithUppercase.d.ts +2 -0
  445. package/dist/src/types/StartsWithUppercase.d.ts.map +1 -0
  446. package/dist/src/types/StartsWithUppercase.lua +2 -0
  447. package/dist/src/types/UnionToIntersection.d.ts +3 -0
  448. package/dist/src/types/UnionToIntersection.d.ts.map +1 -0
  449. package/dist/src/types/UnionToIntersection.lua +2 -0
  450. package/dist/src/types/UppercaseKeys.d.ts +3 -0
  451. package/dist/src/types/UppercaseKeys.d.ts.map +1 -0
  452. package/dist/src/types/UppercaseKeys.lua +2 -0
  453. package/dist/src/types/private/AllButFirst.d.ts +5 -0
  454. package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
  455. package/dist/src/types/private/AllButFirst.lua +2 -0
  456. package/dist/src/types/private/CallbackTuple.d.ts +20 -0
  457. package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
  458. package/dist/src/types/private/CallbackTuple.lua +2 -0
  459. package/dist/src/types/private/MatchingCallbackCustom.d.ts +16 -0
  460. package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
  461. package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
  462. package/package.json +2 -2
  463. package/src/callbacks/customRevive.ts +13 -1
  464. package/src/callbacks/postAmbush.ts +7 -14
  465. package/src/callbacks/postBombExploded.ts +1 -1
  466. package/src/callbacks/postBoneSwing.ts +2 -1
  467. package/src/callbacks/postCollectibleEmpty.ts +2 -0
  468. package/src/callbacks/postCollectibleInitFirst.ts +2 -0
  469. package/src/callbacks/postDoorRender.ts +2 -2
  470. package/src/callbacks/postEffectStateChanged.ts +3 -6
  471. package/src/callbacks/postFamiliarStateChanged.ts +3 -3
  472. package/src/callbacks/postFlip.ts +2 -2
  473. package/src/callbacks/postGridEntity.ts +3 -7
  474. package/src/callbacks/postNPCStateChanged.ts +3 -3
  475. package/src/callbacks/postNewRoomEarly.ts +1 -1
  476. package/src/callbacks/postPickupStateChanged.ts +3 -6
  477. package/src/callbacks/postPlayerCollectible.ts +8 -12
  478. package/src/callbacks/postRoomClearChanged.ts +3 -7
  479. package/src/callbacks/reorderedCallbacks.ts +6 -6
  480. package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
  481. package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
  482. package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
  483. package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
  484. package/src/callbacks/subscriptions/postGridEntityBroken.ts +4 -7
  485. package/src/callbacks/subscriptions/postGridEntityCollision.ts +4 -4
  486. package/src/callbacks/subscriptions/postGridEntityInit.ts +4 -7
  487. package/src/callbacks/subscriptions/postGridEntityRemove.ts +10 -9
  488. package/src/callbacks/subscriptions/postGridEntityRender.ts +4 -7
  489. package/src/callbacks/subscriptions/postGridEntityStateChanged.ts +4 -7
  490. package/src/callbacks/subscriptions/postGridEntityUpdate.ts +4 -7
  491. package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +9 -2
  492. package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
  493. package/src/callbacks/subscriptions/postRockRender.ts +6 -7
  494. package/src/callbacks/subscriptions/postRockUpdate.ts +6 -7
  495. package/src/callbacks/subscriptions/postSpikesRender.ts +4 -7
  496. package/src/callbacks/subscriptions/postSpikesUpdate.ts +4 -7
  497. package/src/callbacks/subscriptions/postTNTRender.ts +4 -7
  498. package/src/callbacks/subscriptions/postTNTUpdate.ts +4 -7
  499. package/src/callbacks.ts +134 -0
  500. package/src/classes/DefaultMap.ts +3 -3
  501. package/src/classes/ModFeature.ts +14 -0
  502. package/src/classes/ModUpgraded.ts +205 -45
  503. package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
  504. package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
  505. package/src/classes/callbacks/PostBombExploded.ts +21 -0
  506. package/src/classes/callbacks/PostBombInitLate.ts +28 -0
  507. package/src/classes/callbacks/PostBoneSwing.ts +61 -0
  508. package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
  509. package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
  510. package/src/classes/callbacks/PostCursedTeleport.ts +186 -0
  511. package/src/classes/callbacks/PostCustomRevive.ts +11 -0
  512. package/src/classes/callbacks/PostDiceRoomActivated.ts +68 -0
  513. package/src/classes/callbacks/PostDoorRender.ts +19 -0
  514. package/src/classes/callbacks/PostDoorUpdate.ts +19 -0
  515. package/src/classes/callbacks/PostEffectInitLate.ts +28 -0
  516. package/src/classes/callbacks/PostEffectStateChanged.ts +35 -0
  517. package/src/classes/callbacks/PostEsauJr.ts +11 -0
  518. package/src/classes/callbacks/PostFamiliarInitLate.ts +28 -0
  519. package/src/classes/callbacks/PostFamiliarStateChanged.ts +35 -0
  520. package/src/classes/callbacks/PostFirstEsauJr.ts +11 -0
  521. package/src/classes/callbacks/PostFirstFlip.ts +11 -0
  522. package/src/classes/callbacks/PostFlip.ts +11 -0
  523. package/src/classes/callbacks/PostGameStartedReordered.ts +11 -0
  524. package/src/classes/callbacks/PostGameStartedReorderedLast.ts +11 -0
  525. package/src/classes/callbacks/PostGreedModeWave.ts +37 -0
  526. package/src/classes/callbacks/PostGridEntityBroken.ts +11 -0
  527. package/src/classes/callbacks/PostGridEntityCollision.ts +65 -0
  528. package/src/classes/callbacks/PostGridEntityCustomBroken.ts +11 -0
  529. package/src/classes/callbacks/PostGridEntityCustomCollision.ts +53 -0
  530. package/src/classes/callbacks/PostGridEntityCustomInit.ts +11 -0
  531. package/src/classes/callbacks/PostGridEntityCustomRemove.ts +32 -0
  532. package/src/classes/callbacks/PostGridEntityCustomStateChanged.ts +11 -0
  533. package/src/classes/callbacks/PostGridEntityCustomUpdate.ts +11 -0
  534. package/src/classes/callbacks/PostGridEntityInit.ts +11 -0
  535. package/src/classes/callbacks/PostGridEntityRemove.ts +39 -0
  536. package/src/classes/callbacks/PostGridEntityStateChanged.ts +11 -0
  537. package/src/classes/callbacks/PostGridEntityUpdate.ts +11 -0
  538. package/src/classes/callbacks/PostHolyMantleRemoved.ts +45 -0
  539. package/src/classes/callbacks/PostKnifeInitLate.ts +28 -0
  540. package/src/classes/callbacks/PostNewLevelReordered.ts +11 -0
  541. package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
  542. package/src/classes/callbacks/PostNewRoomReordered.ts +11 -0
  543. package/src/classes/callbacks/PostPEffectUpdateReordered.ts +11 -0
  544. package/src/classes/callbacks/PostPitRender.ts +21 -0
  545. package/src/classes/callbacks/PostPlayerFatalDamage.ts +127 -0
  546. package/src/classes/callbacks/PostPlayerRenderReordered.ts +11 -0
  547. package/src/classes/callbacks/PostPlayerUpdateReordered.ts +11 -0
  548. package/src/classes/callbacks/PostRoomClearChanged.ts +40 -0
  549. package/src/classes/callbacks/PostSpikesRender.ts +21 -0
  550. package/src/classes/callbacks/PreBerserkDeath.ts +42 -0
  551. package/src/classes/callbacks/PreCustomRevive.ts +11 -0
  552. package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
  553. package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
  554. package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
  555. package/src/classes/callbacks/validation/CustomCallbackDoor.ts +28 -0
  556. package/src/classes/callbacks/validation/CustomCallbackEffect.ts +29 -0
  557. package/src/classes/callbacks/validation/CustomCallbackFamiliar.ts +30 -0
  558. package/src/classes/callbacks/validation/CustomCallbackGridEntity.ts +42 -0
  559. package/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.ts +36 -0
  560. package/src/classes/callbacks/validation/CustomCallbackKnife.ts +27 -0
  561. package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
  562. package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +47 -0
  563. package/src/classes/callbacks/validation/CustomCallbackRevive.ts +27 -0
  564. package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
  565. package/src/classes/features/callbackLogic/CustomGridEntities.ts +398 -0
  566. package/src/classes/features/callbackLogic/CustomRevive.ts +214 -0
  567. package/src/classes/features/callbackLogic/EsauJrDetection.ts +98 -0
  568. package/src/classes/features/callbackLogic/FlipDetection.ts +82 -0
  569. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +160 -0
  570. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +90 -0
  571. package/src/classes/features/callbackLogic/GridEntityDetection.ts +231 -0
  572. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +126 -0
  573. package/src/classes/features/other/RunInNFrames.ts +256 -0
  574. package/src/classes/private/CustomCallback.ts +82 -0
  575. package/src/classes/private/Feature.ts +24 -0
  576. package/src/core/upgradeMod.ts +77 -17
  577. package/src/decorators.ts +13 -0
  578. package/src/enums/ISCFeature.ts +47 -0
  579. package/src/enums/LadderSubTypeCustom.ts +17 -0
  580. package/src/enums/ModCallbackCustom.ts +314 -243
  581. package/src/enums/ModCallbackCustom2.ts +57 -0
  582. package/src/features/customGridEntity.ts +3 -7
  583. package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
  584. package/src/features/customPickup.ts +4 -2
  585. package/src/features/customStage/backdrop.ts +2 -1
  586. package/src/features/customStage/shadows.ts +2 -1
  587. package/src/features/customTrapdoor/init.ts +0 -1
  588. package/src/features/customTrapdoor/touched.ts +1 -1
  589. package/src/features/deployJSONRoom.ts +3 -7
  590. package/src/features/extraConsoleCommands/listCommands.ts +1 -1
  591. package/src/features/firstLast.ts +3 -7
  592. package/src/features/saveDataManager/constants.ts +1 -1
  593. package/src/features/saveDataManager/exports.ts +27 -0
  594. package/src/features/saveDataManager/main.ts +30 -21
  595. package/src/features/saveDataManager/save.ts +2 -2
  596. package/src/features.ts +90 -0
  597. package/src/functions/ambush.ts +26 -1
  598. package/src/functions/characters.ts +3 -3
  599. package/src/functions/charge.ts +30 -8
  600. package/src/functions/chargeBar.ts +6 -0
  601. package/src/functions/decorators.ts +45 -0
  602. package/src/functions/flying.ts +4 -4
  603. package/src/functions/gridEntities.ts +5 -5
  604. package/src/functions/gridEntitiesSpecific.ts +12 -12
  605. package/src/functions/itemPool.ts +2 -2
  606. package/src/functions/minimap.ts +4 -0
  607. package/src/functions/playerHealth.ts +6 -6
  608. package/src/functions/playerIndex.ts +2 -2
  609. package/src/functions/players.ts +26 -7
  610. package/src/functions/pocketItems.ts +1 -1
  611. package/src/functions/roomTransition.ts +3 -27
  612. package/src/functions/rooms.ts +1 -1
  613. package/src/functions/run.ts +12 -0
  614. package/src/functions/spawnCollectible.ts +44 -4
  615. package/src/functions/table.ts +11 -0
  616. package/src/functions/trinkets.ts +1 -1
  617. package/src/functions/tstlClass.ts +48 -24
  618. package/src/functions/utils.ts +56 -2
  619. package/src/index.ts +15 -2
  620. package/src/initCustomCallbacks.ts +1 -2
  621. package/src/initFeatures.ts +2 -2
  622. package/src/interfaces/SaveData.ts +4 -2
  623. package/src/interfaces/{private/TSTLClassMetatable.ts → TSTLClassMetatable.ts} +0 -0
  624. package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +4 -23
  625. package/src/interfaces/private/AddCallbackParametersCustom2.ts +343 -0
  626. package/src/maps/characterNameToTypeMap.ts +12 -12
  627. package/src/objects/callbackRegisterFunctions.ts +2 -4
  628. package/src/objects/characterDamageMultipliers.ts +6 -6
  629. package/src/objects/characterNames.ts +6 -6
  630. package/src/objects/playerNamePNGFileNames.ts +6 -6
  631. package/src/objects/playerPortraitPNGFileNames.ts +6 -6
  632. package/src/sets/charactersThatStartWithAnActiveItemSet.ts +1 -1
  633. package/src/sets/charactersWithFreeDevilDealsSet.ts +1 -1
  634. package/src/sets/charactersWithNoRedHeartsSet.ts +3 -3
  635. package/src/sets/charactersWithNoSoulHeartsSet.ts +2 -2
  636. package/src/sets/lostStyleCharactersSet.ts +4 -4
  637. package/src/types/AllButFirst.ts +6 -0
  638. package/src/types/AllButLast.ts +3 -0
  639. package/src/types/Constructor.ts +2 -0
  640. package/src/types/FunctionTuple.ts +4 -0
  641. package/src/types/HasAllEnumKeys.ts +25 -0
  642. package/src/types/LowercaseKeys.ts +3 -0
  643. package/src/types/StartsWithLowercase.ts +3 -0
  644. package/src/types/StartsWithUppercase.ts +3 -0
  645. package/src/types/UnionToIntersection.ts +6 -0
  646. package/src/types/UppercaseKeys.ts +3 -0
  647. package/src/types/private/AllButFirst.ts +6 -0
  648. package/src/types/private/CallbackTuple.ts +21 -0
  649. package/src/types/private/MatchingCallbackCustom.ts +32 -0
  650. package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
  651. package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
  652. package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
  653. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
  654. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
  655. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
  656. package/dist/src/classes/CustomCallback.d.ts +0 -8
  657. package/dist/src/classes/CustomCallback.d.ts.map +0 -1
  658. package/dist/src/classes/CustomCallback.lua +0 -28
  659. package/dist/src/features/customDoor.d.ts +0 -51
  660. package/dist/src/features/customDoor.d.ts.map +0 -1
  661. package/dist/src/features/customDoor.lua +0 -53
  662. package/dist/src/features/setHotkey.d.ts.map +0 -1
  663. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
  664. package/dist/src/interfaces/private/TSTLClassMetatable.d.ts.map +0 -1
  665. package/src/callbacks/postCustomDoorEnter.ts +0 -250
  666. package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
  667. package/src/classes/CustomCallback.ts +0 -23
  668. package/src/features/customDoor.ts +0 -66
@@ -84,7 +84,7 @@ end
84
84
  -- If the player is the Tainted Soul, this always returns false, since that character cannot pick up
85
85
  -- items. (Only Tainted Forgotten can pick up items.)
86
86
  function ____exports.hasOpenPocketItemSlot(self, player)
87
- if isCharacter(nil, player, PlayerType.THE_SOUL_B) then
87
+ if isCharacter(nil, player, PlayerType.SOUL_B) then
88
88
  return false
89
89
  end
90
90
  local pocketItems = ____exports.getPocketItems(nil, player)
@@ -14,13 +14,12 @@ export declare function reloadRoom(): void;
14
14
  * Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
15
15
  * - you do not forget to set the `Level.LeaveDoor` field
16
16
  * - to prevent crashing on invalid room grid indexes
17
- * - to automatically handle Curse of the Maze
17
+ *
18
+ * Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
18
19
  *
19
20
  * @param roomGridIndex The room grid index of the destination room.
20
21
  * @param direction Optional. Default is `Direction.NO_DIRECTION`.
21
22
  * @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
22
- * @param force Optional. Whether to temporarily disable Curse of the Maze. Default is false. If set
23
- * to false, then this function may not go to the provided room grid index.
24
23
  */
25
- export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim, force?: boolean): void;
24
+ export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim): void;
26
25
  //# sourceMappingURL=roomTransition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roomTransition.d.ts","sourceRoot":"","sources":["../../../src/functions/roomTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGT,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAMtC;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAQjC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CACtB,aAAa,EAAE,GAAG,EAClB,SAAS,YAAyB,EAClC,kBAAkB,qBAA8B,EAChD,KAAK,UAAQ,GACZ,IAAI,CA6BN"}
1
+ {"version":3,"file":"roomTransition.d.ts","sourceRoot":"","sources":["../../../src/functions/roomTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAItC;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAGjC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CACtB,aAAa,EAAE,GAAG,EAClB,SAAS,YAAyB,EAClC,kBAAkB,qBAA8B,GAC/C,IAAI,CAeN"}
@@ -2,14 +2,9 @@ local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
3
  local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
4
4
  local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
5
- local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
6
5
  local RoomTransitionAnim = ____isaac_2Dtypescript_2Ddefinitions.RoomTransitionAnim
7
6
  local ____cachedClasses = require("src.core.cachedClasses")
8
7
  local game = ____cachedClasses.game
9
- local ____runNextRoom = require("src.features.runNextRoom")
10
- local runNextRoom = ____runNextRoom.runNextRoom
11
- local ____curses = require("src.functions.curses")
12
- local hasCurse = ____curses.hasCurse
13
8
  local ____roomData = require("src.functions.roomData")
14
9
  local getRoomData = ____roomData.getRoomData
15
10
  local getRoomGridIndex = ____roomData.getRoomGridIndex
@@ -20,43 +15,26 @@ local getRoomGridIndex = ____roomData.getRoomGridIndex
20
15
  -- Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
21
16
  -- - you do not forget to set the `Level.LeaveDoor` field
22
17
  -- - to prevent crashing on invalid room grid indexes
23
- -- - to automatically handle Curse of the Maze
18
+ --
19
+ -- Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
24
20
  --
25
21
  -- @param roomGridIndex The room grid index of the destination room.
26
22
  -- @param direction Optional. Default is `Direction.NO_DIRECTION`.
27
23
  -- @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
28
- -- @param force Optional. Whether to temporarily disable Curse of the Maze. Default is false. If set
29
- -- to false, then this function may not go to the provided room grid index.
30
- function ____exports.teleport(self, roomGridIndex, direction, roomTransitionAnim, force)
24
+ function ____exports.teleport(self, roomGridIndex, direction, roomTransitionAnim)
31
25
  if direction == nil then
32
26
  direction = Direction.NO_DIRECTION
33
27
  end
34
28
  if roomTransitionAnim == nil then
35
29
  roomTransitionAnim = RoomTransitionAnim.TELEPORT
36
30
  end
37
- if force == nil then
38
- force = false
39
- end
40
31
  local level = game:GetLevel()
41
- local shouldTempDisableCurse = force and hasCurse(nil, LevelCurse.MAZE)
42
- if shouldTempDisableCurse then
43
- level:RemoveCurses(LevelCurse.MAZE)
44
- end
45
32
  local roomData = getRoomData(nil, roomGridIndex)
46
33
  if roomData == nil then
47
34
  error(("Failed to change the room to grid index " .. tostring(roomGridIndex)) .. " because that room does not exist.")
48
35
  end
49
36
  level.LeaveDoor = DoorSlot.NO_DOOR_SLOT
50
37
  game:StartRoomTransition(roomGridIndex, direction, roomTransitionAnim)
51
- if shouldTempDisableCurse then
52
- runNextRoom(
53
- nil,
54
- function()
55
- local futureLevel = game:GetLevel()
56
- futureLevel:AddCurse(LevelCurse.MAZE, false)
57
- end
58
- )
59
- end
60
38
  end
61
39
  --- Helper function to reload the current room using `Game.StartRoomTransition`.
62
40
  --
@@ -64,12 +42,6 @@ end
64
42
  -- take effect.
65
43
  function ____exports.reloadRoom(self)
66
44
  local roomGridIndex = getRoomGridIndex(nil)
67
- ____exports.teleport(
68
- nil,
69
- roomGridIndex,
70
- Direction.NO_DIRECTION,
71
- RoomTransitionAnim.FADE,
72
- true
73
- )
45
+ ____exports.teleport(nil, roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.FADE)
74
46
  end
75
47
  return ____exports
@@ -188,7 +188,7 @@ export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolea
188
188
  * positions/velocities before updating the room, and then restore those positions/velocities.
189
189
  */
190
190
  export declare function roomUpdateSafe(): void;
191
- /** Helper function to set the backdrop of the current room. */
191
+ /** Helper function to set the backdrop (i.e. background) of the current room. */
192
192
  export declare function setBackdrop(backdropType: BackdropType): void;
193
193
  /**
194
194
  * Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAMT,YAAY,EAEZ,UAAU,EAGV,QAAQ,EAGT,MAAM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AAgB,YAAY,IAAI,OAAO,CAUtC;AAED,+FAA+F;AAC/F,wBAAgB,OAAO,IAAI,OAAO,CAUjC;AAED,gGAAgG;AAChG,wBAAgB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAgBxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -408,7 +408,7 @@ function ____exports.roomUpdateSafe(self)
408
408
  setEntityPositions(nil, entityPositions, entities)
409
409
  setEntityVelocities(nil, entityVelocities, entities)
410
410
  end
411
- --- Helper function to set the backdrop of the current room.
411
+ --- Helper function to set the backdrop (i.e. background) of the current room.
412
412
  function ____exports.setBackdrop(self, backdropType)
413
413
  game:ShowHallucination(0, backdropType)
414
414
  sfxManager:Stop(SoundEffect.DEATH_CARD)
@@ -4,6 +4,11 @@ import { PlayerType } from "isaac-typescript-definitions";
4
4
  * set seed or in a victory lap, achievements are disabled.
5
5
  */
6
6
  export declare function canRunUnlockAchievements(): boolean;
7
+ /**
8
+ * Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
9
+ * `Difficulty.GREEDIER`.
10
+ */
11
+ export declare function isGreedMode(): boolean;
7
12
  /**
8
13
  * Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
9
14
  * pressing tab on the character selection screen). When the player resets the game on a set seed,
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAQtC;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAiBpD;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAInE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAUlC"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAQtC;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAiBpD;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAInE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAUlC"}
@@ -1,6 +1,7 @@
1
1
  local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
3
  local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
4
+ local Difficulty = ____isaac_2Dtypescript_2Ddefinitions.Difficulty
4
5
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
5
6
  local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
6
7
  local ____cachedClasses = require("src.core.cachedClasses")
@@ -23,6 +24,11 @@ function ____exports.canRunUnlockAchievements(self)
23
24
  greedDonationMachine:Remove()
24
25
  return canUnlockAchievements
25
26
  end
27
+ --- Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
28
+ -- `Difficulty.GREEDIER`.
29
+ function ____exports.isGreedMode(self)
30
+ return game.Difficulty == Difficulty.GREED or game.Difficulty == Difficulty.GREEDIER
31
+ end
26
32
  --- Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
27
33
  -- pressing tab on the character selection screen). When the player resets the game on a set seed,
28
34
  -- the game will not switch to a different seed.
@@ -1,9 +1,10 @@
1
- import { CollectibleType } from "isaac-typescript-definitions";
1
+ import { CollectibleType, ItemPoolType } from "isaac-typescript-definitions";
2
2
  /**
3
- * Helper function to spawn a collectible. Use this instead of the `Game.Spawn` method because it
4
- * handles the cases of Tainted Keeper collectibles costing coins and preventing quest items from
5
- * being rotated by Tainted Isaac's rotation mechanic. (Rotation prevention will only occur in
6
- * upgraded mods.)
3
+ * Helper function to spawn a collectible.
4
+ *
5
+ * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
6
+ * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
7
+ * rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
7
8
  *
8
9
  * @param collectibleType The collectible type to spawn.
9
10
  * @param position The position to spawn the collectible at.
@@ -16,6 +17,24 @@ import { CollectibleType } from "isaac-typescript-definitions";
16
17
  * @param spawner Optional.
17
18
  */
18
19
  export declare function spawnCollectible(collectibleType: CollectibleType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
20
+ /**
21
+ * Helper function to spawn a collectible from a specific item pool.
22
+ *
23
+ * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
24
+ * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
25
+ * rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
26
+ *
27
+ * @param itemPoolType The item pool to draw the collectible type from.
28
+ * @param position The position to spawn the collectible at.
29
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
30
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
31
+ * @param options Optional. Set to true to make the collectible a "There's Options" style
32
+ * collectible. Default is false.
33
+ * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
34
+ * Tainted Keeper. Default is false.
35
+ * @param spawner Optional.
36
+ */
37
+ export declare function spawnCollectibleFromPool(itemPoolType: ItemPoolType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
19
38
  /**
20
39
  * Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
21
40
  * with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
@@ -1 +1 @@
1
- {"version":3,"file":"spawnCollectible.d.ts","sourceRoot":"","sources":["../../../src/functions/spawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AAUtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAqCzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,YAAY,CAWd"}
1
+ {"version":3,"file":"spawnCollectible.d.ts","sourceRoot":"","sources":["../../../src/functions/spawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAWtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAqCzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAWzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,YAAY,CAWd"}
@@ -3,6 +3,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
3
3
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
4
4
  local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
5
5
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
6
+ local ____cachedClasses = require("src.core.cachedClasses")
7
+ local game = ____cachedClasses.game
6
8
  local ____constants = require("src.core.constants")
7
9
  local VectorZero = ____constants.VectorZero
8
10
  local ____preventCollectibleRotation = require("src.features.preventCollectibleRotation")
@@ -20,10 +22,11 @@ local anyPlayerIs = ____players.anyPlayerIs
20
22
  local ____rng = require("src.functions.rng")
21
23
  local getRandomSeed = ____rng.getRandomSeed
22
24
  local isRNG = ____rng.isRNG
23
- --- Helper function to spawn a collectible. Use this instead of the `Game.Spawn` method because it
24
- -- handles the cases of Tainted Keeper collectibles costing coins and preventing quest items from
25
- -- being rotated by Tainted Isaac's rotation mechanic. (Rotation prevention will only occur in
26
- -- upgraded mods.)
25
+ --- Helper function to spawn a collectible.
26
+ --
27
+ -- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
28
+ -- collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
29
+ -- rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
27
30
  --
28
31
  -- @param collectibleType The collectible type to spawn.
29
32
  -- @param position The position to spawn the collectible at.
@@ -66,6 +69,43 @@ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG
66
69
  end
67
70
  return collectible
68
71
  end
72
+ --- Helper function to spawn a collectible from a specific item pool.
73
+ --
74
+ -- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
75
+ -- collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
76
+ -- rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
77
+ --
78
+ -- @param itemPoolType The item pool to draw the collectible type from.
79
+ -- @param position The position to spawn the collectible at.
80
+ -- @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
81
+ -- `RNG.Next` method will be called. Default is `getRandomSeed()`.
82
+ -- @param options Optional. Set to true to make the collectible a "There's Options" style
83
+ -- collectible. Default is false.
84
+ -- @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
85
+ -- Tainted Keeper. Default is false.
86
+ -- @param spawner Optional.
87
+ function ____exports.spawnCollectibleFromPool(self, itemPoolType, position, seedOrRNG, options, forceFreeItem, spawner)
88
+ if seedOrRNG == nil then
89
+ seedOrRNG = getRandomSeed(nil)
90
+ end
91
+ if options == nil then
92
+ options = false
93
+ end
94
+ if forceFreeItem == nil then
95
+ forceFreeItem = false
96
+ end
97
+ local itemPool = game:GetItemPool()
98
+ local collectibleType = itemPool:GetCollectible(itemPoolType)
99
+ return ____exports.spawnCollectible(
100
+ nil,
101
+ collectibleType,
102
+ position,
103
+ seedOrRNG,
104
+ options,
105
+ forceFreeItem,
106
+ spawner
107
+ )
108
+ end
69
109
  --- Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
70
110
  -- with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
71
111
  -- current room's item pool.
@@ -27,6 +27,8 @@ export declare function getNumbersFromTable(luaMap: LuaMap<string, unknown>, obj
27
27
  * This function is variadic, meaning that you can specify N arguments to get N values.
28
28
  */
29
29
  export declare function getStringsFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): string[];
30
+ /** Helper function to check if a Lua table has 0 keys. */
31
+ export declare function isTableEmpty(luaMap: LuaMap<AnyNotNil, unknown>): boolean;
30
32
  /**
31
33
  * Helper function to iterate over a table deterministically. This is useful because by default, the
32
34
  * `pairs` function will return the keys of a Lua table in a random order.
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/functions/table.ts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,IAAI,CAInE;AAED,iGAAiG;AACjG,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAgBN;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,EAAE,CAoBX;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO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AAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CA4BV;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CAmBV;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,OAAO,CAQxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EACxD,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,EAChC,OAAO,UAAO,GACb,IAAI,CA6BN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAClC,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,CAET"}
@@ -94,6 +94,13 @@ function ____exports.getStringsFromTable(self, luaMap, objectName, ...)
94
94
  end
95
95
  return strings
96
96
  end
97
+ --- Helper function to check if a Lua table has 0 keys.
98
+ function ____exports.isTableEmpty(self, luaMap)
99
+ for _key, _value in pairs(luaMap) do
100
+ return false
101
+ end
102
+ return true
103
+ end
97
104
  --- Helper function to iterate over a table deterministically. This is useful because by default, the
98
105
  -- `pairs` function will return the keys of a Lua table in a random order.
99
106
  --
@@ -128,7 +128,7 @@ end
128
128
  -- If the player is the Tainted Soul, this always returns false, since that character cannot pick up
129
129
  -- items. (Only Tainted Forgotten can pick up items.)
130
130
  function ____exports.hasOpenTrinketSlot(self, player)
131
- if isCharacter(nil, player, PlayerType.THE_SOUL_B) then
131
+ if isCharacter(nil, player, PlayerType.SOUL_B) then
132
132
  return false
133
133
  end
134
134
  local openTrinketSlot = ____exports.getOpenTrinketSlot(nil, player)
@@ -1,15 +1,25 @@
1
1
  /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  import { DefaultMap } from "../classes/DefaultMap";
3
+ import { TSTLClassMetatable } from "../interfaces/TSTLClassMetatable";
4
+ import { FunctionTuple } from "../types/FunctionTuple";
3
5
  import { TSTLClass } from "../types/TSTLClass";
4
6
  /**
5
- * Helper function to get the name of a TypeScriptToLua class. TSTL classes are Lua tables created
6
- * with the `__TS__Class` Lua function from the TSTL lualib. Their name is contained within
7
- * "constructor.name" metatable key.
7
+ * Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
8
+ * located on the metatable.
9
+ *
10
+ * Returns undefined if passed a non-table or if the provided table does not have a metatable.
11
+ */
12
+ export declare function getTSTLClassConstructor(object: unknown): TSTLClassMetatable["constructor"] | undefined;
13
+ export declare function getTSTLClassMethods(object: unknown): FunctionTuple[];
14
+ /**
15
+ * Helper function to get the name of a TypeScriptToLua class from the instantiated class object.
16
+ *
17
+ * TSTL classes are Lua tables created with the `__TS__Class` Lua function from the TSTL lualib.
18
+ * Their name is contained within "constructor.name" metatable key.
8
19
  *
9
20
  * For example, a `Map` class is has a name of "Map".
10
21
  *
11
- * Returns undefined if the object is not a table or if the aforementioned metatable key does not
12
- * exist.
22
+ * Returns undefined if passed a non-table or if the provided table does not have a metatable.
13
23
  */
14
24
  export declare function getTSTLClassName(object: unknown): string | undefined;
15
25
  /**
@@ -27,15 +37,17 @@ export declare function isIsaacScriptCommonClass(object: unknown): boolean;
27
37
  /**
28
38
  * Helper function to determine if a given object is a TypeScriptToLua `Map`.
29
39
  *
30
- * It is not reliable to use the `instanceof` operator to determine this because each Lua module has
31
- * their own copies of the entire lualib and thus their own instantiated version of a `Map`.
40
+ * It is not reliable to use the `instanceof` operator to determine this because each Lua module
41
+ * might have their own copy of the entire lualib and thus their own instantiated version of a
42
+ * `Map`.
32
43
  */
33
44
  export declare function isTSTLMap(object: unknown): object is Map<AnyNotNil, unknown>;
34
45
  /**
35
46
  * Helper function to determine if a given object is a TypeScriptToLua `Set`.
36
47
  *
37
- * It is not reliable to use the `instanceof` operator to determine this because each Lua module has
38
- * their own copies of the entire lualib and thus their own instantiated version of a `Set`.
48
+ * It is not reliable to use the `instanceof` operator to determine this because each Lua module
49
+ * might have their own copy of the entire lualib and thus their own instantiated version of a
50
+ * `Set`.
39
51
  */
40
52
  export declare function isTSTLSet(object: unknown): object is Set<AnyNotNil>;
41
53
  /** TypeScriptToLua classes are Lua tables that have a metatable with a certain amount of keys. */
@@ -1 +1 @@
1
- {"version":3,"file":"tstlClass.d.ts","sourceRoot":"","sources":["../../../src/functions/tstlClass.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAW/C;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAiBpE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAG1C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAG5E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAAC,SAAS,CAAC,CAGnE;AAED,kGAAkG;AAClG,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,O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AC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,SAAS,CA4B3E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAO3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAiB3D"}
@@ -1,20 +1,18 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
+ local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
5
+ local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
4
6
  local ____exports = {}
5
- local newTSTLClassFromMetatable, VANILLA_TSTL_CLASSES
7
+ local VANILLA_TSTL_CLASSES
6
8
  local ____types = require("src.functions.types")
7
9
  local isString = ____types.isString
8
10
  local isTable = ____types.isTable
9
- --- Helper function to get the name of a TypeScriptToLua class. TSTL classes are Lua tables created
10
- -- with the `__TS__Class` Lua function from the TSTL lualib. Their name is contained within
11
- -- "constructor.name" metatable key.
11
+ --- Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
12
+ -- located on the metatable.
12
13
  --
13
- -- For example, a `Map` class is has a name of "Map".
14
- --
15
- -- Returns undefined if the object is not a table or if the aforementioned metatable key does not
16
- -- exist.
17
- function ____exports.getTSTLClassName(self, object)
14
+ -- Returns undefined if passed a non-table or if the provided table does not have a metatable.
15
+ function ____exports.getTSTLClassConstructor(self, object)
18
16
  if not isTable(nil, object) then
19
17
  return nil
20
18
  end
@@ -22,7 +20,18 @@ function ____exports.getTSTLClassName(self, object)
22
20
  if metatable == nil then
23
21
  return nil
24
22
  end
25
- local constructor = metatable.constructor
23
+ return metatable.constructor
24
+ end
25
+ --- Helper function to get the name of a TypeScriptToLua class from the instantiated class object.
26
+ --
27
+ -- TSTL classes are Lua tables created with the `__TS__Class` Lua function from the TSTL lualib.
28
+ -- Their name is contained within "constructor.name" metatable key.
29
+ --
30
+ -- For example, a `Map` class is has a name of "Map".
31
+ --
32
+ -- Returns undefined if passed a non-table or if the provided table does not have a metatable.
33
+ function ____exports.getTSTLClassName(self, object)
34
+ local constructor = ____exports.getTSTLClassConstructor(nil, object)
26
35
  if constructor == nil then
27
36
  return nil
28
37
  end
@@ -37,14 +46,25 @@ function ____exports.isVanillaTSTLClass(self, object)
37
46
  end
38
47
  return VANILLA_TSTL_CLASSES:has(className)
39
48
  end
40
- function newTSTLClassFromMetatable(self, metatable)
41
- local newClass = {}
42
- local newClassMetatable = setmetatable(newClass, metatable.constructor.prototype)
43
- newClassMetatable:____constructor()
44
- return newClass
45
- end
46
49
  VANILLA_TSTL_CLASSES = __TS__New(Set, {"Map", "Set", "WeakMap", "WeakSet"})
47
50
  local TSTL_CLASS_METATABLE_KEYS = __TS__New(Set, {"____constructor", "__index", "constructor"})
51
+ function ____exports.getTSTLClassMethods(self, object)
52
+ local constructor = ____exports.getTSTLClassConstructor(nil, object)
53
+ if constructor == nil then
54
+ return {}
55
+ end
56
+ local classEntries = __TS__ObjectEntries(constructor.prototype)
57
+ return __TS__ArrayFilter(
58
+ classEntries,
59
+ function(____, ____bindingPattern0)
60
+ local value
61
+ local key
62
+ key = ____bindingPattern0[1]
63
+ value = ____bindingPattern0[2]
64
+ return not TSTL_CLASS_METATABLE_KEYS:has(key) and type(value) == "function"
65
+ end
66
+ )
67
+ end
48
68
  --- Helper function to determine if a given object is a TypeScriptToLua `Map`.
49
69
  --
50
70
  -- It is not reliable to use the `instanceof` operator to determine this because each Lua module has
@@ -60,16 +80,18 @@ function ____exports.isIsaacScriptCommonClass(self, object)
60
80
  end
61
81
  --- Helper function to determine if a given object is a TypeScriptToLua `Map`.
62
82
  --
63
- -- It is not reliable to use the `instanceof` operator to determine this because each Lua module has
64
- -- their own copies of the entire lualib and thus their own instantiated version of a `Map`.
83
+ -- It is not reliable to use the `instanceof` operator to determine this because each Lua module
84
+ -- might have their own copy of the entire lualib and thus their own instantiated version of a
85
+ -- `Map`.
65
86
  function ____exports.isTSTLMap(self, object)
66
87
  local className = ____exports.getTSTLClassName(nil, object)
67
88
  return className == "Map"
68
89
  end
69
90
  --- Helper function to determine if a given object is a TypeScriptToLua `Set`.
70
91
  --
71
- -- It is not reliable to use the `instanceof` operator to determine this because each Lua module has
72
- -- their own copies of the entire lualib and thus their own instantiated version of a `Set`.
92
+ -- It is not reliable to use the `instanceof` operator to determine this because each Lua module
93
+ -- might have their own copy of the entire lualib and thus their own instantiated version of a
94
+ -- `Set`.
73
95
  function ____exports.isTSTLSet(self, object)
74
96
  local className = ____exports.getTSTLClassName(nil, object)
75
97
  return className == "Set"
@@ -103,10 +125,13 @@ end
103
125
  -- use the class constructor that is present on the other object's metatable to initialize the new
104
126
  -- class.
105
127
  function ____exports.newTSTLClass(self, oldClass)
106
- local metatable = getmetatable(oldClass)
107
- if metatable == nil then
108
- error("Failed to instantiate a new TypeScriptToLua class since the provided old class does not have a metatable.")
128
+ local constructor = ____exports.getTSTLClassConstructor(nil, oldClass)
129
+ if constructor == nil then
130
+ error("Failed to instantiate a new TypeScriptToLua class since the provided old class does not have a metatable/constructor.")
109
131
  end
110
- return newTSTLClassFromMetatable(nil, metatable)
132
+ local newClass = {}
133
+ local newClassMetatable = setmetatable(newClass, constructor.prototype)
134
+ newClassMetatable:____constructor()
135
+ return newClass
111
136
  end
112
137
  return ____exports
@@ -31,8 +31,13 @@ export declare function getTraversalDescription(key: unknown, traversalDescripti
31
31
  */
32
32
  export declare function iRange(start: int, end?: int, increment?: number): int[];
33
33
  /**
34
- * Since this is a UI element, we do not want to draw it in water reflections. `renderOffset` will
35
- * be a non-zero value in reflections.
34
+ * Helper function to see if the current render callback is rendering a water reflection.
35
+ *
36
+ * When the player is in a room with water, things will be rendered twice: once for the normal
37
+ * rendering, and once for the reflecting rendering. Thus, any mod code in a render callback will
38
+ * run twice per frame in these situations, which may be unexpected or cause bugs.
39
+ *
40
+ * This function is typically used to early return from a render function if it returns true.
36
41
  */
37
42
  export declare function isReflectionRender(): boolean;
38
43
  /**
@@ -40,6 +45,15 @@ export declare function isReflectionRender(): boolean;
40
45
  * because the `EXECUTE_CMD` callback will not fire for any vanilla commands.
41
46
  */
42
47
  export declare function isVanillaConsoleCommand(commandName: string): boolean;
48
+ /**
49
+ * Helper function for creating objects that represent a mapping of an enum value to some other
50
+ * value in a type-safe way.
51
+ *
52
+ * This function will ensure that the provided object has a key for each value in the enum.
53
+ *
54
+ * After the `satisfies` operator is released in TypeScript 4.9, this function should be deleted.
55
+ */
56
+ export declare function newObjectWithEnumKeys<Enum extends number | string, T extends Record<Enum, unknown>>(theEnum: Record<string, Enum>, obj: T): T;
43
57
  /**
44
58
  * Helper function to print something to the in-game console. Use this instead of invoking the
45
59
  * `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
@@ -97,4 +111,32 @@ export declare function todo(...args: unknown[]): void;
97
111
  * https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
98
112
  */
99
113
  export declare function twoDimensionalSort<T>(array1: T[], array2: T[]): -1 | 0 | 1;
114
+ /**
115
+ * Helper function to validate that an interface contains all of the keys of an enum. You must
116
+ * specify both generic parameters in order for this to work properly (i.e. the interface and then
117
+ * the enum).
118
+ *
119
+ * For example:
120
+ *
121
+ * ```ts
122
+ * enum MyEnum {
123
+ * Value1,
124
+ * Value2,
125
+ * Value3,
126
+ * }
127
+ *
128
+ * interface MyEnumToType {
129
+ * [MyEnum.Value1]: boolean;
130
+ * [MyEnum.Value2]: number;
131
+ * [MyEnum.Value3]: string;
132
+ * }
133
+ *
134
+ * validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
135
+ * ```
136
+ *
137
+ * This function is only meant to be used with interfaces (i.e. types that will not exist at
138
+ * run-time). If you are generating an object that will contain all of the keys of an enum, use the
139
+ * `newObjectWithEnumKeys` helper function instead.
140
+ */
141
+ export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
100
142
  //# sourceMappingURL=utils.d.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