isaacscript-common 14.0.0 → 14.1.1
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.
- package/dist/index.d.ts +1111 -83
- package/dist/isaacscript-common.lua +9946 -7327
- package/dist/src/callbacks/customRevive.lua +10 -1
- package/dist/src/callbacks/postDoorRender.lua +2 -2
- package/dist/src/callbacks/postEffectStateChanged.lua +3 -3
- package/dist/src/callbacks/postFamiliarStateChanged.lua +3 -3
- package/dist/src/callbacks/postFlip.lua +1 -1
- package/dist/src/callbacks/postGridEntity.lua +2 -2
- package/dist/src/callbacks/postNPCStateChanged.lua +3 -3
- package/dist/src/callbacks/postPickupStateChanged.lua +3 -3
- package/dist/src/callbacks/postPlayerCollectible.d.ts.map +1 -1
- package/dist/src/callbacks/postPlayerCollectible.lua +5 -9
- package/dist/src/callbacks/reorderedCallbacks.lua +7 -7
- package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityBroken.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
- package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityInit.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts +3 -3
- package/dist/src/callbacks/subscriptions/postGridEntityRemove.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityRemove.lua +4 -4
- package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityRender.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityRender.lua +3 -3
- package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityStateChanged.lua +3 -3
- package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityUpdate.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/src/callbacks/subscriptions/postRockRender.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postRockRender.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postRockRender.lua +3 -3
- package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postRockUpdate.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postRockUpdate.lua +3 -3
- package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postSpikesRender.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postSpikesRender.lua +3 -3
- package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postSpikesUpdate.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postSpikesUpdate.lua +3 -3
- package/dist/src/callbacks/subscriptions/postTNTRender.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postTNTRender.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postTNTRender.lua +3 -3
- package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postTNTUpdate.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postTNTUpdate.lua +3 -3
- package/dist/src/callbacks.d.ts +106 -0
- package/dist/src/callbacks.d.ts.map +1 -0
- package/dist/src/callbacks.lua +176 -0
- package/dist/src/classes/DefaultMap.d.ts.map +1 -1
- package/dist/src/classes/ModFeature.d.ts +11 -0
- package/dist/src/classes/ModFeature.d.ts.map +1 -0
- package/dist/src/classes/ModFeature.lua +13 -0
- package/dist/src/classes/ModUpgraded.d.ts +41 -7
- package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
- package/dist/src/classes/ModUpgraded.lua +75 -60
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +1 -1
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostAmbushFinished.lua +1 -1
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +1 -1
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostAmbushStarted.lua +1 -1
- package/dist/src/classes/callbacks/PostBombExploded.d.ts +1 -1
- package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostBombExploded.lua +1 -1
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts +1 -1
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostBombInitLate.lua +1 -1
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts +3 -4
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostBoneSwing.lua +1 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +3 -3
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +1 -1
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +1 -1
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +1 -1
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +5 -6
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCursedTeleport.lua +1 -1
- package/dist/src/classes/callbacks/PostCustomRevive.d.ts +6 -0
- package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCustomRevive.lua +17 -0
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts +15 -0
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +44 -0
- package/dist/src/classes/callbacks/PostDoorRender.d.ts +7 -0
- package/dist/src/classes/callbacks/PostDoorRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostDoorRender.lua +24 -0
- package/dist/src/classes/callbacks/PostDoorUpdate.d.ts +7 -0
- package/dist/src/classes/callbacks/PostDoorUpdate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostDoorUpdate.lua +24 -0
- package/dist/src/classes/callbacks/PostEffectInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostEffectInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostEffectInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts +13 -0
- package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostEffectStateChanged.lua +33 -0
- package/dist/src/classes/callbacks/PostEsauJr.d.ts +6 -0
- package/dist/src/classes/callbacks/PostEsauJr.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostEsauJr.lua +17 -0
- package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts +13 -0
- package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +33 -0
- package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts +6 -0
- package/dist/src/classes/callbacks/PostFirstEsauJr.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostFirstEsauJr.lua +17 -0
- package/dist/src/classes/callbacks/PostFirstFlip.d.ts +6 -0
- package/dist/src/classes/callbacks/PostFirstFlip.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostFirstFlip.lua +17 -0
- package/dist/src/classes/callbacks/PostFlip.d.ts +6 -0
- package/dist/src/classes/callbacks/PostFlip.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostFlip.lua +17 -0
- package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGameStartedReordered.lua +17 -0
- package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGameStartedReorderedLast.lua +17 -0
- package/dist/src/classes/callbacks/PostGreedModeWave.d.ts +12 -0
- package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGreedModeWave.lua +34 -0
- package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityBroken.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityBroken.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +9 -0
- package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCollision.lua +36 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomBroken.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomBroken.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +9 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.lua +31 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomInit.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomInit.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts +9 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.lua +25 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomStateChanged.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityCustomUpdate.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityInit.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityInit.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityInit.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts +9 -0
- package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityRemove.lua +28 -0
- package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityStateChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityStateChanged.lua +17 -0
- package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts +6 -0
- package/dist/src/classes/callbacks/PostGridEntityUpdate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGridEntityUpdate.lua +17 -0
- package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts +14 -0
- package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +35 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +1 -1
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostKnifeInitLate.lua +1 -1
- package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts +6 -0
- package/dist/src/classes/callbacks/PostNewLevelReordered.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNewLevelReordered.lua +17 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +6 -7
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +1 -1
- package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts +6 -0
- package/dist/src/classes/callbacks/PostNewRoomReordered.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNewRoomReordered.lua +17 -0
- package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts +6 -0
- package/dist/src/classes/callbacks/PostPEffectUpdateReordered.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPEffectUpdateReordered.lua +17 -0
- package/dist/src/classes/callbacks/PostPitRender.d.ts +1 -1
- package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPitRender.lua +1 -1
- package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts +15 -0
- package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +87 -0
- package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts +6 -0
- package/dist/src/classes/callbacks/PostPlayerRenderReordered.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPlayerRenderReordered.lua +17 -0
- package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts +6 -0
- package/dist/src/classes/callbacks/PostPlayerUpdateReordered.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPlayerUpdateReordered.lua +17 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +2 -2
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostRoomClearChanged.lua +1 -1
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts +1 -1
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostSpikesRender.lua +1 -1
- package/dist/src/classes/callbacks/PreBerserkDeath.d.ts +7 -0
- package/dist/src/classes/callbacks/PreBerserkDeath.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PreBerserkDeath.lua +36 -0
- package/dist/src/classes/callbacks/PreCustomRevive.d.ts +6 -0
- package/dist/src/classes/callbacks/PreCustomRevive.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PreCustomRevive.lua +17 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +3 -3
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -1
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +2 -2
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -1
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +2 -2
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -1
- package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackDoor.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackDoor.lua +20 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts +11 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackEffect.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackEffect.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts +11 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackFamiliar.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts +11 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackGridEntity.lua +24 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +2 -2
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -1
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +2 -2
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -1
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +4 -4
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -1
- package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts +11 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackRevive.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackRevive.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +2 -2
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +134 -0
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +220 -0
- package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +39 -0
- package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +140 -0
- package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts +19 -0
- package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +52 -0
- package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts +16 -0
- package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/FlipDetection.lua +58 -0
- package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +27 -0
- package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +108 -0
- package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts +19 -0
- package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +69 -0
- package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts +46 -0
- package/dist/src/classes/features/callbackLogic/GridEntityDetection.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/GridEntityDetection.lua +126 -0
- package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts +24 -0
- package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +72 -0
- package/dist/src/classes/features/other/RunInNFrames.d.ts +123 -0
- package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -0
- package/dist/src/classes/features/other/RunInNFrames.lua +109 -0
- package/dist/src/classes/private/CustomCallback.d.ts +5 -11
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
- package/dist/src/classes/private/CustomCallback.lua +27 -17
- package/dist/src/classes/private/Feature.d.ts +19 -0
- package/dist/src/classes/private/Feature.d.ts.map +1 -0
- package/dist/src/classes/private/Feature.lua +16 -0
- package/dist/src/core/upgradeMod.d.ts +18 -1
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.lua +41 -22
- package/dist/src/decorators.d.ts +9 -0
- package/dist/src/decorators.d.ts.map +1 -0
- package/dist/src/decorators.lua +10 -0
- package/dist/src/enums/ISCFeature.d.ts +12 -0
- package/dist/src/enums/ISCFeature.d.ts.map +1 -0
- package/dist/src/enums/ISCFeature.lua +12 -0
- package/dist/src/enums/ModCallbackCustom2.d.ts +41 -5
- package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom2.lua +77 -5
- package/dist/src/features/customGridEntity.d.ts.map +1 -1
- package/dist/src/features/customGridEntity.lua +6 -8
- package/dist/src/features/customTrapdoor/touched.lua +1 -1
- package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
- package/dist/src/features/deployJSONRoom.lua +6 -8
- package/dist/src/features/saveDataManager/constants.d.ts +1 -1
- package/dist/src/features/saveDataManager/constants.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/exports.d.ts +5 -0
- package/dist/src/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/exports.lua +16 -0
- package/dist/src/features/saveDataManager/main.d.ts +5 -2
- package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/save.lua +2 -3
- package/dist/src/features.d.ts +34 -0
- package/dist/src/features.d.ts.map +1 -0
- package/dist/src/features.lua +68 -0
- package/dist/src/functions/characters.lua +3 -3
- package/dist/src/functions/charge.d.ts +30 -8
- package/dist/src/functions/charge.d.ts.map +1 -1
- package/dist/src/functions/charge.lua +38 -2
- package/dist/src/functions/chargeBar.d.ts +6 -0
- package/dist/src/functions/chargeBar.d.ts.map +1 -1
- package/dist/src/functions/chargeBar.lua +6 -0
- package/dist/src/functions/decorators.d.ts +19 -0
- package/dist/src/functions/decorators.d.ts.map +1 -0
- package/dist/src/functions/decorators.lua +32 -0
- package/dist/src/functions/flying.lua +4 -4
- package/dist/src/functions/gridEntities.lua +5 -5
- package/dist/src/functions/gridEntitiesSpecific.lua +12 -12
- package/dist/src/functions/itemPool.lua +2 -2
- package/dist/src/functions/playerHealth.lua +6 -6
- package/dist/src/functions/playerIndex.lua +2 -2
- package/dist/src/functions/players.d.ts +14 -3
- package/dist/src/functions/players.d.ts.map +1 -1
- package/dist/src/functions/players.lua +35 -16
- package/dist/src/functions/pocketItems.lua +1 -1
- package/dist/src/functions/rooms.d.ts +1 -1
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +1 -1
- package/dist/src/functions/run.d.ts +5 -0
- package/dist/src/functions/run.d.ts.map +1 -1
- package/dist/src/functions/run.lua +6 -0
- package/dist/src/functions/table.d.ts +2 -0
- package/dist/src/functions/table.d.ts.map +1 -1
- package/dist/src/functions/table.lua +7 -0
- package/dist/src/functions/trinkets.lua +1 -1
- package/dist/src/functions/tstlClass.d.ts +21 -9
- package/dist/src/functions/tstlClass.d.ts.map +1 -1
- package/dist/src/functions/tstlClass.lua +49 -24
- package/dist/src/functions/utils.d.ts +37 -0
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +36 -0
- package/dist/src/index.d.ts +12 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +17 -1
- package/dist/src/indexLua.d.ts +199 -0
- package/dist/src/indexLua.d.ts.map +1 -0
- package/dist/src/indexLua.lua +1354 -0
- package/dist/src/interfaces/SaveData.d.ts.map +1 -1
- package/dist/src/interfaces/{private/TSTLClassMetatable.d.ts → TSTLClassMetatable.d.ts} +0 -0
- package/dist/src/interfaces/TSTLClassMetatable.d.ts.map +1 -0
- package/dist/src/interfaces/{private/TSTLClassMetatable.lua → TSTLClassMetatable.lua} +0 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/dist/src/interfaces/private/AddCallbackParametersCustom.lua +3 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +148 -2
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -1
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +3 -0
- package/dist/src/maps/characterNameToTypeMap.lua +12 -12
- package/dist/src/objects/characterDamageMultipliers.lua +6 -6
- package/dist/src/objects/characterNames.lua +6 -6
- package/dist/src/objects/playerNamePNGFileNames.lua +6 -6
- package/dist/src/objects/playerPortraitPNGFileNames.lua +6 -6
- package/dist/src/sets/charactersThatStartWithAnActiveItemSet.lua +1 -1
- package/dist/src/sets/charactersWithFreeDevilDealsSet.d.ts.map +1 -1
- package/dist/src/sets/charactersWithFreeDevilDealsSet.lua +1 -1
- package/dist/src/sets/charactersWithNoRedHeartsSet.lua +3 -3
- package/dist/src/sets/charactersWithNoSoulHeartsSet.lua +2 -2
- package/dist/src/sets/lostStyleCharactersSet.lua +4 -4
- package/dist/src/types/AllButFirst.d.ts +5 -0
- package/dist/src/types/AllButFirst.d.ts.map +1 -0
- package/dist/src/types/AllButFirst.lua +2 -0
- package/dist/src/types/AllButLast.d.ts +2 -0
- package/dist/src/types/AllButLast.d.ts.map +1 -0
- package/dist/src/types/AllButLast.lua +2 -0
- package/dist/src/types/Constructor.d.ts +2 -0
- package/dist/src/types/Constructor.d.ts.map +1 -0
- package/dist/src/types/Constructor.lua +2 -0
- package/dist/src/types/FunctionTuple.d.ts +5 -0
- package/dist/src/types/FunctionTuple.d.ts.map +1 -0
- package/dist/src/types/FunctionTuple.lua +2 -0
- package/dist/src/types/HasAllEnumKeys.d.ts +26 -0
- package/dist/src/types/HasAllEnumKeys.d.ts.map +1 -0
- package/dist/src/types/HasAllEnumKeys.lua +2 -0
- package/dist/src/types/LowercaseKeys.d.ts +3 -0
- package/dist/src/types/LowercaseKeys.d.ts.map +1 -0
- package/dist/src/types/LowercaseKeys.lua +2 -0
- package/dist/src/types/StartsWithLowercase.d.ts +2 -0
- package/dist/src/types/StartsWithLowercase.d.ts.map +1 -0
- package/dist/src/types/StartsWithLowercase.lua +2 -0
- package/dist/src/types/StartsWithUppercase.d.ts +2 -0
- package/dist/src/types/StartsWithUppercase.d.ts.map +1 -0
- package/dist/src/types/StartsWithUppercase.lua +2 -0
- package/dist/src/types/UnionToIntersection.d.ts +3 -0
- package/dist/src/types/UnionToIntersection.d.ts.map +1 -0
- package/dist/src/types/UnionToIntersection.lua +2 -0
- package/dist/src/types/UppercaseKeys.d.ts +3 -0
- package/dist/src/types/UppercaseKeys.d.ts.map +1 -0
- package/dist/src/types/UppercaseKeys.lua +2 -0
- package/dist/src/types/private/CallbackTuple.d.ts +4 -4
- package/dist/src/types/private/CallbackTuple.d.ts.map +1 -1
- package/dist/src/types/private/MatchingCallbackCustom.d.ts +3 -1
- package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/callbacks/customRevive.ts +13 -1
- package/src/callbacks/postDoorRender.ts +2 -2
- package/src/callbacks/postEffectStateChanged.ts +3 -6
- package/src/callbacks/postFamiliarStateChanged.ts +3 -3
- package/src/callbacks/postFlip.ts +2 -2
- package/src/callbacks/postGridEntity.ts +3 -7
- package/src/callbacks/postNPCStateChanged.ts +3 -3
- package/src/callbacks/postPickupStateChanged.ts +3 -6
- package/src/callbacks/postPlayerCollectible.ts +8 -12
- package/src/callbacks/reorderedCallbacks.ts +6 -6
- package/src/callbacks/subscriptions/postGridEntityBroken.ts +4 -7
- package/src/callbacks/subscriptions/postGridEntityCollision.ts +4 -4
- package/src/callbacks/subscriptions/postGridEntityInit.ts +4 -7
- package/src/callbacks/subscriptions/postGridEntityRemove.ts +10 -9
- package/src/callbacks/subscriptions/postGridEntityRender.ts +4 -7
- package/src/callbacks/subscriptions/postGridEntityStateChanged.ts +4 -7
- package/src/callbacks/subscriptions/postGridEntityUpdate.ts +4 -7
- package/src/callbacks/subscriptions/postRockRender.ts +6 -7
- package/src/callbacks/subscriptions/postRockUpdate.ts +6 -7
- package/src/callbacks/subscriptions/postSpikesRender.ts +4 -7
- package/src/callbacks/subscriptions/postSpikesUpdate.ts +4 -7
- package/src/callbacks/subscriptions/postTNTRender.ts +4 -7
- package/src/callbacks/subscriptions/postTNTUpdate.ts +4 -7
- package/src/callbacks.ts +134 -0
- package/src/classes/DefaultMap.ts +3 -3
- package/src/classes/ModFeature.ts +14 -0
- package/src/classes/ModUpgraded.ts +150 -81
- package/src/classes/callbacks/PostAmbushFinished.ts +3 -3
- package/src/classes/callbacks/PostAmbushStarted.ts +3 -3
- package/src/classes/callbacks/PostBombExploded.ts +2 -2
- package/src/classes/callbacks/PostBombInitLate.ts +3 -3
- package/src/classes/callbacks/PostBoneSwing.ts +8 -5
- package/src/classes/callbacks/PostCollectibleEmpty.ts +5 -5
- package/src/classes/callbacks/PostCollectibleInitFirst.ts +3 -3
- package/src/classes/callbacks/PostCursedTeleport.ts +10 -7
- package/src/classes/callbacks/PostCustomRevive.ts +11 -0
- package/src/classes/callbacks/PostDiceRoomActivated.ts +68 -0
- package/src/classes/callbacks/PostDoorRender.ts +19 -0
- package/src/classes/callbacks/PostDoorUpdate.ts +19 -0
- package/src/classes/callbacks/PostEffectInitLate.ts +28 -0
- package/src/classes/callbacks/PostEffectStateChanged.ts +35 -0
- package/src/classes/callbacks/PostEsauJr.ts +11 -0
- package/src/classes/callbacks/PostFamiliarInitLate.ts +28 -0
- package/src/classes/callbacks/PostFamiliarStateChanged.ts +35 -0
- package/src/classes/callbacks/PostFirstEsauJr.ts +11 -0
- package/src/classes/callbacks/PostFirstFlip.ts +11 -0
- package/src/classes/callbacks/PostFlip.ts +11 -0
- package/src/classes/callbacks/PostGameStartedReordered.ts +11 -0
- package/src/classes/callbacks/PostGameStartedReorderedLast.ts +11 -0
- package/src/classes/callbacks/PostGreedModeWave.ts +37 -0
- package/src/classes/callbacks/PostGridEntityBroken.ts +11 -0
- package/src/classes/callbacks/PostGridEntityCollision.ts +65 -0
- package/src/classes/callbacks/PostGridEntityCustomBroken.ts +11 -0
- package/src/classes/callbacks/PostGridEntityCustomCollision.ts +53 -0
- package/src/classes/callbacks/PostGridEntityCustomInit.ts +11 -0
- package/src/classes/callbacks/PostGridEntityCustomRemove.ts +32 -0
- package/src/classes/callbacks/PostGridEntityCustomStateChanged.ts +11 -0
- package/src/classes/callbacks/PostGridEntityCustomUpdate.ts +11 -0
- package/src/classes/callbacks/PostGridEntityInit.ts +11 -0
- package/src/classes/callbacks/PostGridEntityRemove.ts +39 -0
- package/src/classes/callbacks/PostGridEntityStateChanged.ts +11 -0
- package/src/classes/callbacks/PostGridEntityUpdate.ts +11 -0
- package/src/classes/callbacks/PostHolyMantleRemoved.ts +45 -0
- package/src/classes/callbacks/PostKnifeInitLate.ts +3 -3
- package/src/classes/callbacks/PostNewLevelReordered.ts +11 -0
- package/src/classes/callbacks/PostNewRoomEarly.ts +7 -7
- package/src/classes/callbacks/PostNewRoomReordered.ts +11 -0
- package/src/classes/callbacks/PostPEffectUpdateReordered.ts +11 -0
- package/src/classes/callbacks/PostPitRender.ts +2 -2
- package/src/classes/callbacks/PostPlayerFatalDamage.ts +127 -0
- package/src/classes/callbacks/PostPlayerRenderReordered.ts +11 -0
- package/src/classes/callbacks/PostPlayerUpdateReordered.ts +11 -0
- package/src/classes/callbacks/PostRoomClearChanged.ts +4 -4
- package/src/classes/callbacks/PostSpikesRender.ts +2 -2
- package/src/classes/callbacks/PreBerserkDeath.ts +42 -0
- package/src/classes/callbacks/PreCustomRevive.ts +11 -0
- package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +3 -3
- package/src/classes/callbacks/validation/CustomCallbackBomb.ts +2 -2
- package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +2 -2
- package/src/classes/callbacks/validation/CustomCallbackDoor.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackEffect.ts +29 -0
- package/src/classes/callbacks/validation/CustomCallbackFamiliar.ts +30 -0
- package/src/classes/callbacks/validation/CustomCallbackGridEntity.ts +42 -0
- package/src/classes/callbacks/validation/CustomCallbackGridEntityCustom.ts +36 -0
- package/src/classes/callbacks/validation/CustomCallbackKnife.ts +2 -2
- package/src/classes/callbacks/validation/CustomCallbackPit.ts +2 -2
- package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +13 -3
- package/src/classes/callbacks/validation/CustomCallbackRevive.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +2 -2
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +398 -0
- package/src/classes/features/callbackLogic/CustomRevive.ts +214 -0
- package/src/classes/features/callbackLogic/EsauJrDetection.ts +98 -0
- package/src/classes/features/callbackLogic/FlipDetection.ts +82 -0
- package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +160 -0
- package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +90 -0
- package/src/classes/features/callbackLogic/GridEntityDetection.ts +231 -0
- package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +126 -0
- package/src/classes/features/other/RunInNFrames.ts +256 -0
- package/src/classes/private/CustomCallback.ts +29 -26
- package/src/classes/private/Feature.ts +24 -0
- package/src/core/upgradeMod.ts +71 -25
- package/src/decorators.ts +13 -0
- package/src/enums/ISCFeature.ts +47 -0
- package/src/enums/ModCallbackCustom2.ts +40 -0
- package/src/features/customGridEntity.ts +3 -7
- package/src/features/customTrapdoor/touched.ts +1 -1
- package/src/features/deployJSONRoom.ts +3 -7
- package/src/features/extraConsoleCommands/listCommands.ts +1 -1
- package/src/features/saveDataManager/constants.ts +1 -1
- package/src/features/saveDataManager/exports.ts +27 -0
- package/src/features/saveDataManager/main.ts +4 -6
- package/src/features/saveDataManager/save.ts +2 -2
- package/src/features.ts +90 -0
- package/src/functions/characters.ts +3 -3
- package/src/functions/charge.ts +30 -8
- package/src/functions/chargeBar.ts +6 -0
- package/src/functions/decorators.ts +45 -0
- package/src/functions/flying.ts +4 -4
- package/src/functions/gridEntities.ts +5 -5
- package/src/functions/gridEntitiesSpecific.ts +12 -12
- package/src/functions/itemPool.ts +2 -2
- package/src/functions/playerHealth.ts +6 -6
- package/src/functions/playerIndex.ts +2 -2
- package/src/functions/players.ts +26 -7
- package/src/functions/pocketItems.ts +1 -1
- package/src/functions/rooms.ts +1 -1
- package/src/functions/run.ts +12 -0
- package/src/functions/table.ts +11 -0
- package/src/functions/trinkets.ts +1 -1
- package/src/functions/tstlClass.ts +48 -24
- package/src/functions/utils.ts +49 -0
- package/src/index.ts +12 -1
- package/src/interfaces/SaveData.ts +4 -2
- package/src/interfaces/{private/TSTLClassMetatable.ts → TSTLClassMetatable.ts} +0 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +3 -0
- package/src/interfaces/private/AddCallbackParametersCustom2.ts +265 -1
- package/src/maps/characterNameToTypeMap.ts +12 -12
- package/src/objects/characterDamageMultipliers.ts +6 -6
- package/src/objects/characterNames.ts +6 -6
- package/src/objects/playerNamePNGFileNames.ts +6 -6
- package/src/objects/playerPortraitPNGFileNames.ts +6 -6
- package/src/sets/charactersThatStartWithAnActiveItemSet.ts +1 -1
- package/src/sets/charactersWithFreeDevilDealsSet.ts +1 -1
- package/src/sets/charactersWithNoRedHeartsSet.ts +3 -3
- package/src/sets/charactersWithNoSoulHeartsSet.ts +2 -2
- package/src/sets/lostStyleCharactersSet.ts +4 -4
- package/src/types/AllButFirst.ts +6 -0
- package/src/types/AllButLast.ts +3 -0
- package/src/types/Constructor.ts +2 -0
- package/src/types/FunctionTuple.ts +4 -0
- package/src/types/HasAllEnumKeys.ts +25 -0
- package/src/types/LowercaseKeys.ts +3 -0
- package/src/types/StartsWithLowercase.ts +3 -0
- package/src/types/StartsWithUppercase.ts +3 -0
- package/src/types/UnionToIntersection.ts +6 -0
- package/src/types/UppercaseKeys.ts +3 -0
- package/src/types/private/CallbackTuple.ts +4 -4
- package/src/types/private/MatchingCallbackCustom.ts +7 -1
- package/dist/src/enums/IsaacScriptCommonFeature.d.ts +0 -35
- package/dist/src/enums/IsaacScriptCommonFeature.d.ts.map +0 -1
- package/dist/src/enums/IsaacScriptCommonFeature.lua +0 -35
- package/dist/src/interfaces/private/TSTLClassMetatable.d.ts.map +0 -1
- package/src/enums/IsaacScriptCommonFeature.ts +0 -34
|
@@ -61,7 +61,7 @@ export function isCollectibleInItemPool(
|
|
|
61
61
|
|
|
62
62
|
// On Tainted Lost, it is impossible to retrieve non-offensive collectibles from pools, so we
|
|
63
63
|
// temporarily change the character to Isaac.
|
|
64
|
-
const taintedLosts = getPlayersOfType(PlayerType.
|
|
64
|
+
const taintedLosts = getPlayersOfType(PlayerType.LOST_B);
|
|
65
65
|
const isOffensive = collectibleHasTag(
|
|
66
66
|
collectibleType,
|
|
67
67
|
ItemConfigTag.OFFENSIVE,
|
|
@@ -108,7 +108,7 @@ export function isCollectibleInItemPool(
|
|
|
108
108
|
// Change any players back to Tainted Lost, if necessary.
|
|
109
109
|
if (changedPlayerTypes) {
|
|
110
110
|
for (const player of taintedLosts) {
|
|
111
|
-
player.ChangePlayerType(PlayerType.
|
|
111
|
+
player.ChangePlayerType(PlayerType.LOST_B);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -177,7 +177,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
|
|
|
177
177
|
const bloodCharges = player.GetEffectiveBloodCharge();
|
|
178
178
|
|
|
179
179
|
// The Forgotten and The Soul has special health, so we need to account for this.
|
|
180
|
-
if (character === PlayerType.
|
|
180
|
+
if (character === PlayerType.FORGOTTEN && subPlayer !== undefined) {
|
|
181
181
|
// The Forgotten does not have red heart containers.
|
|
182
182
|
maxHearts = boneHearts * 2;
|
|
183
183
|
boneHearts = 0;
|
|
@@ -185,7 +185,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
|
|
|
185
185
|
// The Forgotten will always have 0 soul hearts; we need to get the soul heart amount from the
|
|
186
186
|
// sub player.
|
|
187
187
|
soulHearts = subPlayer.GetSoulHearts();
|
|
188
|
-
} else if (character === PlayerType.
|
|
188
|
+
} else if (character === PlayerType.SOUL && subPlayer !== undefined) {
|
|
189
189
|
// The Soul will always have 0 bone hearts; we need to get the bone heart amount from the sub
|
|
190
190
|
// player. We need to store it as "maxHearts" instead of "boneHearts".
|
|
191
191
|
maxHearts = subPlayer.GetBoneHearts() * 2;
|
|
@@ -202,7 +202,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
|
|
|
202
202
|
const soulHeartTypes: SoulHeartType[] = [];
|
|
203
203
|
for (let i = 0; i < extraHearts; i++) {
|
|
204
204
|
let isBoneHeart = player.IsBoneHeart(i);
|
|
205
|
-
if (character === PlayerType.
|
|
205
|
+
if (character === PlayerType.FORGOTTEN && subPlayer !== undefined) {
|
|
206
206
|
isBoneHeart = subPlayer.IsBoneHeart(i);
|
|
207
207
|
}
|
|
208
208
|
if (isBoneHeart) {
|
|
@@ -210,7 +210,7 @@ export function getPlayerHealth(player: EntityPlayer): PlayerHealth {
|
|
|
210
210
|
} else {
|
|
211
211
|
// We need to add 1 here because only the second half of a black heart is considered black.
|
|
212
212
|
let isBlackHeart = player.IsBlackHeart(currentSoulHeart + 1);
|
|
213
|
-
if (character === PlayerType.
|
|
213
|
+
if (character === PlayerType.FORGOTTEN && subPlayer !== undefined) {
|
|
214
214
|
isBlackHeart = subPlayer.IsBlackHeart(currentSoulHeart + 1);
|
|
215
215
|
}
|
|
216
216
|
if (isBlackHeart) {
|
|
@@ -520,7 +520,7 @@ export function removeAllPlayerHealth(player: EntityPlayer): void {
|
|
|
520
520
|
|
|
521
521
|
// If we are The Soul, the `EntityPlayer.AddBoneHearts` method will not remove Forgotten's bone
|
|
522
522
|
// hearts, so we need to explicitly handle this.
|
|
523
|
-
if (isCharacter(player, PlayerType.
|
|
523
|
+
if (isCharacter(player, PlayerType.SOUL)) {
|
|
524
524
|
const forgotten = player.GetSubPlayer();
|
|
525
525
|
if (forgotten !== undefined) {
|
|
526
526
|
const forgottenBoneHearts = forgotten.GetBoneHearts();
|
|
@@ -559,7 +559,7 @@ export function setPlayerHealth(
|
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
// Add the red heart containers.
|
|
562
|
-
if (character === PlayerType.
|
|
562
|
+
if (character === PlayerType.SOUL && subPlayer !== undefined) {
|
|
563
563
|
// Adding health to The Soul is a special case.
|
|
564
564
|
subPlayer.AddMaxHearts(playerHealth.maxHearts, false);
|
|
565
565
|
} else {
|
|
@@ -6,7 +6,7 @@ const DEFAULT_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
|
|
|
6
6
|
|
|
7
7
|
const EXCLUDED_CHARACTERS: ReadonlySet<PlayerType> = new Set([
|
|
8
8
|
PlayerType.ESAU, // 20
|
|
9
|
-
PlayerType.
|
|
9
|
+
PlayerType.SOUL_B, // 40
|
|
10
10
|
]);
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -122,7 +122,7 @@ function getPlayerIndexCollectibleType(
|
|
|
122
122
|
) {
|
|
123
123
|
const character = player.GetPlayerType();
|
|
124
124
|
|
|
125
|
-
if (character === PlayerType.
|
|
125
|
+
if (character === PlayerType.SOUL) {
|
|
126
126
|
return differentiateForgottenAndSoul
|
|
127
127
|
? CollectibleType.INNER_EYE
|
|
128
128
|
: DEFAULT_COLLECTIBLE_TYPE;
|
package/src/functions/players.ts
CHANGED
|
@@ -299,6 +299,21 @@ export function getPlayerFromEntity(entity: Entity): EntityPlayer | undefined {
|
|
|
299
299
|
return entity.ToPlayer();
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Helper function to get an `EntityPlayer` object from an `EntityPtr`. Returns undefined if the
|
|
304
|
+
* entity has gone out of scope or if the associated entity is not a player.
|
|
305
|
+
*/
|
|
306
|
+
export function getPlayerFromPtr(
|
|
307
|
+
entityPtr: EntityPtr,
|
|
308
|
+
): EntityPlayer | undefined {
|
|
309
|
+
const entity = entityPtr.Ref;
|
|
310
|
+
if (entity === undefined) {
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return entity.ToPlayer();
|
|
315
|
+
}
|
|
316
|
+
|
|
302
317
|
/**
|
|
303
318
|
* Helper function to get the proper name of the player. Use this instead of the
|
|
304
319
|
* `EntityPlayer.GetName` method because it accounts for Blue Baby, Lazarus II, and Tainted
|
|
@@ -442,7 +457,7 @@ export function hasLostCurse(player: EntityPlayer): boolean {
|
|
|
442
457
|
* items. (Only Tainted Forgotten can pick up items.)
|
|
443
458
|
*/
|
|
444
459
|
export function hasOpenActiveItemSlot(player: EntityPlayer): boolean {
|
|
445
|
-
if (isCharacter(player, PlayerType.
|
|
460
|
+
if (isCharacter(player, PlayerType.SOUL_B)) {
|
|
446
461
|
return false;
|
|
447
462
|
}
|
|
448
463
|
|
|
@@ -460,9 +475,15 @@ export function hasOpenActiveItemSlot(player: EntityPlayer): boolean {
|
|
|
460
475
|
return activeItemPrimary === CollectibleType.NULL;
|
|
461
476
|
}
|
|
462
477
|
|
|
478
|
+
/**
|
|
479
|
+
* Helper function to check if the active slot of a particular player is empty.
|
|
480
|
+
*
|
|
481
|
+
* @param player The player to check.
|
|
482
|
+
* @param activeSlot Optional. The active slot to check. Default is `ActiveSlot.PRIMARY`.
|
|
483
|
+
*/
|
|
463
484
|
export function isActiveSlotEmpty(
|
|
464
485
|
player: EntityPlayer,
|
|
465
|
-
activeSlot
|
|
486
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
466
487
|
): boolean {
|
|
467
488
|
const activeCollectibleType = player.GetActiveItem(activeSlot);
|
|
468
489
|
return activeCollectibleType === CollectibleType.NULL;
|
|
@@ -546,9 +567,7 @@ export function isKeeper(player: EntityPlayer): boolean {
|
|
|
546
567
|
export function isLost(player: EntityPlayer): boolean {
|
|
547
568
|
const character = player.GetPlayerType();
|
|
548
569
|
|
|
549
|
-
return
|
|
550
|
-
character === PlayerType.THE_LOST || character === PlayerType.THE_LOST_B
|
|
551
|
-
);
|
|
570
|
+
return character === PlayerType.LOST || character === PlayerType.LOST_B;
|
|
552
571
|
}
|
|
553
572
|
|
|
554
573
|
export function isModdedPlayer(player: EntityPlayer): boolean {
|
|
@@ -714,7 +733,7 @@ export function removeTrinketCostume(
|
|
|
714
733
|
*
|
|
715
734
|
* @param player The player to give the item to.
|
|
716
735
|
* @param collectibleType The collectible type of the item to give.
|
|
717
|
-
* @param activeSlot The slot to set.
|
|
736
|
+
* @param activeSlot Optional. The slot to set. Default is `ActiveSlot.PRIMARY`.
|
|
718
737
|
* @param charge Optional. The argument of charges to set. If not specified, the item will be set
|
|
719
738
|
* with maximum charges.
|
|
720
739
|
* @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
|
|
@@ -722,7 +741,7 @@ export function removeTrinketCostume(
|
|
|
722
741
|
export function setActiveItem(
|
|
723
742
|
player: EntityPlayer,
|
|
724
743
|
collectibleType: CollectibleType,
|
|
725
|
-
activeSlot
|
|
744
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
726
745
|
charge?: int,
|
|
727
746
|
keepInPools = false,
|
|
728
747
|
): void {
|
|
@@ -124,7 +124,7 @@ export function getPocketItems(player: EntityPlayer): PocketItemDescription[] {
|
|
|
124
124
|
* items. (Only Tainted Forgotten can pick up items.)
|
|
125
125
|
*/
|
|
126
126
|
export function hasOpenPocketItemSlot(player: EntityPlayer): boolean {
|
|
127
|
-
if (isCharacter(player, PlayerType.
|
|
127
|
+
if (isCharacter(player, PlayerType.SOUL_B)) {
|
|
128
128
|
return false;
|
|
129
129
|
}
|
|
130
130
|
|
package/src/functions/rooms.ts
CHANGED
|
@@ -546,7 +546,7 @@ export function roomUpdateSafe(): void {
|
|
|
546
546
|
setEntityVelocities(entityVelocities, entities);
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
-
/** Helper function to set the backdrop of the current room. */
|
|
549
|
+
/** Helper function to set the backdrop (i.e. background) of the current room. */
|
|
550
550
|
export function setBackdrop(backdropType: BackdropType): void {
|
|
551
551
|
game.ShowHallucination(0, backdropType);
|
|
552
552
|
sfxManager.Stop(SoundEffect.DEATH_CARD);
|
package/src/functions/run.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Challenge,
|
|
3
|
+
Difficulty,
|
|
3
4
|
PlayerType,
|
|
4
5
|
SlotVariant,
|
|
5
6
|
} from "isaac-typescript-definitions";
|
|
@@ -26,6 +27,17 @@ export function canRunUnlockAchievements(): boolean {
|
|
|
26
27
|
return canUnlockAchievements;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
32
|
+
* `Difficulty.GREEDIER`.
|
|
33
|
+
*/
|
|
34
|
+
export function isGreedMode(): boolean {
|
|
35
|
+
return (
|
|
36
|
+
game.Difficulty === Difficulty.GREED ||
|
|
37
|
+
game.Difficulty === Difficulty.GREEDIER
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
/**
|
|
30
42
|
* Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
|
|
31
43
|
* pressing tab on the character selection screen). When the player resets the game on a set seed,
|
package/src/functions/table.ts
CHANGED
|
@@ -136,6 +136,17 @@ export function getStringsFromTable(
|
|
|
136
136
|
return strings;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/** Helper function to check if a Lua table has 0 keys. */
|
|
140
|
+
export function isTableEmpty(luaMap: LuaMap<AnyNotNil, unknown>): boolean {
|
|
141
|
+
// Using `next` does not seem to work properly, so we use `pairs` instead.
|
|
142
|
+
// eslint-disable-next-line no-unreachable-loop
|
|
143
|
+
for (const [_key, _value] of pairs(luaMap)) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
|
|
139
150
|
/**
|
|
140
151
|
* Helper function to iterate over a table deterministically. This is useful because by default, the
|
|
141
152
|
* `pairs` function will return the keys of a Lua table in a random order.
|
|
@@ -156,7 +156,7 @@ export function getVanillaTrinketTypes(): TrinketType[] {
|
|
|
156
156
|
* items. (Only Tainted Forgotten can pick up items.)
|
|
157
157
|
*/
|
|
158
158
|
export function hasOpenTrinketSlot(player: EntityPlayer): boolean {
|
|
159
|
-
if (isCharacter(player, PlayerType.
|
|
159
|
+
if (isCharacter(player, PlayerType.SOUL_B)) {
|
|
160
160
|
return false;
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DefaultMap } from "../classes/DefaultMap";
|
|
2
|
-
import { TSTLClassMetatable } from "../interfaces/
|
|
2
|
+
import { TSTLClassMetatable } from "../interfaces/TSTLClassMetatable";
|
|
3
|
+
import { FunctionTuple } from "../types/FunctionTuple";
|
|
3
4
|
import { TSTLClass } from "../types/TSTLClass";
|
|
4
5
|
import { isString, isTable } from "./types";
|
|
5
6
|
|
|
@@ -12,16 +13,14 @@ const TSTL_CLASS_METATABLE_KEYS: ReadonlySet<string> = new Set([
|
|
|
12
13
|
]);
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
|
-
* Helper function to get the
|
|
16
|
-
*
|
|
17
|
-
* "constructor.name" metatable key.
|
|
16
|
+
* Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
|
|
17
|
+
* located on the metatable.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* Returns undefined if the object is not a table or if the aforementioned metatable key does not
|
|
22
|
-
* exist.
|
|
19
|
+
* Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
23
20
|
*/
|
|
24
|
-
export function
|
|
21
|
+
export function getTSTLClassConstructor(
|
|
22
|
+
object: unknown,
|
|
23
|
+
): TSTLClassMetatable["constructor"] | undefined {
|
|
25
24
|
if (!isTable(object)) {
|
|
26
25
|
return undefined;
|
|
27
26
|
}
|
|
@@ -31,8 +30,35 @@ export function getTSTLClassName(object: unknown): string | undefined {
|
|
|
31
30
|
return undefined;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
return metatable.constructor;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function getTSTLClassMethods(object: unknown): FunctionTuple[] {
|
|
37
|
+
const constructor = getTSTLClassConstructor(object);
|
|
38
|
+
if (constructor === undefined) {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const classEntries = Object.entries(constructor.prototype);
|
|
43
|
+
return classEntries.filter(
|
|
44
|
+
([key, value]) =>
|
|
45
|
+
// Ignore the stock TSTL keys that are baked into every class.
|
|
46
|
+
!TSTL_CLASS_METATABLE_KEYS.has(key) && type(value) === "function",
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Helper function to get the name of a TypeScriptToLua class from the instantiated class object.
|
|
52
|
+
*
|
|
53
|
+
* TSTL classes are Lua tables created with the `__TS__Class` Lua function from the TSTL lualib.
|
|
54
|
+
* Their name is contained within "constructor.name" metatable key.
|
|
55
|
+
*
|
|
56
|
+
* For example, a `Map` class is has a name of "Map".
|
|
57
|
+
*
|
|
58
|
+
* Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
59
|
+
*/
|
|
60
|
+
export function getTSTLClassName(object: unknown): string | undefined {
|
|
61
|
+
const constructor = getTSTLClassConstructor(object);
|
|
36
62
|
if (constructor === undefined) {
|
|
37
63
|
return undefined;
|
|
38
64
|
}
|
|
@@ -64,8 +90,9 @@ export function isIsaacScriptCommonClass(object: unknown): boolean {
|
|
|
64
90
|
/**
|
|
65
91
|
* Helper function to determine if a given object is a TypeScriptToLua `Map`.
|
|
66
92
|
*
|
|
67
|
-
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
68
|
-
* their own
|
|
93
|
+
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
94
|
+
* might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
95
|
+
* `Map`.
|
|
69
96
|
*/
|
|
70
97
|
export function isTSTLMap(object: unknown): object is Map<AnyNotNil, unknown> {
|
|
71
98
|
const className = getTSTLClassName(object);
|
|
@@ -75,8 +102,9 @@ export function isTSTLMap(object: unknown): object is Map<AnyNotNil, unknown> {
|
|
|
75
102
|
/**
|
|
76
103
|
* Helper function to determine if a given object is a TypeScriptToLua `Set`.
|
|
77
104
|
*
|
|
78
|
-
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
79
|
-
* their own
|
|
105
|
+
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
106
|
+
* might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
107
|
+
* `Set`.
|
|
80
108
|
*/
|
|
81
109
|
export function isTSTLSet(object: unknown): object is Set<AnyNotNil> {
|
|
82
110
|
const className = getTSTLClassName(object);
|
|
@@ -134,22 +162,18 @@ export function isVanillaTSTLClass(object: unknown): boolean {
|
|
|
134
162
|
* class.
|
|
135
163
|
*/
|
|
136
164
|
export function newTSTLClass(oldClass: TSTLClass): TSTLClass {
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
165
|
+
const constructor = getTSTLClassConstructor(oldClass);
|
|
166
|
+
if (constructor === undefined) {
|
|
139
167
|
error(
|
|
140
|
-
"Failed to instantiate a new TypeScriptToLua class since the provided old class does not have a metatable.",
|
|
168
|
+
"Failed to instantiate a new TypeScriptToLua class since the provided old class does not have a metatable/constructor.",
|
|
141
169
|
);
|
|
142
170
|
}
|
|
143
171
|
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/** This is a re-implementation of the transpiled "__TS__New" function. */
|
|
148
|
-
function newTSTLClassFromMetatable(metatable: TSTLClassMetatable): TSTLClass {
|
|
172
|
+
// We re-implement some of the logic from the transpiled "__TS__New" function.
|
|
149
173
|
const newClass = new LuaMap<AnyNotNil, unknown>();
|
|
150
174
|
const newClassMetatable = setmetatable(
|
|
151
175
|
newClass,
|
|
152
|
-
|
|
176
|
+
constructor.prototype,
|
|
153
177
|
) as unknown as TSTLClassMetatable;
|
|
154
178
|
newClassMetatable.____constructor(); // eslint-disable-line no-underscore-dangle
|
|
155
179
|
|
package/src/functions/utils.ts
CHANGED
|
@@ -94,6 +94,22 @@ export function isVanillaConsoleCommand(commandName: string): boolean {
|
|
|
94
94
|
return CONSOLE_COMMANDS_SET.has(commandName);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Helper function for creating objects that represent a mapping of an enum value to some other
|
|
99
|
+
* value in a type-safe way.
|
|
100
|
+
*
|
|
101
|
+
* This function will ensure that the provided object has a key for each value in the enum.
|
|
102
|
+
*
|
|
103
|
+
* After the `satisfies` operator is released in TypeScript 4.9, this function should be deleted.
|
|
104
|
+
*/
|
|
105
|
+
export function newObjectWithEnumKeys<
|
|
106
|
+
Enum extends number | string,
|
|
107
|
+
T extends Record<Enum, unknown>,
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
109
|
+
>(theEnum: Record<string, Enum>, obj: T): T {
|
|
110
|
+
return obj;
|
|
111
|
+
}
|
|
112
|
+
|
|
97
113
|
/**
|
|
98
114
|
* Helper function to print something to the in-game console. Use this instead of invoking the
|
|
99
115
|
* `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
|
|
@@ -186,3 +202,36 @@ export function twoDimensionalSort<T>(array1: T[], array2: T[]): -1 | 0 | 1 {
|
|
|
186
202
|
|
|
187
203
|
return firstElement1 < firstElement2 ? -1 : 1;
|
|
188
204
|
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
208
|
+
* specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
209
|
+
* the enum).
|
|
210
|
+
*
|
|
211
|
+
* For example:
|
|
212
|
+
*
|
|
213
|
+
* ```ts
|
|
214
|
+
* enum MyEnum {
|
|
215
|
+
* Value1,
|
|
216
|
+
* Value2,
|
|
217
|
+
* Value3,
|
|
218
|
+
* }
|
|
219
|
+
*
|
|
220
|
+
* interface MyEnumToType {
|
|
221
|
+
* [MyEnum.Value1]: boolean;
|
|
222
|
+
* [MyEnum.Value2]: number;
|
|
223
|
+
* [MyEnum.Value3]: string;
|
|
224
|
+
* }
|
|
225
|
+
*
|
|
226
|
+
* validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
|
|
227
|
+
* ```
|
|
228
|
+
*
|
|
229
|
+
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
230
|
+
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
231
|
+
* `newObjectWithEnumKeys` helper function instead.
|
|
232
|
+
*/
|
|
233
|
+
export function validateInterfaceMatchesEnum<
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
235
|
+
T extends Record<Enum, unknown>,
|
|
236
|
+
Enum extends string | number,
|
|
237
|
+
>(): void {}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./classes/DefaultMap";
|
|
2
|
+
export * from "./classes/ModFeature";
|
|
2
3
|
export * from "./classes/ModUpgraded";
|
|
3
4
|
export * from "./core/cachedClasses";
|
|
4
5
|
export * from "./core/constants";
|
|
@@ -7,7 +8,7 @@ export * from "./core/upgradeMod";
|
|
|
7
8
|
export * from "./enums/AmbushType";
|
|
8
9
|
export * from "./enums/CornerType";
|
|
9
10
|
export * from "./enums/HealthType";
|
|
10
|
-
export * from "./enums/
|
|
11
|
+
export * from "./enums/ISCFeature";
|
|
11
12
|
export * from "./enums/LadderSubTypeCustom";
|
|
12
13
|
export * from "./enums/ModCallbackCustom";
|
|
13
14
|
export * from "./enums/ModCallbackCustom2";
|
|
@@ -68,6 +69,7 @@ export * from "./functions/collectibleTag";
|
|
|
68
69
|
export * from "./functions/color";
|
|
69
70
|
export * from "./functions/curses";
|
|
70
71
|
export * from "./functions/debugFunctions";
|
|
72
|
+
export * from "./functions/decorators";
|
|
71
73
|
export * from "./functions/deepCopy";
|
|
72
74
|
export * from "./functions/deepCopyTests";
|
|
73
75
|
export * from "./functions/dev";
|
|
@@ -174,13 +176,22 @@ export * from "./maps/pillNameToEffectMap";
|
|
|
174
176
|
export * from "./maps/roomNameToTypeMap";
|
|
175
177
|
export * from "./objects/colors";
|
|
176
178
|
export * from "./objects/kColors";
|
|
179
|
+
export * from "./types/AllButFirst";
|
|
180
|
+
export * from "./types/AllButLast";
|
|
177
181
|
export * from "./types/AnyEntity";
|
|
178
182
|
export * from "./types/AnyGridEntity";
|
|
179
183
|
export * from "./types/CollectibleIndex";
|
|
184
|
+
export * from "./types/Constructor";
|
|
185
|
+
export * from "./types/FunctionTuple";
|
|
186
|
+
export * from "./types/HasAllEnumKeys";
|
|
180
187
|
export * from "./types/Immutable";
|
|
188
|
+
export * from "./types/LowercaseKeys";
|
|
181
189
|
export * from "./types/PickingUpItem";
|
|
182
190
|
export * from "./types/PickupIndex";
|
|
183
191
|
export * from "./types/PlayerIndex";
|
|
184
192
|
export * from "./types/PossibleStatType";
|
|
193
|
+
export * from "./types/StartsWithLowercase";
|
|
194
|
+
export * from "./types/StartsWithUppercase";
|
|
185
195
|
export * from "./types/TSTLClass";
|
|
196
|
+
export * from "./types/UppercaseKeys";
|
|
186
197
|
export * from "./types/WeightedArray";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
2
|
+
/* eslint-disable class-methods-use-this */
|
|
1
3
|
/* eslint-disable max-classes-per-file */
|
|
2
4
|
|
|
3
5
|
import { CopyableIsaacAPIClass } from "../objects/isaacAPIClassTypeToFunctions";
|
|
@@ -233,7 +235,7 @@ function test<Persistent, Run, Level>(
|
|
|
233
235
|
{
|
|
234
236
|
class Foo {
|
|
235
237
|
someField = 123;
|
|
236
|
-
someMethod() {}
|
|
238
|
+
someMethod() {}
|
|
237
239
|
}
|
|
238
240
|
|
|
239
241
|
const saveDataWithClassWithMethod = {
|
|
@@ -264,7 +266,7 @@ function test<Persistent, Run, Level>(
|
|
|
264
266
|
{
|
|
265
267
|
class Foo {
|
|
266
268
|
someField = 123;
|
|
267
|
-
someMethod() {}
|
|
269
|
+
someMethod() {}
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
const saveDataWithNestedClass = {
|
|
File without changes
|
|
@@ -92,6 +92,7 @@ import { PreGetPedestalRegisterParameters } from "../../callbacks/subscriptions/
|
|
|
92
92
|
import { PreItemPickupRegisterParameters } from "../../callbacks/subscriptions/preItemPickup";
|
|
93
93
|
import { PreNewLevelRegisterParameters } from "../../callbacks/subscriptions/preNewLevel";
|
|
94
94
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
95
|
+
import { validateInterfaceMatchesEnum } from "../../functions/utils";
|
|
95
96
|
|
|
96
97
|
export interface AddCallbackParametersCustom {
|
|
97
98
|
[ModCallbackCustom.POST_AMBUSH_FINISHED]: PostAmbushFinishedRegisterParameters;
|
|
@@ -188,3 +189,5 @@ export interface AddCallbackParametersCustom {
|
|
|
188
189
|
[ModCallbackCustom.PRE_ITEM_PICKUP]: PreItemPickupRegisterParameters;
|
|
189
190
|
[ModCallbackCustom.PRE_NEW_LEVEL]: PreNewLevelRegisterParameters;
|
|
190
191
|
}
|
|
192
|
+
|
|
193
|
+
validateInterfaceMatchesEnum<AddCallbackParametersCustom, ModCallbackCustom>();
|