isaacscript-common 14.1.2 → 14.2.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 (494) hide show
  1. package/dist/index.d.ts +954 -158
  2. package/dist/isaacscript-common.lua +4099 -1066
  3. package/dist/src/callbacks.d.ts +102 -20
  4. package/dist/src/callbacks.d.ts.map +1 -1
  5. package/dist/src/callbacks.lua +124 -1
  6. package/dist/src/classes/ModFeature.d.ts +16 -4
  7. package/dist/src/classes/ModFeature.d.ts.map +1 -1
  8. package/dist/src/classes/ModFeature.lua +67 -4
  9. package/dist/src/classes/ModUpgraded.d.ts +10 -10
  10. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  11. package/dist/src/classes/ModUpgraded.lua +35 -16
  12. package/dist/src/classes/callbacks/PostCustomRevive.d.ts +5 -2
  13. package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -1
  14. package/dist/src/classes/callbacks/PostCustomRevive.lua +12 -4
  15. package/dist/src/classes/callbacks/PostGridEntityBroken.lua +1 -1
  16. package/dist/src/classes/callbacks/PostGridEntityCollision.lua +1 -1
  17. package/dist/src/classes/callbacks/PostGridEntityCustomBroken.lua +1 -1
  18. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.lua +1 -1
  19. package/dist/src/classes/callbacks/PostGridEntityCustomInit.lua +1 -1
  20. package/dist/src/classes/callbacks/PostGridEntityCustomRemove.lua +1 -1
  21. package/dist/src/classes/callbacks/PostGridEntityCustomRender.d.ts +6 -0
  22. package/dist/src/classes/callbacks/PostGridEntityCustomRender.d.ts.map +1 -0
  23. package/dist/src/classes/callbacks/PostGridEntityCustomRender.lua +17 -0
  24. package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.lua +1 -1
  25. package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.lua +1 -1
  26. package/dist/src/classes/callbacks/PostGridEntityInit.lua +1 -1
  27. package/dist/src/classes/callbacks/PostGridEntityRemove.lua +1 -1
  28. package/dist/src/classes/callbacks/PostGridEntityRender.d.ts +6 -0
  29. package/dist/src/classes/callbacks/PostGridEntityRender.d.ts.map +1 -0
  30. package/dist/src/classes/callbacks/PostGridEntityRender.lua +17 -0
  31. package/dist/src/classes/callbacks/PostGridEntityStateChanged.lua +1 -1
  32. package/dist/src/classes/callbacks/PostGridEntityUpdate.lua +1 -1
  33. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts +1 -1
  34. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -1
  35. package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +3 -4
  36. package/dist/src/classes/callbacks/PostItemDischarge.d.ts +43 -0
  37. package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -0
  38. package/dist/src/classes/callbacks/PostItemDischarge.lua +113 -0
  39. package/dist/src/classes/callbacks/PostItemPickup.d.ts +6 -0
  40. package/dist/src/classes/callbacks/PostItemPickup.d.ts.map +1 -0
  41. package/dist/src/classes/callbacks/PostItemPickup.lua +17 -0
  42. package/dist/src/classes/callbacks/PostLaserInitLate.d.ts +12 -0
  43. package/dist/src/classes/callbacks/PostLaserInitLate.d.ts.map +1 -0
  44. package/dist/src/classes/callbacks/PostLaserInitLate.lua +27 -0
  45. package/dist/src/classes/callbacks/PostNPCInitLate.d.ts +12 -0
  46. package/dist/src/classes/callbacks/PostNPCInitLate.d.ts.map +1 -0
  47. package/dist/src/classes/callbacks/PostNPCInitLate.lua +27 -0
  48. package/dist/src/classes/callbacks/PostNPCStateChanged.d.ts +14 -0
  49. package/dist/src/classes/callbacks/PostNPCStateChanged.d.ts.map +1 -0
  50. package/dist/src/classes/callbacks/PostNPCStateChanged.lua +33 -0
  51. package/dist/src/classes/callbacks/PostPickupCollect.d.ts +12 -0
  52. package/dist/src/classes/callbacks/PostPickupCollect.d.ts.map +1 -0
  53. package/dist/src/classes/callbacks/PostPickupCollect.lua +35 -0
  54. package/dist/src/classes/callbacks/PostPickupInitFirst.d.ts +12 -0
  55. package/dist/src/classes/callbacks/PostPickupInitFirst.d.ts.map +1 -0
  56. package/dist/src/classes/callbacks/PostPickupInitFirst.lua +32 -0
  57. package/dist/src/classes/callbacks/PostPickupInitLate.d.ts +12 -0
  58. package/dist/src/classes/callbacks/PostPickupInitLate.d.ts.map +1 -0
  59. package/dist/src/classes/callbacks/PostPickupInitLate.lua +27 -0
  60. package/dist/src/classes/callbacks/PostPickupStateChanged.d.ts +13 -0
  61. package/dist/src/classes/callbacks/PostPickupStateChanged.d.ts.map +1 -0
  62. package/dist/src/classes/callbacks/PostPickupStateChanged.lua +33 -0
  63. package/dist/src/classes/callbacks/PostPitUpdate.d.ts +7 -0
  64. package/dist/src/classes/callbacks/PostPitUpdate.d.ts.map +1 -0
  65. package/dist/src/classes/callbacks/PostPitUpdate.lua +24 -0
  66. package/dist/src/classes/callbacks/PostPlayerChangeHealth.d.ts +15 -0
  67. package/dist/src/classes/callbacks/PostPlayerChangeHealth.d.ts.map +1 -0
  68. package/dist/src/classes/callbacks/PostPlayerChangeHealth.lua +52 -0
  69. package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts +16 -0
  70. package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts.map +1 -0
  71. package/dist/src/classes/callbacks/PostPlayerChangeStat.lua +94 -0
  72. package/dist/src/classes/callbacks/PostPlayerChangeType.d.ts +15 -0
  73. package/dist/src/classes/callbacks/PostPlayerChangeType.d.ts.map +1 -0
  74. package/dist/src/classes/callbacks/PostPlayerChangeType.lua +37 -0
  75. package/dist/src/classes/callbacks/PostPlayerCollectibleAdded.d.ts +6 -0
  76. package/dist/src/classes/callbacks/PostPlayerCollectibleAdded.d.ts.map +1 -0
  77. package/dist/src/classes/callbacks/PostPlayerCollectibleAdded.lua +17 -0
  78. package/dist/src/classes/callbacks/PostPlayerCollectibleRemoved.d.ts +6 -0
  79. package/dist/src/classes/callbacks/PostPlayerCollectibleRemoved.d.ts.map +1 -0
  80. package/dist/src/classes/callbacks/PostPlayerCollectibleRemoved.lua +17 -0
  81. package/dist/src/classes/callbacks/PostPlayerInitFirst.d.ts +8 -0
  82. package/dist/src/classes/callbacks/PostPlayerInitFirst.d.ts.map +1 -0
  83. package/dist/src/classes/callbacks/PostPlayerInitFirst.lua +39 -0
  84. package/dist/src/classes/callbacks/PostPlayerInitLate.d.ts +13 -0
  85. package/dist/src/classes/callbacks/PostPlayerInitLate.d.ts.map +1 -0
  86. package/dist/src/classes/callbacks/PostPlayerInitLate.lua +29 -0
  87. package/dist/src/classes/callbacks/PostPoopRender.d.ts +7 -0
  88. package/dist/src/classes/callbacks/PostPoopRender.d.ts.map +1 -0
  89. package/dist/src/classes/callbacks/PostPoopRender.lua +24 -0
  90. package/dist/src/classes/callbacks/PostPoopUpdate.d.ts +7 -0
  91. package/dist/src/classes/callbacks/PostPoopUpdate.d.ts.map +1 -0
  92. package/dist/src/classes/callbacks/PostPoopUpdate.lua +24 -0
  93. package/dist/src/classes/callbacks/PostPressurePlateRender.d.ts +7 -0
  94. package/dist/src/classes/callbacks/PostPressurePlateRender.d.ts.map +1 -0
  95. package/dist/src/classes/callbacks/PostPressurePlateRender.lua +24 -0
  96. package/dist/src/classes/callbacks/PostPressurePlateUpdate.d.ts +7 -0
  97. package/dist/src/classes/callbacks/PostPressurePlateUpdate.d.ts.map +1 -0
  98. package/dist/src/classes/callbacks/PostPressurePlateUpdate.lua +24 -0
  99. package/dist/src/classes/callbacks/PostProjectileInitLate.d.ts +12 -0
  100. package/dist/src/classes/callbacks/PostProjectileInitLate.d.ts.map +1 -0
  101. package/dist/src/classes/callbacks/PostProjectileInitLate.lua +27 -0
  102. package/dist/src/classes/callbacks/PostPurchase.d.ts +18 -0
  103. package/dist/src/classes/callbacks/PostPurchase.d.ts.map +1 -0
  104. package/dist/src/classes/callbacks/PostPurchase.lua +56 -0
  105. package/dist/src/classes/callbacks/PostRockRender.d.ts +7 -0
  106. package/dist/src/classes/callbacks/PostRockRender.d.ts.map +1 -0
  107. package/dist/src/classes/callbacks/PostRockRender.lua +24 -0
  108. package/dist/src/classes/callbacks/PostRockUpdate.d.ts +7 -0
  109. package/dist/src/classes/callbacks/PostRockUpdate.d.ts.map +1 -0
  110. package/dist/src/classes/callbacks/PostRockUpdate.lua +24 -0
  111. package/dist/src/classes/callbacks/PostSacrifice.d.ts +15 -0
  112. package/dist/src/classes/callbacks/PostSacrifice.d.ts.map +1 -0
  113. package/dist/src/classes/callbacks/PostSacrifice.lua +52 -0
  114. package/dist/src/classes/callbacks/PostSlotAnimationChanged.d.ts +6 -0
  115. package/dist/src/classes/callbacks/PostSlotAnimationChanged.d.ts.map +1 -0
  116. package/dist/src/classes/callbacks/PostSlotAnimationChanged.lua +17 -0
  117. package/dist/src/classes/callbacks/PostSlotCollision.d.ts +7 -0
  118. package/dist/src/classes/callbacks/PostSlotCollision.d.ts.map +1 -0
  119. package/dist/src/classes/callbacks/PostSlotCollision.lua +25 -0
  120. package/dist/src/classes/callbacks/PostSlotDestroyed.d.ts +14 -0
  121. package/dist/src/classes/callbacks/PostSlotDestroyed.d.ts.map +1 -0
  122. package/dist/src/classes/callbacks/PostSlotDestroyed.lua +65 -0
  123. package/dist/src/classes/callbacks/PostSlotInit.d.ts +6 -0
  124. package/dist/src/classes/callbacks/PostSlotInit.d.ts.map +1 -0
  125. package/dist/src/classes/callbacks/PostSlotInit.lua +17 -0
  126. package/dist/src/classes/callbacks/PostSlotRender.d.ts +6 -0
  127. package/dist/src/classes/callbacks/PostSlotRender.d.ts.map +1 -0
  128. package/dist/src/classes/callbacks/PostSlotRender.lua +17 -0
  129. package/dist/src/classes/callbacks/PostSlotUpdate.d.ts +6 -0
  130. package/dist/src/classes/callbacks/PostSlotUpdate.d.ts.map +1 -0
  131. package/dist/src/classes/callbacks/PostSlotUpdate.lua +17 -0
  132. package/dist/src/classes/callbacks/PostSpikesUpdate.d.ts +7 -0
  133. package/dist/src/classes/callbacks/PostSpikesUpdate.d.ts.map +1 -0
  134. package/dist/src/classes/callbacks/PostSpikesUpdate.lua +24 -0
  135. package/dist/src/classes/callbacks/PostTNTRender.d.ts +7 -0
  136. package/dist/src/classes/callbacks/PostTNTRender.d.ts.map +1 -0
  137. package/dist/src/classes/callbacks/PostTNTRender.lua +24 -0
  138. package/dist/src/classes/callbacks/PostTNTUpdate.d.ts +7 -0
  139. package/dist/src/classes/callbacks/PostTNTUpdate.d.ts.map +1 -0
  140. package/dist/src/classes/callbacks/PostTNTUpdate.lua +24 -0
  141. package/dist/src/classes/callbacks/PostTearInitLate.d.ts +12 -0
  142. package/dist/src/classes/callbacks/PostTearInitLate.d.ts.map +1 -0
  143. package/dist/src/classes/callbacks/PostTearInitLate.lua +27 -0
  144. package/dist/src/classes/callbacks/PostTearInitVeryLate.d.ts +12 -0
  145. package/dist/src/classes/callbacks/PostTearInitVeryLate.d.ts.map +1 -0
  146. package/dist/src/classes/callbacks/PostTearInitVeryLate.lua +30 -0
  147. package/dist/src/classes/callbacks/PostTransformation.d.ts +18 -0
  148. package/dist/src/classes/callbacks/PostTransformation.d.ts.map +1 -0
  149. package/dist/src/classes/callbacks/PostTransformation.lua +53 -0
  150. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts +1 -1
  151. package/dist/src/classes/callbacks/PreBerserkDeath.d.ts.map +1 -1
  152. package/dist/src/classes/callbacks/PreBerserkDeath.lua +3 -4
  153. package/dist/src/classes/callbacks/PreItemPickup.d.ts +6 -0
  154. package/dist/src/classes/callbacks/PreItemPickup.d.ts.map +1 -0
  155. package/dist/src/classes/callbacks/PreItemPickup.lua +17 -0
  156. package/dist/src/classes/callbacks/validation/CustomCallbackCollectibleType.d.ts +10 -0
  157. package/dist/src/classes/callbacks/validation/CustomCallbackCollectibleType.d.ts.map +1 -0
  158. package/dist/src/classes/callbacks/validation/CustomCallbackCollectibleType.lua +19 -0
  159. package/dist/src/classes/callbacks/validation/CustomCallbackItemPickup.d.ts +11 -0
  160. package/dist/src/classes/callbacks/validation/CustomCallbackItemPickup.d.ts.map +1 -0
  161. package/dist/src/classes/callbacks/validation/CustomCallbackItemPickup.lua +22 -0
  162. package/dist/src/classes/callbacks/validation/CustomCallbackLaser.d.ts +10 -0
  163. package/dist/src/classes/callbacks/validation/CustomCallbackLaser.d.ts.map +1 -0
  164. package/dist/src/classes/callbacks/validation/CustomCallbackLaser.lua +19 -0
  165. package/dist/src/classes/callbacks/validation/{CustomCallbackRevive.d.ts → CustomCallbackNPC.d.ts} +4 -4
  166. package/dist/src/classes/callbacks/validation/CustomCallbackNPC.d.ts.map +1 -0
  167. package/dist/src/classes/callbacks/validation/CustomCallbackNPC.lua +22 -0
  168. package/dist/src/classes/callbacks/validation/CustomCallbackPickup.d.ts +12 -0
  169. package/dist/src/classes/callbacks/validation/CustomCallbackPickup.d.ts.map +1 -0
  170. package/dist/src/classes/callbacks/validation/CustomCallbackPickup.lua +22 -0
  171. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +5 -2
  172. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -1
  173. package/dist/src/classes/callbacks/validation/CustomCallbackPoop.d.ts +10 -0
  174. package/dist/src/classes/callbacks/validation/CustomCallbackPoop.d.ts.map +1 -0
  175. package/dist/src/classes/callbacks/validation/CustomCallbackPoop.lua +20 -0
  176. package/dist/src/classes/callbacks/validation/CustomCallbackPressurePlate.d.ts +10 -0
  177. package/dist/src/classes/callbacks/validation/CustomCallbackPressurePlate.d.ts.map +1 -0
  178. package/dist/src/classes/callbacks/validation/CustomCallbackPressurePlate.lua +20 -0
  179. package/dist/src/classes/callbacks/validation/CustomCallbackProjectile.d.ts +10 -0
  180. package/dist/src/classes/callbacks/validation/CustomCallbackProjectile.d.ts.map +1 -0
  181. package/dist/src/classes/callbacks/validation/CustomCallbackProjectile.lua +19 -0
  182. package/dist/src/classes/callbacks/validation/CustomCallbackRock.d.ts +10 -0
  183. package/dist/src/classes/callbacks/validation/CustomCallbackRock.d.ts.map +1 -0
  184. package/dist/src/classes/callbacks/validation/CustomCallbackRock.lua +20 -0
  185. package/dist/src/classes/callbacks/validation/CustomCallbackSlot.d.ts +12 -0
  186. package/dist/src/classes/callbacks/validation/CustomCallbackSlot.d.ts.map +1 -0
  187. package/dist/src/classes/callbacks/validation/CustomCallbackSlot.lua +19 -0
  188. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +4 -4
  189. package/dist/src/classes/callbacks/validation/CustomCallbackTNT.d.ts +10 -0
  190. package/dist/src/classes/callbacks/validation/CustomCallbackTNT.d.ts.map +1 -0
  191. package/dist/src/classes/callbacks/validation/CustomCallbackTNT.lua +20 -0
  192. package/dist/src/classes/callbacks/validation/CustomCallbackTear.d.ts +10 -0
  193. package/dist/src/classes/callbacks/validation/CustomCallbackTear.d.ts.map +1 -0
  194. package/dist/src/classes/callbacks/validation/CustomCallbackTear.lua +19 -0
  195. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +1 -1
  196. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  197. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +27 -30
  198. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +2 -2
  199. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
  200. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +6 -6
  201. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -1
  202. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
  203. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +3 -18
  204. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -1
  205. package/dist/src/classes/features/callbackLogic/GridEntityRenderDetection.d.ts +12 -0
  206. package/dist/src/classes/features/callbackLogic/GridEntityRenderDetection.d.ts.map +1 -0
  207. package/dist/src/classes/features/callbackLogic/GridEntityRenderDetection.lua +33 -0
  208. package/dist/src/classes/features/callbackLogic/{GridEntityDetection.d.ts → GridEntityUpdateDetection.d.ts} +3 -3
  209. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -0
  210. package/dist/src/classes/features/callbackLogic/{GridEntityDetection.lua → GridEntityUpdateDetection.lua} +11 -14
  211. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts +20 -0
  212. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts.map +1 -0
  213. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.lua +60 -0
  214. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts +47 -0
  215. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts.map +1 -0
  216. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.lua +154 -0
  217. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts +18 -0
  218. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts.map +1 -0
  219. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.lua +51 -0
  220. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.d.ts +17 -0
  221. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.d.ts.map +1 -0
  222. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.lua +45 -0
  223. package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -1
  224. package/dist/src/classes/features/other/RunInNFrames.lua +9 -0
  225. package/dist/src/classes/features/other/SaveDataManager.d.ts +215 -0
  226. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -0
  227. package/dist/src/classes/features/other/SaveDataManager.lua +190 -0
  228. package/dist/src/classes/features/other/saveDataManager/glowingHourGlass.d.ts +6 -0
  229. package/dist/src/classes/features/other/saveDataManager/glowingHourGlass.d.ts.map +1 -0
  230. package/dist/src/classes/features/other/saveDataManager/glowingHourGlass.lua +98 -0
  231. package/dist/src/classes/features/other/saveDataManager/loadFromDisk.d.ts +6 -0
  232. package/dist/src/classes/features/other/saveDataManager/loadFromDisk.d.ts.map +1 -0
  233. package/dist/src/classes/features/other/saveDataManager/loadFromDisk.lua +81 -0
  234. package/dist/src/classes/features/other/saveDataManager/restoreDefaults.d.ts +7 -0
  235. package/dist/src/classes/features/other/saveDataManager/restoreDefaults.d.ts.map +1 -0
  236. package/dist/src/classes/features/other/saveDataManager/restoreDefaults.lua +69 -0
  237. package/dist/src/classes/features/other/saveDataManager/saveToDisk.d.ts +5 -0
  238. package/dist/src/classes/features/other/saveDataManager/saveToDisk.d.ts.map +1 -0
  239. package/dist/src/classes/features/other/saveDataManager/saveToDisk.lua +46 -0
  240. package/dist/src/classes/private/CustomCallback.d.ts +2 -3
  241. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
  242. package/dist/src/classes/private/CustomCallback.lua +2 -5
  243. package/dist/src/classes/private/Feature.d.ts +1 -0
  244. package/dist/src/classes/private/Feature.d.ts.map +1 -1
  245. package/dist/src/classes/private/Feature.lua +1 -0
  246. package/dist/src/core/upgradeMod.d.ts +2 -5
  247. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  248. package/dist/src/decorators.d.ts +1 -1
  249. package/dist/src/decorators.d.ts.map +1 -1
  250. package/dist/src/decorators.lua +6 -8
  251. package/dist/src/enums/ISCFeature.d.ts +15 -9
  252. package/dist/src/enums/ISCFeature.d.ts.map +1 -1
  253. package/dist/src/enums/ISCFeature.lua +30 -9
  254. package/dist/src/enums/ModCallbackCustom.d.ts +34 -20
  255. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  256. package/dist/src/enums/ModCallbackCustom2.d.ts +61 -20
  257. package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -1
  258. package/dist/src/enums/ModCallbackCustom2.lua +102 -20
  259. package/dist/src/enums/{private/SerializationBrand.d.ts → SerializationBrand.d.ts} +6 -1
  260. package/dist/src/enums/SerializationBrand.d.ts.map +1 -0
  261. package/dist/src/enums/{private/SerializationBrand.lua → SerializationBrand.lua} +1 -0
  262. package/dist/src/features/customItemPool.d.ts +52 -0
  263. package/dist/src/features/customItemPool.d.ts.map +1 -0
  264. package/dist/src/features/customItemPool.lua +111 -0
  265. package/dist/src/features/deployJSONRoom.d.ts +6 -4
  266. package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
  267. package/dist/src/features/deployJSONRoom.lua +6 -4
  268. package/dist/src/features/fadeInRemover.d.ts.map +1 -1
  269. package/dist/src/features/fadeInRemover.lua +4 -16
  270. package/dist/src/features/saveDataManager/exports.d.ts +14 -4
  271. package/dist/src/features/saveDataManager/exports.d.ts.map +1 -1
  272. package/dist/src/features/saveDataManager/exports.lua +38 -0
  273. package/dist/src/features/saveDataManager/load.d.ts +2 -1
  274. package/dist/src/features/saveDataManager/load.d.ts.map +1 -1
  275. package/dist/src/features/saveDataManager/load.lua +10 -4
  276. package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
  277. package/dist/src/features/saveDataManager/main.lua +12 -5
  278. package/dist/src/features/saveDataManager/maps.d.ts +14 -0
  279. package/dist/src/features/saveDataManager/maps.d.ts.map +1 -1
  280. package/dist/src/features/saveDataManager/maps.lua +7 -0
  281. package/dist/src/features.d.ts +31 -12
  282. package/dist/src/features.d.ts.map +1 -1
  283. package/dist/src/features.lua +24 -6
  284. package/dist/src/functions/array.d.ts.map +1 -1
  285. package/dist/src/functions/array.lua +4 -5
  286. package/dist/src/functions/bitSet128.d.ts +2 -2
  287. package/dist/src/functions/bitSet128.lua +3 -3
  288. package/dist/src/functions/color.d.ts +2 -2
  289. package/dist/src/functions/color.lua +3 -3
  290. package/dist/src/functions/decorators.d.ts +28 -6
  291. package/dist/src/functions/decorators.d.ts.map +1 -1
  292. package/dist/src/functions/decorators.lua +24 -5
  293. package/dist/src/functions/deepCopy.d.ts +11 -4
  294. package/dist/src/functions/deepCopy.d.ts.map +1 -1
  295. package/dist/src/functions/deepCopy.lua +84 -32
  296. package/dist/src/functions/deepCopyTests.lua +1 -1
  297. package/dist/src/functions/initArray.d.ts +4 -4
  298. package/dist/src/functions/initArray.d.ts.map +1 -1
  299. package/dist/src/functions/initArray.lua +6 -12
  300. package/dist/src/functions/jsonRoom.d.ts +11 -0
  301. package/dist/src/functions/jsonRoom.d.ts.map +1 -1
  302. package/dist/src/functions/jsonRoom.lua +11 -0
  303. package/dist/src/functions/kColor.d.ts +2 -2
  304. package/dist/src/functions/kColor.lua +3 -3
  305. package/dist/src/functions/logMisc.d.ts +9 -2
  306. package/dist/src/functions/logMisc.d.ts.map +1 -1
  307. package/dist/src/functions/logMisc.lua +32 -2
  308. package/dist/src/functions/merge.d.ts +40 -0
  309. package/dist/src/functions/merge.d.ts.map +1 -0
  310. package/dist/src/{features/saveDataManager → functions}/merge.lua +84 -37
  311. package/dist/src/functions/mergeTests.d.ts +1 -2
  312. package/dist/src/functions/mergeTests.d.ts.map +1 -1
  313. package/dist/src/functions/mergeTests.lua +3 -4
  314. package/dist/src/functions/rng.d.ts +2 -2
  315. package/dist/src/functions/rng.lua +3 -3
  316. package/dist/src/functions/serialization.d.ts.map +1 -1
  317. package/dist/src/functions/serialization.lua +22 -0
  318. package/dist/src/functions/tstlClass.d.ts +0 -10
  319. package/dist/src/functions/tstlClass.d.ts.map +1 -1
  320. package/dist/src/functions/tstlClass.lua +2 -42
  321. package/dist/src/functions/vector.d.ts +2 -2
  322. package/dist/src/functions/vector.lua +3 -3
  323. package/dist/src/functions/weighted.d.ts +12 -1
  324. package/dist/src/functions/weighted.d.ts.map +1 -1
  325. package/dist/src/functions/weighted.lua +27 -10
  326. package/dist/src/index.d.ts +5 -0
  327. package/dist/src/index.d.ts.map +1 -1
  328. package/dist/src/index.lua +24 -0
  329. package/dist/src/interfaces/SaveData.d.ts +3 -7
  330. package/dist/src/interfaces/SaveData.d.ts.map +1 -1
  331. package/dist/src/interfaces/SaveData.lua +0 -11
  332. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +195 -2
  333. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -1
  334. package/dist/src/objects/isaacAPIClassTypeToBrand.d.ts +1 -1
  335. package/dist/src/objects/isaacAPIClassTypeToBrand.d.ts.map +1 -1
  336. package/dist/src/objects/isaacAPIClassTypeToBrand.lua +1 -1
  337. package/dist/src/types/AnyClass.d.ts +2 -0
  338. package/dist/src/types/AnyClass.d.ts.map +1 -0
  339. package/dist/src/types/AnyClass.lua +2 -0
  340. package/dist/src/types/AnyFunction.d.ts +6 -0
  341. package/dist/src/types/AnyFunction.d.ts.map +1 -0
  342. package/dist/src/types/AnyFunction.lua +2 -0
  343. package/dist/src/types/FunctionTuple.d.ts +2 -4
  344. package/dist/src/types/FunctionTuple.d.ts.map +1 -1
  345. package/dist/src/types/HasFunction.d.ts +5 -0
  346. package/dist/src/types/HasFunction.d.ts.map +1 -0
  347. package/dist/src/types/HasFunction.lua +2 -0
  348. package/package.json +1 -1
  349. package/src/callbacks.ts +88 -5
  350. package/src/classes/ModFeature.ts +96 -6
  351. package/src/classes/ModUpgraded.ts +57 -32
  352. package/src/classes/callbacks/PostCustomRevive.ts +22 -2
  353. package/src/classes/callbacks/PostGridEntityBroken.ts +1 -1
  354. package/src/classes/callbacks/PostGridEntityCollision.ts +1 -1
  355. package/src/classes/callbacks/PostGridEntityCustomBroken.ts +1 -1
  356. package/src/classes/callbacks/PostGridEntityCustomCollision.ts +1 -1
  357. package/src/classes/callbacks/PostGridEntityCustomInit.ts +1 -1
  358. package/src/classes/callbacks/PostGridEntityCustomRemove.ts +1 -1
  359. package/src/classes/callbacks/PostGridEntityCustomRender.ts +11 -0
  360. package/src/classes/callbacks/PostGridEntityCustomStateChanged.ts +1 -1
  361. package/src/classes/callbacks/PostGridEntityCustomUpdate.ts +1 -1
  362. package/src/classes/callbacks/PostGridEntityInit.ts +1 -1
  363. package/src/classes/callbacks/PostGridEntityRemove.ts +1 -1
  364. package/src/classes/callbacks/PostGridEntityRender.ts +11 -0
  365. package/src/classes/callbacks/PostGridEntityStateChanged.ts +1 -1
  366. package/src/classes/callbacks/PostGridEntityUpdate.ts +1 -1
  367. package/src/classes/callbacks/PostHolyMantleRemoved.ts +5 -8
  368. package/src/classes/callbacks/PostItemDischarge.ts +181 -0
  369. package/src/classes/callbacks/PostItemPickup.ts +11 -0
  370. package/src/classes/callbacks/PostLaserInitLate.ts +28 -0
  371. package/src/classes/callbacks/PostNPCInitLate.ts +28 -0
  372. package/src/classes/callbacks/PostNPCStateChanged.ts +37 -0
  373. package/src/classes/callbacks/PostPickupCollect.ts +37 -0
  374. package/src/classes/callbacks/PostPickupInitFirst.ts +34 -0
  375. package/src/classes/callbacks/PostPickupInitLate.ts +28 -0
  376. package/src/classes/callbacks/PostPickupStateChanged.ts +35 -0
  377. package/src/classes/callbacks/PostPitUpdate.ts +21 -0
  378. package/src/classes/callbacks/PostPlayerChangeHealth.ts +57 -0
  379. package/src/classes/callbacks/PostPlayerChangeStat.ts +102 -0
  380. package/src/classes/callbacks/PostPlayerChangeType.ts +44 -0
  381. package/src/classes/callbacks/PostPlayerCollectibleAdded.ts +11 -0
  382. package/src/classes/callbacks/PostPlayerCollectibleRemoved.ts +11 -0
  383. package/src/classes/callbacks/PostPlayerInitFirst.ts +44 -0
  384. package/src/classes/callbacks/PostPlayerInitLate.ts +32 -0
  385. package/src/classes/callbacks/PostPoopRender.ts +21 -0
  386. package/src/classes/callbacks/PostPoopUpdate.ts +21 -0
  387. package/src/classes/callbacks/PostPressurePlateRender.ts +21 -0
  388. package/src/classes/callbacks/PostPressurePlateUpdate.ts +21 -0
  389. package/src/classes/callbacks/PostProjectileInitLate.ts +28 -0
  390. package/src/classes/callbacks/PostPurchase.ts +87 -0
  391. package/src/classes/callbacks/PostRockRender.ts +21 -0
  392. package/src/classes/callbacks/PostRockUpdate.ts +21 -0
  393. package/src/classes/callbacks/PostSacrifice.ts +89 -0
  394. package/src/classes/callbacks/PostSlotAnimationChanged.ts +11 -0
  395. package/src/classes/callbacks/PostSlotCollision.ts +26 -0
  396. package/src/classes/callbacks/PostSlotDestroyed.ts +79 -0
  397. package/src/classes/callbacks/PostSlotInit.ts +11 -0
  398. package/src/classes/callbacks/PostSlotRender.ts +11 -0
  399. package/src/classes/callbacks/PostSlotUpdate.ts +11 -0
  400. package/src/classes/callbacks/PostSpikesUpdate.ts +21 -0
  401. package/src/classes/callbacks/PostTNTRender.ts +21 -0
  402. package/src/classes/callbacks/PostTNTUpdate.ts +21 -0
  403. package/src/classes/callbacks/PostTearInitLate.ts +28 -0
  404. package/src/classes/callbacks/PostTearInitVeryLate.ts +33 -0
  405. package/src/classes/callbacks/PostTransformation.ts +71 -0
  406. package/src/classes/callbacks/PreBerserkDeath.ts +5 -8
  407. package/src/classes/callbacks/PreItemPickup.ts +11 -0
  408. package/src/classes/callbacks/validation/CustomCallbackCollectibleType.ts +32 -0
  409. package/src/classes/callbacks/validation/CustomCallbackItemPickup.ts +48 -0
  410. package/src/classes/callbacks/validation/CustomCallbackLaser.ts +27 -0
  411. package/src/classes/callbacks/validation/CustomCallbackNPC.ts +34 -0
  412. package/src/classes/callbacks/validation/CustomCallbackPickup.ts +41 -0
  413. package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +25 -2
  414. package/src/classes/callbacks/validation/CustomCallbackPoop.ts +28 -0
  415. package/src/classes/callbacks/validation/CustomCallbackPressurePlate.ts +31 -0
  416. package/src/classes/callbacks/validation/CustomCallbackProjectile.ts +28 -0
  417. package/src/classes/callbacks/validation/CustomCallbackRock.ts +30 -0
  418. package/src/classes/callbacks/validation/CustomCallbackSlot.ts +37 -0
  419. package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +4 -4
  420. package/src/classes/callbacks/validation/CustomCallbackTNT.ts +28 -0
  421. package/src/classes/callbacks/validation/CustomCallbackTear.ts +27 -0
  422. package/src/classes/features/callbackLogic/CustomGridEntities.ts +32 -36
  423. package/src/classes/features/callbackLogic/CustomRevive.ts +14 -21
  424. package/src/classes/features/callbackLogic/EsauJrDetection.ts +0 -4
  425. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +7 -9
  426. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +0 -4
  427. package/src/classes/features/callbackLogic/GridEntityRenderDetection.ts +42 -0
  428. package/src/classes/features/callbackLogic/{GridEntityDetection.ts → GridEntityUpdateDetection.ts} +4 -20
  429. package/src/classes/features/callbackLogic/ItemPickupDetection.ts +91 -0
  430. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +245 -0
  431. package/src/classes/features/callbackLogic/SlotRenderDetection.ts +64 -0
  432. package/src/classes/features/callbackLogic/SlotUpdateDetection.ts +57 -0
  433. package/src/classes/features/other/RunInNFrames.ts +7 -0
  434. package/src/classes/features/other/SaveDataManager.ts +492 -0
  435. package/src/classes/features/other/saveDataManager/glowingHourGlass.ts +138 -0
  436. package/src/classes/features/other/saveDataManager/loadFromDisk.ts +99 -0
  437. package/src/classes/features/other/saveDataManager/restoreDefaults.ts +116 -0
  438. package/src/classes/features/other/saveDataManager/saveToDisk.ts +70 -0
  439. package/src/classes/private/CustomCallback.ts +2 -6
  440. package/src/classes/private/Feature.ts +1 -0
  441. package/src/core/upgradeMod.ts +6 -13
  442. package/src/decorators.ts +17 -16
  443. package/src/enums/ISCFeature.ts +44 -39
  444. package/src/enums/ModCallbackCustom.ts +34 -20
  445. package/src/enums/ModCallbackCustom2.ts +53 -5
  446. package/src/enums/{private/SerializationBrand.ts → SerializationBrand.ts} +8 -2
  447. package/src/features/customItemPool.ts +133 -0
  448. package/src/features/deployJSONRoom.ts +6 -4
  449. package/src/features/fadeInRemover.ts +4 -22
  450. package/src/features/saveDataManager/exports.ts +62 -3
  451. package/src/features/saveDataManager/load.ts +4 -1
  452. package/src/features/saveDataManager/main.ts +5 -3
  453. package/src/features/saveDataManager/maps.ts +16 -0
  454. package/src/features.ts +39 -4
  455. package/src/functions/array.ts +8 -9
  456. package/src/functions/bitSet128.ts +3 -3
  457. package/src/functions/color.ts +3 -3
  458. package/src/functions/decorators.ts +83 -12
  459. package/src/functions/deepCopy.ts +83 -17
  460. package/src/functions/deepCopyTests.ts +1 -1
  461. package/src/functions/initArray.ts +6 -11
  462. package/src/functions/jsonRoom.ts +11 -0
  463. package/src/functions/kColor.ts +3 -3
  464. package/src/functions/logMisc.ts +28 -2
  465. package/src/{features/saveDataManager → functions}/merge.ts +79 -45
  466. package/src/functions/mergeTests.ts +2 -3
  467. package/src/functions/rng.ts +3 -3
  468. package/src/functions/serialization.ts +25 -1
  469. package/src/functions/table.ts +1 -1
  470. package/src/functions/tstlClass.ts +3 -57
  471. package/src/functions/vector.ts +3 -3
  472. package/src/functions/weighted.ts +28 -11
  473. package/src/index.ts +5 -0
  474. package/src/interfaces/SaveData.ts +3 -34
  475. package/src/interfaces/private/AddCallbackParametersCustom2.ts +298 -7
  476. package/src/objects/isaacAPIClassTypeToBrand.ts +1 -1
  477. package/src/types/AnyClass.ts +1 -0
  478. package/src/types/AnyFunction.ts +5 -0
  479. package/src/types/FunctionTuple.ts +3 -4
  480. package/src/types/HasFunction.ts +7 -0
  481. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts.map +0 -1
  482. package/dist/src/classes/callbacks/validation/CustomCallbackRevive.lua +0 -19
  483. package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts.map +0 -1
  484. package/dist/src/enums/private/SerializationBrand.d.ts.map +0 -1
  485. package/dist/src/features/saveDataManager/merge.d.ts +0 -26
  486. package/dist/src/features/saveDataManager/merge.d.ts.map +0 -1
  487. package/dist/src/features/saveDataManager/serializationBrands.d.ts +0 -2
  488. package/dist/src/features/saveDataManager/serializationBrands.d.ts.map +0 -1
  489. package/dist/src/features/saveDataManager/serializationBrands.lua +0 -19
  490. package/dist/src/indexLua.d.ts +0 -199
  491. package/dist/src/indexLua.d.ts.map +0 -1
  492. package/dist/src/indexLua.lua +0 -1354
  493. package/src/classes/callbacks/validation/CustomCallbackRevive.ts +0 -27
  494. package/src/features/saveDataManager/serializationBrands.ts +0 -16
