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
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { GridCollisionClass, GridEntityType } from "isaac-typescript-definitions";
|
|
2
|
+
import { GridEntityCustomData } from "../../../interfaces/GridEntityCustomData";
|
|
3
|
+
import { DefaultMap } from "../../DefaultMap";
|
|
4
|
+
import { Feature } from "../../private/Feature";
|
|
5
|
+
import { RunInNFrames } from "../other/RunInNFrames";
|
|
6
|
+
export declare class CustomGridEntities extends Feature {
|
|
7
|
+
v: {
|
|
8
|
+
level: {
|
|
9
|
+
/** Indexed by room list index and grid index. */
|
|
10
|
+
customGridEntities: DefaultMap<number, Map<number, GridEntityCustomData>, []>;
|
|
11
|
+
};
|
|
12
|
+
room: {
|
|
13
|
+
genericPropPtrHashes: Set<PtrHash>;
|
|
14
|
+
manuallyUsingShovel: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
private runInNFrames;
|
|
18
|
+
constructor(runInNFrames: RunInNFrames);
|
|
19
|
+
private preUseItemWeNeedToGoDeeper;
|
|
20
|
+
private postNewRoomReordered;
|
|
21
|
+
/**
|
|
22
|
+
* Helper function to spawn a custom grid entity. Custom grid entities are persistent in that they
|
|
23
|
+
* will reappear if the player leaves and re-enters the room. (It will be manually respawned in
|
|
24
|
+
* the `POST_NEW_ROOM` callback.)
|
|
25
|
+
*
|
|
26
|
+
* Custom grid entities are built on top of real grid entities. You can use any existing grid
|
|
27
|
+
* entity type as a base. For example, if you want to create a custom rock that would be breakable
|
|
28
|
+
* like a normal rock, then you should specify `GridEntityType.ROCK` as the base grid entity type.
|
|
29
|
+
*
|
|
30
|
+
* Once a custom grid entity is spawned, you can take advantage of the custom grid callbacks such
|
|
31
|
+
* as `POST_GRID_ENTITY_CUSTOM_UPDATE`. Note that the "normal" grid entities callbacks will not
|
|
32
|
+
* fire for custom entities. For example, if you had a custom grid entity based on
|
|
33
|
+
* `GridEntityType.ROCK`, and you also had a subscription to the `POST_GRID_ENTITY_UPDATE`
|
|
34
|
+
* callback, the callback would only fire for normal rocks and not the custom entity.
|
|
35
|
+
*
|
|
36
|
+
* Custom grid entities are an IsaacScript feature because the vanilla game does not support any
|
|
37
|
+
* custom grid entities.
|
|
38
|
+
*
|
|
39
|
+
* For example, this would be code to create a custom rock called a "Silver Rock" that produces a
|
|
40
|
+
* dime when destroyed:
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* // This is local to the mod and can safely overlap with the values of `GridEntityType`.
|
|
44
|
+
* const GridEntityTypeCustom = {
|
|
45
|
+
* SILVER_ROCK: 0 as GridEntityType,
|
|
46
|
+
* } as const;
|
|
47
|
+
*
|
|
48
|
+
* // This is copied from "gfx/grid/grid_rock.anm2" with some tweaks to make it look special.
|
|
49
|
+
* const SILVER_ROCK_ANM2_PATH = "gfx/grid/grid_rock_silver.anm2";
|
|
50
|
+
*
|
|
51
|
+
* export function silverRockInit(mod: ModUpgraded): void {
|
|
52
|
+
* mod.AddCallbackCustom(
|
|
53
|
+
* ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_BROKEN,
|
|
54
|
+
* postGridEntityCustomBrokenSilverRock,
|
|
55
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
56
|
+
* );
|
|
57
|
+
* }
|
|
58
|
+
*
|
|
59
|
+
* function postGridEntityCustomBrokenSilverRock(gridEntity: GridEntity) {
|
|
60
|
+
* spawnCoin(CoinSubType.DIME, gridEntity.Position);
|
|
61
|
+
* }
|
|
62
|
+
*
|
|
63
|
+
* export function spawnSilverRock(mod: ModUpgraded, gridIndex: int): GridEntity {
|
|
64
|
+
* return mod.spawnCustomGridEntity(
|
|
65
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
66
|
+
* gridIndex,
|
|
67
|
+
* undefined,
|
|
68
|
+
* SILVER_ROCK_ANM2_PATH,
|
|
69
|
+
* undefined,
|
|
70
|
+
* GridEntityType.ROCK,
|
|
71
|
+
* );
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param gridEntityTypeCustom An integer that identifies what kind of grid entity you are
|
|
76
|
+
* creating. It should correspond to a local enum value created in
|
|
77
|
+
* your mod. The integer can be any unique value and will not
|
|
78
|
+
* correspond to the actual grid entity type used. (This integer is
|
|
79
|
+
* used in the various custom grid entity callbacks.)
|
|
80
|
+
* @param gridIndexOrPosition The grid index or position in the room that you want to spawn the
|
|
81
|
+
* grid entity at. If a position is specified, the closest grid index
|
|
82
|
+
* will be used.
|
|
83
|
+
* @param gridCollisionClass Optional. The collision class that you want the custom grid entity to
|
|
84
|
+
* have. If not specified, the grid collision class from the base grid
|
|
85
|
+
* entity will be used.
|
|
86
|
+
* @param anm2Path Optional. The path to the ANM2 file to use for the sprite. If not specified,
|
|
87
|
+
* the normal sprite from the base grid entity will be used.
|
|
88
|
+
* @param defaultAnimation Optional. The name of the animation to play after the sprite is
|
|
89
|
+
* initialized and after the player re-enters a room with this grid entity
|
|
90
|
+
* in it. If not specified, the default animation in the anm2 will be
|
|
91
|
+
* used.
|
|
92
|
+
* @param baseGridEntityType Optional. The type of the grid entity to use as a "base" for this
|
|
93
|
+
* custom grid entity. Default is `GridEntityType.DECORATION`.
|
|
94
|
+
* @param baseGridEntityVariant Optional. The variant of the grid entity to use as a "base" for
|
|
95
|
+
* this custom grid entity. Default is 0.
|
|
96
|
+
*/
|
|
97
|
+
spawnCustomGridEntity(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, gridCollisionClass?: GridCollisionClass, anm2Path?: string, defaultAnimation?: string, baseGridEntityType?: GridEntityType, baseGridEntityVariant?: number): GridEntity;
|
|
98
|
+
/**
|
|
99
|
+
* Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
|
|
100
|
+
*
|
|
101
|
+
* @param gridIndexOrPositionOrGridEntity You can specify the custom grid entity to remove by
|
|
102
|
+
* providing the grid index, the room position, or the grid entity
|
|
103
|
+
* itself.
|
|
104
|
+
* @param updateRoom Optional. Whether or not to update the room after the grid entity is removed.
|
|
105
|
+
* Default is true. This is generally a good idea because if the room is not
|
|
106
|
+
* updated, you will be unable to spawn another grid entity on the same tile
|
|
107
|
+
* until a frame has passed. However, doing this is expensive, since it involves
|
|
108
|
+
* a call to `Isaac.GetRoomEntities`, so set it to false if you need to run this
|
|
109
|
+
* function multiple times.
|
|
110
|
+
* @returns The grid entity that was removed. Returns undefined if no grid entity was found at the
|
|
111
|
+
* given location or if the given grid entity was not a custom grid entity.
|
|
112
|
+
*/
|
|
113
|
+
removeCustomGridEntity(gridIndexOrPositionOrGridEntity: int | Vector | GridEntity, updateRoom?: boolean): GridEntity | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Helper function to get the custom grid entities in the current room. Returns an array of tuples
|
|
116
|
+
* containing the raw decoration grid entity and the associated entity data.
|
|
117
|
+
*/
|
|
118
|
+
getCustomGridEntities(): Array<[
|
|
119
|
+
gridEntity: GridEntity,
|
|
120
|
+
data: GridEntityCustomData
|
|
121
|
+
]>;
|
|
122
|
+
/**
|
|
123
|
+
* Helper function to get the custom `GridEntityType` from a `GridEntity` or grid index. Returns
|
|
124
|
+
* undefined if the provided `GridEntity` is not a custom grid entity, or if there was not a grid
|
|
125
|
+
* entity on the provided grid index.
|
|
126
|
+
*/
|
|
127
|
+
getCustomGridEntityType(gridEntityOrGridIndex: GridEntity | int): GridEntityType | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Helper function to check if a `GridEntity` is a custom grid entity or if a grid index has a
|
|
130
|
+
* custom grid entity.
|
|
131
|
+
*/
|
|
132
|
+
isCustomGridEntity(gridEntityOrGridIndex: GridEntity | int): boolean;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=CustomGridEntities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomGridEntities.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomGridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAa,kBAAmB,SAAQ,OAAO;IAC7B,CAAC;;YAEb,iDAAiD;;;;;;;MAUnD;IAEF,OAAO,CAAC,YAAY,CAAe;gBAEvB,YAAY,EAAE,YAAY;IAqBtC,OAAO,CAAC,0BAA0B,CA+ChC;IAGF,OAAO,CAAC,oBAAoB,CA4B1B;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2EG;IACI,qBAAqB,CAC1B,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU;IA8Cb;;;;;;;;;;;;;;OAcG;IACI,sBAAsB,CAC3B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS;IAuCzB;;;OAGG;IACI,qBAAqB,IAAI,KAAK,CACnC;QAAC,UAAU,EAAE,UAAU;QAAE,IAAI,EAAE,oBAAoB;KAAC,CACrD;IAoBD;;;;OAIG;IACI,uBAAuB,CAC5B,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS;IAyB7B;;;OAGG;IACI,kBAAkB,CAAC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO;CAM5E"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local Map = ____lualib.Map
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local Set = ____lualib.Set
|
|
7
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
8
|
+
local ____exports = {}
|
|
9
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
10
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
11
|
+
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
12
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
13
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
14
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
15
|
+
local game = ____cachedClasses.game
|
|
16
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
17
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
18
|
+
local ____ModCallbackCustom2 = require("src.enums.ModCallbackCustom2")
|
|
19
|
+
local ModCallbackCustom2 = ____ModCallbackCustom2.ModCallbackCustom2
|
|
20
|
+
local ____gridEntities = require("src.functions.gridEntities")
|
|
21
|
+
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
22
|
+
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
23
|
+
local ____players = require("src.functions.players")
|
|
24
|
+
local getPlayerFromPtr = ____players.getPlayerFromPtr
|
|
25
|
+
local ____roomData = require("src.functions.roomData")
|
|
26
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
27
|
+
local ____types = require("src.functions.types")
|
|
28
|
+
local isNumber = ____types.isNumber
|
|
29
|
+
local ____vector = require("src.functions.vector")
|
|
30
|
+
local isVector = ____vector.isVector
|
|
31
|
+
local ____DefaultMap = require("src.classes.DefaultMap")
|
|
32
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
33
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
34
|
+
local Feature = ____Feature.Feature
|
|
35
|
+
____exports.CustomGridEntities = __TS__Class()
|
|
36
|
+
local CustomGridEntities = ____exports.CustomGridEntities
|
|
37
|
+
CustomGridEntities.name = "CustomGridEntities"
|
|
38
|
+
__TS__ClassExtends(CustomGridEntities, Feature)
|
|
39
|
+
function CustomGridEntities.prototype.____constructor(self, runInNFrames)
|
|
40
|
+
Feature.prototype.____constructor(self)
|
|
41
|
+
self.v = {
|
|
42
|
+
level = {customGridEntities = __TS__New(
|
|
43
|
+
DefaultMap,
|
|
44
|
+
function() return __TS__New(Map) end
|
|
45
|
+
)},
|
|
46
|
+
room = {
|
|
47
|
+
genericPropPtrHashes = __TS__New(Set),
|
|
48
|
+
manuallyUsingShovel = false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
self.preUseItemWeNeedToGoDeeper = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
52
|
+
local room = game:GetRoom()
|
|
53
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
54
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:get(roomListIndex)
|
|
55
|
+
if roomCustomGridEntities == nil then
|
|
56
|
+
return nil
|
|
57
|
+
end
|
|
58
|
+
local gridIndex = room:GetGridIndex(player.Position)
|
|
59
|
+
local customGridEntity = roomCustomGridEntities:get(gridIndex)
|
|
60
|
+
if customGridEntity == nil then
|
|
61
|
+
return nil
|
|
62
|
+
end
|
|
63
|
+
if customGridEntity.gridCollisionClass ~= GridCollisionClass.NONE then
|
|
64
|
+
return nil
|
|
65
|
+
end
|
|
66
|
+
removeGridEntity(nil, customGridEntity.gridIndex, false)
|
|
67
|
+
local entityPtr = EntityPtr(player)
|
|
68
|
+
self.runInNFrames:runNextGameFrame(function()
|
|
69
|
+
local futurePlayer = getPlayerFromPtr(nil, entityPtr)
|
|
70
|
+
if futurePlayer == nil then
|
|
71
|
+
return
|
|
72
|
+
end
|
|
73
|
+
self.v.room.manuallyUsingShovel = true
|
|
74
|
+
futurePlayer:UseActiveItem(CollectibleType.WE_NEED_TO_GO_DEEPER)
|
|
75
|
+
self.v.room.manuallyUsingShovel = false
|
|
76
|
+
end)
|
|
77
|
+
return true
|
|
78
|
+
end
|
|
79
|
+
self.postNewRoomReordered = function()
|
|
80
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
81
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:get(roomListIndex)
|
|
82
|
+
if roomCustomGridEntities == nil then
|
|
83
|
+
return
|
|
84
|
+
end
|
|
85
|
+
local room = game:GetRoom()
|
|
86
|
+
for ____, ____value in __TS__Iterator(roomCustomGridEntities:entries()) do
|
|
87
|
+
local gridIndex = ____value[1]
|
|
88
|
+
local data = ____value[2]
|
|
89
|
+
do
|
|
90
|
+
local decoration = room:GetGridEntity(gridIndex)
|
|
91
|
+
if decoration == nil then
|
|
92
|
+
roomCustomGridEntities:delete(gridIndex)
|
|
93
|
+
goto __continue12
|
|
94
|
+
end
|
|
95
|
+
if data.anm2Path ~= nil then
|
|
96
|
+
local sprite = decoration:GetSprite()
|
|
97
|
+
sprite:Load(data.anm2Path, true)
|
|
98
|
+
local animationToPlay = data.defaultAnimation == nil and sprite:GetDefaultAnimation() or data.defaultAnimation
|
|
99
|
+
sprite:Play(animationToPlay, true)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
::__continue12::
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
|
|
106
|
+
self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, {self.preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER}}}
|
|
107
|
+
self.customCallbacksUsed = {{ModCallbackCustom2.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
108
|
+
self.runInNFrames = runInNFrames
|
|
109
|
+
end
|
|
110
|
+
function CustomGridEntities.prototype.spawnCustomGridEntity(self, gridEntityTypeCustom, gridIndexOrPosition, gridCollisionClass, anm2Path, defaultAnimation, baseGridEntityType, baseGridEntityVariant)
|
|
111
|
+
if baseGridEntityType == nil then
|
|
112
|
+
baseGridEntityType = GridEntityType.DECORATION
|
|
113
|
+
end
|
|
114
|
+
if baseGridEntityVariant == nil then
|
|
115
|
+
baseGridEntityVariant = 0
|
|
116
|
+
end
|
|
117
|
+
local room = game:GetRoom()
|
|
118
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
119
|
+
local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
|
|
120
|
+
local customGridEntity = spawnGridEntityWithVariant(nil, baseGridEntityType, baseGridEntityVariant, gridIndexOrPosition)
|
|
121
|
+
if customGridEntity == nil then
|
|
122
|
+
error("Failed to spawn a custom grid entity.")
|
|
123
|
+
end
|
|
124
|
+
if gridCollisionClass ~= nil then
|
|
125
|
+
customGridEntity.CollisionClass = gridCollisionClass
|
|
126
|
+
end
|
|
127
|
+
if anm2Path ~= nil then
|
|
128
|
+
local sprite = customGridEntity:GetSprite()
|
|
129
|
+
sprite:Load(anm2Path, true)
|
|
130
|
+
local animationToPlay = defaultAnimation == nil and sprite:GetDefaultAnimation() or defaultAnimation
|
|
131
|
+
sprite:Play(animationToPlay, true)
|
|
132
|
+
end
|
|
133
|
+
local customGridEntityData = {
|
|
134
|
+
gridEntityTypeCustom = gridEntityTypeCustom,
|
|
135
|
+
roomListIndex = roomListIndex,
|
|
136
|
+
gridIndex = gridIndex,
|
|
137
|
+
anm2Path = anm2Path,
|
|
138
|
+
defaultAnimation = defaultAnimation,
|
|
139
|
+
gridCollisionClass = gridCollisionClass
|
|
140
|
+
}
|
|
141
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:getAndSetDefault(roomListIndex)
|
|
142
|
+
roomCustomGridEntities:set(gridIndex, customGridEntityData)
|
|
143
|
+
return customGridEntity
|
|
144
|
+
end
|
|
145
|
+
function CustomGridEntities.prototype.removeCustomGridEntity(self, gridIndexOrPositionOrGridEntity, updateRoom)
|
|
146
|
+
if updateRoom == nil then
|
|
147
|
+
updateRoom = true
|
|
148
|
+
end
|
|
149
|
+
local room = game:GetRoom()
|
|
150
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
151
|
+
local decoration
|
|
152
|
+
if type(gridIndexOrPositionOrGridEntity) == "number" then
|
|
153
|
+
local gridIndex = gridIndexOrPositionOrGridEntity
|
|
154
|
+
local gridEntity = room:GetGridEntity(gridIndex)
|
|
155
|
+
if gridEntity == nil then
|
|
156
|
+
return nil
|
|
157
|
+
end
|
|
158
|
+
decoration = gridEntity
|
|
159
|
+
elseif isVector(nil, gridIndexOrPositionOrGridEntity) then
|
|
160
|
+
local position = gridIndexOrPositionOrGridEntity
|
|
161
|
+
local gridEntity = room:GetGridEntityFromPos(position)
|
|
162
|
+
if gridEntity == nil then
|
|
163
|
+
return nil
|
|
164
|
+
end
|
|
165
|
+
decoration = gridEntity
|
|
166
|
+
else
|
|
167
|
+
decoration = gridIndexOrPositionOrGridEntity
|
|
168
|
+
end
|
|
169
|
+
local gridIndex = decoration:GetGridIndex()
|
|
170
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:getAndSetDefault(roomListIndex)
|
|
171
|
+
local exists = roomCustomGridEntities:has(gridIndex)
|
|
172
|
+
if not exists then
|
|
173
|
+
return nil
|
|
174
|
+
end
|
|
175
|
+
roomCustomGridEntities:delete(gridIndex)
|
|
176
|
+
removeGridEntity(nil, decoration, updateRoom)
|
|
177
|
+
return decoration
|
|
178
|
+
end
|
|
179
|
+
function CustomGridEntities.prototype.getCustomGridEntities(self)
|
|
180
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
181
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:get(roomListIndex)
|
|
182
|
+
if roomCustomGridEntities == nil then
|
|
183
|
+
return {}
|
|
184
|
+
end
|
|
185
|
+
local room = game:GetRoom()
|
|
186
|
+
local customGridEntities = {}
|
|
187
|
+
for ____, ____value in __TS__Iterator(roomCustomGridEntities:entries()) do
|
|
188
|
+
local gridIndex = ____value[1]
|
|
189
|
+
local data = ____value[2]
|
|
190
|
+
local gridEntity = room:GetGridEntity(gridIndex)
|
|
191
|
+
if gridEntity ~= nil then
|
|
192
|
+
customGridEntities[#customGridEntities + 1] = {gridEntity, data}
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
return customGridEntities
|
|
196
|
+
end
|
|
197
|
+
function CustomGridEntities.prototype.getCustomGridEntityType(self, gridEntityOrGridIndex)
|
|
198
|
+
if not self.initialized then
|
|
199
|
+
return nil
|
|
200
|
+
end
|
|
201
|
+
local gridIndex = isNumber(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
202
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
203
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:get(roomListIndex)
|
|
204
|
+
if roomCustomGridEntities == nil then
|
|
205
|
+
return nil
|
|
206
|
+
end
|
|
207
|
+
for ____, ____value in __TS__Iterator(roomCustomGridEntities:entries()) do
|
|
208
|
+
local _gridIndex = ____value[1]
|
|
209
|
+
local data = ____value[2]
|
|
210
|
+
if data.gridIndex == gridIndex then
|
|
211
|
+
return data.gridEntityTypeCustom
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
return nil
|
|
215
|
+
end
|
|
216
|
+
function CustomGridEntities.prototype.isCustomGridEntity(self, gridEntityOrGridIndex)
|
|
217
|
+
local gridEntityTypeCustom = self:getCustomGridEntityType(gridEntityOrGridIndex)
|
|
218
|
+
return gridEntityTypeCustom ~= nil
|
|
219
|
+
end
|
|
220
|
+
return ____exports
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PlayerIndex } from "../../../types/PlayerIndex";
|
|
2
|
+
import { PostCustomRevive } from "../../callbacks/PostCustomRevive";
|
|
3
|
+
import { PreCustomRevive } from "../../callbacks/PreCustomRevive";
|
|
4
|
+
import { Feature } from "../../private/Feature";
|
|
5
|
+
declare enum CustomReviveState {
|
|
6
|
+
DISABLED = 0,
|
|
7
|
+
/**
|
|
8
|
+
* We can't immediately jump to waiting for an item animation because it is possible for a player
|
|
9
|
+
* to be holding an item above their head as they are dying (e.g. with Razor Blade).
|
|
10
|
+
*/
|
|
11
|
+
WAITING_FOR_ROOM_TRANSITION = 1,
|
|
12
|
+
WAITING_FOR_ITEM_ANIMATION = 2
|
|
13
|
+
}
|
|
14
|
+
export declare class CustomRevive extends Feature {
|
|
15
|
+
v: {
|
|
16
|
+
run: {
|
|
17
|
+
state: CustomReviveState;
|
|
18
|
+
revivalType: number | null;
|
|
19
|
+
dyingPlayerIndex: PlayerIndex | null;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
private preCustomRevive;
|
|
23
|
+
private postCustomRevive;
|
|
24
|
+
constructor(preCustomRevive: PreCustomRevive, postCustomRevive: PostCustomRevive);
|
|
25
|
+
private postRender;
|
|
26
|
+
private postNewRoomReordered;
|
|
27
|
+
private postPEffectUpdateReordered;
|
|
28
|
+
private checkWaitingForItemAnimation;
|
|
29
|
+
private postPlayerFatalDamage;
|
|
30
|
+
private preBerserkDeath;
|
|
31
|
+
/**
|
|
32
|
+
* The player is about to die, which will immediately delete the save data for the run. To prevent
|
|
33
|
+
* this from happening, we grant the 1-Up item.
|
|
34
|
+
*/
|
|
35
|
+
private playerIsAboutToDie;
|
|
36
|
+
private logStateChanged;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=CustomRevive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomRevive.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomRevive.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIhD,aAAK,iBAAiB;IACpB,QAAQ,IAAA;IAER;;;OAGG;IACH,2BAA2B,IAAA;IAE3B,0BAA0B,IAAA;CAC3B;AAED,qBAAa,YAAa,SAAQ,OAAO;IACvB,CAAC;;;;;;MAMf;IAEF,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,gBAAgB,CAAmB;gBAGzC,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB;IA0BpC,OAAO,CAAC,UAAU,CAQhB;IAGF,OAAO,CAAC,oBAAoB,CAO1B;IAGF,OAAO,CAAC,0BAA0B,CAEhC;IAEF,OAAO,CAAC,4BAA4B;IA6CpC,OAAO,CAAC,qBAAqB,CAK3B;IAGF,OAAO,CAAC,eAAe,CAErB;IAEF;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAoC1B,OAAO,CAAC,eAAe;CASxB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
7
|
+
local FamiliarVariant = ____isaac_2Dtypescript_2Ddefinitions.FamiliarVariant
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
10
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
11
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
12
|
+
local sfxManager = ____cachedClasses.sfxManager
|
|
13
|
+
local ____ModCallbackCustom2 = require("src.enums.ModCallbackCustom2")
|
|
14
|
+
local ModCallbackCustom2 = ____ModCallbackCustom2.ModCallbackCustom2
|
|
15
|
+
local ____runInNFrames = require("src.features.runInNFrames")
|
|
16
|
+
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
17
|
+
local ____collectibles = require("src.functions.collectibles")
|
|
18
|
+
local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromItemTracker
|
|
19
|
+
local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
20
|
+
local removeAllFamiliars = ____entitiesSpecific.removeAllFamiliars
|
|
21
|
+
local ____log = require("src.functions.log")
|
|
22
|
+
local log = ____log.log
|
|
23
|
+
local ____logMisc = require("src.functions.logMisc")
|
|
24
|
+
local logError = ____logMisc.logError
|
|
25
|
+
local ____playerIndex = require("src.functions.playerIndex")
|
|
26
|
+
local getPlayerFromIndex = ____playerIndex.getPlayerFromIndex
|
|
27
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
28
|
+
local ____players = require("src.functions.players")
|
|
29
|
+
local isCharacter = ____players.isCharacter
|
|
30
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
31
|
+
local Feature = ____Feature.Feature
|
|
32
|
+
local DEBUG = false
|
|
33
|
+
local CustomReviveState = {}
|
|
34
|
+
CustomReviveState.DISABLED = 0
|
|
35
|
+
CustomReviveState[CustomReviveState.DISABLED] = "DISABLED"
|
|
36
|
+
CustomReviveState.WAITING_FOR_ROOM_TRANSITION = 1
|
|
37
|
+
CustomReviveState[CustomReviveState.WAITING_FOR_ROOM_TRANSITION] = "WAITING_FOR_ROOM_TRANSITION"
|
|
38
|
+
CustomReviveState.WAITING_FOR_ITEM_ANIMATION = 2
|
|
39
|
+
CustomReviveState[CustomReviveState.WAITING_FOR_ITEM_ANIMATION] = "WAITING_FOR_ITEM_ANIMATION"
|
|
40
|
+
____exports.CustomRevive = __TS__Class()
|
|
41
|
+
local CustomRevive = ____exports.CustomRevive
|
|
42
|
+
CustomRevive.name = "CustomRevive"
|
|
43
|
+
__TS__ClassExtends(CustomRevive, Feature)
|
|
44
|
+
function CustomRevive.prototype.____constructor(self, preCustomRevive, postCustomRevive)
|
|
45
|
+
Feature.prototype.____constructor(self)
|
|
46
|
+
self.v = {run = {state = CustomReviveState.DISABLED, revivalType = nil, dyingPlayerIndex = nil}}
|
|
47
|
+
self.postRender = function()
|
|
48
|
+
if self.v.run.state ~= CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
49
|
+
return
|
|
50
|
+
end
|
|
51
|
+
sfxManager:Stop(SoundEffect.ONE_UP)
|
|
52
|
+
end
|
|
53
|
+
self.postNewRoomReordered = function()
|
|
54
|
+
if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
|
|
55
|
+
return
|
|
56
|
+
end
|
|
57
|
+
self.v.run.state = CustomReviveState.WAITING_FOR_ITEM_ANIMATION
|
|
58
|
+
self:logStateChanged()
|
|
59
|
+
end
|
|
60
|
+
self.postPEffectUpdateReordered = function(____, player)
|
|
61
|
+
self:checkWaitingForItemAnimation(player)
|
|
62
|
+
end
|
|
63
|
+
self.postPlayerFatalDamage = function(____, player)
|
|
64
|
+
self:playerIsAboutToDie(player)
|
|
65
|
+
return nil
|
|
66
|
+
end
|
|
67
|
+
self.preBerserkDeath = function(____, player)
|
|
68
|
+
self:playerIsAboutToDie(player)
|
|
69
|
+
end
|
|
70
|
+
self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
|
|
71
|
+
self.customCallbacksUsed = {{ModCallbackCustom2.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}, {ModCallbackCustom2.POST_PEFFECT_UPDATE_REORDERED, {self.postPEffectUpdateReordered}}, {ModCallbackCustom2.POST_PLAYER_FATAL_DAMAGE, {self.postPlayerFatalDamage}}, {ModCallbackCustom2.PRE_BERSERK_DEATH, {self.preBerserkDeath}}}
|
|
72
|
+
self.preCustomRevive = preCustomRevive
|
|
73
|
+
self.postCustomRevive = postCustomRevive
|
|
74
|
+
end
|
|
75
|
+
function CustomRevive.prototype.checkWaitingForItemAnimation(self, player)
|
|
76
|
+
if self.v.run.state ~= CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
77
|
+
return
|
|
78
|
+
end
|
|
79
|
+
if self.v.run.dyingPlayerIndex == nil then
|
|
80
|
+
return
|
|
81
|
+
end
|
|
82
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
83
|
+
if playerIndex ~= self.v.run.dyingPlayerIndex then
|
|
84
|
+
return
|
|
85
|
+
end
|
|
86
|
+
local playerToCheckHoldingItem = player
|
|
87
|
+
if isCharacter(nil, player, PlayerType.SOUL_B) then
|
|
88
|
+
local forgottenBody = player:GetOtherTwin()
|
|
89
|
+
if forgottenBody ~= nil then
|
|
90
|
+
playerToCheckHoldingItem = forgottenBody
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
if not playerToCheckHoldingItem:IsHoldingItem() then
|
|
94
|
+
return
|
|
95
|
+
end
|
|
96
|
+
if self.v.run.revivalType ~= nil then
|
|
97
|
+
self.postCustomRevive:fire(playerToCheckHoldingItem, self.v.run.revivalType)
|
|
98
|
+
end
|
|
99
|
+
self.v.run.state = CustomReviveState.DISABLED
|
|
100
|
+
self.v.run.revivalType = nil
|
|
101
|
+
self.v.run.dyingPlayerIndex = nil
|
|
102
|
+
self:logStateChanged()
|
|
103
|
+
end
|
|
104
|
+
function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
105
|
+
local revivalType = self.preCustomRevive:fire(player)
|
|
106
|
+
if revivalType == nil then
|
|
107
|
+
return
|
|
108
|
+
end
|
|
109
|
+
self.v.run.state = CustomReviveState.WAITING_FOR_ROOM_TRANSITION
|
|
110
|
+
self.v.run.revivalType = revivalType
|
|
111
|
+
self.v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
|
|
112
|
+
self:logStateChanged()
|
|
113
|
+
player:AddCollectible(CollectibleType.ONE_UP, 0, false)
|
|
114
|
+
removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
|
|
115
|
+
removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
|
|
116
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
117
|
+
runNextGameFrame(
|
|
118
|
+
nil,
|
|
119
|
+
function()
|
|
120
|
+
local futurePlayer = getPlayerFromIndex(nil, playerIndex)
|
|
121
|
+
if futurePlayer == nil then
|
|
122
|
+
return
|
|
123
|
+
end
|
|
124
|
+
if futurePlayer:IsDead() then
|
|
125
|
+
return
|
|
126
|
+
end
|
|
127
|
+
logError(nil, "The player is still alive after initializing a custom revive. Explicitly killing the player.")
|
|
128
|
+
futurePlayer:Kill()
|
|
129
|
+
end
|
|
130
|
+
)
|
|
131
|
+
end
|
|
132
|
+
function CustomRevive.prototype.logStateChanged(self)
|
|
133
|
+
if DEBUG then
|
|
134
|
+
log(
|
|
135
|
+
nil,
|
|
136
|
+
((("Custom revive state changed: " .. tostring(CustomReviveState[self.v.run.state])) .. " (") .. tostring(self.v.run.state)) .. ")"
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
return ____exports
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ControllerIndex } from "isaac-typescript-definitions";
|
|
2
|
+
import { PostEsauJr } from "../../callbacks/PostEsauJr";
|
|
3
|
+
import { PostFirstEsauJr } from "../../callbacks/PostFirstEsauJr";
|
|
4
|
+
import { Feature } from "../../private/Feature";
|
|
5
|
+
export declare class EsauJrDetection extends Feature {
|
|
6
|
+
v: {
|
|
7
|
+
run: {
|
|
8
|
+
usedEsauJrFrame: number | null;
|
|
9
|
+
usedEsauJrControllerIndex: ControllerIndex | null;
|
|
10
|
+
usedEsauJrAtLeastOnce: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
private postEsauJr;
|
|
14
|
+
private postFirstEsauJr;
|
|
15
|
+
constructor(postEsauJr: PostEsauJr, postFirstEsauJr: PostFirstEsauJr);
|
|
16
|
+
private postUpdate;
|
|
17
|
+
private useItemEsauJr;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=EsauJrDetection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EsauJrDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/EsauJrDetection.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,OAAO;IAC1B,CAAC;;;;;;MAMf;IAEF,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe;IAgBpE,OAAO,CAAC,UAAU,CAiChB;IAIF,OAAO,CAAC,aAAa,CAenB;CACH"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
9
|
+
local game = ____cachedClasses.game
|
|
10
|
+
local ____players = require("src.functions.players")
|
|
11
|
+
local getPlayersWithControllerIndex = ____players.getPlayersWithControllerIndex
|
|
12
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
13
|
+
local Feature = ____Feature.Feature
|
|
14
|
+
____exports.EsauJrDetection = __TS__Class()
|
|
15
|
+
local EsauJrDetection = ____exports.EsauJrDetection
|
|
16
|
+
EsauJrDetection.name = "EsauJrDetection"
|
|
17
|
+
__TS__ClassExtends(EsauJrDetection, Feature)
|
|
18
|
+
function EsauJrDetection.prototype.____constructor(self, postEsauJr, postFirstEsauJr)
|
|
19
|
+
Feature.prototype.____constructor(self)
|
|
20
|
+
self.v = {run = {usedEsauJrFrame = nil, usedEsauJrControllerIndex = nil, usedEsauJrAtLeastOnce = false}}
|
|
21
|
+
self.postUpdate = function()
|
|
22
|
+
local gameFrameCount = game:GetFrameCount()
|
|
23
|
+
if self.v.run.usedEsauJrFrame == nil or gameFrameCount < self.v.run.usedEsauJrFrame + 1 then
|
|
24
|
+
return
|
|
25
|
+
end
|
|
26
|
+
self.v.run.usedEsauJrFrame = nil
|
|
27
|
+
if self.v.run.usedEsauJrControllerIndex == nil then
|
|
28
|
+
return
|
|
29
|
+
end
|
|
30
|
+
local players = getPlayersWithControllerIndex(nil, self.v.run.usedEsauJrControllerIndex)
|
|
31
|
+
self.v.run.usedEsauJrControllerIndex = nil
|
|
32
|
+
local player = players[1]
|
|
33
|
+
if player == nil then
|
|
34
|
+
return
|
|
35
|
+
end
|
|
36
|
+
if not self.v.run.usedEsauJrAtLeastOnce then
|
|
37
|
+
self.v.run.usedEsauJrAtLeastOnce = true
|
|
38
|
+
self.postFirstEsauJr:fire(player)
|
|
39
|
+
end
|
|
40
|
+
self.postEsauJr:fire(player)
|
|
41
|
+
end
|
|
42
|
+
self.useItemEsauJr = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
43
|
+
local gameFrameCount = game:GetFrameCount()
|
|
44
|
+
self.v.run.usedEsauJrFrame = gameFrameCount + 1
|
|
45
|
+
self.v.run.usedEsauJrControllerIndex = player.ControllerIndex
|
|
46
|
+
return nil
|
|
47
|
+
end
|
|
48
|
+
self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}, {ModCallback.POST_USE_ITEM, {self.useItemEsauJr, CollectibleType.ESAU_JR}}}
|
|
49
|
+
self.postEsauJr = postEsauJr
|
|
50
|
+
self.postFirstEsauJr = postFirstEsauJr
|
|
51
|
+
end
|
|
52
|
+
return ____exports
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PostFirstFlip } from "../../callbacks/PostFirstFlip";
|
|
2
|
+
import { PostFlip } from "../../callbacks/PostFlip";
|
|
3
|
+
import { Feature } from "../../private/Feature";
|
|
4
|
+
export declare class FlipDetection extends Feature {
|
|
5
|
+
v: {
|
|
6
|
+
run: {
|
|
7
|
+
/** We don't consider the case of a multiplayer game with more than one Tainted Lazarus. */
|
|
8
|
+
usedFlipAtLeastOnce: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
private postFlip;
|
|
12
|
+
private postFirstFlip;
|
|
13
|
+
constructor(postFlip: PostFlip, postFirstFlip: PostFirstFlip);
|
|
14
|
+
private useItemFlip;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=FlipDetection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlipDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/FlipDetection.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;IACxB,CAAC;;YAEb,2FAA2F;;;MAG7F;IAEF,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,aAAa,CAAgB;gBAEzB,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa;IAa5D,OAAO,CAAC,WAAW,CA2BjB;CACH"}
|