isaacscript-common 13.3.4 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1644 -441
- package/dist/isaacscript-common.lua +19643 -16276
- package/dist/src/callbacks/customRevive.lua +10 -1
- package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
- package/dist/src/callbacks/postAmbush.lua +7 -12
- package/dist/src/callbacks/postBombExploded.lua +3 -3
- 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/postRoomClearChanged.d.ts.map +1 -1
- package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
- package/dist/src/callbacks/reorderedCallbacks.lua +7 -7
- package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
- package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
- package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
- package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
- package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
- 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/postHolyMantleRemoved.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
- package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
- 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 +49 -11
- package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
- package/dist/src/classes/ModUpgraded.lua +118 -16
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
- package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
- package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts +14 -0
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +20 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
- 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 +12 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
- 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 +13 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
- 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 +7 -0
- package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
- 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 +13 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
- 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 +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
- 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 +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
- 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 +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
- 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 +26 -0
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
- package/dist/src/classes/private/CustomCallback.lua +63 -0
- 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 +44 -9
- package/dist/src/decorators.d.ts +9 -0
- package/dist/src/decorators.d.ts.map +1 -0
- package/dist/src/decorators.lua +12 -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/LadderSubTypeCustom.d.ts +17 -0
- package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
- package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +85 -87
- package/dist/src/enums/ModCallbackCustom2.d.ts +53 -0
- package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
- package/dist/src/enums/ModCallbackCustom2.lua +102 -0
- package/dist/src/features/customGridEntity.d.ts.map +1 -1
- package/dist/src/features/customGridEntity.lua +6 -8
- package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
- package/dist/src/features/customHotkeys.d.ts.map +1 -0
- package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
- package/dist/src/features/customPickup.d.ts.map +1 -1
- package/dist/src/features/customPickup.lua +6 -2
- package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/src/features/customStage/backdrop.lua +3 -1
- package/dist/src/features/customStage/shadows.d.ts.map +1 -1
- package/dist/src/features/customStage/shadows.lua +3 -1
- package/dist/src/features/customTrapdoor/init.lua +1 -7
- 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/firstLast.d.ts.map +1 -1
- package/dist/src/features/firstLast.lua +3 -3
- 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 +8 -2
- package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/main.lua +3 -5
- 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/ambush.d.ts +6 -0
- package/dist/src/functions/ambush.d.ts.map +1 -1
- package/dist/src/functions/ambush.lua +31 -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/minimap.d.ts +4 -0
- package/dist/src/functions/minimap.d.ts.map +1 -1
- package/dist/src/functions/minimap.lua +4 -0
- 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/roomTransition.d.ts +3 -4
- package/dist/src/functions/roomTransition.d.ts.map +1 -1
- package/dist/src/functions/roomTransition.lua +4 -32
- 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/spawnCollectible.d.ts +24 -5
- package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/src/functions/spawnCollectible.lua +44 -4
- 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 +44 -2
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +43 -2
- package/dist/src/index.d.ts +15 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +42 -10
- package/dist/src/initCustomCallbacks.d.ts.map +1 -1
- package/dist/src/initCustomCallbacks.lua +0 -3
- package/dist/src/initFeatures.lua +3 -3
- 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/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
- package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +3 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +201 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +7 -0
- package/dist/src/maps/characterNameToTypeMap.lua +12 -12
- package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
- package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
- 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/AllButFirst.d.ts +5 -0
- package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
- package/dist/src/types/private/AllButFirst.lua +2 -0
- package/dist/src/types/private/CallbackTuple.d.ts +20 -0
- package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
- package/dist/src/types/private/CallbackTuple.lua +2 -0
- package/dist/src/types/private/MatchingCallbackCustom.d.ts +16 -0
- package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
- package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
- package/package.json +2 -2
- package/src/callbacks/customRevive.ts +13 -1
- package/src/callbacks/postAmbush.ts +7 -14
- package/src/callbacks/postBombExploded.ts +1 -1
- package/src/callbacks/postBoneSwing.ts +2 -1
- package/src/callbacks/postCollectibleEmpty.ts +2 -0
- package/src/callbacks/postCollectibleInitFirst.ts +2 -0
- 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/postNewRoomEarly.ts +1 -1
- package/src/callbacks/postPickupStateChanged.ts +3 -6
- package/src/callbacks/postPlayerCollectible.ts +8 -12
- package/src/callbacks/postRoomClearChanged.ts +3 -7
- package/src/callbacks/reorderedCallbacks.ts +6 -6
- package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
- package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
- package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
- package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
- 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/postHolyMantleRemoved.ts +9 -2
- package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
- 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 +205 -45
- package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
- package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
- package/src/classes/callbacks/PostBombExploded.ts +21 -0
- package/src/classes/callbacks/PostBombInitLate.ts +28 -0
- package/src/classes/callbacks/PostBoneSwing.ts +61 -0
- package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
- package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
- package/src/classes/callbacks/PostCursedTeleport.ts +186 -0
- 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 +28 -0
- package/src/classes/callbacks/PostNewLevelReordered.ts +11 -0
- package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
- package/src/classes/callbacks/PostNewRoomReordered.ts +11 -0
- package/src/classes/callbacks/PostPEffectUpdateReordered.ts +11 -0
- package/src/classes/callbacks/PostPitRender.ts +21 -0
- 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 +40 -0
- package/src/classes/callbacks/PostSpikesRender.ts +21 -0
- package/src/classes/callbacks/PreBerserkDeath.ts +42 -0
- package/src/classes/callbacks/PreCustomRevive.ts +11 -0
- package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
- 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 +27 -0
- package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +47 -0
- package/src/classes/callbacks/validation/CustomCallbackRevive.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
- 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 +82 -0
- package/src/classes/private/Feature.ts +24 -0
- package/src/core/upgradeMod.ts +77 -17
- package/src/decorators.ts +13 -0
- package/src/enums/ISCFeature.ts +47 -0
- package/src/enums/LadderSubTypeCustom.ts +17 -0
- package/src/enums/ModCallbackCustom.ts +314 -243
- package/src/enums/ModCallbackCustom2.ts +57 -0
- package/src/features/customGridEntity.ts +3 -7
- package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
- package/src/features/customPickup.ts +4 -2
- package/src/features/customStage/backdrop.ts +2 -1
- package/src/features/customStage/shadows.ts +2 -1
- package/src/features/customTrapdoor/init.ts +0 -1
- 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/firstLast.ts +3 -7
- package/src/features/saveDataManager/constants.ts +1 -1
- package/src/features/saveDataManager/exports.ts +27 -0
- package/src/features/saveDataManager/main.ts +30 -21
- package/src/features/saveDataManager/save.ts +2 -2
- package/src/features.ts +90 -0
- package/src/functions/ambush.ts +26 -1
- 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/minimap.ts +4 -0
- 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/roomTransition.ts +3 -27
- package/src/functions/rooms.ts +1 -1
- package/src/functions/run.ts +12 -0
- package/src/functions/spawnCollectible.ts +44 -4
- 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 +56 -2
- package/src/index.ts +15 -2
- package/src/initCustomCallbacks.ts +1 -2
- package/src/initFeatures.ts +2 -2
- package/src/interfaces/SaveData.ts +4 -2
- package/src/interfaces/{private/TSTLClassMetatable.ts → TSTLClassMetatable.ts} +0 -0
- package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +4 -23
- package/src/interfaces/private/AddCallbackParametersCustom2.ts +343 -0
- package/src/maps/characterNameToTypeMap.ts +12 -12
- package/src/objects/callbackRegisterFunctions.ts +2 -4
- 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/AllButFirst.ts +6 -0
- package/src/types/private/CallbackTuple.ts +21 -0
- package/src/types/private/MatchingCallbackCustom.ts +32 -0
- package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
- package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
- package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
- package/dist/src/classes/CustomCallback.d.ts +0 -8
- package/dist/src/classes/CustomCallback.d.ts.map +0 -1
- package/dist/src/classes/CustomCallback.lua +0 -28
- package/dist/src/features/customDoor.d.ts +0 -51
- package/dist/src/features/customDoor.d.ts.map +0 -1
- package/dist/src/features/customDoor.lua +0 -53
- package/dist/src/features/setHotkey.d.ts.map +0 -1
- package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
- package/dist/src/interfaces/private/TSTLClassMetatable.d.ts.map +0 -1
- package/src/callbacks/postCustomDoorEnter.ts +0 -250
- package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
- package/src/classes/CustomCallback.ts +0 -23
- package/src/features/customDoor.ts +0 -66
package/src/functions/charge.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { getRoomShapeCharges } from "./roomShape";
|
|
|
25
25
|
* - AAA Battery
|
|
26
26
|
*
|
|
27
27
|
* @param player The player to grant the charges to.
|
|
28
|
-
* @param activeSlot The slot to grant the charges to.
|
|
28
|
+
* @param activeSlot Optional. The slot to grant the charges to. Default is `ActiveSlot.PRIMARY`.
|
|
29
29
|
* @param numCharges Optional. The amount of charges to grant. Default is 1.
|
|
30
30
|
* @param playSoundEffect Optional. Whether to play a charge-related sound effect. Default is true.
|
|
31
31
|
* @returns The amount of charges that were actually granted. For example, if the active item was
|
|
@@ -34,7 +34,7 @@ import { getRoomShapeCharges } from "./roomShape";
|
|
|
34
34
|
*/
|
|
35
35
|
export function addCharge(
|
|
36
36
|
player: EntityPlayer,
|
|
37
|
-
activeSlot
|
|
37
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
38
38
|
numCharges = 1,
|
|
39
39
|
playSoundEffect = true,
|
|
40
40
|
): int {
|
|
@@ -116,7 +116,8 @@ export function addRoomClearCharge(
|
|
|
116
116
|
* - Not charging active items with `chargetype="special"`
|
|
117
117
|
*
|
|
118
118
|
* @param player The player to grant the charges to.
|
|
119
|
-
* @param activeSlot The active item slot to grant the charges to.
|
|
119
|
+
* @param activeSlot Optional. The active item slot to grant the charges to. Default is
|
|
120
|
+
* `ActiveSlot.PRIMARY`.
|
|
120
121
|
* @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
|
|
121
122
|
* room for the purposes of calculating how much charge to grant. Default
|
|
122
123
|
* is true.
|
|
@@ -124,7 +125,7 @@ export function addRoomClearCharge(
|
|
|
124
125
|
*/
|
|
125
126
|
export function addRoomClearChargeToSlot(
|
|
126
127
|
player: EntityPlayer,
|
|
127
|
-
activeSlot
|
|
128
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
128
129
|
bigRoomDoubleCharge = true,
|
|
129
130
|
playSoundEffect = true,
|
|
130
131
|
): void {
|
|
@@ -202,10 +203,13 @@ export function addRoomClearCharges(bigRoomDoubleCharge = true): void {
|
|
|
202
203
|
* This function accounts for The Battery. For example, if the player has 2/6 charges on a D6, this
|
|
203
204
|
* function will return 10 (because there are 4 charges remaining on the base charge and 6 charges
|
|
204
205
|
* remaining on The Battery charge).
|
|
206
|
+
*
|
|
207
|
+
* @param player The player to get the charges from.
|
|
208
|
+
* @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
|
|
205
209
|
*/
|
|
206
210
|
export function getChargesAwayFromMax(
|
|
207
211
|
player: EntityPlayer,
|
|
208
|
-
activeSlot
|
|
212
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
209
213
|
): int {
|
|
210
214
|
const totalCharge = getTotalCharge(player, activeSlot);
|
|
211
215
|
const activeItem = player.GetActiveItem(activeSlot);
|
|
@@ -220,10 +224,13 @@ export function getChargesAwayFromMax(
|
|
|
220
224
|
* Helper function to get the combined normal charge and the battery charge for the player's active
|
|
221
225
|
* item. This is useful because you have to add these two values together when setting the active
|
|
222
226
|
* charge.
|
|
227
|
+
*
|
|
228
|
+
* @param player The player to get the charges from.
|
|
229
|
+
* @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
|
|
223
230
|
*/
|
|
224
231
|
export function getTotalCharge(
|
|
225
232
|
player: EntityPlayer,
|
|
226
|
-
activeSlot
|
|
233
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
227
234
|
): int {
|
|
228
235
|
const activeCharge = player.GetActiveCharge(activeSlot);
|
|
229
236
|
const batteryCharge = player.GetBatteryCharge(activeSlot);
|
|
@@ -231,9 +238,16 @@ export function getTotalCharge(
|
|
|
231
238
|
return activeCharge + batteryCharge;
|
|
232
239
|
}
|
|
233
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Helper function to check if a player's active item is "double charged", meaning that it has both
|
|
243
|
+
* a full normal charge and a full charge from The Battery.
|
|
244
|
+
*
|
|
245
|
+
* @param player The player to check.
|
|
246
|
+
* @param activeSlot Optional. The slot to check. Default is `ActiveSlot.PRIMARY`.
|
|
247
|
+
*/
|
|
234
248
|
export function isActiveSlotDoubleCharged(
|
|
235
249
|
player: EntityPlayer,
|
|
236
|
-
activeSlot
|
|
250
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
237
251
|
): boolean {
|
|
238
252
|
const collectibleType = player.GetActiveItem(activeSlot);
|
|
239
253
|
const batteryCharge = player.GetBatteryCharge(activeSlot);
|
|
@@ -242,9 +256,17 @@ export function isActiveSlotDoubleCharged(
|
|
|
242
256
|
return batteryCharge >= maxCharges;
|
|
243
257
|
}
|
|
244
258
|
|
|
259
|
+
/**
|
|
260
|
+
* Helper function to play the appropriate sound effect for a player after getting one or more
|
|
261
|
+
* charges on their active item. (There is a different sound depending on whether the item is fully
|
|
262
|
+
* charged or not.)
|
|
263
|
+
*
|
|
264
|
+
* @param player The player to play the sound effect for.
|
|
265
|
+
* @param activeSlot Optional. The slot that was just charged. Default is `ActiveSlot.PRIMARY`.
|
|
266
|
+
*/
|
|
245
267
|
export function playChargeSoundEffect(
|
|
246
268
|
player: EntityPlayer,
|
|
247
|
-
activeSlot
|
|
269
|
+
activeSlot = ActiveSlot.PRIMARY,
|
|
248
270
|
): void {
|
|
249
271
|
for (const soundEffect of [
|
|
250
272
|
SoundEffect.BATTERY_CHARGE, // 170
|
|
@@ -5,6 +5,9 @@ const CHARGE_BAR_ANM2 = "gfx/ui/ui_chargebar.anm2";
|
|
|
5
5
|
/**
|
|
6
6
|
* Constructor for a `ChargeBarSprites` object. For more information, see the `renderChargeBar`
|
|
7
7
|
* helper function.
|
|
8
|
+
*
|
|
9
|
+
* Note that this is for the vertical charge bar that represents the number of charges that an
|
|
10
|
+
* active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
|
|
8
11
|
*/
|
|
9
12
|
export function newChargeBarSprites(maxCharges: int): ChargeBarSprites {
|
|
10
13
|
const back = Sprite();
|
|
@@ -35,6 +38,9 @@ export function newChargeBarSprites(maxCharges: int): ChargeBarSprites {
|
|
|
35
38
|
/**
|
|
36
39
|
* Helper function to render a charge bar on the screen. First, call the `newChargeBarSprites`
|
|
37
40
|
* function to initialize the sprites, and then call this function on every render frame.
|
|
41
|
+
*
|
|
42
|
+
* Note that this is for the vertical charge bar that represents the number of charges that an
|
|
43
|
+
* active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
|
|
38
44
|
*/
|
|
39
45
|
export function renderChargeBar(
|
|
40
46
|
sprites: ChargeBarSprites,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
|
+
import { ModFeature } from "../classes/ModFeature";
|
|
3
|
+
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
4
|
+
import { ModCallbackCustom2 } from "../enums/ModCallbackCustom2";
|
|
5
|
+
import { AddCallbackParametersCustom2 } from "../interfaces/private/AddCallbackParametersCustom2";
|
|
6
|
+
import { AllButFirst } from "../types/AllButFirst";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A decorator function that signifies that the decorated class method should be automatically
|
|
10
|
+
* registered with `Mod.AddCallback`.
|
|
11
|
+
*/
|
|
12
|
+
export function Callback<T extends ModCallback>(
|
|
13
|
+
modCallback: T,
|
|
14
|
+
...optionalArgs: AllButFirst<AddCallbackParameters[T]>
|
|
15
|
+
) {
|
|
16
|
+
return <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(
|
|
17
|
+
target: Class,
|
|
18
|
+
propertyKey: string,
|
|
19
|
+
_descriptor: TypedPropertyDescriptor<Fn>,
|
|
20
|
+
): void => {
|
|
21
|
+
const methodName = propertyKey as keyof Class;
|
|
22
|
+
const method = target[methodName] as AddCallbackParameters[T][0];
|
|
23
|
+
// @ts-expect-error The compiler is not smart enough to join the types together.
|
|
24
|
+
target.mod.AddCallback(modCallback, method, ...optionalArgs);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A decorator function that signifies that the decorated class method should be automatically
|
|
30
|
+
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
31
|
+
*/
|
|
32
|
+
export function CallbackCustom<T extends ModCallbackCustom2>(
|
|
33
|
+
modCallbackCustom: T,
|
|
34
|
+
...optionalArgs: AllButFirst<AddCallbackParametersCustom2[T]>
|
|
35
|
+
) {
|
|
36
|
+
return <Class extends { mod: ModUpgraded }>(
|
|
37
|
+
target: Class,
|
|
38
|
+
propertyKey: string,
|
|
39
|
+
): void => {
|
|
40
|
+
const methodName = propertyKey as keyof Class;
|
|
41
|
+
const method = target[methodName] as AddCallbackParametersCustom2[T][0];
|
|
42
|
+
// @ts-expect-error The compiler is not smart enough to join the types together.
|
|
43
|
+
target.mod.AddCallbackCustom2(modCallbackCustom, method, ...optionalArgs);
|
|
44
|
+
};
|
|
45
|
+
}
|
package/src/functions/flying.ts
CHANGED
|
@@ -10,11 +10,11 @@ import { copySet, deleteSetsFromSet } from "./set";
|
|
|
10
10
|
|
|
11
11
|
const FLYING_CHARACTERS: ReadonlySet<PlayerType> = new Set([
|
|
12
12
|
PlayerType.AZAZEL, // 7
|
|
13
|
-
PlayerType.
|
|
14
|
-
PlayerType.
|
|
15
|
-
PlayerType.
|
|
13
|
+
PlayerType.LOST, // 10
|
|
14
|
+
PlayerType.SOUL, // 17
|
|
15
|
+
PlayerType.LOST_B, // 31
|
|
16
16
|
PlayerType.JACOB_2_B, // 39
|
|
17
|
-
PlayerType.
|
|
17
|
+
PlayerType.SOUL_B, // 40
|
|
18
18
|
]);
|
|
19
19
|
|
|
20
20
|
const FLYING_TRINKETS: ReadonlySet<TrinketType> = new Set([
|
|
@@ -63,7 +63,7 @@ export function convertXMLGridEntityType(
|
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
const gridEntityType = gridEntityArray[0];
|
|
66
|
-
let
|
|
66
|
+
let variant = gridEntityArray[1];
|
|
67
67
|
|
|
68
68
|
// For some specific grid entities, the variant defined in the XML is what is used by the actual
|
|
69
69
|
// game (which is not the case for e.g. poops).
|
|
@@ -72,10 +72,10 @@ export function convertXMLGridEntityType(
|
|
|
72
72
|
gridEntityType === GridEntityType.PRESSURE_PLATE || // 20
|
|
73
73
|
gridEntityType === GridEntityType.TELEPORTER // 23
|
|
74
74
|
) {
|
|
75
|
-
|
|
75
|
+
variant = gridEntityXMLVariant;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
return [gridEntityType,
|
|
78
|
+
return [gridEntityType, variant];
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
@@ -323,8 +323,8 @@ export function isGridEntityBreakableByExplosion(
|
|
|
323
323
|
gridEntity: GridEntity,
|
|
324
324
|
): boolean {
|
|
325
325
|
const gridEntityType = gridEntity.GetType();
|
|
326
|
-
const
|
|
327
|
-
const gridEntityTypeVariant = `${gridEntityType}.${
|
|
326
|
+
const variant = gridEntity.GetVariant();
|
|
327
|
+
const gridEntityTypeVariant = `${gridEntityType}.${variant}`;
|
|
328
328
|
|
|
329
329
|
return (
|
|
330
330
|
BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS.has(gridEntityType) ||
|
|
@@ -47,8 +47,8 @@ export function getPits(pitVariant: PitVariant = -1): GridEntityPit[] {
|
|
|
47
47
|
for (const gridEntity of getGridEntities()) {
|
|
48
48
|
const pit = gridEntity.ToPit();
|
|
49
49
|
if (pit !== undefined) {
|
|
50
|
-
const
|
|
51
|
-
if (asNumber(pitVariant) === -1 || pitVariant ===
|
|
50
|
+
const thisPitVariant = pit.GetVariant();
|
|
51
|
+
if (asNumber(pitVariant) === -1 || pitVariant === thisPitVariant) {
|
|
52
52
|
pits.push(pit);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -70,8 +70,8 @@ export function getPoops(
|
|
|
70
70
|
for (const gridEntity of getGridEntities()) {
|
|
71
71
|
const poop = gridEntity.ToPoop();
|
|
72
72
|
if (poop !== undefined) {
|
|
73
|
-
const
|
|
74
|
-
if (asNumber(poopVariant) === -1 || poopVariant ===
|
|
73
|
+
const thisPoopVariant = poop.GetVariant();
|
|
74
|
+
if (asNumber(poopVariant) === -1 || poopVariant === thisPoopVariant) {
|
|
75
75
|
poops.push(poop);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -93,10 +93,10 @@ export function getPressurePlates(
|
|
|
93
93
|
for (const gridEntity of getGridEntities()) {
|
|
94
94
|
const pressurePlate = gridEntity.ToPressurePlate();
|
|
95
95
|
if (pressurePlate !== undefined) {
|
|
96
|
-
const
|
|
96
|
+
const thisPressurePlateVariant = pressurePlate.GetVariant();
|
|
97
97
|
if (
|
|
98
98
|
asNumber(pressurePlateVariant) === -1 ||
|
|
99
|
-
pressurePlateVariant ===
|
|
99
|
+
pressurePlateVariant === thisPressurePlateVariant
|
|
100
100
|
) {
|
|
101
101
|
pressurePlates.push(pressurePlate);
|
|
102
102
|
}
|
|
@@ -119,8 +119,8 @@ export function getRocks(variant = -1): GridEntityRock[] {
|
|
|
119
119
|
for (const gridEntity of getGridEntities()) {
|
|
120
120
|
const rock = gridEntity.ToRock();
|
|
121
121
|
if (rock !== undefined) {
|
|
122
|
-
const
|
|
123
|
-
if (variant === -1 || variant ===
|
|
122
|
+
const thisVariant = rock.GetVariant();
|
|
123
|
+
if (variant === -1 || variant === thisVariant) {
|
|
124
124
|
rocks.push(rock);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -135,8 +135,8 @@ export function getSpikes(variant = -1): GridEntitySpikes[] {
|
|
|
135
135
|
for (const gridEntity of getGridEntities()) {
|
|
136
136
|
const spike = gridEntity.ToSpikes();
|
|
137
137
|
if (spike !== undefined) {
|
|
138
|
-
const
|
|
139
|
-
if (variant === -1 || variant ===
|
|
138
|
+
const thisVariant = spike.GetVariant();
|
|
139
|
+
if (variant === -1 || variant === thisVariant) {
|
|
140
140
|
spikes.push(spike);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -151,8 +151,8 @@ export function getTNT(variant = -1): GridEntityTNT[] {
|
|
|
151
151
|
for (const gridEntity of getGridEntities()) {
|
|
152
152
|
const tnt = gridEntity.ToTNT();
|
|
153
153
|
if (tnt !== undefined) {
|
|
154
|
-
const
|
|
155
|
-
if (variant === -1 || variant ===
|
|
154
|
+
const thisVariant = tnt.GetVariant();
|
|
155
|
+
if (variant === -1 || variant === thisVariant) {
|
|
156
156
|
tntArray.push(tnt);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -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
|
|
package/src/functions/minimap.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { getRoomsInsideGrid } from "./rooms";
|
|
|
8
8
|
* Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
|
|
9
9
|
* or not it is visible and so on).
|
|
10
10
|
*
|
|
11
|
+
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
12
|
+
*
|
|
11
13
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
12
14
|
* @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
|
|
13
15
|
* @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
@@ -97,6 +99,8 @@ export function getRoomDisplayFlags(
|
|
|
97
99
|
* This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
|
|
98
100
|
* the changes will be immediately visible.
|
|
99
101
|
*
|
|
102
|
+
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
103
|
+
*
|
|
100
104
|
* @param displayFlagsMap A map of the display flags that is indexed by the room's safe grid index.
|
|
101
105
|
*/
|
|
102
106
|
export function setDisplayFlags(
|
|
@@ -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
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Direction,
|
|
3
3
|
DoorSlot,
|
|
4
|
-
LevelCurse,
|
|
5
4
|
RoomTransitionAnim,
|
|
6
5
|
} from "isaac-typescript-definitions";
|
|
7
6
|
import { game } from "../core/cachedClasses";
|
|
8
|
-
import { runNextRoom } from "../features/runNextRoom";
|
|
9
|
-
import { hasCurse } from "./curses";
|
|
10
7
|
import { getRoomData, getRoomGridIndex } from "./roomData";
|
|
11
8
|
|
|
12
9
|
/**
|
|
@@ -17,12 +14,7 @@ import { getRoomData, getRoomGridIndex } from "./roomData";
|
|
|
17
14
|
*/
|
|
18
15
|
export function reloadRoom(): void {
|
|
19
16
|
const roomGridIndex = getRoomGridIndex();
|
|
20
|
-
teleport(
|
|
21
|
-
roomGridIndex,
|
|
22
|
-
Direction.NO_DIRECTION,
|
|
23
|
-
RoomTransitionAnim.FADE,
|
|
24
|
-
true,
|
|
25
|
-
);
|
|
17
|
+
teleport(roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.FADE);
|
|
26
18
|
}
|
|
27
19
|
|
|
28
20
|
/**
|
|
@@ -33,29 +25,20 @@ export function reloadRoom(): void {
|
|
|
33
25
|
* Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
|
|
34
26
|
* - you do not forget to set the `Level.LeaveDoor` field
|
|
35
27
|
* - to prevent crashing on invalid room grid indexes
|
|
36
|
-
*
|
|
28
|
+
*
|
|
29
|
+
* Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
|
|
37
30
|
*
|
|
38
31
|
* @param roomGridIndex The room grid index of the destination room.
|
|
39
32
|
* @param direction Optional. Default is `Direction.NO_DIRECTION`.
|
|
40
33
|
* @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
|
|
41
|
-
* @param force Optional. Whether to temporarily disable Curse of the Maze. Default is false. If set
|
|
42
|
-
* to false, then this function may not go to the provided room grid index.
|
|
43
34
|
*/
|
|
44
35
|
export function teleport(
|
|
45
36
|
roomGridIndex: int,
|
|
46
37
|
direction = Direction.NO_DIRECTION,
|
|
47
38
|
roomTransitionAnim = RoomTransitionAnim.TELEPORT,
|
|
48
|
-
force = false,
|
|
49
39
|
): void {
|
|
50
40
|
const level = game.GetLevel();
|
|
51
41
|
|
|
52
|
-
// Before starting a room transition, we must ensure that Curse of the Maze is not in effect, or
|
|
53
|
-
// else the room transition might send us to the wrong room.
|
|
54
|
-
const shouldTempDisableCurse = force && hasCurse(LevelCurse.MAZE);
|
|
55
|
-
if (shouldTempDisableCurse) {
|
|
56
|
-
level.RemoveCurses(LevelCurse.MAZE);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
42
|
const roomData = getRoomData(roomGridIndex);
|
|
60
43
|
if (roomData === undefined) {
|
|
61
44
|
error(
|
|
@@ -68,11 +51,4 @@ export function teleport(
|
|
|
68
51
|
level.LeaveDoor = DoorSlot.NO_DOOR_SLOT;
|
|
69
52
|
|
|
70
53
|
game.StartRoomTransition(roomGridIndex, direction, roomTransitionAnim);
|
|
71
|
-
|
|
72
|
-
if (shouldTempDisableCurse) {
|
|
73
|
-
runNextRoom(() => {
|
|
74
|
-
const futureLevel = game.GetLevel();
|
|
75
|
-
futureLevel.AddCurse(LevelCurse.MAZE, false);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
54
|
}
|
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,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectibleType,
|
|
3
|
+
ItemPoolType,
|
|
3
4
|
PickupVariant,
|
|
4
5
|
PlayerType,
|
|
5
6
|
} from "isaac-typescript-definitions";
|
|
7
|
+
import { game } from "../core/cachedClasses";
|
|
6
8
|
import { VectorZero } from "../core/constants";
|
|
7
9
|
import { preventCollectibleRotation } from "../features/preventCollectibleRotation";
|
|
8
10
|
import { areFeaturesInitialized } from "../featuresInitialized";
|
|
@@ -13,10 +15,11 @@ import { anyPlayerIs } from "./players";
|
|
|
13
15
|
import { getRandomSeed, isRNG } from "./rng";
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
* Helper function to spawn a collectible.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Helper function to spawn a collectible.
|
|
19
|
+
*
|
|
20
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
21
|
+
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
22
|
+
* rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
20
23
|
*
|
|
21
24
|
* @param collectibleType The collectible type to spawn.
|
|
22
25
|
* @param position The position to spawn the collectible at.
|
|
@@ -74,6 +77,43 @@ export function spawnCollectible(
|
|
|
74
77
|
return collectible;
|
|
75
78
|
}
|
|
76
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Helper function to spawn a collectible from a specific item pool.
|
|
82
|
+
*
|
|
83
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
84
|
+
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
85
|
+
* rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
86
|
+
*
|
|
87
|
+
* @param itemPoolType The item pool to draw the collectible type from.
|
|
88
|
+
* @param position The position to spawn the collectible at.
|
|
89
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
90
|
+
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
91
|
+
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
92
|
+
* collectible. Default is false.
|
|
93
|
+
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
94
|
+
* Tainted Keeper. Default is false.
|
|
95
|
+
* @param spawner Optional.
|
|
96
|
+
*/
|
|
97
|
+
export function spawnCollectibleFromPool(
|
|
98
|
+
itemPoolType: ItemPoolType,
|
|
99
|
+
position: Vector,
|
|
100
|
+
seedOrRNG: Seed | RNG = getRandomSeed(),
|
|
101
|
+
options = false,
|
|
102
|
+
forceFreeItem = false,
|
|
103
|
+
spawner?: Entity,
|
|
104
|
+
): EntityPickupCollectible {
|
|
105
|
+
const itemPool = game.GetItemPool();
|
|
106
|
+
const collectibleType = itemPool.GetCollectible(itemPoolType);
|
|
107
|
+
return spawnCollectible(
|
|
108
|
+
collectibleType,
|
|
109
|
+
position,
|
|
110
|
+
seedOrRNG,
|
|
111
|
+
options,
|
|
112
|
+
forceFreeItem,
|
|
113
|
+
spawner,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
77
117
|
/**
|
|
78
118
|
* Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
|
|
79
119
|
* with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
|