@@ -0,0 +1,12 @@
1
+ import { PostGridEntityCustomRender } from "../../callbacks/PostGridEntityCustomRender";
2
+ import { PostGridEntityRender } from "../../callbacks/PostGridEntityRender";
3
+ import { Feature } from "../../private/Feature";
4
+ import { CustomGridEntities } from "./CustomGridEntities";
5
+ export declare class GridEntityRenderDetection extends Feature {
6
+ private postGridEntityRender;
7
+ private postGridEntityCustomRender;
8
+ private customGridEntities;
9
+ constructor(postGridEntityRender: PostGridEntityRender, postGridEntityCustomRender: PostGridEntityCustomRender, customGridEntities: CustomGridEntities);
10
+ private postRender;
11
+ }
12
+ //# sourceMappingURL=GridEntityRenderDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridEntityRenderDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GridEntityRenderDetection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,yBAA0B,SAAQ,OAAO;IACpD,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,kBAAkB,EAAE,kBAAkB;IAcxC,OAAO,CAAC,UAAU,CAWhB;CACH"}
@@ -0,0 +1,33 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local ____exports = {}
5
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
7
+ local ____gridEntities = require("src.functions.gridEntities")
8
+ local getGridEntities = ____gridEntities.getGridEntities
9
+ local ____Feature = require("src.classes.private.Feature")
10
+ local Feature = ____Feature.Feature
11
+ ____exports.GridEntityRenderDetection = __TS__Class()
12
+ local GridEntityRenderDetection = ____exports.GridEntityRenderDetection
13
+ GridEntityRenderDetection.name = "GridEntityRenderDetection"
14
+ __TS__ClassExtends(GridEntityRenderDetection, Feature)
15
+ function GridEntityRenderDetection.prototype.____constructor(self, postGridEntityRender, postGridEntityCustomRender, customGridEntities)
16
+ Feature.prototype.____constructor(self)
17
+ self.postRender = function()
18
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
19
+ local gridIndex = gridEntity:GetGridIndex()
20
+ local gridEntityTypeCustom = self.customGridEntities:getCustomGridEntityType(gridIndex)
21
+ if gridEntityTypeCustom == nil then
22
+ self.postGridEntityRender:fire(gridEntity)
23
+ else
24
+ self.postGridEntityCustomRender:fire(gridEntity, gridEntityTypeCustom)
25
+ end
26
+ end
27
+ end
28
+ self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
29
+ self.postGridEntityRender = postGridEntityRender
30
+ self.postGridEntityCustomRender = postGridEntityCustomRender
31
+ self.customGridEntities = customGridEntities
32
+ end
33
+ return ____exports
@@ -16,7 +16,7 @@ declare type GridEntityTuple = [
16
16
  variant: int,
17
17
  state: int
18
18
  ];
19
- export declare class GridEntityDetection extends Feature {
19
+ export declare class GridEntityUpdateDetection extends Feature {
20
20
  v: {
21
21
  room: {
22
22
  /** Indexed by grid index. */
@@ -40,7 +40,7 @@ export declare class GridEntityDetection extends Feature {
40
40
  private checkGridEntityStateChanged;
41
41
  private checkNewGridEntity;
42
42
  private updateTupleInMap;
43
- private postNewRoomReordered;
43
+ private postNewRoom;
44
44
  }
45
45
  export {};
46
- //# sourceMappingURL=GridEntityDetection.d.ts.map
46
+ //# sourceMappingURL=GridEntityUpdateDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridEntityUpdateDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GridEntityUpdateDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,8BAA8B,CAAC;AAM3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,aAAK,eAAe,GAAG;IACrB,cAAc,EAAE,cAAc;IAC9B,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,qBAAa,yBAA0B,SAAQ,OAAO;IACpC,CAAC;;YAEb,6BAA6B;;;MAG/B;IAEF,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,wBAAwB,CAA2B;IAC3D,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,gCAAgC,CAAmC;IAC3E,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,kBAAkB,EAAE,kBAAkB,EACtC,wBAAwB,EAAE,wBAAwB,EAClD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,0BAA0B,EAAE,0BAA0B,EACtD,gCAAgC,EAAE,gCAAgC,EAClE,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,kBAAkB,EAAE,kBAAkB;IAyBxC,OAAO,CAAC,UAAU,CAmBhB;IAEF,OAAO,CAAC,wBAAwB;IA8BhC,OAAO,CAAC,2BAA2B;IA0CnC,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,WAAW,CAMjB;CACH"}
@@ -9,18 +9,16 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
9
9
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
10
  local ____ISCFeature = require("src.enums.ISCFeature")
11
11
  local ISCFeature = ____ISCFeature.ISCFeature
12
- local ____ModCallbackCustom2 = require("src.enums.ModCallbackCustom2")
13
- local ModCallbackCustom2 = ____ModCallbackCustom2.ModCallbackCustom2
14
12
  local ____gridEntities = require("src.functions.gridEntities")
15
13
  local getGridEntitiesMap = ____gridEntities.getGridEntitiesMap
16
14
  local isGridEntityBroken = ____gridEntities.isGridEntityBroken
17
15
  local ____Feature = require("src.classes.private.Feature")
18
16
  local Feature = ____Feature.Feature
19
- ____exports.GridEntityDetection = __TS__Class()
20
- local GridEntityDetection = ____exports.GridEntityDetection
21
- GridEntityDetection.name = "GridEntityDetection"
22
- __TS__ClassExtends(GridEntityDetection, Feature)
23
- function GridEntityDetection.prototype.____constructor(self, postGridEntityInit, postGridEntityCustomInit, postGridEntityUpdate, postGridEntityCustomUpdate, postGridEntityRemove, postGridEntityCustomRemove, postGridEntityStateChanged, postGridEntityCustomStateChanged, postGridEntityBroken, postGridEntityCustomBroken, customGridEntities)
17
+ ____exports.GridEntityUpdateDetection = __TS__Class()
18
+ local GridEntityUpdateDetection = ____exports.GridEntityUpdateDetection
19
+ GridEntityUpdateDetection.name = "GridEntityUpdateDetection"
20
+ __TS__ClassExtends(GridEntityUpdateDetection, Feature)
21
+ function GridEntityUpdateDetection.prototype.____constructor(self, postGridEntityInit, postGridEntityCustomInit, postGridEntityUpdate, postGridEntityCustomUpdate, postGridEntityRemove, postGridEntityCustomRemove, postGridEntityStateChanged, postGridEntityCustomStateChanged, postGridEntityBroken, postGridEntityCustomBroken, customGridEntities)
24
22
  Feature.prototype.____constructor(self)
25
23
  self.v = {room = {initializedGridEntities = __TS__New(Map)}}
26
24
  self.postUpdate = function()
@@ -39,7 +37,7 @@ function GridEntityDetection.prototype.____constructor(self, postGridEntityInit,
39
37
  end
40
38
  end
41
39
  end
42
- self.postNewRoomReordered = function()
40
+ self.postNewRoom = function()
43
41
  local gridEntitiesMap = getGridEntitiesMap(nil)
44
42
  for ____, ____value in __TS__Iterator(gridEntitiesMap:entries()) do
45
43
  local gridIndex = ____value[1]
@@ -48,8 +46,7 @@ function GridEntityDetection.prototype.____constructor(self, postGridEntityInit,
48
46
  end
49
47
  end
50
48
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
51
- self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
52
- self.customCallbacksUsed = {{ModCallbackCustom2.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
49
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}, {ModCallback.POST_NEW_ROOM, {self.postNewRoom}}}
53
50
  self.postGridEntityInit = postGridEntityInit
54
51
  self.postGridEntityCustomInit = postGridEntityCustomInit
55
52
  self.postGridEntityUpdate = postGridEntityUpdate
@@ -62,7 +59,7 @@ function GridEntityDetection.prototype.____constructor(self, postGridEntityInit,
62
59
  self.postGridEntityCustomBroken = postGridEntityCustomBroken
63
60
  self.customGridEntities = customGridEntities
64
61
  end
65
- function GridEntityDetection.prototype.checkGridEntitiesRemoved(self, gridEntitiesMap)
62
+ function GridEntityUpdateDetection.prototype.checkGridEntitiesRemoved(self, gridEntitiesMap)
66
63
  for ____, ____value in __TS__Iterator(self.v.room.initializedGridEntities:entries()) do
67
64
  local gridIndex = ____value[1]
68
65
  local gridEntityTuple = ____value[2]
@@ -79,7 +76,7 @@ function GridEntityDetection.prototype.checkGridEntitiesRemoved(self, gridEntiti
79
76
  end
80
77
  end
81
78
  end
82
- function GridEntityDetection.prototype.checkGridEntityStateChanged(self, gridIndex, gridEntity)
79
+ function GridEntityUpdateDetection.prototype.checkGridEntityStateChanged(self, gridIndex, gridEntity)
83
80
  local gridEntityTuple = self.v.room.initializedGridEntities:get(gridIndex)
84
81
  if gridEntityTuple == nil then
85
82
  return
@@ -103,7 +100,7 @@ function GridEntityDetection.prototype.checkGridEntityStateChanged(self, gridInd
103
100
  end
104
101
  end
105
102
  end
106
- function GridEntityDetection.prototype.checkNewGridEntity(self, gridIndex, gridEntity)
103
+ function GridEntityUpdateDetection.prototype.checkNewGridEntity(self, gridIndex, gridEntity)
107
104
  local gridEntityType = gridEntity:GetType()
108
105
  local gridEntityTuple = self.v.room.initializedGridEntities:get(gridIndex)
109
106
  if gridEntityTuple == nil or gridEntityTuple[1] ~= gridEntityType then
@@ -116,7 +113,7 @@ function GridEntityDetection.prototype.checkNewGridEntity(self, gridIndex, gridE
116
113
  end
117
114
  end
118
115
  end
119
- function GridEntityDetection.prototype.updateTupleInMap(self, gridEntity)
116
+ function GridEntityUpdateDetection.prototype.updateTupleInMap(self, gridEntity)
120
117
  local gridEntityType = gridEntity:GetType()
121
118
  local variant = gridEntity:GetVariant()
122
119
  local gridIndex = gridEntity:GetGridIndex()
@@ -0,0 +1,20 @@
1
+ import { PickingUpItem } from "../../../types/PickingUpItem";
2
+ import { PlayerIndex } from "../../../types/PlayerIndex";
3
+ import { PostItemPickup } from "../../callbacks/PostItemPickup";
4
+ import { PreItemPickup } from "../../callbacks/PreItemPickup";
5
+ import { DefaultMap } from "../../DefaultMap";
6
+ import { Feature } from "../../private/Feature";
7
+ export declare class ItemPickupDetection extends Feature {
8
+ v: {
9
+ run: {
10
+ playersPickingUpItemMap: DefaultMap<PlayerIndex, PickingUpItem, []>;
11
+ };
12
+ };
13
+ private postItemPickup;
14
+ private preItemPickup;
15
+ constructor(postItemPickup: PostItemPickup, preItemPickup: PreItemPickup);
16
+ private postPEffectUpdate;
17
+ private queueEmpty;
18
+ private queueNotEmpty;
19
+ }
20
+ //# sourceMappingURL=ItemPickupDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemPickupDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/ItemPickupDetection.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,aAAa,EAEd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9B,CAAC;;;;MAMf;IAEF,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa;IAYxE,OAAO,CAAC,iBAAiB,CAevB;IAEF,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,aAAa;CAkBtB"}
@@ -0,0 +1,60 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local __TS__New = ____lualib.__TS__New
5
+ local ____exports = {}
6
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
+ local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
8
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
+ local ____playerDataStructures = require("src.functions.playerDataStructures")
10
+ local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
11
+ local ____types = require("src.functions.types")
12
+ local asNumber = ____types.asNumber
13
+ local ____PickingUpItem = require("src.types.PickingUpItem")
14
+ local newPickingUpItem = ____PickingUpItem.newPickingUpItem
15
+ local resetPickingUpItem = ____PickingUpItem.resetPickingUpItem
16
+ local ____DefaultMap = require("src.classes.DefaultMap")
17
+ local DefaultMap = ____DefaultMap.DefaultMap
18
+ local ____Feature = require("src.classes.private.Feature")
19
+ local Feature = ____Feature.Feature
20
+ ____exports.ItemPickupDetection = __TS__Class()
21
+ local ItemPickupDetection = ____exports.ItemPickupDetection
22
+ ItemPickupDetection.name = "ItemPickupDetection"
23
+ __TS__ClassExtends(ItemPickupDetection, Feature)
24
+ function ItemPickupDetection.prototype.____constructor(self, postItemPickup, preItemPickup)
25
+ Feature.prototype.____constructor(self)
26
+ self.v = {run = {playersPickingUpItemMap = __TS__New(
27
+ DefaultMap,
28
+ function() return newPickingUpItem(nil) end
29
+ )}}
30
+ self.postPEffectUpdate = function(____, player)
31
+ local pickingUpItem = defaultMapGetPlayer(nil, self.v.run.playersPickingUpItemMap, player)
32
+ if player:IsItemQueueEmpty() then
33
+ self:queueEmpty(player, pickingUpItem)
34
+ else
35
+ self:queueNotEmpty(player, pickingUpItem)
36
+ end
37
+ end
38
+ self.callbacksUsed = {{ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}}
39
+ self.postItemPickup = postItemPickup
40
+ self.preItemPickup = preItemPickup
41
+ end
42
+ function ItemPickupDetection.prototype.queueEmpty(self, player, pickingUpItem)
43
+ if pickingUpItem.itemType == ItemType.NULL or asNumber(nil, pickingUpItem.subType) == 0 then
44
+ return
45
+ end
46
+ self.postItemPickup:fire(player, pickingUpItem)
47
+ resetPickingUpItem(nil, pickingUpItem)
48
+ end
49
+ function ItemPickupDetection.prototype.queueNotEmpty(self, player, pickingUpItem)
50
+ local queuedItem = player.QueuedItem.Item
51
+ if queuedItem == nil or queuedItem.Type == ItemType.NULL then
52
+ return
53
+ end
54
+ if queuedItem.Type ~= pickingUpItem.itemType or queuedItem.ID ~= pickingUpItem.subType then
55
+ pickingUpItem.itemType = queuedItem.Type
56
+ pickingUpItem.subType = queuedItem.ID
57
+ self.preItemPickup:fire(player, pickingUpItem)
58
+ end
59
+ end
60
+ return ____exports
@@ -0,0 +1,47 @@
1
+ import { ActiveSlot, CollectibleType } from "isaac-typescript-definitions";
2
+ import { PlayerIndex } from "../../../types/PlayerIndex";
3
+ import { PostPlayerCollectibleAdded } from "../../callbacks/PostPlayerCollectibleAdded";
4
+ import { PostPlayerCollectibleRemoved } from "../../callbacks/PostPlayerCollectibleRemoved";
5
+ import { DefaultMap } from "../../DefaultMap";
6
+ import { Feature } from "../../private/Feature";
7
+ import { RunInNFrames } from "../other/RunInNFrames";
8
+ export declare class PlayerCollectibleDetection extends Feature {
9
+ v: {
10
+ run: {
11
+ playersCollectibleCount: DefaultMap<PlayerIndex, number, []>;
12
+ playersCollectibleMap: DefaultMap<PlayerIndex, Map<CollectibleType, number>, []>;
13
+ playersActiveItemMap: DefaultMap<PlayerIndex, Map<ActiveSlot, CollectibleType>, []>;
14
+ };
15
+ };
16
+ private postPlayerCollectibleAdded;
17
+ private postPlayerCollectibleRemoved;
18
+ private runInNFrames;
19
+ constructor(postPlayerCollectibleAdded: PostPlayerCollectibleAdded, postPlayerCollectibleRemoved: PostPlayerCollectibleRemoved, runInNFrames: RunInNFrames);
20
+ /**
21
+ * This is called when the collectible count changes and in situations where the entire build is
22
+ * rerolled.
23
+ *
24
+ * Since getting a new player collectible map is expensive, we want to only run this function when
25
+ * necessary, and not on e.g. every frame. Unfortunately, this has the side effect of missing out
26
+ * on collectible changes from mods that add and remove a collectible on the same frame.
27
+ *
28
+ * @param player The player to update.
29
+ * @param numCollectiblesChanged Pass undefined for situations where the entire build was
30
+ * rerolled.
31
+ */
32
+ private updateCollectibleMapAndFire;
33
+ private useItemD4;
34
+ private postPEffectUpdate;
35
+ /**
36
+ * Checking for collectible count will work to detect when a player swaps their active item for
37
+ * another active item. This is because the collectible count will decrement by 1 when the item is
38
+ * swapped onto the pedestal and the hold animation begins, and increment by 1 when the item is
39
+ * dequeued and the hold animation ends.
40
+ *
41
+ * However, we also want to explicitly check for the case where a mod swaps in a custom active
42
+ * collectible on the same frame, since doing so is cheap.
43
+ */
44
+ private checkActiveItemsChanged;
45
+ private entityTakeDmgPlayer;
46
+ }
47
+ //# sourceMappingURL=PlayerCollectibleDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlayerCollectibleDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PlayerCollectibleDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EAKhB,MAAM,8BAA8B,CAAC;AAatC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAa,0BAA2B,SAAQ,OAAO;IACrC,CAAC;;;;;;MAYf;IAEF,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,4BAA4B,CAA+B;IACnE,OAAO,CAAC,YAAY,CAAe;gBAGjC,0BAA0B,EAAE,0BAA0B,EACtD,4BAA4B,EAAE,4BAA4B,EAC1D,YAAY,EAAE,YAAY;IAkB5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,2BAA2B;IAyCnC,OAAO,CAAC,SAAS,CAqBf;IAGF,OAAO,CAAC,iBAAiB,CAqBvB;IAEF;;;;;;;;OAQG;IACH,OAAO,CAAC,uBAAuB;IAmC/B,OAAO,CAAC,mBAAmB,CAgCzB;CACH"}
@@ -0,0 +1,154 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local __TS__New = ____lualib.__TS__New
5
+ local Map = ____lualib.Map
6
+ local Set = ____lualib.Set
7
+ local __TS__Spread = ____lualib.__TS__Spread
8
+ local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
9
+ local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
10
+ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
11
+ local __TS__Iterator = ____lualib.__TS__Iterator
12
+ local __TS__ArraySort = ____lualib.__TS__ArraySort
13
+ local ____exports = {}
14
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
15
+ local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
16
+ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
17
+ local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
18
+ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
19
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
20
+ local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
21
+ local ____array = require("src.functions.array")
22
+ local arrayEquals = ____array.arrayEquals
23
+ local ____enums = require("src.functions.enums")
24
+ local getEnumValues = ____enums.getEnumValues
25
+ local ____flag = require("src.functions.flag")
26
+ local hasFlag = ____flag.hasFlag
27
+ local ____playerDataStructures = require("src.functions.playerDataStructures")
28
+ local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
29
+ local mapSetPlayer = ____playerDataStructures.mapSetPlayer
30
+ local ____players = require("src.functions.players")
31
+ local getPlayerCollectibleMap = ____players.getPlayerCollectibleMap
32
+ local getPlayerFromPtr = ____players.getPlayerFromPtr
33
+ local ____utils = require("src.functions.utils")
34
+ local ____repeat = ____utils["repeat"]
35
+ local ____DefaultMap = require("src.classes.DefaultMap")
36
+ local DefaultMap = ____DefaultMap.DefaultMap
37
+ local ____Feature = require("src.classes.private.Feature")
38
+ local Feature = ____Feature.Feature
39
+ ____exports.PlayerCollectibleDetection = __TS__Class()
40
+ local PlayerCollectibleDetection = ____exports.PlayerCollectibleDetection
41
+ PlayerCollectibleDetection.name = "PlayerCollectibleDetection"
42
+ __TS__ClassExtends(PlayerCollectibleDetection, Feature)
43
+ function PlayerCollectibleDetection.prototype.____constructor(self, postPlayerCollectibleAdded, postPlayerCollectibleRemoved, runInNFrames)
44
+ Feature.prototype.____constructor(self)
45
+ self.v = {run = {
46
+ playersCollectibleCount = __TS__New(DefaultMap, 0),
47
+ playersCollectibleMap = __TS__New(
48
+ DefaultMap,
49
+ function() return __TS__New(Map) end
50
+ ),
51
+ playersActiveItemMap = __TS__New(
52
+ DefaultMap,
53
+ function() return __TS__New(Map) end
54
+ )
55
+ }}
56
+ self.useItemD4 = function(____, _collectibleType, _rng, player)
57
+ self:updateCollectibleMapAndFire(player, nil)
58
+ return nil
59
+ end
60
+ self.postPEffectUpdate = function(____, player)
61
+ local oldCollectibleCount = defaultMapGetPlayer(nil, self.v.run.playersCollectibleCount, player)
62
+ local newCollectibleCount = player:GetCollectibleCount()
63
+ mapSetPlayer(nil, self.v.run.playersCollectibleCount, player, newCollectibleCount)
64
+ local difference = newCollectibleCount - oldCollectibleCount
65
+ if difference > 0 then
66
+ self:updateCollectibleMapAndFire(player, difference)
67
+ elseif difference < 0 then
68
+ self:updateCollectibleMapAndFire(player, difference * -1)
69
+ elseif difference == 0 then
70
+ self:checkActiveItemsChanged(player)
71
+ end
72
+ end
73
+ self.entityTakeDmgPlayer = function(____, entity, _amount, damageFlags, _source, _countdownFrames)
74
+ if hasFlag(nil, damageFlags, DamageFlag.FAKE) then
75
+ return nil
76
+ end
77
+ local player = entity:ToPlayer()
78
+ if player == nil then
79
+ return nil
80
+ end
81
+ local character = player:GetPlayerType()
82
+ if character ~= PlayerType.EDEN_B then
83
+ return nil
84
+ end
85
+ local entityPtr = EntityPtr(player)
86
+ self.runInNFrames:runNextGameFrame(function()
87
+ local futurePlayer = getPlayerFromPtr(nil, entityPtr)
88
+ if futurePlayer ~= nil then
89
+ self:updateCollectibleMapAndFire(player, nil)
90
+ end
91
+ end)
92
+ return nil
93
+ end
94
+ self.callbacksUsed = {{ModCallback.POST_USE_ITEM, {self.useItemD4, CollectibleType.D4}}, {ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}, {ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}}
95
+ self.postPlayerCollectibleAdded = postPlayerCollectibleAdded
96
+ self.postPlayerCollectibleRemoved = postPlayerCollectibleRemoved
97
+ self.runInNFrames = runInNFrames
98
+ end
99
+ function PlayerCollectibleDetection.prototype.updateCollectibleMapAndFire(self, player, numCollectiblesChanged)
100
+ local oldCollectibleMap = defaultMapGetPlayer(nil, self.v.run.playersCollectibleMap, player)
101
+ local newCollectibleMap = getPlayerCollectibleMap(nil, player)
102
+ mapSetPlayer(nil, self.v.run.playersCollectibleMap, player, newCollectibleMap)
103
+ local ____Set_1 = Set
104
+ local ____array_0 = __TS__SparseArrayNew(__TS__Spread(oldCollectibleMap:keys()))
105
+ __TS__SparseArrayPush(
106
+ ____array_0,
107
+ __TS__Spread(newCollectibleMap:keys())
108
+ )
109
+ local collectibleTypesSet = __TS__New(
110
+ ____Set_1,
111
+ {__TS__SparseArraySpread(____array_0)}
112
+ )
113
+ local numFired = 0
114
+ for ____, collectibleType in __TS__Iterator(collectibleTypesSet:values()) do
115
+ local oldNum = oldCollectibleMap:get(collectibleType) or 0
116
+ local newNum = newCollectibleMap:get(collectibleType) or 0
117
+ local difference = newNum - oldNum
118
+ local increased = difference > 0
119
+ local absoluteDifference = math.abs(difference)
120
+ ____repeat(
121
+ nil,
122
+ absoluteDifference,
123
+ function()
124
+ if increased then
125
+ self.postPlayerCollectibleAdded:fire(player, collectibleType)
126
+ else
127
+ self.postPlayerCollectibleRemoved:fire(player, collectibleType)
128
+ end
129
+ numFired = numFired + 1
130
+ end
131
+ )
132
+ if numFired == numCollectiblesChanged then
133
+ return
134
+ end
135
+ end
136
+ end
137
+ function PlayerCollectibleDetection.prototype.checkActiveItemsChanged(self, player)
138
+ local activeItemMap = defaultMapGetPlayer(nil, self.v.run.playersActiveItemMap, player)
139
+ local oldCollectibleTypes = {}
140
+ local newCollectibleTypes = {}
141
+ for ____, activeSlot in ipairs(getEnumValues(nil, ActiveSlot)) do
142
+ local oldCollectibleType = activeItemMap:get(activeSlot) or CollectibleType.NULL
143
+ local newCollectibleType = player:GetActiveItem(activeSlot)
144
+ activeItemMap:set(activeSlot, newCollectibleType)
145
+ oldCollectibleTypes[#oldCollectibleTypes + 1] = oldCollectibleType
146
+ newCollectibleTypes[#newCollectibleTypes + 1] = newCollectibleType
147
+ end
148
+ __TS__ArraySort(oldCollectibleTypes)
149
+ __TS__ArraySort(newCollectibleTypes)
150
+ if not arrayEquals(nil, oldCollectibleTypes, newCollectibleTypes) then
151
+ self:updateCollectibleMapAndFire(player, nil)
152
+ end
153
+ end
154
+ return ____exports
@@ -0,0 +1,18 @@
1
+ import { PostSlotAnimationChanged } from "../../callbacks/PostSlotAnimationChanged";
2
+ import { PostSlotRender } from "../../callbacks/PostSlotRender";
3
+ import { DefaultMap } from "../../DefaultMap";
4
+ import { Feature } from "../../private/Feature";
5
+ export declare class SlotRenderDetection extends Feature {
6
+ v: {
7
+ room: {
8
+ slotAnimations: DefaultMap<PtrHash, string, [slot: Entity]>;
9
+ brokenSlots: Set<PtrHash>;
10
+ };
11
+ };
12
+ private postSlotRender;
13
+ private postSlotAnimationChanged;
14
+ constructor(postSlotRender: PostSlotRender, postSlotAnimationChanged: PostSlotAnimationChanged);
15
+ private postRender;
16
+ private checkSlotAnimationChanged;
17
+ }
18
+ //# sourceMappingURL=SlotRenderDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlotRenderDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotRenderDetection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9B,CAAC;;;;;MAUf;IAEF,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,wBAAwB,CAA2B;gBAGzD,cAAc,EAAE,cAAc,EAC9B,wBAAwB,EAAE,wBAAwB;IAapD,OAAO,CAAC,UAAU,CAKhB;IAEF,OAAO,CAAC,yBAAyB;CAkBlC"}
@@ -0,0 +1,51 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local __TS__New = ____lualib.__TS__New
5
+ local Set = ____lualib.Set
6
+ local ____exports = {}
7
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
+ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
10
+ local getSlots = ____entitiesSpecific.getSlots
11
+ local ____DefaultMap = require("src.classes.DefaultMap")
12
+ local DefaultMap = ____DefaultMap.DefaultMap
13
+ local ____Feature = require("src.classes.private.Feature")
14
+ local Feature = ____Feature.Feature
15
+ ____exports.SlotRenderDetection = __TS__Class()
16
+ local SlotRenderDetection = ____exports.SlotRenderDetection
17
+ SlotRenderDetection.name = "SlotRenderDetection"
18
+ __TS__ClassExtends(SlotRenderDetection, Feature)
19
+ function SlotRenderDetection.prototype.____constructor(self, postSlotRender, postSlotAnimationChanged)
20
+ Feature.prototype.____constructor(self)
21
+ self.v = {room = {
22
+ slotAnimations = __TS__New(
23
+ DefaultMap,
24
+ function(____, slot)
25
+ local sprite = slot:GetSprite()
26
+ return sprite:GetAnimation()
27
+ end
28
+ ),
29
+ brokenSlots = __TS__New(Set)
30
+ }}
31
+ self.postRender = function()
32
+ for ____, slot in ipairs(getSlots(nil)) do
33
+ self.postSlotRender:fire(slot)
34
+ self:checkSlotAnimationChanged(slot)
35
+ end
36
+ end
37
+ self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
38
+ self.postSlotRender = postSlotRender
39
+ self.postSlotAnimationChanged = postSlotAnimationChanged
40
+ end
41
+ function SlotRenderDetection.prototype.checkSlotAnimationChanged(self, slot)
42
+ local sprite = slot:GetSprite()
43
+ local currentAnimation = sprite:GetAnimation()
44
+ local ptrHash = GetPtrHash(slot)
45
+ local previousAnimation = self.v.room.slotAnimations:getAndSetDefault(ptrHash, slot)
46
+ self.v.room.slotAnimations:set(ptrHash, currentAnimation)
47
+ if currentAnimation ~= previousAnimation then
48
+ self.postSlotAnimationChanged:fire(slot, previousAnimation, currentAnimation)
49
+ end
50
+ end
51
+ return ____exports
@@ -0,0 +1,17 @@
1
+ import { PostSlotInit } from "../../callbacks/PostSlotInit";
2
+ import { PostSlotUpdate } from "../../callbacks/PostSlotUpdate";
3
+ import { Feature } from "../../private/Feature";
4
+ export declare class SlotUpdateDetection extends Feature {
5
+ v: {
6
+ room: {
7
+ initializedSlots: Set<PtrHash>;
8
+ };
9
+ };
10
+ private postSlotInit;
11
+ private postSlotUpdate;
12
+ constructor(postSlotInit: PostSlotInit, postSlotUpdate: PostSlotUpdate);
13
+ private postUpdate;
14
+ private postNewRoomReordered;
15
+ private checkNewEntity;
16
+ }
17
+ //# sourceMappingURL=SlotUpdateDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlotUpdateDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotUpdateDetection.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9B,CAAC;;;;MAIf;IAEF,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAiB;gBAE3B,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc;IAkBtE,OAAO,CAAC,UAAU,CAKhB;IAGF,OAAO,CAAC,oBAAoB,CAI1B;IAEF,OAAO,CAAC,cAAc;CAOvB"}
@@ -0,0 +1,45 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local Set = ____lualib.Set
5
+ local __TS__New = ____lualib.__TS__New
6
+ local ____exports = {}
7
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
+ local ____ModCallbackCustom2 = require("src.enums.ModCallbackCustom2")
10
+ local ModCallbackCustom2 = ____ModCallbackCustom2.ModCallbackCustom2
11
+ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
12
+ local getSlots = ____entitiesSpecific.getSlots
13
+ local ____Feature = require("src.classes.private.Feature")
14
+ local Feature = ____Feature.Feature
15
+ ____exports.SlotUpdateDetection = __TS__Class()
16
+ local SlotUpdateDetection = ____exports.SlotUpdateDetection
17
+ SlotUpdateDetection.name = "SlotUpdateDetection"
18
+ __TS__ClassExtends(SlotUpdateDetection, Feature)
19
+ function SlotUpdateDetection.prototype.____constructor(self, postSlotInit, postSlotUpdate)
20
+ Feature.prototype.____constructor(self)
21
+ self.v = {room = {initializedSlots = __TS__New(Set)}}
22
+ self.postUpdate = function()
23
+ for ____, slot in ipairs(getSlots(nil)) do
24
+ self:checkNewEntity(slot)
25
+ self.postSlotUpdate:fire(slot)
26
+ end
27
+ end
28
+ self.postNewRoomReordered = function()
29
+ for ____, slot in ipairs(getSlots(nil)) do
30
+ self:checkNewEntity(slot)
31
+ end
32
+ end
33
+ self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
34
+ self.customCallbacksUsed = {{ModCallbackCustom2.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
35
+ self.postSlotInit = postSlotInit
36
+ self.postSlotUpdate = postSlotUpdate
37
+ end
38
+ function SlotUpdateDetection.prototype.checkNewEntity(self, slot)
39
+ local ptrHash = GetPtrHash(slot)
40
+ if not self.v.room.initializedSlots:has(ptrHash) then
41
+ self.v.room.initializedSlots:add(ptrHash)
42
+ self.postSlotInit:fire(slot)
43
+ end
44
+ end
45
+ return ____exports
@@ -1 +1 @@
1
- {"version":3,"file":"RunInNFrames.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RunInNFrames.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,yCAAyC;AACzC,aAAK,mBAAmB,GAAG,CAAC,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;AAErE;;;;GAIG;AACH,aAAK,qBAAqB,GAAG;IAC3B,gBAAgB,EAAE,GAAG;IACrB,IAAI,EAAE,MAAM,OAAO;IACnB,iBAAiB,EAAE,GAAG;CACvB,CAAC;AAEF,qBAAa,YAAa,SAAQ,OAAO;IACvB,CAAC;;;;;;;MAQf;;IAYF,OAAO,CAAC,UAAU,CAWhB;IAGF,OAAO,CAAC,UAAU,CAWhB;IAMF;;;;;;;;;OASG;IACI,gBAAgB,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,UAAU,EAAE,GAAG,GAAG,IAAI;IAOhE;;;;;;;;;OASG;IACI,kBAAkB,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,YAAY,EAAE,GAAG,GAAG,IAAI;IAOpE;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACI,gBAAgB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAI/C;;;;;;;OAOG;IACI,kBAAkB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAIjD;;;;;;;;;;;;;;;OAeG;IACI,qBAAqB,CAC1B,IAAI,EAAE,MAAM,OAAO,EACnB,UAAU,EAAE,GAAG,EACf,cAAc,EAAE,OAAO,GACtB,IAAI;IAWP;;;;;;;;;;;;;;;OAeG;IACI,uBAAuB,CAC5B,IAAI,EAAE,MAAM,OAAO,EACnB,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE,OAAO,GACtB,IAAI;CAcR"}
1
+ {"version":3,"file":"RunInNFrames.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RunInNFrames.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,yCAAyC;AACzC,aAAK,mBAAmB,GAAG,CAAC,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC;AAErE;;;;GAIG;AACH,aAAK,qBAAqB,GAAG;IAC3B,gBAAgB,EAAE,GAAG;IACrB,IAAI,EAAE,MAAM,OAAO;IACnB,iBAAiB,EAAE,GAAG;CACvB,CAAC;AAEF,qBAAa,YAAa,SAAQ,OAAO;IACvB,CAAC;;;;;;;MAQf;;IAYF,OAAO,CAAC,UAAU,CAWhB;IAGF,OAAO,CAAC,UAAU,CAWhB;IAMF;;;;;;;;;OASG;IAEI,gBAAgB,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,UAAU,EAAE,GAAG,GAAG,IAAI;IAOhE;;;;;;;;;OASG;IAEI,kBAAkB,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,YAAY,EAAE,GAAG,GAAG,IAAI;IAOpE;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IAEI,gBAAgB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAI/C;;;;;;;OAOG;IAEI,kBAAkB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAIjD;;;;;;;;;;;;;;;OAeG;IAEI,qBAAqB,CAC1B,IAAI,EAAE,MAAM,OAAO,EACnB,UAAU,EAAE,GAAG,EACf,cAAc,EAAE,OAAO,GACtB,IAAI;IAWP;;;;;;;;;;;;;;;OAeG;IAEI,uBAAuB,CAC5B,IAAI,EAAE,MAAM,OAAO,EACnB,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE,OAAO,GACtB,IAAI;CAcR"}
@@ -1,6 +1,7 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__Class = ____lualib.__TS__Class
3
3
  local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local __TS__Decorate = ____lualib.__TS__Decorate
4
5
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
5
6
  local ____exports = {}
6
7
  local checkExecuteQueuedFunctions, checkExecuteIntervalFunctions
@@ -8,6 +9,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
8
9
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
10
  local ____cachedClasses = require("src.core.cachedClasses")
10
11
  local game = ____cachedClasses.game
12
+ local ____decorators = require("src.decorators")
13
+ local Exported = ____decorators.Exported
11
14
  local ____array = require("src.functions.array")
12
15
  local arrayRemoveInPlace = ____array.arrayRemoveInPlace
13
16
  local ____Feature = require("src.classes.private.Feature")
@@ -106,4 +109,10 @@ function RunInNFrames.prototype.setIntervalRenderFrames(self, func, renderFrames
106
109
  func(nil)
107
110
  end
108
111
  end
112
+ __TS__Decorate({Exported}, RunInNFrames.prototype, "runInNGameFrames", true)
113
+ __TS__Decorate({Exported}, RunInNFrames.prototype, "runInNRenderFrames", true)
114
+ __TS__Decorate({Exported}, RunInNFrames.prototype, "runNextGameFrame", true)
115
+ __TS__Decorate({Exported}, RunInNFrames.prototype, "runNextRenderFrame", true)
116
+ __TS__Decorate({Exported}, RunInNFrames.prototype, "setIntervalGameFrames", true)
117
+ __TS__Decorate({Exported}, RunInNFrames.prototype, "setIntervalRenderFrames", true)
109
118
  return ____exports