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/dist/index.d.ts
CHANGED
|
@@ -88,7 +88,6 @@ declare interface AddCallbackParametersCustom {
|
|
|
88
88
|
[ModCallbackCustom.POST_COLLECTIBLE_EMPTY]: PostCollectibleEmptyRegisterParameters;
|
|
89
89
|
[ModCallbackCustom.POST_COLLECTIBLE_INIT_FIRST]: PostCollectibleInitFirstRegisterParameters;
|
|
90
90
|
[ModCallbackCustom.POST_CURSED_TELEPORT]: PostCursedTeleportRegisterParameters;
|
|
91
|
-
[ModCallbackCustom.POST_CUSTOM_DOOR_ENTER]: PostCustomDoorEnterRegisterParameters;
|
|
92
91
|
[ModCallbackCustom.POST_CUSTOM_REVIVE]: PostCustomReviveRegisterParameters;
|
|
93
92
|
[ModCallbackCustom.POST_DICE_ROOM_ACTIVATED]: PostDiceRoomActivatedRegisterParameters;
|
|
94
93
|
[ModCallbackCustom.POST_DOOR_RENDER]: PostDoorRenderRegisterParameters;
|
|
@@ -133,7 +132,6 @@ declare interface AddCallbackParametersCustom {
|
|
|
133
132
|
[ModCallbackCustom.POST_PICKUP_INIT_FIRST]: PostPickupInitFirstRegisterParameters;
|
|
134
133
|
[ModCallbackCustom.POST_PICKUP_INIT_LATE]: PostPickupInitLateRegisterParameters;
|
|
135
134
|
[ModCallbackCustom.POST_PICKUP_STATE_CHANGED]: PostPickupStateChangedRegisterParameters;
|
|
136
|
-
[ModCallbackCustom.POST_PIT_RENDER]: PostPitRenderRegisterParameters;
|
|
137
135
|
[ModCallbackCustom.POST_PIT_UPDATE]: PostPitUpdateRegisterParameters;
|
|
138
136
|
[ModCallbackCustom.POST_PLAYER_CHANGE_HEALTH]: PostPlayerChangeHealthRegisterParameters;
|
|
139
137
|
[ModCallbackCustom.POST_PLAYER_CHANGE_STAT]: PostPlayerChangeStatRegisterParameters;
|
|
@@ -145,6 +143,7 @@ declare interface AddCallbackParametersCustom {
|
|
|
145
143
|
[ModCallbackCustom.POST_PLAYER_INIT_LATE]: PostPlayerInitLateRegisterParameters;
|
|
146
144
|
[ModCallbackCustom.POST_PLAYER_RENDER_REORDERED]: PostPlayerRenderReorderedRegisterParameters;
|
|
147
145
|
[ModCallbackCustom.POST_PLAYER_UPDATE_REORDERED]: PostPlayerUpdateReorderedRegisterParameters;
|
|
146
|
+
[ModCallbackCustom.POST_PIT_RENDER]: PostPitRenderRegisterParameters;
|
|
148
147
|
[ModCallbackCustom.POST_POOP_RENDER]: PostPoopRenderRegisterParameters;
|
|
149
148
|
[ModCallbackCustom.POST_POOP_UPDATE]: PostPoopUpdateRegisterParameters;
|
|
150
149
|
[ModCallbackCustom.POST_PRESSURE_PLATE_RENDER]: PostPressurePlateRenderRegisterParameters;
|
|
@@ -176,6 +175,204 @@ declare interface AddCallbackParametersCustom {
|
|
|
176
175
|
[ModCallbackCustom.PRE_NEW_LEVEL]: PreNewLevelRegisterParameters;
|
|
177
176
|
}
|
|
178
177
|
|
|
178
|
+
declare interface AddCallbackParametersCustom2 {
|
|
179
|
+
[ModCallbackCustom2.POST_AMBUSH_FINISHED]: [
|
|
180
|
+
callback: (ambushType: AmbushType) => void,
|
|
181
|
+
ambushType?: AmbushType
|
|
182
|
+
];
|
|
183
|
+
[ModCallbackCustom2.POST_AMBUSH_STARTED]: [
|
|
184
|
+
callback: (ambushType: AmbushType) => void,
|
|
185
|
+
ambushType?: AmbushType
|
|
186
|
+
];
|
|
187
|
+
[ModCallbackCustom2.POST_BOMB_EXPLODED]: [
|
|
188
|
+
callback: (bomb: EntityBomb) => void,
|
|
189
|
+
bombVariant?: BombVariant
|
|
190
|
+
];
|
|
191
|
+
[ModCallbackCustom2.POST_BOMB_INIT_LATE]: [
|
|
192
|
+
callback: (bomb: EntityBomb) => void,
|
|
193
|
+
bombVariant?: BombVariant
|
|
194
|
+
];
|
|
195
|
+
[ModCallbackCustom2.POST_BONE_SWING]: [
|
|
196
|
+
callback: (knife: EntityKnife) => void
|
|
197
|
+
];
|
|
198
|
+
[ModCallbackCustom2.POST_COLLECTIBLE_EMPTY]: [
|
|
199
|
+
callback: (collectible: EntityPickupCollectible, oldCollectibleType: CollectibleType) => void,
|
|
200
|
+
collectibleType?: CollectibleType
|
|
201
|
+
];
|
|
202
|
+
[ModCallbackCustom2.POST_COLLECTIBLE_INIT_FIRST]: [
|
|
203
|
+
callback: (collectible: EntityPickupCollectible) => void,
|
|
204
|
+
collectibleType?: CollectibleType
|
|
205
|
+
];
|
|
206
|
+
[ModCallbackCustom2.POST_CURSED_TELEPORT]: [
|
|
207
|
+
callback: (player: EntityPlayer) => void,
|
|
208
|
+
playerVariant?: PlayerVariant,
|
|
209
|
+
character?: PlayerType
|
|
210
|
+
];
|
|
211
|
+
[ModCallbackCustom2.POST_CUSTOM_REVIVE]: [
|
|
212
|
+
callback: (player: EntityPlayer, revivalType: int) => void,
|
|
213
|
+
revivalType?: int
|
|
214
|
+
];
|
|
215
|
+
[ModCallbackCustom2.POST_DICE_ROOM_ACTIVATED]: [
|
|
216
|
+
callback: (player: EntityPlayer, diceFloorSubType: DiceFloorSubType) => void,
|
|
217
|
+
diceFloorSubType?: DiceFloorSubType
|
|
218
|
+
];
|
|
219
|
+
[ModCallbackCustom2.POST_DOOR_RENDER]: [
|
|
220
|
+
callback: (door: GridEntityDoor) => void,
|
|
221
|
+
doorVariant?: DoorVariant
|
|
222
|
+
];
|
|
223
|
+
[ModCallbackCustom2.POST_DOOR_UPDATE]: [
|
|
224
|
+
callback: (door: GridEntityDoor) => void,
|
|
225
|
+
doorVariant?: DoorVariant
|
|
226
|
+
];
|
|
227
|
+
[ModCallbackCustom2.POST_EFFECT_INIT_LATE]: [
|
|
228
|
+
callback: (effect: EntityEffect) => void,
|
|
229
|
+
effectVariant?: EffectVariant
|
|
230
|
+
];
|
|
231
|
+
[ModCallbackCustom2.POST_EFFECT_STATE_CHANGED]: [
|
|
232
|
+
callback: (effect: EntityEffect, previousState: int, currentState: int) => void,
|
|
233
|
+
effectVariant?: EffectVariant
|
|
234
|
+
];
|
|
235
|
+
[ModCallbackCustom2.POST_ESAU_JR]: [callback: (player: EntityPlayer) => void];
|
|
236
|
+
[ModCallbackCustom2.POST_FAMILIAR_INIT_LATE]: [
|
|
237
|
+
callback: (familiar: EntityFamiliar) => void,
|
|
238
|
+
familiarVariant?: FamiliarVariant
|
|
239
|
+
];
|
|
240
|
+
[ModCallbackCustom2.POST_FAMILIAR_STATE_CHANGED]: [
|
|
241
|
+
callback: (familiar: EntityFamiliar, previousState: int, currentState: int) => void,
|
|
242
|
+
familiarVariant?: FamiliarVariant
|
|
243
|
+
];
|
|
244
|
+
[ModCallbackCustom2.POST_FIRST_ESAU_JR]: [
|
|
245
|
+
callback: (player: EntityPlayer) => void
|
|
246
|
+
];
|
|
247
|
+
[ModCallbackCustom2.POST_FIRST_FLIP]: [
|
|
248
|
+
callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void
|
|
249
|
+
];
|
|
250
|
+
[ModCallbackCustom2.POST_FLIP]: [
|
|
251
|
+
callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void
|
|
252
|
+
];
|
|
253
|
+
[ModCallbackCustom2.POST_GAME_STARTED_REORDERED]: [
|
|
254
|
+
callback: (isContinued: boolean) => void
|
|
255
|
+
];
|
|
256
|
+
[ModCallbackCustom2.POST_GAME_STARTED_REORDERED_LAST]: [
|
|
257
|
+
callback: (isContinued: boolean) => void
|
|
258
|
+
];
|
|
259
|
+
[ModCallbackCustom2.POST_GREED_MODE_WAVE]: [
|
|
260
|
+
callback: (oldWave: int, newWave: int) => void
|
|
261
|
+
];
|
|
262
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_BROKEN]: [
|
|
263
|
+
callback: (gridEntity: GridEntity) => void,
|
|
264
|
+
gridEntityType?: GridEntityType,
|
|
265
|
+
variant?: int
|
|
266
|
+
];
|
|
267
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_COLLISION]: [
|
|
268
|
+
callback: (gridEntity: GridEntity, entity: Entity) => void,
|
|
269
|
+
gridEntityType?: GridEntityType,
|
|
270
|
+
gridEntityVariant?: int,
|
|
271
|
+
entityType?: EntityType,
|
|
272
|
+
entityVariant?: int
|
|
273
|
+
];
|
|
274
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_BROKEN]: [
|
|
275
|
+
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
|
|
276
|
+
gridEntityTypeCustom?: GridEntityType
|
|
277
|
+
];
|
|
278
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_COLLISION]: [
|
|
279
|
+
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, entity: Entity) => void,
|
|
280
|
+
gridEntityTypeCustom?: GridEntityType,
|
|
281
|
+
entityType?: EntityType,
|
|
282
|
+
entityVariant?: int
|
|
283
|
+
];
|
|
284
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_INIT]: [
|
|
285
|
+
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
|
|
286
|
+
gridEntityTypeCustom?: GridEntityType
|
|
287
|
+
];
|
|
288
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_REMOVE]: [
|
|
289
|
+
callback: (gridIndex: int, gridEntityTypeCustom: GridEntityType) => void,
|
|
290
|
+
gridEntityTypeCustom?: GridEntityType
|
|
291
|
+
];
|
|
292
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_STATE_CHANGED]: [
|
|
293
|
+
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, oldState: int, newState: int) => void,
|
|
294
|
+
gridEntityTypeCustom?: GridEntityType
|
|
295
|
+
];
|
|
296
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_UPDATE]: [
|
|
297
|
+
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
|
|
298
|
+
gridEntityTypeCustom?: GridEntityType
|
|
299
|
+
];
|
|
300
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_INIT]: [
|
|
301
|
+
callback: (gridEntity: GridEntity) => void,
|
|
302
|
+
gridEntityType?: GridEntityType,
|
|
303
|
+
variant?: int
|
|
304
|
+
];
|
|
305
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_REMOVE]: [
|
|
306
|
+
callback: (gridIndex: int, gridEntityType: GridEntityType, variant: int) => void,
|
|
307
|
+
gridEntityType?: GridEntityType,
|
|
308
|
+
variant?: int
|
|
309
|
+
];
|
|
310
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_STATE_CHANGED]: [
|
|
311
|
+
callback: (gridEntity: GridEntity, oldState: int, newState: int) => void,
|
|
312
|
+
gridEntityType?: GridEntityType,
|
|
313
|
+
variant?: int
|
|
314
|
+
];
|
|
315
|
+
[ModCallbackCustom2.POST_GRID_ENTITY_UPDATE]: [
|
|
316
|
+
callback: (gridEntity: GridEntity) => void,
|
|
317
|
+
gridEntityType?: GridEntityType,
|
|
318
|
+
variant?: int
|
|
319
|
+
];
|
|
320
|
+
[ModCallbackCustom2.POST_HOLY_MANTLE_REMOVED]: [
|
|
321
|
+
callback: (player: EntityPlayer, oldNumHolyMantles: int, newNumHolyMantles: int) => void,
|
|
322
|
+
playerVariant?: PlayerVariant,
|
|
323
|
+
character?: PlayerType
|
|
324
|
+
];
|
|
325
|
+
[ModCallbackCustom2.POST_NEW_LEVEL_REORDERED]: [callback: () => void];
|
|
326
|
+
[ModCallbackCustom2.POST_KNIFE_INIT_LATE]: [
|
|
327
|
+
callback: (knife: EntityKnife) => void,
|
|
328
|
+
knifeVariant?: KnifeVariant
|
|
329
|
+
];
|
|
330
|
+
[ModCallbackCustom2.POST_NEW_ROOM_EARLY]: [callback: () => void];
|
|
331
|
+
[ModCallbackCustom2.POST_NEW_ROOM_REORDERED]: [callback: () => void];
|
|
332
|
+
[ModCallbackCustom2.POST_PEFFECT_UPDATE_REORDERED]: [
|
|
333
|
+
callback: (player: EntityPlayer) => void,
|
|
334
|
+
playerVariant?: PlayerVariant,
|
|
335
|
+
character?: PlayerType
|
|
336
|
+
];
|
|
337
|
+
[ModCallbackCustom2.POST_PIT_RENDER]: [
|
|
338
|
+
callback: (pit: GridEntityPit) => void,
|
|
339
|
+
pitVariant?: PitVariant
|
|
340
|
+
];
|
|
341
|
+
[ModCallbackCustom2.POST_PLAYER_FATAL_DAMAGE]: [
|
|
342
|
+
callback: (player: EntityPlayer, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int) => boolean | undefined,
|
|
343
|
+
playerVariant?: PlayerVariant,
|
|
344
|
+
character?: PlayerType
|
|
345
|
+
];
|
|
346
|
+
[ModCallbackCustom2.POST_PLAYER_RENDER_REORDERED]: [
|
|
347
|
+
callback: (player: EntityPlayer) => void,
|
|
348
|
+
playerVariant?: PlayerVariant,
|
|
349
|
+
character?: PlayerType
|
|
350
|
+
];
|
|
351
|
+
[ModCallbackCustom2.POST_PLAYER_UPDATE_REORDERED]: [
|
|
352
|
+
callback: (player: EntityPlayer) => void,
|
|
353
|
+
playerVariant?: PlayerVariant,
|
|
354
|
+
character?: PlayerType
|
|
355
|
+
];
|
|
356
|
+
[ModCallbackCustom2.POST_ROOM_CLEAR_CHANGED]: [
|
|
357
|
+
callback: (roomClear: boolean) => void,
|
|
358
|
+
roomClear?: boolean
|
|
359
|
+
];
|
|
360
|
+
[ModCallbackCustom2.POST_SPIKES_RENDER]: [
|
|
361
|
+
callback: (spikes: GridEntitySpikes) => void,
|
|
362
|
+
variant?: int
|
|
363
|
+
];
|
|
364
|
+
[ModCallbackCustom2.PRE_BERSERK_DEATH]: [
|
|
365
|
+
callback: (player: EntityPlayer) => void,
|
|
366
|
+
playerVariant?: PlayerVariant,
|
|
367
|
+
character?: PlayerType
|
|
368
|
+
];
|
|
369
|
+
[ModCallbackCustom2.PRE_CUSTOM_REVIVE]: [
|
|
370
|
+
callback: (player: EntityPlayer) => int | undefined,
|
|
371
|
+
playerVariant?: PlayerVariant,
|
|
372
|
+
character?: PlayerType
|
|
373
|
+
];
|
|
374
|
+
}
|
|
375
|
+
|
|
179
376
|
/**
|
|
180
377
|
* Helper function to add a charge to the player's active item. Will flash the HUD and play the
|
|
181
378
|
* appropriate sound effect, depending on whether the charge is partially full or completely full.
|
|
@@ -188,14 +385,14 @@ declare interface AddCallbackParametersCustom {
|
|
|
188
385
|
* - AAA Battery
|
|
189
386
|
*
|
|
190
387
|
* @param player The player to grant the charges to.
|
|
191
|
-
* @param activeSlot The slot to grant the charges to.
|
|
388
|
+
* @param activeSlot Optional. The slot to grant the charges to. Default is `ActiveSlot.PRIMARY`.
|
|
192
389
|
* @param numCharges Optional. The amount of charges to grant. Default is 1.
|
|
193
390
|
* @param playSoundEffect Optional. Whether to play a charge-related sound effect. Default is true.
|
|
194
391
|
* @returns The amount of charges that were actually granted. For example, if the active item was
|
|
195
392
|
* only one away from a full charge, but the `numCharges` provided to this function was 2,
|
|
196
393
|
* then this function would return 1.
|
|
197
394
|
*/
|
|
198
|
-
export declare function addCharge(player: EntityPlayer, activeSlot
|
|
395
|
+
export declare function addCharge(player: EntityPlayer, activeSlot?: ActiveSlot, numCharges?: number, playSoundEffect?: boolean): int;
|
|
199
396
|
|
|
200
397
|
export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
|
|
201
398
|
|
|
@@ -284,18 +481,21 @@ export declare function addRoomClearCharges(bigRoomDoubleCharge?: boolean): void
|
|
|
284
481
|
* - Not charging active items with `chargetype="special"`
|
|
285
482
|
*
|
|
286
483
|
* @param player The player to grant the charges to.
|
|
287
|
-
* @param activeSlot The active item slot to grant the charges to.
|
|
484
|
+
* @param activeSlot Optional. The active item slot to grant the charges to. Default is
|
|
485
|
+
* `ActiveSlot.PRIMARY`.
|
|
288
486
|
* @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
|
|
289
487
|
* room for the purposes of calculating how much charge to grant. Default
|
|
290
488
|
* is true.
|
|
291
489
|
* @param playSoundEffect Optional. Whether to play a charge-related sound effect. Default is true.
|
|
292
490
|
*/
|
|
293
|
-
export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlot
|
|
491
|
+
export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlot?: ActiveSlot, bigRoomDoubleCharge?: boolean, playSoundEffect?: boolean): void;
|
|
294
492
|
|
|
295
493
|
/**
|
|
296
494
|
* Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
|
|
297
495
|
* or not it is visible and so on).
|
|
298
496
|
*
|
|
497
|
+
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
498
|
+
*
|
|
299
499
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
300
500
|
* @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
|
|
301
501
|
* @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
@@ -333,6 +533,18 @@ export declare const ALL_DISPLAY_FLAGS: BitFlags<number & {
|
|
|
333
533
|
readonly __displayFlagBrand: symbol;
|
|
334
534
|
}>;
|
|
335
535
|
|
|
536
|
+
export declare type AllButFirst<T extends unknown[]> = T extends [
|
|
537
|
+
unknown,
|
|
538
|
+
...infer Tail
|
|
539
|
+
] ? Tail : unknown[];
|
|
540
|
+
|
|
541
|
+
declare type AllButFirst_2<T extends unknown[]> = T extends [
|
|
542
|
+
unknown,
|
|
543
|
+
...infer Tail
|
|
544
|
+
] ? Tail : unknown[];
|
|
545
|
+
|
|
546
|
+
export declare type AllButLast<T extends unknown[]> = T extends [...infer Head, unknown] ? Head : unknown[];
|
|
547
|
+
|
|
336
548
|
/** This is used by the `POST_AMBUSH_STARTED` and `POST_AMBUSH_FINISHED` custom callbacks. */
|
|
337
549
|
export declare enum AmbushType {
|
|
338
550
|
CHALLENGE_ROOM = 0,
|
|
@@ -612,6 +824,37 @@ export declare function calculateStageType(stage: LevelStage): StageType;
|
|
|
612
824
|
*/
|
|
613
825
|
export declare function calculateStageTypeRepentance(stage: LevelStage): StageType;
|
|
614
826
|
|
|
827
|
+
/**
|
|
828
|
+
* A decorator function that signifies that the decorated class method should be automatically
|
|
829
|
+
* registered with `Mod.AddCallback`.
|
|
830
|
+
*/
|
|
831
|
+
export declare function Callback<T extends ModCallback>(modCallback: T, ...optionalArgs: AllButFirst<AddCallbackParameters[T]>): <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* A decorator function that signifies that the decorated class method should be automatically
|
|
835
|
+
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
836
|
+
*/
|
|
837
|
+
export declare function CallbackCustom<T extends ModCallbackCustom2>(modCallbackCustom: T, ...optionalArgs: AllButFirst<AddCallbackParametersCustom2[T]>): <Class extends {
|
|
838
|
+
mod: ModUpgraded;
|
|
839
|
+
}>(target: Class, propertyKey: string) => void;
|
|
840
|
+
|
|
841
|
+
declare type CallbackSignatureGridEntity = ((gridEntity: GridEntity) => void) | ((gridEntity: GridEntity, oldState: int, newState: int) => void);
|
|
842
|
+
|
|
843
|
+
declare type CallbackSignatureGridEntityCustom = ((gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void) | ((gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, oldState: int, newState: int) => void);
|
|
844
|
+
|
|
845
|
+
declare type CallbackSignaturePlayer = ((player: EntityPlayer) => void) | ((player: EntityPlayer) => int | undefined) | ((player: EntityPlayer, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int) => boolean | undefined);
|
|
846
|
+
|
|
847
|
+
declare type CallbackSignatureRevive = (player: EntityPlayer, revivalType: int) => void;
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* A mapping of the callback enum to the associated callback functions (and optional arguments).
|
|
851
|
+
* This is so that the respective callback functions can be added/removed on demand as subscribers
|
|
852
|
+
* get added/removed.
|
|
853
|
+
*/
|
|
854
|
+
declare type CallbackTuple = {
|
|
855
|
+
[K in ModCallback]: [K, AddCallbackParameters[K]];
|
|
856
|
+
}[ModCallback];
|
|
857
|
+
|
|
615
858
|
/**
|
|
616
859
|
* Helper function to see if the provided player can pick up an eternal heart. (If a player already
|
|
617
860
|
* has an eternal heart and full heart containers, they are not able to pick up any additional
|
|
@@ -887,6 +1130,8 @@ export declare function combineArrays<T>(...arrays: Array<T[] | readonly T[]>):
|
|
|
887
1130
|
*/
|
|
888
1131
|
export declare function combineSets<T>(...sets: Array<Set<T> | ReadonlySet<T>>): Set<T>;
|
|
889
1132
|
|
|
1133
|
+
export declare type Constructor = new (...args: any[]) => {};
|
|
1134
|
+
|
|
890
1135
|
/**
|
|
891
1136
|
* Helper function to get the enum name for the specified `Controller` value. Note that this will
|
|
892
1137
|
* trim off the "BUTTON_" prefix.
|
|
@@ -1016,6 +1261,215 @@ export declare const CUSTOM_FLOOR_STAGE: LevelStage;
|
|
|
1016
1261
|
*/
|
|
1017
1262
|
export declare const CUSTOM_FLOOR_STAGE_TYPE = StageType.WRATH_OF_THE_LAMB;
|
|
1018
1263
|
|
|
1264
|
+
/**
|
|
1265
|
+
* The base class for a custom callback. Individual custom callbacks (and validation callbacks) will
|
|
1266
|
+
* extend from this class.
|
|
1267
|
+
*/
|
|
1268
|
+
declare abstract class CustomCallback<T extends ModCallbackCustom2> extends Feature {
|
|
1269
|
+
private subscriptions;
|
|
1270
|
+
hasSubscriptions(): boolean;
|
|
1271
|
+
add(...args: AddCallbackParametersCustom2[T]): void;
|
|
1272
|
+
/**
|
|
1273
|
+
* If the submitted function does not match any of the existing subscriptions, this method will do
|
|
1274
|
+
* nothing.
|
|
1275
|
+
*/
|
|
1276
|
+
remove(callback: AddCallbackParametersCustom2[T][0]): void;
|
|
1277
|
+
fire: (...fireArgs: FireArgs<T>) => ReturnType<AddCallbackParametersCustom2[T][0]>;
|
|
1278
|
+
/**
|
|
1279
|
+
* This method needs to be overwritten for any callback that has optional filtration arguments.
|
|
1280
|
+
*/
|
|
1281
|
+
protected shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
declare class CustomCallbackGridEntity<T extends ModCallbackCustomGridEntity> extends CustomCallback<T> {
|
|
1285
|
+
protected shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
declare class CustomCallbackGridEntityCustom<T extends ModCallbackCustomGridEntityCustom> extends CustomCallback<T> {
|
|
1289
|
+
protected shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
declare class CustomCallbackPlayer<T extends ModCallbackCustomPlayer> extends CustomCallback<T> {
|
|
1293
|
+
protected shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
declare class CustomCallbackRevive<T extends ModCallbackCustomRevive> extends CustomCallback<T> {
|
|
1297
|
+
protected shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* A mapping of the custom callback enum to the associated callback functions (and optional
|
|
1302
|
+
* arguments). This is so that the respective callback functions can be added/removed on demand as
|
|
1303
|
+
* subscribers get added/removed.
|
|
1304
|
+
*/
|
|
1305
|
+
declare type CustomCallbackTuple = {
|
|
1306
|
+
[K in ModCallbackCustom2]: [K, AddCallbackParametersCustom2[K]];
|
|
1307
|
+
}[ModCallbackCustom2];
|
|
1308
|
+
|
|
1309
|
+
declare class CustomGridEntities extends Feature {
|
|
1310
|
+
v: {
|
|
1311
|
+
level: {
|
|
1312
|
+
/** Indexed by room list index and grid index. */
|
|
1313
|
+
customGridEntities: DefaultMap<number, Map<number, GridEntityCustomData>, []>;
|
|
1314
|
+
};
|
|
1315
|
+
room: {
|
|
1316
|
+
genericPropPtrHashes: Set<PtrHash>;
|
|
1317
|
+
manuallyUsingShovel: boolean;
|
|
1318
|
+
};
|
|
1319
|
+
};
|
|
1320
|
+
private runInNFrames;
|
|
1321
|
+
constructor(runInNFrames: RunInNFrames);
|
|
1322
|
+
private preUseItemWeNeedToGoDeeper;
|
|
1323
|
+
private postNewRoomReordered;
|
|
1324
|
+
/**
|
|
1325
|
+
* Helper function to spawn a custom grid entity. Custom grid entities are persistent in that they
|
|
1326
|
+
* will reappear if the player leaves and re-enters the room. (It will be manually respawned in
|
|
1327
|
+
* the `POST_NEW_ROOM` callback.)
|
|
1328
|
+
*
|
|
1329
|
+
* Custom grid entities are built on top of real grid entities. You can use any existing grid
|
|
1330
|
+
* entity type as a base. For example, if you want to create a custom rock that would be breakable
|
|
1331
|
+
* like a normal rock, then you should specify `GridEntityType.ROCK` as the base grid entity type.
|
|
1332
|
+
*
|
|
1333
|
+
* Once a custom grid entity is spawned, you can take advantage of the custom grid callbacks such
|
|
1334
|
+
* as `POST_GRID_ENTITY_CUSTOM_UPDATE`. Note that the "normal" grid entities callbacks will not
|
|
1335
|
+
* fire for custom entities. For example, if you had a custom grid entity based on
|
|
1336
|
+
* `GridEntityType.ROCK`, and you also had a subscription to the `POST_GRID_ENTITY_UPDATE`
|
|
1337
|
+
* callback, the callback would only fire for normal rocks and not the custom entity.
|
|
1338
|
+
*
|
|
1339
|
+
* Custom grid entities are an IsaacScript feature because the vanilla game does not support any
|
|
1340
|
+
* custom grid entities.
|
|
1341
|
+
*
|
|
1342
|
+
* For example, this would be code to create a custom rock called a "Silver Rock" that produces a
|
|
1343
|
+
* dime when destroyed:
|
|
1344
|
+
*
|
|
1345
|
+
* ```ts
|
|
1346
|
+
* // This is local to the mod and can safely overlap with the values of `GridEntityType`.
|
|
1347
|
+
* const GridEntityTypeCustom = {
|
|
1348
|
+
* SILVER_ROCK: 0 as GridEntityType,
|
|
1349
|
+
* } as const;
|
|
1350
|
+
*
|
|
1351
|
+
* // This is copied from "gfx/grid/grid_rock.anm2" with some tweaks to make it look special.
|
|
1352
|
+
* const SILVER_ROCK_ANM2_PATH = "gfx/grid/grid_rock_silver.anm2";
|
|
1353
|
+
*
|
|
1354
|
+
* export function silverRockInit(mod: ModUpgraded): void {
|
|
1355
|
+
* mod.AddCallbackCustom(
|
|
1356
|
+
* ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_BROKEN,
|
|
1357
|
+
* postGridEntityCustomBrokenSilverRock,
|
|
1358
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
1359
|
+
* );
|
|
1360
|
+
* }
|
|
1361
|
+
*
|
|
1362
|
+
* function postGridEntityCustomBrokenSilverRock(gridEntity: GridEntity) {
|
|
1363
|
+
* spawnCoin(CoinSubType.DIME, gridEntity.Position);
|
|
1364
|
+
* }
|
|
1365
|
+
*
|
|
1366
|
+
* export function spawnSilverRock(mod: ModUpgraded, gridIndex: int): GridEntity {
|
|
1367
|
+
* return mod.spawnCustomGridEntity(
|
|
1368
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
1369
|
+
* gridIndex,
|
|
1370
|
+
* undefined,
|
|
1371
|
+
* SILVER_ROCK_ANM2_PATH,
|
|
1372
|
+
* undefined,
|
|
1373
|
+
* GridEntityType.ROCK,
|
|
1374
|
+
* );
|
|
1375
|
+
* }
|
|
1376
|
+
* ```
|
|
1377
|
+
*
|
|
1378
|
+
* @param gridEntityTypeCustom An integer that identifies what kind of grid entity you are
|
|
1379
|
+
* creating. It should correspond to a local enum value created in
|
|
1380
|
+
* your mod. The integer can be any unique value and will not
|
|
1381
|
+
* correspond to the actual grid entity type used. (This integer is
|
|
1382
|
+
* used in the various custom grid entity callbacks.)
|
|
1383
|
+
* @param gridIndexOrPosition The grid index or position in the room that you want to spawn the
|
|
1384
|
+
* grid entity at. If a position is specified, the closest grid index
|
|
1385
|
+
* will be used.
|
|
1386
|
+
* @param gridCollisionClass Optional. The collision class that you want the custom grid entity to
|
|
1387
|
+
* have. If not specified, the grid collision class from the base grid
|
|
1388
|
+
* entity will be used.
|
|
1389
|
+
* @param anm2Path Optional. The path to the ANM2 file to use for the sprite. If not specified,
|
|
1390
|
+
* the normal sprite from the base grid entity will be used.
|
|
1391
|
+
* @param defaultAnimation Optional. The name of the animation to play after the sprite is
|
|
1392
|
+
* initialized and after the player re-enters a room with this grid entity
|
|
1393
|
+
* in it. If not specified, the default animation in the anm2 will be
|
|
1394
|
+
* used.
|
|
1395
|
+
* @param baseGridEntityType Optional. The type of the grid entity to use as a "base" for this
|
|
1396
|
+
* custom grid entity. Default is `GridEntityType.DECORATION`.
|
|
1397
|
+
* @param baseGridEntityVariant Optional. The variant of the grid entity to use as a "base" for
|
|
1398
|
+
* this custom grid entity. Default is 0.
|
|
1399
|
+
*/
|
|
1400
|
+
spawnCustomGridEntity(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, gridCollisionClass?: GridCollisionClass, anm2Path?: string, defaultAnimation?: string, baseGridEntityType?: GridEntityType, baseGridEntityVariant?: number): GridEntity;
|
|
1401
|
+
/**
|
|
1402
|
+
* Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
|
|
1403
|
+
*
|
|
1404
|
+
* @param gridIndexOrPositionOrGridEntity You can specify the custom grid entity to remove by
|
|
1405
|
+
* providing the grid index, the room position, or the grid entity
|
|
1406
|
+
* itself.
|
|
1407
|
+
* @param updateRoom Optional. Whether or not to update the room after the grid entity is removed.
|
|
1408
|
+
* Default is true. This is generally a good idea because if the room is not
|
|
1409
|
+
* updated, you will be unable to spawn another grid entity on the same tile
|
|
1410
|
+
* until a frame has passed. However, doing this is expensive, since it involves
|
|
1411
|
+
* a call to `Isaac.GetRoomEntities`, so set it to false if you need to run this
|
|
1412
|
+
* function multiple times.
|
|
1413
|
+
* @returns The grid entity that was removed. Returns undefined if no grid entity was found at the
|
|
1414
|
+
* given location or if the given grid entity was not a custom grid entity.
|
|
1415
|
+
*/
|
|
1416
|
+
removeCustomGridEntity(gridIndexOrPositionOrGridEntity: int | Vector | GridEntity, updateRoom?: boolean): GridEntity | undefined;
|
|
1417
|
+
/**
|
|
1418
|
+
* Helper function to get the custom grid entities in the current room. Returns an array of tuples
|
|
1419
|
+
* containing the raw decoration grid entity and the associated entity data.
|
|
1420
|
+
*/
|
|
1421
|
+
getCustomGridEntities(): Array<[
|
|
1422
|
+
gridEntity: GridEntity,
|
|
1423
|
+
data: GridEntityCustomData
|
|
1424
|
+
]>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Helper function to get the custom `GridEntityType` from a `GridEntity` or grid index. Returns
|
|
1427
|
+
* undefined if the provided `GridEntity` is not a custom grid entity, or if there was not a grid
|
|
1428
|
+
* entity on the provided grid index.
|
|
1429
|
+
*/
|
|
1430
|
+
getCustomGridEntityType(gridEntityOrGridIndex: GridEntity | int): GridEntityType | undefined;
|
|
1431
|
+
/**
|
|
1432
|
+
* Helper function to check if a `GridEntity` is a custom grid entity or if a grid index has a
|
|
1433
|
+
* custom grid entity.
|
|
1434
|
+
*/
|
|
1435
|
+
isCustomGridEntity(gridEntityOrGridIndex: GridEntity | int): boolean;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
declare class CustomRevive extends Feature {
|
|
1439
|
+
v: {
|
|
1440
|
+
run: {
|
|
1441
|
+
state: CustomReviveState;
|
|
1442
|
+
revivalType: number | null;
|
|
1443
|
+
dyingPlayerIndex: PlayerIndex | null;
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1446
|
+
private preCustomRevive;
|
|
1447
|
+
private postCustomRevive;
|
|
1448
|
+
constructor(preCustomRevive: PreCustomRevive, postCustomRevive: PostCustomRevive);
|
|
1449
|
+
private postRender;
|
|
1450
|
+
private postNewRoomReordered;
|
|
1451
|
+
private postPEffectUpdateReordered;
|
|
1452
|
+
private checkWaitingForItemAnimation;
|
|
1453
|
+
private postPlayerFatalDamage;
|
|
1454
|
+
private preBerserkDeath;
|
|
1455
|
+
/**
|
|
1456
|
+
* The player is about to die, which will immediately delete the save data for the run. To prevent
|
|
1457
|
+
* this from happening, we grant the 1-Up item.
|
|
1458
|
+
*/
|
|
1459
|
+
private playerIsAboutToDie;
|
|
1460
|
+
private logStateChanged;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
declare enum CustomReviveState {
|
|
1464
|
+
DISABLED = 0,
|
|
1465
|
+
/**
|
|
1466
|
+
* We can't immediately jump to waiting for an item animation because it is possible for a player
|
|
1467
|
+
* to be holding an item above their head as they are dying (e.g. with Razor Blade).
|
|
1468
|
+
*/
|
|
1469
|
+
WAITING_FOR_ROOM_TRANSITION = 1,
|
|
1470
|
+
WAITING_FOR_ITEM_ANIMATION = 2
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1019
1473
|
/**
|
|
1020
1474
|
* An object that represents a possible boss for a custom stage. This can be for a vanilla boss or a
|
|
1021
1475
|
* custom boss.
|
|
@@ -2146,6 +2600,21 @@ declare type ErrorCustomClassNotSerializable = "Error: Custom classes with one o
|
|
|
2146
2600
|
|
|
2147
2601
|
declare type ErrorIsaacAPIClassIsNotSerializable = "Error: Isaac API classes (such as e.g. `Entity` or `RoomConfig`) are not serializable. For more information, see: https://isaacscript.github.io/main/gotchas#isaac-api-classes-are-not-serializable";
|
|
2148
2602
|
|
|
2603
|
+
declare class EsauJrDetection extends Feature {
|
|
2604
|
+
v: {
|
|
2605
|
+
run: {
|
|
2606
|
+
usedEsauJrFrame: number | null;
|
|
2607
|
+
usedEsauJrControllerIndex: ControllerIndex | null;
|
|
2608
|
+
usedEsauJrAtLeastOnce: boolean;
|
|
2609
|
+
};
|
|
2610
|
+
};
|
|
2611
|
+
private postEsauJr;
|
|
2612
|
+
private postFirstEsauJr;
|
|
2613
|
+
constructor(postEsauJr: PostEsauJr, postFirstEsauJr: PostFirstEsauJr);
|
|
2614
|
+
private postUpdate;
|
|
2615
|
+
private useItemEsauJr;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2149
2618
|
/**
|
|
2150
2619
|
* These are a collection of functions for non-TypeScript users so that they can access some of
|
|
2151
2620
|
* useful methods offered on the `Array` class in the JavaScript standard library.
|
|
@@ -2169,6 +2638,22 @@ export declare function every<T>(array: T[], func: (value: T, index: number, arr
|
|
|
2169
2638
|
*/
|
|
2170
2639
|
export declare type FactoryFunction<V, Args extends unknown[]> = (...args: Args) => V;
|
|
2171
2640
|
|
|
2641
|
+
/**
|
|
2642
|
+
* The IsaacScript standard library contains many optional features, such as the ability to create
|
|
2643
|
+
* custom pickups. All features are optional and are only initialized when needed. This class
|
|
2644
|
+
* contains elements to facilitate that.
|
|
2645
|
+
*
|
|
2646
|
+
* Additionally, all custom callbacks extend from this class.
|
|
2647
|
+
*/
|
|
2648
|
+
declare class Feature {
|
|
2649
|
+
initialized: boolean;
|
|
2650
|
+
v?: SaveData;
|
|
2651
|
+
featuresUsed?: ISCFeature[];
|
|
2652
|
+
callbacksUsed?: CallbackTuple[];
|
|
2653
|
+
customCallbacksUsed?: CustomCallbackTuple[];
|
|
2654
|
+
exportedMethods: string[];
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2172
2657
|
export declare function fillLevelWithRedRooms(): void;
|
|
2173
2658
|
|
|
2174
2659
|
/**
|
|
@@ -2201,6 +2686,8 @@ export declare function find<T>(array: T[], func: (value: T, index: number, arra
|
|
|
2201
2686
|
*/
|
|
2202
2687
|
export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean, minimumDistance?: float): Vector;
|
|
2203
2688
|
|
|
2689
|
+
declare type FireArgs<T extends ModCallbackCustom2> = Parameters<AddCallbackParametersCustom2[T][0]>;
|
|
2690
|
+
|
|
2204
2691
|
/**
|
|
2205
2692
|
* Helper function to make an NPC fire one or more projectiles. Returns the fired projectile(s).
|
|
2206
2693
|
*
|
|
@@ -2265,6 +2752,19 @@ export declare const FIRST_STAGE = LevelStage.BASEMENT_1;
|
|
|
2265
2752
|
/** Equal to `TrinketType.SWALLOWED_PENNY`. */
|
|
2266
2753
|
export declare const FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY;
|
|
2267
2754
|
|
|
2755
|
+
declare class FlipDetection extends Feature {
|
|
2756
|
+
v: {
|
|
2757
|
+
run: {
|
|
2758
|
+
/** We don't consider the case of a multiplayer game with more than one Tainted Lazarus. */
|
|
2759
|
+
usedFlipAtLeastOnce: boolean;
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
private postFlip;
|
|
2763
|
+
private postFirstFlip;
|
|
2764
|
+
constructor(postFlip: PostFlip, postFirstFlip: PostFirstFlip);
|
|
2765
|
+
private useItemFlip;
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2268
2768
|
/**
|
|
2269
2769
|
* An object containing all 7 vanilla fonts that are pre-loaded and ready to use.
|
|
2270
2770
|
*
|
|
@@ -2318,6 +2818,11 @@ export declare function forgottenSwitch(): void;
|
|
|
2318
2818
|
|
|
2319
2819
|
declare type FunctionIsNotSerializable = "Error: Functions are not serializable. For more information, see: https://isaacscript.github.io/main/gotchas#functions-are-not-serializable";
|
|
2320
2820
|
|
|
2821
|
+
export declare type FunctionTuple = [
|
|
2822
|
+
name: string,
|
|
2823
|
+
func: (...args: unknown[]) => unknown
|
|
2824
|
+
];
|
|
2825
|
+
|
|
2321
2826
|
/**
|
|
2322
2827
|
* A cached version of the class returned from the `Game()` constructor.
|
|
2323
2828
|
*
|
|
@@ -2331,6 +2836,27 @@ export declare const game: Game;
|
|
|
2331
2836
|
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
|
|
2332
2837
|
export declare const GAME_FRAMES_PER_SECOND = 30;
|
|
2333
2838
|
|
|
2839
|
+
declare class GameReorderedCallbacks extends Feature {
|
|
2840
|
+
private currentStage;
|
|
2841
|
+
private currentStageType;
|
|
2842
|
+
private usedGlowingHourGlass;
|
|
2843
|
+
private forceNewLevel;
|
|
2844
|
+
private forceNewRoom;
|
|
2845
|
+
private postGameStartedReordered;
|
|
2846
|
+
private postNewLevelReordered;
|
|
2847
|
+
private postNewRoomReordered;
|
|
2848
|
+
private postGameStartedReorderedLast;
|
|
2849
|
+
constructor(postGameStartedReordered: PostGameStartedReordered, postNewLevelReordered: PostNewLevelReordered, postNewRoomReordered: PostNewRoomReordered, postGameStartedReorderedLast: PostGameStartedReorderedLast);
|
|
2850
|
+
private useItemGlowingHourGlass;
|
|
2851
|
+
private postGameStarted;
|
|
2852
|
+
private postNewLevel;
|
|
2853
|
+
private postNewRoom;
|
|
2854
|
+
private recordCurrentStage;
|
|
2855
|
+
forceNewLevelCallback(): void;
|
|
2856
|
+
forceNewRoomCallback(): void;
|
|
2857
|
+
reorderedCallbacksSetStage(stage: LevelStage, stageType: StageType): void;
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2334
2860
|
/**
|
|
2335
2861
|
* Helper function to find the active slot that the player has the corresponding collectible type
|
|
2336
2862
|
* in. Returns undefined if the player does not have the collectible in any active slot.
|
|
@@ -2470,6 +2996,12 @@ export declare function getAllPlayers(): EntityPlayer[];
|
|
|
2470
2996
|
/** Helper function to get the room safe grid index for every room on the entire floor. */
|
|
2471
2997
|
export declare function getAllRoomGridIndexes(): int[];
|
|
2472
2998
|
|
|
2999
|
+
/**
|
|
3000
|
+
* Helper function to get the corresponding ambush type for the current room. Returns undefined if
|
|
3001
|
+
* the current room does not correspond to any particular ambush type.
|
|
3002
|
+
*/
|
|
3003
|
+
export declare function getAmbushType(): AmbushType | undefined;
|
|
3004
|
+
|
|
2473
3005
|
export declare function getAngelRoomDoor(): GridEntityDoor | undefined;
|
|
2474
3006
|
|
|
2475
3007
|
export declare function getAngleDifference(angle1: float, angle2: float): float;
|
|
@@ -2657,8 +3189,11 @@ export declare function getCharacters(): PlayerType[];
|
|
|
2657
3189
|
* This function accounts for The Battery. For example, if the player has 2/6 charges on a D6, this
|
|
2658
3190
|
* function will return 10 (because there are 4 charges remaining on the base charge and 6 charges
|
|
2659
3191
|
* remaining on The Battery charge).
|
|
3192
|
+
*
|
|
3193
|
+
* @param player The player to get the charges from.
|
|
3194
|
+
* @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
|
|
2660
3195
|
*/
|
|
2661
|
-
export declare function getChargesAwayFromMax(player: EntityPlayer, activeSlot
|
|
3196
|
+
export declare function getChargesAwayFromMax(player: EntityPlayer, activeSlot?: ActiveSlot): int;
|
|
2662
3197
|
|
|
2663
3198
|
/**
|
|
2664
3199
|
* Helper function to get an array of equidistant points on the circumference around a circle.
|
|
@@ -4155,6 +4690,12 @@ export declare function getPlayerFromEntity(entity: Entity): EntityPlayer | unde
|
|
|
4155
4690
|
*/
|
|
4156
4691
|
export declare function getPlayerFromIndex(playerIndex: PlayerIndex): EntityPlayer | undefined;
|
|
4157
4692
|
|
|
4693
|
+
/**
|
|
4694
|
+
* Helper function to get an `EntityPlayer` object from an `EntityPtr`. Returns undefined if the
|
|
4695
|
+
* entity has gone out of scope or if the associated entity is not a player.
|
|
4696
|
+
*/
|
|
4697
|
+
export declare function getPlayerFromPtr(entityPtr: EntityPtr): EntityPlayer | undefined;
|
|
4698
|
+
|
|
4158
4699
|
/**
|
|
4159
4700
|
* Helper function to get an object representing the player's health. You can use this in
|
|
4160
4701
|
* combination with the `setPlayerHealth` function to restore the player's health back to a certain
|
|
@@ -5237,8 +5778,11 @@ export declare function getTopLeftWallGridIndex(): int;
|
|
|
5237
5778
|
* Helper function to get the combined normal charge and the battery charge for the player's active
|
|
5238
5779
|
* item. This is useful because you have to add these two values together when setting the active
|
|
5239
5780
|
* charge.
|
|
5781
|
+
*
|
|
5782
|
+
* @param player The player to get the charges from.
|
|
5783
|
+
* @param activeSlot Optional. The slot to get the charges from. Default is `ActiveSlot.PRIMARY`.
|
|
5240
5784
|
*/
|
|
5241
|
-
export declare function getTotalCharge(player: EntityPlayer, activeSlot
|
|
5785
|
+
export declare function getTotalCharge(player: EntityPlayer, activeSlot?: ActiveSlot): int;
|
|
5242
5786
|
|
|
5243
5787
|
/**
|
|
5244
5788
|
* Returns the total number of collectibles amongst all players. For example, if player 1 has 1 Sad
|
|
@@ -5360,14 +5904,24 @@ export declare function getTrinketsForCacheFlag(cacheFlag: CacheFlag): ReadonlyS
|
|
|
5360
5904
|
export declare function getTrinketTypes(): TrinketType[];
|
|
5361
5905
|
|
|
5362
5906
|
/**
|
|
5363
|
-
* Helper function to get the
|
|
5364
|
-
*
|
|
5365
|
-
*
|
|
5907
|
+
* Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
|
|
5908
|
+
* located on the metatable.
|
|
5909
|
+
*
|
|
5910
|
+
* Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
5911
|
+
*/
|
|
5912
|
+
export declare function getTSTLClassConstructor(object: unknown): TSTLClassMetatable["constructor"] | undefined;
|
|
5913
|
+
|
|
5914
|
+
export declare function getTSTLClassMethods(object: unknown): FunctionTuple[];
|
|
5915
|
+
|
|
5916
|
+
/**
|
|
5917
|
+
* Helper function to get the name of a TypeScriptToLua class from the instantiated class object.
|
|
5918
|
+
*
|
|
5919
|
+
* TSTL classes are Lua tables created with the `__TS__Class` Lua function from the TSTL lualib.
|
|
5920
|
+
* Their name is contained within "constructor.name" metatable key.
|
|
5366
5921
|
*
|
|
5367
5922
|
* For example, a `Map` class is has a name of "Map".
|
|
5368
5923
|
*
|
|
5369
|
-
* Returns undefined if
|
|
5370
|
-
* exist.
|
|
5924
|
+
* Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
5371
5925
|
*/
|
|
5372
5926
|
export declare function getTSTLClassName(object: unknown): string | undefined;
|
|
5373
5927
|
|
|
@@ -5455,6 +6009,20 @@ export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
|
5455
6009
|
*/
|
|
5456
6010
|
export declare function gridCoordinatesToWorldPosition(x: int, y: int): Vector;
|
|
5457
6011
|
|
|
6012
|
+
declare class GridEntityCollisionDetection extends Feature {
|
|
6013
|
+
v: {
|
|
6014
|
+
room: {
|
|
6015
|
+
/** Indexed by grid entity pointer hash. */
|
|
6016
|
+
collidingEntitiesMap: DefaultMap<PtrHash, Set<PtrHash>, []>;
|
|
6017
|
+
};
|
|
6018
|
+
};
|
|
6019
|
+
private postGridEntityCollision;
|
|
6020
|
+
private postGridEntityCustomCollision;
|
|
6021
|
+
private customGridEntities;
|
|
6022
|
+
constructor(postGridEntityCollision: PostGridEntityCollision, postGridEntityCustomCollision: PostGridEntityCustomCollision, customGridEntities: CustomGridEntities);
|
|
6023
|
+
private postUpdate;
|
|
6024
|
+
}
|
|
6025
|
+
|
|
5458
6026
|
/**
|
|
5459
6027
|
* This is meta-data that describes a custom grid entity.
|
|
5460
6028
|
*
|
|
@@ -5474,6 +6042,39 @@ export declare interface GridEntityCustomData {
|
|
|
5474
6042
|
defaultAnimation?: string;
|
|
5475
6043
|
}
|
|
5476
6044
|
|
|
6045
|
+
declare class GridEntityDetection extends Feature {
|
|
6046
|
+
v: {
|
|
6047
|
+
room: {
|
|
6048
|
+
/** Indexed by grid index. */
|
|
6049
|
+
initializedGridEntities: Map<number, GridEntityTuple>;
|
|
6050
|
+
};
|
|
6051
|
+
};
|
|
6052
|
+
private postGridEntityInit;
|
|
6053
|
+
private postGridEntityCustomInit;
|
|
6054
|
+
private postGridEntityUpdate;
|
|
6055
|
+
private postGridEntityCustomUpdate;
|
|
6056
|
+
private postGridEntityRemove;
|
|
6057
|
+
private postGridEntityCustomRemove;
|
|
6058
|
+
private postGridEntityStateChanged;
|
|
6059
|
+
private postGridEntityCustomStateChanged;
|
|
6060
|
+
private postGridEntityBroken;
|
|
6061
|
+
private postGridEntityCustomBroken;
|
|
6062
|
+
private customGridEntities;
|
|
6063
|
+
constructor(postGridEntityInit: PostGridEntityInit, postGridEntityCustomInit: PostGridEntityCustomInit, postGridEntityUpdate: PostGridEntityUpdate, postGridEntityCustomUpdate: PostGridEntityCustomUpdate, postGridEntityRemove: PostGridEntityRemove, postGridEntityCustomRemove: PostGridEntityCustomRemove, postGridEntityStateChanged: PostGridEntityStateChanged, postGridEntityCustomStateChanged: PostGridEntityCustomStateChanged, postGridEntityBroken: PostGridEntityBroken, postGridEntityCustomBroken: PostGridEntityCustomBroken, customGridEntities: CustomGridEntities);
|
|
6064
|
+
private postUpdate;
|
|
6065
|
+
private checkGridEntitiesRemoved;
|
|
6066
|
+
private checkGridEntityStateChanged;
|
|
6067
|
+
private checkNewGridEntity;
|
|
6068
|
+
private updateTupleInMap;
|
|
6069
|
+
private postNewRoomReordered;
|
|
6070
|
+
}
|
|
6071
|
+
|
|
6072
|
+
declare type GridEntityTuple = [
|
|
6073
|
+
gridEntityType: GridEntityType,
|
|
6074
|
+
variant: int,
|
|
6075
|
+
state: int
|
|
6076
|
+
];
|
|
6077
|
+
|
|
5477
6078
|
/**
|
|
5478
6079
|
* Helper function to convert a grid index to a grid position.
|
|
5479
6080
|
*
|
|
@@ -5489,6 +6090,32 @@ export declare function gridIndexToGridPosition(gridIndex: int, roomShape: RoomS
|
|
|
5489
6090
|
*/
|
|
5490
6091
|
export declare function gridPositionToWorldPosition(gridPosition: Vector): Vector;
|
|
5491
6092
|
|
|
6093
|
+
/**
|
|
6094
|
+
* A helper type to ensure that an object contains a key for every enum member. Use this with `as
|
|
6095
|
+
* const` and `satisfies` to prevent narrowing the type of the object.
|
|
6096
|
+
*
|
|
6097
|
+
* For example:
|
|
6098
|
+
*
|
|
6099
|
+
* ```ts
|
|
6100
|
+
* enum MyEnum {
|
|
6101
|
+
* Value1,
|
|
6102
|
+
* Value2,
|
|
6103
|
+
* Value3,
|
|
6104
|
+
* }
|
|
6105
|
+
*
|
|
6106
|
+
* const MyEnumToString = {
|
|
6107
|
+
* [MyEnum.Value1]: "foo",
|
|
6108
|
+
* [MyEnum.Value2]: "bar",
|
|
6109
|
+
* [MyEnum.Value3]: "baz",
|
|
6110
|
+
* } as const satisfies HasAllEnumKeys<MyEnum>;
|
|
6111
|
+
*
|
|
6112
|
+
* const value = MyEnumToString[MyEnum.Value2];
|
|
6113
|
+
* ```
|
|
6114
|
+
*/
|
|
6115
|
+
export declare type HasAllEnumKeys<T extends string | number> = {
|
|
6116
|
+
readonly [key in T]: unknown;
|
|
6117
|
+
};
|
|
6118
|
+
|
|
5492
6119
|
/**
|
|
5493
6120
|
* Helper function to see if a particular entity has armor. In this context, armor refers to the
|
|
5494
6121
|
* damage scaling mechanic. For example, Ultra Greed has armor, but a Gaper does not.
|
|
@@ -5712,33 +6339,6 @@ export declare function inHomeCloset(): boolean;
|
|
|
5712
6339
|
*/
|
|
5713
6340
|
export declare function initArray<T>(defaultValue: T, size: int): T[];
|
|
5714
6341
|
|
|
5715
|
-
/**
|
|
5716
|
-
* `isaacscript-common` provides custom doors that can be spawned where any wall segment is. If you
|
|
5717
|
-
* use this feature, you must first call this initialization function at the beginning of your mod.
|
|
5718
|
-
*
|
|
5719
|
-
* Each kind of custom door that you create must have an entry in the "content/entities2.xml" file,
|
|
5720
|
-
* like so:
|
|
5721
|
-
*
|
|
5722
|
-
* ```xml
|
|
5723
|
-
* <entity id="1000" name="Foo Custom Door" anm2path="grid/door_foo.anm2" />
|
|
5724
|
-
* ```
|
|
5725
|
-
*
|
|
5726
|
-
* (Custom door entities must have an id of "1000", which corresponds to an effect. If you do not
|
|
5727
|
-
* specify the variant, then the game will automatically assign it.)
|
|
5728
|
-
*
|
|
5729
|
-
* Next, pass the variant into this function:
|
|
5730
|
-
*
|
|
5731
|
-
* ```ts
|
|
5732
|
-
* const modVanilla = RegisterMod("My Mod", 1);
|
|
5733
|
-
* const mod = upgradeMod(modVanilla);
|
|
5734
|
-
* const fooEffectVariant = Isaac.GetEntityVariantByName("Foo Custom Door");
|
|
5735
|
-
* initCustomDoor(mod, fooEffectVariant);
|
|
5736
|
-
* ```
|
|
5737
|
-
*
|
|
5738
|
-
* Also see the `spawnCustomDoor` function.
|
|
5739
|
-
*/
|
|
5740
|
-
export declare function initCustomDoor(mod: ModUpgraded, effectVariant: EffectVariant): void;
|
|
5741
|
-
|
|
5742
6342
|
/** Helper function to determine if the current room shape is one of the four L room shapes. */
|
|
5743
6343
|
export declare function inLRoom(): boolean;
|
|
5744
6344
|
|
|
@@ -5794,6 +6394,17 @@ export declare function inSecretShop(): boolean;
|
|
|
5794
6394
|
*/
|
|
5795
6395
|
export declare function inStartingRoom(): boolean;
|
|
5796
6396
|
|
|
6397
|
+
/**
|
|
6398
|
+
* Used for `setInterval` functions.
|
|
6399
|
+
*
|
|
6400
|
+
* The return value is whether or not to continue the function from firing.
|
|
6401
|
+
*/
|
|
6402
|
+
declare type IntervalFunctionTuple = [
|
|
6403
|
+
frameCountToFire: int,
|
|
6404
|
+
func: () => boolean,
|
|
6405
|
+
numIntervalFrames: int
|
|
6406
|
+
];
|
|
6407
|
+
|
|
5797
6408
|
/**
|
|
5798
6409
|
* Helper function to return an array of integers with the specified range, inclusive on both ends.
|
|
5799
6410
|
* (The "i" stands for inclusive.)
|
|
@@ -5842,9 +6453,22 @@ export declare function isActionTriggeredOnAnyInput(buttonAction: ButtonAction):
|
|
|
5842
6453
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
5843
6454
|
export declare function isActiveCollectible(collectibleType: CollectibleType): boolean;
|
|
5844
6455
|
|
|
5845
|
-
|
|
6456
|
+
/**
|
|
6457
|
+
* Helper function to check if a player's active item is "double charged", meaning that it has both
|
|
6458
|
+
* a full normal charge and a full charge from The Battery.
|
|
6459
|
+
*
|
|
6460
|
+
* @param player The player to check.
|
|
6461
|
+
* @param activeSlot Optional. The slot to check. Default is `ActiveSlot.PRIMARY`.
|
|
6462
|
+
*/
|
|
6463
|
+
export declare function isActiveSlotDoubleCharged(player: EntityPlayer, activeSlot?: ActiveSlot): boolean;
|
|
5846
6464
|
|
|
5847
|
-
|
|
6465
|
+
/**
|
|
6466
|
+
* Helper function to check if the active slot of a particular player is empty.
|
|
6467
|
+
*
|
|
6468
|
+
* @param player The player to check.
|
|
6469
|
+
* @param activeSlot Optional. The active slot to check. Default is `ActiveSlot.PRIMARY`.
|
|
6470
|
+
*/
|
|
6471
|
+
export declare function isActiveSlotEmpty(player: EntityPlayer, activeSlot?: ActiveSlot): boolean;
|
|
5848
6472
|
|
|
5849
6473
|
/**
|
|
5850
6474
|
* Checks for specific NPCs that have "CanShutDoors" set to true naturally by the game, but should
|
|
@@ -5940,6 +6564,30 @@ export declare function isCardPickup(pickup: EntityPickup): pickup is EntityPick
|
|
|
5940
6564
|
/** Returns whether or not the given card type matches the specified item config card type. */
|
|
5941
6565
|
export declare function isCardType(cardType: CardType, itemConfigCardType: ItemConfigCardType): boolean;
|
|
5942
6566
|
|
|
6567
|
+
export declare enum ISCFeature {
|
|
6568
|
+
CUSTOM_REVIVE = "CustomRevive",
|
|
6569
|
+
ESAU_JR_DETECTION = "EsauJrDetection",
|
|
6570
|
+
FLIP_DETECTION = "FlipDetection",
|
|
6571
|
+
GRID_ENTITY_COLLISION_DETECTION = "GridEntityCollisionDetection",
|
|
6572
|
+
GRID_ENTITY_DETECTION = "GridEntityDetection",
|
|
6573
|
+
GAME_REORDERED_CALLBACKS = "GameReorderedCallbacks",
|
|
6574
|
+
PLAYER_REORDERED_CALLBACKS = "PlayerReorderedCallbacks",
|
|
6575
|
+
CUSTOM_GRID_ENTITIES = "CustomGridEntities",
|
|
6576
|
+
RUN_IN_N_FRAMES = "runInNFrames"
|
|
6577
|
+
}
|
|
6578
|
+
|
|
6579
|
+
declare interface ISCFeatureToClass {
|
|
6580
|
+
[ISCFeature.CUSTOM_REVIVE]: CustomRevive;
|
|
6581
|
+
[ISCFeature.ESAU_JR_DETECTION]: EsauJrDetection;
|
|
6582
|
+
[ISCFeature.FLIP_DETECTION]: FlipDetection;
|
|
6583
|
+
[ISCFeature.GRID_ENTITY_COLLISION_DETECTION]: GridEntityCollisionDetection;
|
|
6584
|
+
[ISCFeature.GRID_ENTITY_DETECTION]: GridEntityDetection;
|
|
6585
|
+
[ISCFeature.GAME_REORDERED_CALLBACKS]: GameReorderedCallbacks;
|
|
6586
|
+
[ISCFeature.PLAYER_REORDERED_CALLBACKS]: PlayerReorderedCallbacks;
|
|
6587
|
+
[ISCFeature.CUSTOM_GRID_ENTITIES]: CustomGridEntities;
|
|
6588
|
+
[ISCFeature.RUN_IN_N_FRAMES]: RunInNFrames;
|
|
6589
|
+
}
|
|
6590
|
+
|
|
5943
6591
|
/**
|
|
5944
6592
|
* Helper function to check if a player is a specific character (i.e. `PlayerType`).
|
|
5945
6593
|
*
|
|
@@ -6179,6 +6827,12 @@ export declare function isGlitchedCollectible(pickup: EntityPickup): boolean;
|
|
|
6179
6827
|
|
|
6180
6828
|
export declare function isGoldenTrinketType(trinketType: TrinketType): boolean;
|
|
6181
6829
|
|
|
6830
|
+
/**
|
|
6831
|
+
* Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
6832
|
+
* `Difficulty.GREEDIER`.
|
|
6833
|
+
*/
|
|
6834
|
+
export declare function isGreedMode(): boolean;
|
|
6835
|
+
|
|
6182
6836
|
/** Helper function to detect if a variable is of type `GridEntity`. */
|
|
6183
6837
|
export declare function isGridEntity(variable: unknown): variable is GridEntity;
|
|
6184
6838
|
|
|
@@ -6408,8 +7062,13 @@ export declare function isRedHeart(pickup: EntityPickup): boolean;
|
|
|
6408
7062
|
export declare function isRedKeyRoom(roomGridIndex?: int): boolean;
|
|
6409
7063
|
|
|
6410
7064
|
/**
|
|
6411
|
-
*
|
|
6412
|
-
*
|
|
7065
|
+
* Helper function to see if the current render callback is rendering a water reflection.
|
|
7066
|
+
*
|
|
7067
|
+
* When the player is in a room with water, things will be rendered twice: once for the normal
|
|
7068
|
+
* rendering, and once for the reflecting rendering. Thus, any mod code in a render callback will
|
|
7069
|
+
* run twice per frame in these situations, which may be unexpected or cause bugs.
|
|
7070
|
+
*
|
|
7071
|
+
* This function is typically used to early return from a render function if it returns true.
|
|
6413
7072
|
*/
|
|
6414
7073
|
export declare function isReflectionRender(): boolean;
|
|
6415
7074
|
|
|
@@ -6548,6 +7207,9 @@ export declare function isSuitCard(cardType: CardType): boolean;
|
|
|
6548
7207
|
|
|
6549
7208
|
export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
|
|
6550
7209
|
|
|
7210
|
+
/** Helper function to check if a Lua table has 0 keys. */
|
|
7211
|
+
export declare function isTableEmpty(luaMap: LuaMap<AnyNotNil, unknown>): boolean;
|
|
7212
|
+
|
|
6551
7213
|
/** Helper function for detecting if a player is one of the Tainted characters. */
|
|
6552
7214
|
export declare function isTainted(player: EntityPlayer): boolean;
|
|
6553
7215
|
|
|
@@ -6603,16 +7265,18 @@ export declare function isTrinket(pickup: EntityPickup): pickup is EntityPickupT
|
|
|
6603
7265
|
/**
|
|
6604
7266
|
* Helper function to determine if a given object is a TypeScriptToLua `Map`.
|
|
6605
7267
|
*
|
|
6606
|
-
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
6607
|
-
* their own
|
|
7268
|
+
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
7269
|
+
* might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
7270
|
+
* `Map`.
|
|
6608
7271
|
*/
|
|
6609
7272
|
export declare function isTSTLMap(object: unknown): object is Map<AnyNotNil, unknown>;
|
|
6610
7273
|
|
|
6611
7274
|
/**
|
|
6612
7275
|
* Helper function to determine if a given object is a TypeScriptToLua `Set`.
|
|
6613
7276
|
*
|
|
6614
|
-
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
6615
|
-
* their own
|
|
7277
|
+
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
7278
|
+
* might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
7279
|
+
* `Set`.
|
|
6616
7280
|
*/
|
|
6617
7281
|
export declare function isTSTLSet(object: unknown): object is Set<AnyNotNil>;
|
|
6618
7282
|
|
|
@@ -6858,6 +7522,25 @@ export declare function kColorEquals(kColor1: KColor, kColor2: KColor): boolean;
|
|
|
6858
7522
|
*/
|
|
6859
7523
|
export declare function keyboardToString(keyboard: Keyboard, uppercase: boolean): string | undefined;
|
|
6860
7524
|
|
|
7525
|
+
declare type KeysToScrubFromModClass = keyof Feature | LowercaseKeys<ModUpgraded>;
|
|
7526
|
+
|
|
7527
|
+
/**
|
|
7528
|
+
* For `EntityType.EFFECT` (1000), `EffectVariant.LADDER` (8).
|
|
7529
|
+
*
|
|
7530
|
+
* Note that vanilla ladders only use a sub-type of 0. The `isaacscript-common` library uses ladders
|
|
7531
|
+
* to represent custom objects, since they are non-interacting and will not automatically despawn
|
|
7532
|
+
* after time passes, unlike most other effects.
|
|
7533
|
+
*
|
|
7534
|
+
* This enum tracks the kinds of custom objects that are represented by vanilla ladders. We start
|
|
7535
|
+
* assigning sub-types after 100 as to not interfere with any possible modded ladder variants.
|
|
7536
|
+
*/
|
|
7537
|
+
export declare enum LadderSubTypeCustom {
|
|
7538
|
+
LADDER = 0,
|
|
7539
|
+
CUSTOM_BACKDROP = 101,
|
|
7540
|
+
CUSTOM_SHADOW = 102,
|
|
7541
|
+
CUSTOM_PICKUP = 103
|
|
7542
|
+
}
|
|
7543
|
+
|
|
6861
7544
|
/**
|
|
6862
7545
|
* Equal to `PillColor.HORSE_WHITE_YELLOW`.
|
|
6863
7546
|
*
|
|
@@ -7058,6 +7741,8 @@ export declare function logUserdata(userdata: unknown): void;
|
|
|
7058
7741
|
|
|
7059
7742
|
export declare function logVector(vector: Vector, round?: boolean): void;
|
|
7060
7743
|
|
|
7744
|
+
export declare type LowercaseKeys<T> = StartsWithLowercase<keyof T>;
|
|
7745
|
+
|
|
7061
7746
|
/**
|
|
7062
7747
|
* Helper function for non-TypeScript users to convert all of the elements in an array to something
|
|
7063
7748
|
* else.
|
|
@@ -7122,6 +7807,20 @@ export declare function mapSetHash<V>(map: Map<PtrHash, V>, entity: Entity, valu
|
|
|
7122
7807
|
*/
|
|
7123
7808
|
export declare function mapSetPlayer<V>(map: Map<PlayerIndex, V>, player: EntityPlayer, value: V): void;
|
|
7124
7809
|
|
|
7810
|
+
/**
|
|
7811
|
+
* A helper type used to get the matching `ModCallbackCustom` enum values that match the provided
|
|
7812
|
+
* callback function signature.
|
|
7813
|
+
*
|
|
7814
|
+
* "T extends T" is necessary because of distributive conditional types:
|
|
7815
|
+
* https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
|
|
7816
|
+
*
|
|
7817
|
+
* "extends Parameters<FuncSignature>" is necessary because "() => void" will match "(arg1: number)
|
|
7818
|
+
* => void", since in JavaScript, functions ignore extra arguments.
|
|
7819
|
+
*
|
|
7820
|
+
* "extends ReturnType<FuncSignature>" is necessary because "() => void" will match "() => number".
|
|
7821
|
+
*/
|
|
7822
|
+
declare type MatchingCallbackCustom<FuncSignature extends (...args: any[]) => unknown, T extends ModCallbackCustom2 = ModCallbackCustom2> = T extends T ? AddCallbackParametersCustom2[T][0] extends FuncSignature ? Parameters<AddCallbackParametersCustom2[T][0]> extends Parameters<FuncSignature> ? ReturnType<AddCallbackParametersCustom2[T][0]> extends ReturnType<FuncSignature> ? T : never : never : never : never;
|
|
7823
|
+
|
|
7125
7824
|
/**
|
|
7126
7825
|
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
7127
7826
|
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
@@ -7182,8 +7881,9 @@ export declare enum ModCallbackCustom {
|
|
|
7182
7881
|
* Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is started.
|
|
7183
7882
|
* Specifically, this happens on the first frame that `Room.IsAmbushDone` is true.
|
|
7184
7883
|
*
|
|
7185
|
-
* When registering the callback
|
|
7186
|
-
* only fire if
|
|
7884
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
7885
|
+
* an optional third argument that will make the callback only fire if it matches the `AmbushType`
|
|
7886
|
+
* provided.
|
|
7187
7887
|
*
|
|
7188
7888
|
* ```ts
|
|
7189
7889
|
* function postAmbushFinished(ambushType: AmbushType): void {}
|
|
@@ -7194,8 +7894,9 @@ export declare enum ModCallbackCustom {
|
|
|
7194
7894
|
* Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is completed.
|
|
7195
7895
|
* Specifically, this happens on the first frame that `Room.IsAmbushActive` is true.
|
|
7196
7896
|
*
|
|
7197
|
-
* When registering the callback
|
|
7198
|
-
* only fire if
|
|
7897
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
7898
|
+
* an optional third argument that will make the callback only fire if it matches the `AmbushType`
|
|
7899
|
+
* provided.
|
|
7199
7900
|
*
|
|
7200
7901
|
* ```ts
|
|
7201
7902
|
* function postAmbushStarted(ambushType: AmbushType): void {}
|
|
@@ -7205,8 +7906,9 @@ export declare enum ModCallbackCustom {
|
|
|
7205
7906
|
/**
|
|
7206
7907
|
* Fires on the `POST_BOMB_UPDATE` callback that it explodes.
|
|
7207
7908
|
*
|
|
7208
|
-
* When registering the callback
|
|
7209
|
-
* only fire if
|
|
7909
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
7910
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
7911
|
+
* `BombVariant` provided.
|
|
7210
7912
|
*
|
|
7211
7913
|
* ```ts
|
|
7212
7914
|
* function postBombDetonated(bomb: EntityBomb): void {}
|
|
@@ -7219,8 +7921,9 @@ export declare enum ModCallbackCustom {
|
|
|
7219
7921
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7220
7922
|
* normal `POST_BOMB_INIT` callback.
|
|
7221
7923
|
*
|
|
7222
|
-
* When registering the callback
|
|
7223
|
-
* only fire if
|
|
7924
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
7925
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
7926
|
+
* `BombVariant` provided.
|
|
7224
7927
|
*
|
|
7225
7928
|
* ```ts
|
|
7226
7929
|
* function postBombInitLate(bomb: EntityBomb): void {}
|
|
@@ -7239,8 +7942,9 @@ export declare enum ModCallbackCustom {
|
|
|
7239
7942
|
* Fires from the `POST_PICKUP_UPDATE` callback when a collectible goes from a non-zero sub-type
|
|
7240
7943
|
* to `CollectibleType.NULL` (i.e. an "empty" pedestal).
|
|
7241
7944
|
*
|
|
7242
|
-
* When registering the callback
|
|
7243
|
-
* only fire if the
|
|
7945
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
7946
|
+
* an optional third argument that will make the callback only fire if the pedestal changed from
|
|
7947
|
+
* the `CollectibleType` provided.
|
|
7244
7948
|
*
|
|
7245
7949
|
* ```ts
|
|
7246
7950
|
* function postCollectibleEmpty(
|
|
@@ -7259,11 +7963,12 @@ export declare enum ModCallbackCustom {
|
|
|
7259
7963
|
* upon re-entering the room. Additionally, when playing as Tainted Isaac, the `POST_PICKUP_INIT`
|
|
7260
7964
|
* callback will fire every time the item shifts.
|
|
7261
7965
|
*
|
|
7262
|
-
* When registering the callback
|
|
7263
|
-
* only fire if
|
|
7966
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
7967
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
7968
|
+
* `CollectibleType` provided.
|
|
7264
7969
|
*
|
|
7265
7970
|
* ```ts
|
|
7266
|
-
* function postCollectibleInitLate(collectible:
|
|
7971
|
+
* function postCollectibleInitLate(collectible: EntityPickupCollectible): void {}
|
|
7267
7972
|
* ```
|
|
7268
7973
|
*/
|
|
7269
7974
|
POST_COLLECTIBLE_INIT_FIRST = 6,
|
|
@@ -7272,28 +7977,17 @@ export declare enum ModCallbackCustom {
|
|
|
7272
7977
|
* begins playing after a player triggers a Cursed Eye teleport or a Cursed Skull teleport. (Both
|
|
7273
7978
|
* of these have the same effect in causing Isaac to be teleported to a random room.)
|
|
7274
7979
|
*
|
|
7980
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
7981
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
7982
|
+
* matches the `PlayerVariant` provided.
|
|
7983
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
7984
|
+
* matches the `PlayerType` provided.
|
|
7985
|
+
*
|
|
7275
7986
|
* ```ts
|
|
7276
7987
|
* function postCursedTeleport(player: EntityPlayer): void {}
|
|
7277
7988
|
* ```
|
|
7278
7989
|
*/
|
|
7279
7990
|
POST_CURSED_TELEPORT = 7,
|
|
7280
|
-
/**
|
|
7281
|
-
* Fires from the `POST_PEFFECT_UPDATE` callback when a player enters the loading zone of a custom
|
|
7282
|
-
* door created with the `spawnCustomDoor` helper function.
|
|
7283
|
-
*
|
|
7284
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7285
|
-
* only fire if it matches the `DoorVariant` provided.
|
|
7286
|
-
*
|
|
7287
|
-
* ```ts
|
|
7288
|
-
* function postCustomDoorEnter(
|
|
7289
|
-
* player: EntityPlayer,
|
|
7290
|
-
* effectVariant: int,
|
|
7291
|
-
* doorSlot: DoorSlot,
|
|
7292
|
-
* direction: Direction,
|
|
7293
|
-
* ): void {}
|
|
7294
|
-
* ```
|
|
7295
|
-
*/
|
|
7296
|
-
POST_CUSTOM_DOOR_ENTER = 8,
|
|
7297
7991
|
/**
|
|
7298
7992
|
* Fires from the `POST_PLAYER_UPDATE` callback after the player has finished the death animation,
|
|
7299
7993
|
* has teleported to the previous room, and is ready to play the animation for the modded revival
|
|
@@ -7303,20 +7997,22 @@ export declare enum ModCallbackCustom {
|
|
|
7303
7997
|
* `player.AnimateCollectible(CollectibleTypeCustom.COLLECTIBLE_MY_REVIVAL_ITEM);`, otherwise the
|
|
7304
7998
|
* animation for a 1-Up will play.
|
|
7305
7999
|
*
|
|
7306
|
-
* When registering the callback
|
|
7307
|
-
* only fire if the revival type matches
|
|
8000
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8001
|
+
* an optional third argument that will make the callback only fire if the revival type matches
|
|
8002
|
+
* the one provided.
|
|
7308
8003
|
*
|
|
7309
8004
|
* ```ts
|
|
7310
8005
|
* function postCustomRevive(player: EntityPlayer, revivalType: int): void {}
|
|
7311
8006
|
* ```
|
|
7312
8007
|
*/
|
|
7313
|
-
POST_CUSTOM_REVIVE =
|
|
8008
|
+
POST_CUSTOM_REVIVE = 8,
|
|
7314
8009
|
/**
|
|
7315
8010
|
* Fires from the `EFFECT_POST_UPDATE` callback after a player has entered the range of a Dice
|
|
7316
8011
|
* Room floor.
|
|
7317
8012
|
*
|
|
7318
|
-
* When registering the callback
|
|
7319
|
-
* only fire if
|
|
8013
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8014
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8015
|
+
* `DiceFloorSubType` provided.
|
|
7320
8016
|
*
|
|
7321
8017
|
* ```ts
|
|
7322
8018
|
* function postDiceRoomActivated(
|
|
@@ -7325,49 +8021,53 @@ export declare enum ModCallbackCustom {
|
|
|
7325
8021
|
* ): void {}
|
|
7326
8022
|
* ```
|
|
7327
8023
|
*/
|
|
7328
|
-
POST_DICE_ROOM_ACTIVATED =
|
|
8024
|
+
POST_DICE_ROOM_ACTIVATED = 9,
|
|
7329
8025
|
/**
|
|
7330
8026
|
* Fires from the `POST_RENDER` callback on every frame that a door exists.
|
|
7331
8027
|
*
|
|
7332
|
-
* When registering the callback
|
|
7333
|
-
* only fire if it matches the variant
|
|
8028
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8029
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8030
|
+
* provided.
|
|
7334
8031
|
*
|
|
7335
8032
|
* ```ts
|
|
7336
8033
|
* function postDoorRender(door: GridEntityDoor): void {}
|
|
7337
8034
|
* ```
|
|
7338
8035
|
*/
|
|
7339
|
-
POST_DOOR_RENDER =
|
|
8036
|
+
POST_DOOR_RENDER = 10,
|
|
7340
8037
|
/**
|
|
7341
8038
|
* Fires from the `POST_UPDATE` callback on every frame that a door exists.
|
|
7342
8039
|
*
|
|
7343
|
-
* When registering the callback
|
|
7344
|
-
* only fire if it matches the variant
|
|
8040
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8041
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8042
|
+
* provided.
|
|
7345
8043
|
*
|
|
7346
8044
|
* ```ts
|
|
7347
8045
|
* function postDoorUpdate(door: GridEntityDoor): void {}
|
|
7348
8046
|
* ```
|
|
7349
8047
|
*/
|
|
7350
|
-
POST_DOOR_UPDATE =
|
|
8048
|
+
POST_DOOR_UPDATE = 11,
|
|
7351
8049
|
/**
|
|
7352
8050
|
* Fires on the first `POST_EFFECT_UPDATE` frame for each effect.
|
|
7353
8051
|
*
|
|
7354
8052
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7355
8053
|
* normal `POST_EFFECT_INIT` callback.
|
|
7356
8054
|
*
|
|
7357
|
-
* When registering the callback
|
|
7358
|
-
* only fire if
|
|
8055
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8056
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8057
|
+
* `EffectVariant` provided.
|
|
7359
8058
|
*
|
|
7360
8059
|
* ```ts
|
|
7361
8060
|
* function postEffectInitLate(effect: EntityEffect): void {}
|
|
7362
8061
|
* ```
|
|
7363
8062
|
*/
|
|
7364
|
-
POST_EFFECT_INIT_LATE =
|
|
8063
|
+
POST_EFFECT_INIT_LATE = 12,
|
|
7365
8064
|
/**
|
|
7366
8065
|
* Fires from the `POST_EFFECT_UPDATE` callback when an effect's state has changed from what it
|
|
7367
8066
|
* was on the previous frame. (In this context, "state" refers to the `EntityEffect.State` field.)
|
|
7368
8067
|
*
|
|
7369
|
-
* When registering the callback
|
|
7370
|
-
* only fire if it matches the
|
|
8068
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8069
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8070
|
+
* `EffectVariant` provided.
|
|
7371
8071
|
*
|
|
7372
8072
|
* ```ts
|
|
7373
8073
|
* function postEffectStateChanged(
|
|
@@ -7377,7 +8077,7 @@ export declare enum ModCallbackCustom {
|
|
|
7377
8077
|
* ): void {}
|
|
7378
8078
|
* ```
|
|
7379
8079
|
*/
|
|
7380
|
-
POST_EFFECT_STATE_CHANGED =
|
|
8080
|
+
POST_EFFECT_STATE_CHANGED = 13,
|
|
7381
8081
|
/**
|
|
7382
8082
|
* Fires one `POST_UPDATE` frame after the player has used the Esau Jr. item. (The player is not
|
|
7383
8083
|
* updated to the new character until a game frame has passed.)
|
|
@@ -7386,28 +8086,30 @@ export declare enum ModCallbackCustom {
|
|
|
7386
8086
|
* function postEsauJr(player: EntityPlayer): void {}
|
|
7387
8087
|
* ```
|
|
7388
8088
|
*/
|
|
7389
|
-
POST_ESAU_JR =
|
|
8089
|
+
POST_ESAU_JR = 14,
|
|
7390
8090
|
/**
|
|
7391
8091
|
* Fires on the first `FAMILIAR_UPDATE` frame for each familiar.
|
|
7392
8092
|
*
|
|
7393
8093
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7394
8094
|
* normal `POST_TEAR_INIT` callback.
|
|
7395
8095
|
*
|
|
7396
|
-
* When registering the callback
|
|
7397
|
-
* only fire if
|
|
8096
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8097
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8098
|
+
* `FamiliarVariant` provided.
|
|
7398
8099
|
*
|
|
7399
8100
|
* ```ts
|
|
7400
8101
|
* function postFamiliarInitLate(familiar: EntityFamiliar): void {}
|
|
7401
8102
|
* ```
|
|
7402
8103
|
*/
|
|
7403
|
-
POST_FAMILIAR_INIT_LATE =
|
|
8104
|
+
POST_FAMILIAR_INIT_LATE = 15,
|
|
7404
8105
|
/**
|
|
7405
8106
|
* Fires from the `POST_FAMILIAR_UPDATE` callback when a familiar's state has changed from what it
|
|
7406
8107
|
* was on the previous frame. (In this context, "state" refers to the `EntityFamiliar.State`
|
|
7407
8108
|
* field.)
|
|
7408
8109
|
*
|
|
7409
|
-
* When registering the callback
|
|
7410
|
-
* only fire if it matches the
|
|
8110
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8111
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8112
|
+
* `FamiliarVariant` provided.
|
|
7411
8113
|
*
|
|
7412
8114
|
* ```ts
|
|
7413
8115
|
* function postFamiliarStateChanged(
|
|
@@ -7417,7 +8119,7 @@ export declare enum ModCallbackCustom {
|
|
|
7417
8119
|
* ): void {}
|
|
7418
8120
|
* ```
|
|
7419
8121
|
*/
|
|
7420
|
-
POST_FAMILIAR_STATE_CHANGED =
|
|
8122
|
+
POST_FAMILIAR_STATE_CHANGED = 16,
|
|
7421
8123
|
/**
|
|
7422
8124
|
* Fires one `POST_UPDATE` frame after the player has first used the Esau Jr. item. (The player is
|
|
7423
8125
|
* not updated to the new character until a game frame has passed.)
|
|
@@ -7429,7 +8131,7 @@ export declare enum ModCallbackCustom {
|
|
|
7429
8131
|
* function postFirstEsauJr(player: EntityPlayer): void {}
|
|
7430
8132
|
* ```
|
|
7431
8133
|
*/
|
|
7432
|
-
POST_FIRST_ESAU_JR =
|
|
8134
|
+
POST_FIRST_ESAU_JR = 17,
|
|
7433
8135
|
/**
|
|
7434
8136
|
* Fires after the player has used the Flip item for the first time. Unlike the vanilla `USE_ITEM`
|
|
7435
8137
|
* callback, this callback will return the player object for the new Lazarus (not the one who used
|
|
@@ -7442,7 +8144,7 @@ export declare enum ModCallbackCustom {
|
|
|
7442
8144
|
* function postFirstFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
|
|
7443
8145
|
* ```
|
|
7444
8146
|
*/
|
|
7445
|
-
POST_FIRST_FLIP =
|
|
8147
|
+
POST_FIRST_FLIP = 18,
|
|
7446
8148
|
/**
|
|
7447
8149
|
* Fires after the player has used the Flip item. Unlike the vanilla `USE_ITEM` callback, this
|
|
7448
8150
|
* callback will return the player object for the new Lazarus (not the one who used the Flip
|
|
@@ -7455,7 +8157,7 @@ export declare enum ModCallbackCustom {
|
|
|
7455
8157
|
* function postFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
|
|
7456
8158
|
* ```
|
|
7457
8159
|
*/
|
|
7458
|
-
POST_FLIP =
|
|
8160
|
+
POST_FLIP = 19,
|
|
7459
8161
|
/**
|
|
7460
8162
|
* Similar to the vanilla callback of the same name, but fires in the correct order with respect
|
|
7461
8163
|
* to the `POST_NEW_LEVEL` and the `POST_NEW_ROOM` callbacks:
|
|
@@ -7466,7 +8168,7 @@ export declare enum ModCallbackCustom {
|
|
|
7466
8168
|
* function postGameStartedReordered(isContinued: boolean): void {}
|
|
7467
8169
|
* ```
|
|
7468
8170
|
*/
|
|
7469
|
-
POST_GAME_STARTED_REORDERED =
|
|
8171
|
+
POST_GAME_STARTED_REORDERED = 20,
|
|
7470
8172
|
/**
|
|
7471
8173
|
* Similar to the `POST_GAME_STARTED_REORDERED` callback, but fires after all of the subscribed
|
|
7472
8174
|
* callbacks have finished firing. Thus, you can use this callback to do perform things after a
|
|
@@ -7477,7 +8179,7 @@ export declare enum ModCallbackCustom {
|
|
|
7477
8179
|
* function postGameStartedReorderedLast(isContinued: boolean): void {}
|
|
7478
8180
|
* ```
|
|
7479
8181
|
*/
|
|
7480
|
-
POST_GAME_STARTED_REORDERED_LAST =
|
|
8182
|
+
POST_GAME_STARTED_REORDERED_LAST = 21,
|
|
7481
8183
|
/**
|
|
7482
8184
|
* Fires from the `POST_UPDATE` callback when the Greed Mode wave increases.
|
|
7483
8185
|
*
|
|
@@ -7485,7 +8187,7 @@ export declare enum ModCallbackCustom {
|
|
|
7485
8187
|
* function postGreedModeWave(oldWave: int, newWave: int): void {}
|
|
7486
8188
|
* ```
|
|
7487
8189
|
*/
|
|
7488
|
-
POST_GREED_MODE_WAVE =
|
|
8190
|
+
POST_GREED_MODE_WAVE = 22,
|
|
7489
8191
|
/**
|
|
7490
8192
|
* Fires from the `POST_UPDATE` callback when a grid entity changes to a state that corresponds to
|
|
7491
8193
|
* the broken state for the respective grid entity type. (For example, this will fire for a
|
|
@@ -7494,16 +8196,17 @@ export declare enum ModCallbackCustom {
|
|
|
7494
8196
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7495
8197
|
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
7496
8198
|
*
|
|
7497
|
-
*
|
|
7498
|
-
*
|
|
7499
|
-
*
|
|
7500
|
-
*
|
|
8199
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8200
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8201
|
+
* matches the `GridEntityType` provided.
|
|
8202
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8203
|
+
* matches the variant provided.
|
|
7501
8204
|
*
|
|
7502
8205
|
* ```ts
|
|
7503
8206
|
* function postGridEntityBroken(gridEntity: GridEntity): void {}
|
|
7504
8207
|
* ```
|
|
7505
8208
|
*/
|
|
7506
|
-
POST_GRID_ENTITY_BROKEN =
|
|
8209
|
+
POST_GRID_ENTITY_BROKEN = 23,
|
|
7507
8210
|
/**
|
|
7508
8211
|
* Fires from the `POST_UPDATE` callback when a new entity collides with a grid entity. (After
|
|
7509
8212
|
* this, the callback will not continue to fire. It will only fire again once the entity moves out
|
|
@@ -7512,14 +8215,15 @@ export declare enum ModCallbackCustom {
|
|
|
7512
8215
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7513
8216
|
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
7514
8217
|
*
|
|
7515
|
-
*
|
|
7516
|
-
*
|
|
7517
|
-
*
|
|
7518
|
-
*
|
|
7519
|
-
*
|
|
7520
|
-
*
|
|
7521
|
-
*
|
|
7522
|
-
*
|
|
8218
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8219
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8220
|
+
* matches the `GridEntityType` provided.
|
|
8221
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8222
|
+
* matches the variant provided (for the grid entity).
|
|
8223
|
+
* - You can provide an optional fifth argument that will make the callback only fire if the
|
|
8224
|
+
* colliding entity matches the `EntityType` provided.
|
|
8225
|
+
* - You can provide an optional sixth argument that will make the callback only fire if the
|
|
8226
|
+
* colliding entity matches the variant provided.
|
|
7523
8227
|
*
|
|
7524
8228
|
* ```ts
|
|
7525
8229
|
* function postGridEntityCollision(
|
|
@@ -7528,14 +8232,15 @@ export declare enum ModCallbackCustom {
|
|
|
7528
8232
|
* ): void {}
|
|
7529
8233
|
* ```
|
|
7530
8234
|
*/
|
|
7531
|
-
POST_GRID_ENTITY_COLLISION =
|
|
8235
|
+
POST_GRID_ENTITY_COLLISION = 24,
|
|
7532
8236
|
/**
|
|
7533
8237
|
* The same as the `POST_GRID_ENTITY_BROKEN` callback, but only fires for grid entities created
|
|
7534
8238
|
* with the `spawnCustomGridEntity` helper function.
|
|
7535
8239
|
*
|
|
7536
|
-
* When registering the callback
|
|
7537
|
-
*
|
|
7538
|
-
* variants, so there is no need for
|
|
8240
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8241
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
8242
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
8243
|
+
* an optional argument to filter by variant.)
|
|
7539
8244
|
*
|
|
7540
8245
|
* ```ts
|
|
7541
8246
|
* function postGridEntityCustomBroken(
|
|
@@ -7544,18 +8249,19 @@ export declare enum ModCallbackCustom {
|
|
|
7544
8249
|
* ): void {}
|
|
7545
8250
|
* ```
|
|
7546
8251
|
*/
|
|
7547
|
-
POST_GRID_ENTITY_CUSTOM_BROKEN =
|
|
8252
|
+
POST_GRID_ENTITY_CUSTOM_BROKEN = 25,
|
|
7548
8253
|
/**
|
|
7549
8254
|
* The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
|
|
7550
8255
|
* with the `spawnCustomGridEntity` helper function.
|
|
7551
8256
|
*
|
|
7552
|
-
*
|
|
7553
|
-
*
|
|
7554
|
-
*
|
|
7555
|
-
*
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
*
|
|
8257
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8258
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8259
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
8260
|
+
* there is no need for an optional argument to filter by variant.)
|
|
8261
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
8262
|
+
* colliding entity matches the `EntityType` provided.
|
|
8263
|
+
* - You can provide an optional fifth argument that will make the callback only fire if the
|
|
8264
|
+
* colliding entity matches the variant provided.
|
|
7559
8265
|
*
|
|
7560
8266
|
* ```ts
|
|
7561
8267
|
* function postGridEntityCustomCollision(
|
|
@@ -7565,14 +8271,15 @@ export declare enum ModCallbackCustom {
|
|
|
7565
8271
|
* ): void {}
|
|
7566
8272
|
* ```
|
|
7567
8273
|
*/
|
|
7568
|
-
POST_GRID_ENTITY_CUSTOM_COLLISION =
|
|
8274
|
+
POST_GRID_ENTITY_CUSTOM_COLLISION = 26,
|
|
7569
8275
|
/**
|
|
7570
8276
|
* The same as the `POST_GRID_ENTITY_INIT` callback, but only fires for grid entities created with
|
|
7571
8277
|
* the `spawnCustomGridEntity` helper function.
|
|
7572
8278
|
*
|
|
7573
|
-
* When registering the callback
|
|
7574
|
-
*
|
|
7575
|
-
* variants, so there is no need for
|
|
8279
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8280
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
8281
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
8282
|
+
* an optional argument to filter by variant.)
|
|
7576
8283
|
*
|
|
7577
8284
|
* ```ts
|
|
7578
8285
|
* function postGridEntityCustomInit(
|
|
@@ -7581,14 +8288,15 @@ export declare enum ModCallbackCustom {
|
|
|
7581
8288
|
* ): void {}
|
|
7582
8289
|
* ```
|
|
7583
8290
|
*/
|
|
7584
|
-
POST_GRID_ENTITY_CUSTOM_INIT =
|
|
8291
|
+
POST_GRID_ENTITY_CUSTOM_INIT = 27,
|
|
7585
8292
|
/**
|
|
7586
8293
|
* The same as the `POST_GRID_ENTITY_REMOVE` callback, but only fires for grid entities created
|
|
7587
8294
|
* with the `spawnCustomGridEntity` helper function.
|
|
7588
8295
|
*
|
|
7589
|
-
* When registering the callback
|
|
7590
|
-
*
|
|
7591
|
-
* variants, so there is no need for
|
|
8296
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8297
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
8298
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
8299
|
+
* an optional argument to filter by variant.)
|
|
7592
8300
|
*
|
|
7593
8301
|
* ```ts
|
|
7594
8302
|
* function postGridEntityCustomRemove(
|
|
@@ -7597,14 +8305,15 @@ export declare enum ModCallbackCustom {
|
|
|
7597
8305
|
* ): void {}
|
|
7598
8306
|
* ```
|
|
7599
8307
|
*/
|
|
7600
|
-
POST_GRID_ENTITY_CUSTOM_REMOVE =
|
|
8308
|
+
POST_GRID_ENTITY_CUSTOM_REMOVE = 28,
|
|
7601
8309
|
/**
|
|
7602
8310
|
* The same as the `POST_GRID_ENTITY_RENDER` callback, but only fires for grid entities created
|
|
7603
8311
|
* with the `spawnCustomGridEntity` helper function.
|
|
7604
8312
|
*
|
|
7605
|
-
* When registering the callback
|
|
7606
|
-
*
|
|
7607
|
-
* variants, so there is no need for
|
|
8313
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8314
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
8315
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
8316
|
+
* an optional argument to filter by variant.)
|
|
7608
8317
|
*
|
|
7609
8318
|
* ```ts
|
|
7610
8319
|
* function postGridEntityCustomRender(
|
|
@@ -7613,14 +8322,15 @@ export declare enum ModCallbackCustom {
|
|
|
7613
8322
|
* ): void {}
|
|
7614
8323
|
* ```
|
|
7615
8324
|
*/
|
|
7616
|
-
POST_GRID_ENTITY_CUSTOM_RENDER =
|
|
8325
|
+
POST_GRID_ENTITY_CUSTOM_RENDER = 29,
|
|
7617
8326
|
/**
|
|
7618
8327
|
* The same as the `POST_GRID_ENTITY_STATE_CHANGED` callback, but only fires for grid entities
|
|
7619
8328
|
* created with the `spawnCustomGridEntity` helper function.
|
|
7620
8329
|
*
|
|
7621
|
-
* When registering the callback
|
|
7622
|
-
*
|
|
7623
|
-
* variants, so there is no need for
|
|
8330
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8331
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
8332
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
8333
|
+
* an optional argument to filter by variant.)
|
|
7624
8334
|
*
|
|
7625
8335
|
* ```ts
|
|
7626
8336
|
* function postGridEntityCustomStateChanged(
|
|
@@ -7631,14 +8341,15 @@ export declare enum ModCallbackCustom {
|
|
|
7631
8341
|
* ): void {}
|
|
7632
8342
|
* ```
|
|
7633
8343
|
*/
|
|
7634
|
-
POST_GRID_ENTITY_CUSTOM_STATE_CHANGED =
|
|
8344
|
+
POST_GRID_ENTITY_CUSTOM_STATE_CHANGED = 30,
|
|
7635
8345
|
/**
|
|
7636
8346
|
* The same as the `POST_GRID_ENTITY_UPDATE` callback, but only fires for grid entities created
|
|
7637
8347
|
* with the `spawnCustomGridEntity` helper function.
|
|
7638
8348
|
*
|
|
7639
|
-
* When registering the callback
|
|
7640
|
-
*
|
|
7641
|
-
* variants, so there is no need for
|
|
8349
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8350
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
8351
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
8352
|
+
* an optional argument to filter by variant.)
|
|
7642
8353
|
*
|
|
7643
8354
|
* ```ts
|
|
7644
8355
|
* function postGridEntityCustomUpdate(
|
|
@@ -7647,7 +8358,7 @@ export declare enum ModCallbackCustom {
|
|
|
7647
8358
|
* ): void {}
|
|
7648
8359
|
* ```
|
|
7649
8360
|
*/
|
|
7650
|
-
POST_GRID_ENTITY_CUSTOM_UPDATE =
|
|
8361
|
+
POST_GRID_ENTITY_CUSTOM_UPDATE = 31,
|
|
7651
8362
|
/**
|
|
7652
8363
|
* Fires when a new grid entity is initialized. Specifically, this is either:
|
|
7653
8364
|
*
|
|
@@ -7659,16 +8370,17 @@ export declare enum ModCallbackCustom {
|
|
|
7659
8370
|
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
7660
8371
|
* callback instead.
|
|
7661
8372
|
*
|
|
7662
|
-
*
|
|
7663
|
-
*
|
|
7664
|
-
*
|
|
7665
|
-
*
|
|
8373
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8374
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8375
|
+
* matches the `GridEntityType` provided.
|
|
8376
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8377
|
+
* matches the variant provided.
|
|
7666
8378
|
*
|
|
7667
8379
|
* ```ts
|
|
7668
8380
|
* function postGridEntityInit(gridEntity: GridEntity): void {}
|
|
7669
8381
|
* ```
|
|
7670
8382
|
*/
|
|
7671
|
-
POST_GRID_ENTITY_INIT =
|
|
8383
|
+
POST_GRID_ENTITY_INIT = 32,
|
|
7672
8384
|
/**
|
|
7673
8385
|
* Fires from the `POST_UPDATE` callback when a new grid entity is removed. Specifically, this on
|
|
7674
8386
|
* the frame after it no longer exists (where it did exist a frame ago).
|
|
@@ -7680,10 +8392,11 @@ export declare enum ModCallbackCustom {
|
|
|
7680
8392
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7681
8393
|
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
7682
8394
|
*
|
|
7683
|
-
*
|
|
7684
|
-
*
|
|
7685
|
-
*
|
|
7686
|
-
*
|
|
8395
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8396
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8397
|
+
* matches the `GridEntityType` provided.
|
|
8398
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8399
|
+
* matches the variant provided.
|
|
7687
8400
|
*
|
|
7688
8401
|
* ```ts
|
|
7689
8402
|
* function postGridEntityRemove(
|
|
@@ -7692,23 +8405,24 @@ export declare enum ModCallbackCustom {
|
|
|
7692
8405
|
* ): void {}
|
|
7693
8406
|
* ```
|
|
7694
8407
|
*/
|
|
7695
|
-
POST_GRID_ENTITY_REMOVE =
|
|
8408
|
+
POST_GRID_ENTITY_REMOVE = 33,
|
|
7696
8409
|
/**
|
|
7697
8410
|
* Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
|
|
7698
8411
|
*
|
|
7699
8412
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7700
8413
|
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
7701
8414
|
*
|
|
7702
|
-
*
|
|
7703
|
-
*
|
|
7704
|
-
*
|
|
7705
|
-
*
|
|
8415
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8416
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8417
|
+
* matches the `GridEntityType` provided.
|
|
8418
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8419
|
+
* matches the variant provided.
|
|
7706
8420
|
*
|
|
7707
8421
|
* ```ts
|
|
7708
8422
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
7709
8423
|
* ```
|
|
7710
8424
|
*/
|
|
7711
|
-
POST_GRID_ENTITY_RENDER =
|
|
8425
|
+
POST_GRID_ENTITY_RENDER = 34,
|
|
7712
8426
|
/**
|
|
7713
8427
|
* Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
|
|
7714
8428
|
* "state" refers to the `GridEntity.State` field.)
|
|
@@ -7716,10 +8430,11 @@ export declare enum ModCallbackCustom {
|
|
|
7716
8430
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7717
8431
|
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
7718
8432
|
*
|
|
7719
|
-
*
|
|
7720
|
-
*
|
|
7721
|
-
*
|
|
7722
|
-
*
|
|
8433
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8434
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8435
|
+
* matches the `GridEntityType` provided.
|
|
8436
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8437
|
+
* matches the variant provided.
|
|
7723
8438
|
*
|
|
7724
8439
|
* ```ts
|
|
7725
8440
|
* function postGridEntityStateChanged(
|
|
@@ -7729,23 +8444,24 @@ export declare enum ModCallbackCustom {
|
|
|
7729
8444
|
* ): void {}
|
|
7730
8445
|
* ```
|
|
7731
8446
|
*/
|
|
7732
|
-
POST_GRID_ENTITY_STATE_CHANGED =
|
|
8447
|
+
POST_GRID_ENTITY_STATE_CHANGED = 35,
|
|
7733
8448
|
/**
|
|
7734
8449
|
* Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
|
|
7735
8450
|
*
|
|
7736
8451
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7737
8452
|
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
7738
8453
|
*
|
|
7739
|
-
*
|
|
7740
|
-
*
|
|
7741
|
-
*
|
|
7742
|
-
*
|
|
8454
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8455
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8456
|
+
* matches the `GridEntityType` provided.
|
|
8457
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8458
|
+
* matches the variant provided.
|
|
7743
8459
|
*
|
|
7744
8460
|
* ```ts
|
|
7745
8461
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
7746
8462
|
* ```
|
|
7747
8463
|
*/
|
|
7748
|
-
POST_GRID_ENTITY_UPDATE =
|
|
8464
|
+
POST_GRID_ENTITY_UPDATE = 36,
|
|
7749
8465
|
/**
|
|
7750
8466
|
* Fires from the `POST_PEFFECT_UPDATE` callback when the player loses a Holy Mantle temporary
|
|
7751
8467
|
* collectible effect.
|
|
@@ -7754,10 +8470,11 @@ export declare enum ModCallbackCustom {
|
|
|
7754
8470
|
* from an enemy. Normally, you would accomplish this via the `ENTITY_TAKE_DMG` callback, but that
|
|
7755
8471
|
* callback never fires if the player has a Holy Mantle shield.
|
|
7756
8472
|
*
|
|
7757
|
-
*
|
|
7758
|
-
*
|
|
7759
|
-
*
|
|
7760
|
-
*
|
|
8473
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8474
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8475
|
+
* matches the `PlayerVariant` provided.
|
|
8476
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8477
|
+
* matches the `PlayerType` provided.
|
|
7761
8478
|
*
|
|
7762
8479
|
* ```ts
|
|
7763
8480
|
* function postPlayerInitReordered(
|
|
@@ -7767,7 +8484,7 @@ export declare enum ModCallbackCustom {
|
|
|
7767
8484
|
* ): void {}
|
|
7768
8485
|
* ```
|
|
7769
8486
|
*/
|
|
7770
|
-
POST_HOLY_MANTLE_REMOVED =
|
|
8487
|
+
POST_HOLY_MANTLE_REMOVED = 37,
|
|
7771
8488
|
/**
|
|
7772
8489
|
* Fires from `POST_PEFFECT_UPDATE` callback when the player loses charge on their active
|
|
7773
8490
|
* collectible item, implying that the item was just used.
|
|
@@ -7778,8 +8495,9 @@ export declare enum ModCallbackCustom {
|
|
|
7778
8495
|
* Note that this callback will not fire if the active item is both discharged and swapped for
|
|
7779
8496
|
* another item / discharged on the same frame, like in the case of Alabaster Box.
|
|
7780
8497
|
*
|
|
7781
|
-
* When registering the callback
|
|
7782
|
-
* only fire if it matches the
|
|
8498
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8499
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8500
|
+
* `CollectibleType` provided.
|
|
7783
8501
|
*
|
|
7784
8502
|
* ```ts
|
|
7785
8503
|
* function postItemDischarge(
|
|
@@ -7789,7 +8507,7 @@ export declare enum ModCallbackCustom {
|
|
|
7789
8507
|
* ): void {}
|
|
7790
8508
|
* ```
|
|
7791
8509
|
*/
|
|
7792
|
-
POST_ITEM_DISCHARGE =
|
|
8510
|
+
POST_ITEM_DISCHARGE = 38,
|
|
7793
8511
|
/**
|
|
7794
8512
|
* Fires from the `POST_PEFFECT_UPDATE` callback when an item is no longer queued (i.e. when the
|
|
7795
8513
|
* animation of the player holding the item above their head is finished and the item is actually
|
|
@@ -7797,10 +8515,11 @@ export declare enum ModCallbackCustom {
|
|
|
7797
8515
|
*
|
|
7798
8516
|
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
7799
8517
|
*
|
|
7800
|
-
*
|
|
7801
|
-
*
|
|
7802
|
-
*
|
|
7803
|
-
*
|
|
8518
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8519
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8520
|
+
* matches the `ItemType` provided.
|
|
8521
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
8522
|
+
* sub-type matches the `CollectibleType` or the `TrinketType` provided.
|
|
7804
8523
|
*
|
|
7805
8524
|
* ```ts
|
|
7806
8525
|
* function postItemPickup(
|
|
@@ -7809,35 +8528,37 @@ export declare enum ModCallbackCustom {
|
|
|
7809
8528
|
* ): void {}
|
|
7810
8529
|
* ```
|
|
7811
8530
|
*/
|
|
7812
|
-
POST_ITEM_PICKUP =
|
|
8531
|
+
POST_ITEM_PICKUP = 39,
|
|
7813
8532
|
/**
|
|
7814
8533
|
* Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
|
|
7815
8534
|
*
|
|
7816
8535
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7817
8536
|
* normal `POST_KNIFE_INIT` callback.
|
|
7818
8537
|
*
|
|
7819
|
-
* When registering the callback
|
|
7820
|
-
* only fire if
|
|
8538
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8539
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8540
|
+
* `KnifeVariant` provided.
|
|
7821
8541
|
*
|
|
7822
8542
|
* ```ts
|
|
7823
8543
|
* function postKnifeInitLate(knife: EntityKnife): void {}
|
|
7824
8544
|
* ```
|
|
7825
8545
|
*/
|
|
7826
|
-
POST_KNIFE_INIT_LATE =
|
|
8546
|
+
POST_KNIFE_INIT_LATE = 40,
|
|
7827
8547
|
/**
|
|
7828
8548
|
* Fires on the first `POST_LASER_UPDATE` frame for each laser.
|
|
7829
8549
|
*
|
|
7830
8550
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7831
8551
|
* normal `POST_LASER_INIT` callback.
|
|
7832
8552
|
*
|
|
7833
|
-
* When registering the callback
|
|
7834
|
-
* only fire if
|
|
8553
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8554
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8555
|
+
* `LaserVariant` provided.
|
|
7835
8556
|
*
|
|
7836
8557
|
* ```ts
|
|
7837
8558
|
* function postLaserInitLate(laser: EntityLaser): void {}
|
|
7838
8559
|
* ```
|
|
7839
8560
|
*/
|
|
7840
|
-
POST_LASER_INIT_LATE =
|
|
8561
|
+
POST_LASER_INIT_LATE = 41,
|
|
7841
8562
|
/**
|
|
7842
8563
|
* The same as the vanilla callback of the same name, but fires in the correct order with respect
|
|
7843
8564
|
* to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
|
|
@@ -7854,7 +8575,7 @@ export declare enum ModCallbackCustom {
|
|
|
7854
8575
|
* function postNewLevelReordered(): void {}
|
|
7855
8576
|
* ```
|
|
7856
8577
|
*/
|
|
7857
|
-
POST_NEW_LEVEL_REORDERED =
|
|
8578
|
+
POST_NEW_LEVEL_REORDERED = 42,
|
|
7858
8579
|
/**
|
|
7859
8580
|
* Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
|
|
7860
8581
|
* detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
|
|
@@ -7865,7 +8586,7 @@ export declare enum ModCallbackCustom {
|
|
|
7865
8586
|
* function postNewRoomEarly(): void {}
|
|
7866
8587
|
* ```
|
|
7867
8588
|
*/
|
|
7868
|
-
POST_NEW_ROOM_EARLY =
|
|
8589
|
+
POST_NEW_ROOM_EARLY = 43,
|
|
7869
8590
|
/**
|
|
7870
8591
|
* The same as the vanilla callback of the same name, but fires in the correct order with respect
|
|
7871
8592
|
* to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
|
|
@@ -7882,29 +8603,31 @@ export declare enum ModCallbackCustom {
|
|
|
7882
8603
|
* function postNewRoomReordered(): void {}
|
|
7883
8604
|
* ```
|
|
7884
8605
|
*/
|
|
7885
|
-
POST_NEW_ROOM_REORDERED =
|
|
8606
|
+
POST_NEW_ROOM_REORDERED = 44,
|
|
7886
8607
|
/**
|
|
7887
8608
|
* Fires on the first `NPC_UPDATE` frame for each NPC.
|
|
7888
8609
|
*
|
|
7889
8610
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7890
8611
|
* normal `POST_NPC_INIT` callback.
|
|
7891
8612
|
*
|
|
7892
|
-
* When registering the callback
|
|
7893
|
-
*
|
|
8613
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8614
|
+
* an optional third argument that will make the callback only fire if it matches the `EntityType`
|
|
8615
|
+
* provided.
|
|
7894
8616
|
*
|
|
7895
8617
|
* ```ts
|
|
7896
8618
|
* function postNPCInitLate(npc: EntityNPC): void {}
|
|
7897
8619
|
* ```
|
|
7898
8620
|
*/
|
|
7899
|
-
POST_NPC_INIT_LATE =
|
|
8621
|
+
POST_NPC_INIT_LATE = 45,
|
|
7900
8622
|
/**
|
|
7901
8623
|
* Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
|
|
7902
8624
|
* the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
|
|
7903
8625
|
*
|
|
7904
|
-
*
|
|
7905
|
-
*
|
|
7906
|
-
*
|
|
7907
|
-
*
|
|
8626
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8627
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8628
|
+
* matches the `EntityType` provided.
|
|
8629
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8630
|
+
* matches the variant provided.
|
|
7908
8631
|
*
|
|
7909
8632
|
* ```ts
|
|
7910
8633
|
* function postNPCStateChanged(
|
|
@@ -7914,7 +8637,7 @@ export declare enum ModCallbackCustom {
|
|
|
7914
8637
|
* ): void {}
|
|
7915
8638
|
* ```
|
|
7916
8639
|
*/
|
|
7917
|
-
POST_NPC_STATE_CHANGED =
|
|
8640
|
+
POST_NPC_STATE_CHANGED = 46,
|
|
7918
8641
|
/**
|
|
7919
8642
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
7920
8643
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -7929,29 +8652,31 @@ export declare enum ModCallbackCustom {
|
|
|
7929
8652
|
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
7930
8653
|
* any rooms.
|
|
7931
8654
|
*
|
|
7932
|
-
*
|
|
7933
|
-
*
|
|
7934
|
-
*
|
|
7935
|
-
*
|
|
8655
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8656
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8657
|
+
* matches the `PlayerVariant` provided.
|
|
8658
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8659
|
+
* matches the `PlayerType` provided.
|
|
7936
8660
|
*
|
|
7937
8661
|
* ```ts
|
|
7938
8662
|
* function postPEffectUpdateReordered(player: EntityPlayer): void {}
|
|
7939
8663
|
* ```
|
|
7940
8664
|
*/
|
|
7941
|
-
POST_PEFFECT_UPDATE_REORDERED =
|
|
8665
|
+
POST_PEFFECT_UPDATE_REORDERED = 47,
|
|
7942
8666
|
/**
|
|
7943
8667
|
* Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
|
|
7944
8668
|
*
|
|
7945
8669
|
* Use this callback to know when a pickup is added to the player's inventory or health.
|
|
7946
8670
|
*
|
|
7947
|
-
* When registering the callback
|
|
7948
|
-
* only fire if
|
|
8671
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8672
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8673
|
+
* `PickupVariant` provided.
|
|
7949
8674
|
*
|
|
7950
8675
|
* ```ts
|
|
7951
8676
|
* function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
|
|
7952
8677
|
* ```
|
|
7953
8678
|
*/
|
|
7954
|
-
POST_PICKUP_COLLECT =
|
|
8679
|
+
POST_PICKUP_COLLECT = 48,
|
|
7955
8680
|
/**
|
|
7956
8681
|
* Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
|
|
7957
8682
|
* respective pickup on the run.
|
|
@@ -7959,34 +8684,37 @@ export declare enum ModCallbackCustom {
|
|
|
7959
8684
|
* This callback is useful because pickups will despawn upon leaving the room and respawn upon
|
|
7960
8685
|
* re-entering the room.
|
|
7961
8686
|
*
|
|
7962
|
-
* When registering the callback
|
|
7963
|
-
* only fire if
|
|
8687
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8688
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8689
|
+
* `PickupVariant` provided.
|
|
7964
8690
|
*
|
|
7965
8691
|
* ```ts
|
|
7966
8692
|
* function postPickupInitFirst(pickup: EntityPickup): void {}
|
|
7967
8693
|
* ```
|
|
7968
8694
|
*/
|
|
7969
|
-
POST_PICKUP_INIT_FIRST =
|
|
8695
|
+
POST_PICKUP_INIT_FIRST = 49,
|
|
7970
8696
|
/**
|
|
7971
8697
|
* Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
|
|
7972
8698
|
*
|
|
7973
8699
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
7974
8700
|
* normal `POST_PICKUP_INIT` callback.
|
|
7975
8701
|
*
|
|
7976
|
-
* When registering the callback
|
|
7977
|
-
* only fire if
|
|
8702
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8703
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8704
|
+
* `PickupVariant` provided.
|
|
7978
8705
|
*
|
|
7979
8706
|
* ```ts
|
|
7980
8707
|
* function postPickupInitLate(pickup: EntityPickup): void {}
|
|
7981
8708
|
* ```
|
|
7982
8709
|
*/
|
|
7983
|
-
POST_PICKUP_INIT_LATE =
|
|
8710
|
+
POST_PICKUP_INIT_LATE = 50,
|
|
7984
8711
|
/**
|
|
7985
8712
|
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
|
|
7986
8713
|
* on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
|
|
7987
8714
|
*
|
|
7988
|
-
* When registering the callback
|
|
7989
|
-
* only fire if it matches the
|
|
8715
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8716
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8717
|
+
* `PickupVariant` provided.
|
|
7990
8718
|
*
|
|
7991
8719
|
* ```ts
|
|
7992
8720
|
* function postPickupStateChanged(
|
|
@@ -7996,37 +8724,40 @@ export declare enum ModCallbackCustom {
|
|
|
7996
8724
|
* ): void {}
|
|
7997
8725
|
* ```
|
|
7998
8726
|
*/
|
|
7999
|
-
POST_PICKUP_STATE_CHANGED =
|
|
8727
|
+
POST_PICKUP_STATE_CHANGED = 51,
|
|
8000
8728
|
/**
|
|
8001
8729
|
* Fires from the `POST_RENDER` callback on every frame that a pit exists.
|
|
8002
8730
|
*
|
|
8003
|
-
* When registering the callback
|
|
8004
|
-
* only fire if it matches the variant
|
|
8731
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8732
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8733
|
+
* provided.
|
|
8005
8734
|
*
|
|
8006
8735
|
* ```ts
|
|
8007
8736
|
* function postPitRender(pit: GridEntityPit): void {}
|
|
8008
8737
|
* ```
|
|
8009
8738
|
*/
|
|
8010
|
-
POST_PIT_RENDER =
|
|
8739
|
+
POST_PIT_RENDER = 52,
|
|
8011
8740
|
/**
|
|
8012
8741
|
* Fires from the `POST_UPDATE` callback on every frame that a pit exists.
|
|
8013
8742
|
*
|
|
8014
|
-
* When registering the callback
|
|
8015
|
-
* only fire if it matches the variant
|
|
8743
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8744
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8745
|
+
* provided.
|
|
8016
8746
|
*
|
|
8017
8747
|
* ```ts
|
|
8018
8748
|
* function postPitUpdate(pit: GridEntityPit): void {}
|
|
8019
8749
|
* ```
|
|
8020
8750
|
*/
|
|
8021
|
-
POST_PIT_UPDATE =
|
|
8751
|
+
POST_PIT_UPDATE = 53,
|
|
8022
8752
|
/**
|
|
8023
8753
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's health (i.e. hearts) is different
|
|
8024
8754
|
* than what it was on the previous frame. For more information, see the `PlayerHealth` enum.
|
|
8025
8755
|
*
|
|
8026
|
-
*
|
|
8027
|
-
*
|
|
8028
|
-
*
|
|
8029
|
-
*
|
|
8756
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8757
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8758
|
+
* matches the `PlayerVariant` provided.
|
|
8759
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8760
|
+
* matches the `PlayerType` provided.
|
|
8030
8761
|
*
|
|
8031
8762
|
* ```ts
|
|
8032
8763
|
* function postPlayerChangeHealth(
|
|
@@ -8038,7 +8769,7 @@ export declare enum ModCallbackCustom {
|
|
|
8038
8769
|
* ): void {}
|
|
8039
8770
|
* ```
|
|
8040
8771
|
*/
|
|
8041
|
-
POST_PLAYER_CHANGE_HEALTH =
|
|
8772
|
+
POST_PLAYER_CHANGE_HEALTH = 54,
|
|
8042
8773
|
/**
|
|
8043
8774
|
* Fires from the `POST_PEFFECT_UPDATE` callback when one of the player's stats change from what
|
|
8044
8775
|
* they were on the previous frame.
|
|
@@ -8052,10 +8783,11 @@ export declare enum ModCallbackCustom {
|
|
|
8052
8783
|
* numbers. (For these cases, you should examine the `oldValue` and `newValue` arguments
|
|
8053
8784
|
* accordingly.)
|
|
8054
8785
|
*
|
|
8055
|
-
*
|
|
8056
|
-
*
|
|
8057
|
-
*
|
|
8058
|
-
*
|
|
8786
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8787
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8788
|
+
* matches the `PlayerVariant` provided.
|
|
8789
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8790
|
+
* matches the `PlayerType` provided.
|
|
8059
8791
|
*
|
|
8060
8792
|
* ```ts
|
|
8061
8793
|
* function postPlayerChangeStat(
|
|
@@ -8067,7 +8799,7 @@ export declare enum ModCallbackCustom {
|
|
|
8067
8799
|
* ): void {}
|
|
8068
8800
|
* ```
|
|
8069
8801
|
*/
|
|
8070
|
-
POST_PLAYER_CHANGE_STAT =
|
|
8802
|
+
POST_PLAYER_CHANGE_STAT = 55,
|
|
8071
8803
|
/**
|
|
8072
8804
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player entity changes its player type
|
|
8073
8805
|
* (i.e. character) from what it was on the previous frame. For example, it will fire after using
|
|
@@ -8077,6 +8809,10 @@ export declare enum ModCallbackCustom {
|
|
|
8077
8809
|
* those items cause separate player entities to be created. Use the `POST_FLIP` and
|
|
8078
8810
|
* `POST_ESAU_JR` callbacks to handle those situations.
|
|
8079
8811
|
*
|
|
8812
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8813
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
8814
|
+
* `PlayerVariant` provided.
|
|
8815
|
+
*
|
|
8080
8816
|
* ```ts
|
|
8081
8817
|
* function postPlayerChangeType(
|
|
8082
8818
|
* player: EntityPlayer,
|
|
@@ -8085,14 +8821,15 @@ export declare enum ModCallbackCustom {
|
|
|
8085
8821
|
* ): void {}
|
|
8086
8822
|
* ```
|
|
8087
8823
|
*/
|
|
8088
|
-
POST_PLAYER_CHANGE_TYPE =
|
|
8824
|
+
POST_PLAYER_CHANGE_TYPE = 56,
|
|
8089
8825
|
/**
|
|
8090
8826
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is higher than
|
|
8091
8827
|
* what it was on the previous frame, or when the active items change, or when the build is
|
|
8092
8828
|
* rerolled.
|
|
8093
8829
|
*
|
|
8094
|
-
* When registering the callback
|
|
8095
|
-
* only fire if the collectible matches the
|
|
8830
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8831
|
+
* an optional third argument that will make the callback only fire if the collectible matches the
|
|
8832
|
+
* `CollectibleType` provided.
|
|
8096
8833
|
*
|
|
8097
8834
|
* ```ts
|
|
8098
8835
|
* function postPlayerCollectibleAdded(
|
|
@@ -8101,14 +8838,15 @@ export declare enum ModCallbackCustom {
|
|
|
8101
8838
|
* ): void {}
|
|
8102
8839
|
* ```
|
|
8103
8840
|
*/
|
|
8104
|
-
POST_PLAYER_COLLECTIBLE_ADDED =
|
|
8841
|
+
POST_PLAYER_COLLECTIBLE_ADDED = 57,
|
|
8105
8842
|
/**
|
|
8106
8843
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is lower than
|
|
8107
8844
|
* what it was on the previous frame, or when the active items change, or when the build is
|
|
8108
8845
|
* rerolled.
|
|
8109
8846
|
*
|
|
8110
|
-
* When registering the callback
|
|
8111
|
-
* only fire if the collectible matches the
|
|
8847
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8848
|
+
* an optional third argument that will make the callback only fire if the collectible matches the
|
|
8849
|
+
* `CollectibleType` provided.
|
|
8112
8850
|
*
|
|
8113
8851
|
* ```ts
|
|
8114
8852
|
* function postPlayerCollectibleRemoved(
|
|
@@ -8117,7 +8855,7 @@ export declare enum ModCallbackCustom {
|
|
|
8117
8855
|
* ): void {}
|
|
8118
8856
|
* ```
|
|
8119
8857
|
*/
|
|
8120
|
-
POST_PLAYER_COLLECTIBLE_REMOVED =
|
|
8858
|
+
POST_PLAYER_COLLECTIBLE_REMOVED = 58,
|
|
8121
8859
|
/**
|
|
8122
8860
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
|
|
8123
8861
|
* prevent the fatal damage.
|
|
@@ -8125,16 +8863,17 @@ export declare enum ModCallbackCustom {
|
|
|
8125
8863
|
* Note that this function does properly take into account Guppy's Collar, Broken Ankh, Spirit
|
|
8126
8864
|
* Shackles, and Mysterious Paper. It also takes into account using The Bible on Satan.
|
|
8127
8865
|
*
|
|
8128
|
-
*
|
|
8129
|
-
*
|
|
8130
|
-
*
|
|
8131
|
-
*
|
|
8866
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8867
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8868
|
+
* matches the `PlayerVariant` provided.
|
|
8869
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8870
|
+
* matches the `PlayerType` provided.
|
|
8132
8871
|
*
|
|
8133
8872
|
* ```ts
|
|
8134
8873
|
* function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
|
|
8135
8874
|
* ```
|
|
8136
8875
|
*/
|
|
8137
|
-
POST_PLAYER_FATAL_DAMAGE =
|
|
8876
|
+
POST_PLAYER_FATAL_DAMAGE = 59,
|
|
8138
8877
|
/**
|
|
8139
8878
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
|
|
8140
8879
|
* `POST_PLAYER_INIT_LATE` callback, with two changes:
|
|
@@ -8146,16 +8885,17 @@ export declare enum ModCallbackCustom {
|
|
|
8146
8885
|
* character their starting items for the run. (You do not want to use the vanilla
|
|
8147
8886
|
* `POST_PLAYER_INIT` callback for this because it fires when a run is continued.)
|
|
8148
8887
|
*
|
|
8149
|
-
*
|
|
8150
|
-
*
|
|
8151
|
-
*
|
|
8152
|
-
*
|
|
8888
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8889
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8890
|
+
* matches the `PlayerVariant` provided.
|
|
8891
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8892
|
+
* matches the `PlayerType` provided.
|
|
8153
8893
|
*
|
|
8154
8894
|
* ```ts
|
|
8155
8895
|
* function postPlayerInitFirst(player: EntityPlayer): void {}
|
|
8156
8896
|
* ```
|
|
8157
8897
|
*/
|
|
8158
|
-
POST_PLAYER_INIT_FIRST =
|
|
8898
|
+
POST_PLAYER_INIT_FIRST = 60,
|
|
8159
8899
|
/**
|
|
8160
8900
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
|
|
8161
8901
|
*
|
|
@@ -8165,16 +8905,17 @@ export declare enum ModCallbackCustom {
|
|
|
8165
8905
|
* For initializing a player with custom items and so forth, use the `POST_PLAYER_INIT_FIRST`
|
|
8166
8906
|
* callback instead to handle the case of a Genesis room.
|
|
8167
8907
|
*
|
|
8168
|
-
*
|
|
8169
|
-
*
|
|
8170
|
-
*
|
|
8171
|
-
*
|
|
8908
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8909
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8910
|
+
* matches the `PlayerVariant` provided.
|
|
8911
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8912
|
+
* matches the `PlayerType` provided.
|
|
8172
8913
|
*
|
|
8173
8914
|
* ```ts
|
|
8174
8915
|
* function postPlayerInitLate(pickup: EntityPickup): void {}
|
|
8175
8916
|
* ```
|
|
8176
8917
|
*/
|
|
8177
|
-
POST_PLAYER_INIT_LATE =
|
|
8918
|
+
POST_PLAYER_INIT_LATE = 61,
|
|
8178
8919
|
/**
|
|
8179
8920
|
* Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
|
|
8180
8921
|
* callback fires (if the player is spawning on the 0th game frame of the run).
|
|
@@ -8188,16 +8929,17 @@ export declare enum ModCallbackCustom {
|
|
|
8188
8929
|
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
8189
8930
|
* any rooms.
|
|
8190
8931
|
*
|
|
8191
|
-
*
|
|
8192
|
-
*
|
|
8193
|
-
*
|
|
8194
|
-
*
|
|
8932
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8933
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8934
|
+
* matches the `PlayerVariant` provided.
|
|
8935
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8936
|
+
* matches the `PlayerType` provided.
|
|
8195
8937
|
*
|
|
8196
8938
|
* ```ts
|
|
8197
8939
|
* function postPlayerRenderReordered(player: EntityPlayer): void {}
|
|
8198
8940
|
* ```
|
|
8199
8941
|
*/
|
|
8200
|
-
POST_PLAYER_RENDER_REORDERED =
|
|
8942
|
+
POST_PLAYER_RENDER_REORDERED = 62,
|
|
8201
8943
|
/**
|
|
8202
8944
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
8203
8945
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -8212,147 +8954,159 @@ export declare enum ModCallbackCustom {
|
|
|
8212
8954
|
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
8213
8955
|
* any rooms.
|
|
8214
8956
|
*
|
|
8215
|
-
*
|
|
8216
|
-
*
|
|
8217
|
-
*
|
|
8218
|
-
*
|
|
8957
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
8958
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
8959
|
+
* matches the `PlayerVariant` provided.
|
|
8960
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
8961
|
+
* matches the `PlayerType` provided.
|
|
8219
8962
|
*
|
|
8220
8963
|
* ```ts
|
|
8221
8964
|
* function postPlayerUpdateReordered(player: EntityPlayer): void {}
|
|
8222
8965
|
* ```
|
|
8223
8966
|
*/
|
|
8224
|
-
POST_PLAYER_UPDATE_REORDERED =
|
|
8967
|
+
POST_PLAYER_UPDATE_REORDERED = 63,
|
|
8225
8968
|
/**
|
|
8226
8969
|
* Fires from the `POST_RENDER` callback on every frame that a poop exists.
|
|
8227
8970
|
*
|
|
8228
|
-
* When registering the callback
|
|
8229
|
-
* only fire if it matches the variant
|
|
8971
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8972
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8973
|
+
* provided.
|
|
8230
8974
|
*
|
|
8231
8975
|
* ```ts
|
|
8232
8976
|
* function postPoopRender(poop: GridEntityPoop): void {}
|
|
8233
8977
|
* ```
|
|
8234
8978
|
*/
|
|
8235
|
-
POST_POOP_RENDER =
|
|
8979
|
+
POST_POOP_RENDER = 64,
|
|
8236
8980
|
/**
|
|
8237
8981
|
* Fires from the `POST_UPDATE` callback on every frame that a poop exists.
|
|
8238
8982
|
*
|
|
8239
|
-
* When registering the callback
|
|
8240
|
-
* only fire if it matches the variant
|
|
8983
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8984
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8985
|
+
* provided.
|
|
8241
8986
|
*
|
|
8242
8987
|
* ```ts
|
|
8243
8988
|
* function postPoopUpdate(poop: GridEntityPoop): void {}
|
|
8244
8989
|
* ```
|
|
8245
8990
|
*/
|
|
8246
|
-
POST_POOP_UPDATE =
|
|
8991
|
+
POST_POOP_UPDATE = 65,
|
|
8247
8992
|
/**
|
|
8248
8993
|
* Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
|
|
8249
8994
|
*
|
|
8250
|
-
* When registering the callback
|
|
8251
|
-
* only fire if it matches the variant
|
|
8995
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
8996
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
8997
|
+
* provided.
|
|
8252
8998
|
*
|
|
8253
8999
|
* ```ts
|
|
8254
9000
|
* function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
|
|
8255
9001
|
* ```
|
|
8256
9002
|
*/
|
|
8257
|
-
POST_PRESSURE_PLATE_RENDER =
|
|
9003
|
+
POST_PRESSURE_PLATE_RENDER = 66,
|
|
8258
9004
|
/**
|
|
8259
9005
|
* Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
|
|
8260
9006
|
*
|
|
8261
|
-
* When registering the callback
|
|
8262
|
-
* only fire if it matches the variant
|
|
9007
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9008
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9009
|
+
* provided.
|
|
8263
9010
|
*
|
|
8264
9011
|
* ```ts
|
|
8265
9012
|
* function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
|
|
8266
9013
|
* ```
|
|
8267
9014
|
*/
|
|
8268
|
-
POST_PRESSURE_PLATE_UPDATE =
|
|
9015
|
+
POST_PRESSURE_PLATE_UPDATE = 67,
|
|
8269
9016
|
/**
|
|
8270
9017
|
* Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
|
|
8271
9018
|
*
|
|
8272
9019
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
8273
9020
|
* normal `POST_PROJECTILE_INIT` callback.
|
|
8274
9021
|
*
|
|
8275
|
-
* When registering the callback
|
|
8276
|
-
*
|
|
9022
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9023
|
+
* an optional third argument that will make the callback only fire if matches the
|
|
9024
|
+
* `ProjectileVariant` provided.
|
|
8277
9025
|
*
|
|
8278
9026
|
* ```ts
|
|
8279
9027
|
* function postProjectileInitLate(projectile: EntityProjectile): void {}
|
|
8280
9028
|
* ```
|
|
8281
9029
|
*/
|
|
8282
|
-
POST_PROJECTILE_INIT_LATE =
|
|
9030
|
+
POST_PROJECTILE_INIT_LATE = 68,
|
|
8283
9031
|
/**
|
|
8284
9032
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player first picks up a new item. The
|
|
8285
9033
|
* pickup returned in the callback is assumed to be the first pickup that no longer exists.
|
|
8286
9034
|
*
|
|
8287
|
-
*
|
|
8288
|
-
*
|
|
8289
|
-
*
|
|
8290
|
-
*
|
|
9035
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9036
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9037
|
+
* matches the `PickupVariant` provided.
|
|
9038
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9039
|
+
* matches the sub-type provided.
|
|
8291
9040
|
*
|
|
8292
9041
|
* ```ts
|
|
8293
9042
|
* function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
|
|
8294
9043
|
* ```
|
|
8295
9044
|
*/
|
|
8296
|
-
POST_PURCHASE =
|
|
9045
|
+
POST_PURCHASE = 69,
|
|
8297
9046
|
/**
|
|
8298
9047
|
* Fires from the `POST_RENDER` callback on every frame that a rock exists.
|
|
8299
9048
|
*
|
|
8300
|
-
* When registering the callback
|
|
8301
|
-
* only fire if it matches the variant
|
|
9049
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9050
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9051
|
+
* provided.
|
|
8302
9052
|
*
|
|
8303
9053
|
* ```ts
|
|
8304
9054
|
* function postRockRender(rock: GridEntityRock): void {}
|
|
8305
9055
|
* ```
|
|
8306
9056
|
*/
|
|
8307
|
-
POST_ROCK_RENDER =
|
|
9057
|
+
POST_ROCK_RENDER = 70,
|
|
8308
9058
|
/**
|
|
8309
9059
|
* Fires from the `POST_UPDATE` callback on every frame that a rock exists.
|
|
8310
9060
|
*
|
|
8311
|
-
* When registering the callback
|
|
8312
|
-
* only fire if it matches the variant
|
|
9061
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9062
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9063
|
+
* provided.
|
|
8313
9064
|
*
|
|
8314
9065
|
* ```ts
|
|
8315
9066
|
* function postRockUpdate(rock: GridEntityRock): void {}
|
|
8316
9067
|
* ```
|
|
8317
9068
|
*/
|
|
8318
|
-
POST_ROCK_UPDATE =
|
|
9069
|
+
POST_ROCK_UPDATE = 71,
|
|
8319
9070
|
/**
|
|
8320
9071
|
* Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
|
|
8321
9072
|
* the `Room.IsClear` method).
|
|
8322
9073
|
*
|
|
8323
|
-
* When registering the callback
|
|
8324
|
-
* only fire if the room clear state
|
|
9074
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9075
|
+
* an optional third argument that will make the callback only fire if the room clear state
|
|
9076
|
+
* matches the boolean provided.
|
|
8325
9077
|
*
|
|
8326
9078
|
* ```ts
|
|
8327
9079
|
* function postRoomClearChanged(roomClear: boolean): void {}
|
|
8328
9080
|
* ```
|
|
8329
9081
|
*/
|
|
8330
|
-
POST_ROOM_CLEAR_CHANGED =
|
|
9082
|
+
POST_ROOM_CLEAR_CHANGED = 72,
|
|
8331
9083
|
/**
|
|
8332
9084
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
|
|
8333
9085
|
* Room.
|
|
8334
9086
|
*
|
|
8335
|
-
*
|
|
8336
|
-
*
|
|
8337
|
-
*
|
|
8338
|
-
*
|
|
9087
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9088
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9089
|
+
* matches the `PlayerVariant` provided.
|
|
9090
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9091
|
+
* matches the `PlayerType` provided.
|
|
8339
9092
|
*
|
|
8340
9093
|
* ```ts
|
|
8341
9094
|
* function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
|
|
8342
9095
|
* ```
|
|
8343
9096
|
*/
|
|
8344
|
-
POST_SACRIFICE =
|
|
9097
|
+
POST_SACRIFICE = 73,
|
|
8345
9098
|
/**
|
|
8346
9099
|
* Fires from the `POST_RENDER` callback when a slot entity's animation changes.
|
|
8347
9100
|
*
|
|
8348
|
-
* When registering the callback
|
|
8349
|
-
* only fire if it matches the
|
|
9101
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9102
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9103
|
+
* `SlotVariant` provided.
|
|
8350
9104
|
*
|
|
8351
9105
|
* ```ts
|
|
8352
9106
|
* function postSlotAnimationChanged(slot: Entity): void {}
|
|
8353
9107
|
* ```
|
|
8354
9108
|
*/
|
|
8355
|
-
POST_SLOT_ANIMATION_CHANGED =
|
|
9109
|
+
POST_SLOT_ANIMATION_CHANGED = 74,
|
|
8356
9110
|
/**
|
|
8357
9111
|
* Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
|
|
8358
9112
|
* (It will not fire if any other type of entity collides with the slot entity.)
|
|
@@ -8361,9 +9115,10 @@ export declare enum ModCallbackCustom {
|
|
|
8361
9115
|
* colliding with it on every frame. Thus, you should only perform actions in this callback under
|
|
8362
9116
|
* certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
|
|
8363
9117
|
*
|
|
8364
|
-
* When registering the callback
|
|
8365
|
-
*
|
|
8366
|
-
*
|
|
9118
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9119
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9120
|
+
* `SlotVariant` provided. (Only players will cause this callback to fire, so there is no need for
|
|
9121
|
+
* an optional argument to filter by `EntityType`.)
|
|
8367
9122
|
*
|
|
8368
9123
|
* ```ts
|
|
8369
9124
|
* function postSlotCollision(
|
|
@@ -8372,21 +9127,22 @@ export declare enum ModCallbackCustom {
|
|
|
8372
9127
|
* ): void {}
|
|
8373
9128
|
* ```
|
|
8374
9129
|
*/
|
|
8375
|
-
POST_SLOT_COLLISION =
|
|
9130
|
+
POST_SLOT_COLLISION = 75,
|
|
8376
9131
|
/**
|
|
8377
9132
|
* Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
|
|
8378
9133
|
* has broken.
|
|
8379
9134
|
*
|
|
8380
|
-
*
|
|
8381
|
-
*
|
|
8382
|
-
*
|
|
8383
|
-
*
|
|
9135
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9136
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9137
|
+
* matches the `SlotVariant` provided.
|
|
9138
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9139
|
+
* matches the `SlotDestructionType` provided.
|
|
8384
9140
|
*
|
|
8385
9141
|
* ```ts
|
|
8386
9142
|
* function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
|
|
8387
9143
|
* ```
|
|
8388
9144
|
*/
|
|
8389
|
-
POST_SLOT_DESTROYED =
|
|
9145
|
+
POST_SLOT_DESTROYED = 76,
|
|
8390
9146
|
/**
|
|
8391
9147
|
* Fires when a new slot entity is initialized. Specifically, this is either:
|
|
8392
9148
|
*
|
|
@@ -8395,58 +9151,63 @@ export declare enum ModCallbackCustom {
|
|
|
8395
9151
|
* - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when a
|
|
8396
9152
|
* Wheel of Fortune card is used)
|
|
8397
9153
|
*
|
|
8398
|
-
* When registering the callback
|
|
8399
|
-
* only fire if it matches the
|
|
9154
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9155
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9156
|
+
* `SlotVariant` provided.
|
|
8400
9157
|
*
|
|
8401
9158
|
* ```ts
|
|
8402
9159
|
* function postSlotInit(slot: Entity): void {}
|
|
8403
9160
|
* ```
|
|
8404
9161
|
*/
|
|
8405
|
-
POST_SLOT_INIT =
|
|
9162
|
+
POST_SLOT_INIT = 77,
|
|
8406
9163
|
/**
|
|
8407
9164
|
* Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
|
|
8408
9165
|
*
|
|
8409
|
-
* When registering the callback
|
|
8410
|
-
* only fire if it matches the
|
|
9166
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9167
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9168
|
+
* `SlotVariant` provided.
|
|
8411
9169
|
*
|
|
8412
9170
|
* ```ts
|
|
8413
9171
|
* function postSlotRender(slot: Entity): void {}
|
|
8414
9172
|
* ```
|
|
8415
9173
|
*/
|
|
8416
|
-
POST_SLOT_RENDER =
|
|
9174
|
+
POST_SLOT_RENDER = 78,
|
|
8417
9175
|
/**
|
|
8418
9176
|
* Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
|
|
8419
9177
|
*
|
|
8420
|
-
* When registering the callback
|
|
8421
|
-
* only fire if it matches the
|
|
9178
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9179
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9180
|
+
* `SlotVariant` provided.
|
|
8422
9181
|
*
|
|
8423
9182
|
* ```ts
|
|
8424
9183
|
* function postSlotUpdate(slot: Entity): void {}
|
|
8425
9184
|
* ```
|
|
8426
9185
|
*/
|
|
8427
|
-
POST_SLOT_UPDATE =
|
|
9186
|
+
POST_SLOT_UPDATE = 79,
|
|
8428
9187
|
/**
|
|
8429
9188
|
* Fires from the `POST_RENDER` callback on every frame that spikes exist.
|
|
8430
9189
|
*
|
|
8431
|
-
* When registering the callback
|
|
8432
|
-
* only fire if it matches the variant
|
|
9190
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9191
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9192
|
+
* provided.
|
|
8433
9193
|
*
|
|
8434
9194
|
* ```ts
|
|
8435
9195
|
* function postSpikesRender(spikes: GridEntitySpikes): void {}
|
|
8436
9196
|
* ```
|
|
8437
9197
|
*/
|
|
8438
|
-
POST_SPIKES_RENDER =
|
|
9198
|
+
POST_SPIKES_RENDER = 80,
|
|
8439
9199
|
/**
|
|
8440
9200
|
* Fires from the `POST_UPDATE` callback on every frame that spikes exist.
|
|
8441
9201
|
*
|
|
8442
|
-
* When registering the callback
|
|
8443
|
-
* only fire if it matches the variant
|
|
9202
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9203
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9204
|
+
* provided.
|
|
8444
9205
|
*
|
|
8445
9206
|
* ```ts
|
|
8446
9207
|
* function postSpikesUpdate(spikes: GridEntitySpikes): void {}
|
|
8447
9208
|
* ```
|
|
8448
9209
|
*/
|
|
8449
|
-
POST_SPIKES_UPDATE =
|
|
9210
|
+
POST_SPIKES_UPDATE = 81,
|
|
8450
9211
|
/**
|
|
8451
9212
|
* Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
8452
9213
|
* `EntityTear.FrameCount` is equal to 0).
|
|
@@ -8454,58 +9215,63 @@ export declare enum ModCallbackCustom {
|
|
|
8454
9215
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
8455
9216
|
* normal `POST_TEAR_INIT` callback.
|
|
8456
9217
|
*
|
|
8457
|
-
* When registering the callback
|
|
8458
|
-
* only fire if
|
|
9218
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9219
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9220
|
+
* `TearVariant` provided.
|
|
8459
9221
|
*
|
|
8460
9222
|
* ```ts
|
|
8461
9223
|
* function postTearInitLate(tear: EntityTear): void {}
|
|
8462
9224
|
* ```
|
|
8463
9225
|
*/
|
|
8464
|
-
POST_TEAR_INIT_LATE =
|
|
9226
|
+
POST_TEAR_INIT_LATE = 82,
|
|
8465
9227
|
/**
|
|
8466
9228
|
* Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
8467
9229
|
* `EntityTear.FrameCount` is equal to 1).
|
|
8468
9230
|
*
|
|
8469
9231
|
* This callback is useful because Incubus tears are not distinguishable until the second frame.
|
|
8470
9232
|
*
|
|
8471
|
-
* When registering the callback
|
|
8472
|
-
* only fire if
|
|
9233
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9234
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9235
|
+
* `TearVariant` provided.
|
|
8473
9236
|
*
|
|
8474
9237
|
* ```ts
|
|
8475
9238
|
* function postTearInitVeryLate(tear: EntityTear): void {}
|
|
8476
9239
|
* ```
|
|
8477
9240
|
*/
|
|
8478
|
-
POST_TEAR_INIT_VERY_LATE =
|
|
9241
|
+
POST_TEAR_INIT_VERY_LATE = 83,
|
|
8479
9242
|
/**
|
|
8480
9243
|
* Fires from the `POST_RENDER` callback on every frame that a TNT exists.
|
|
8481
9244
|
*
|
|
8482
|
-
* When registering the callback
|
|
8483
|
-
* only fire if it matches the variant
|
|
9245
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9246
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9247
|
+
* provided.
|
|
8484
9248
|
*
|
|
8485
9249
|
* ```ts
|
|
8486
9250
|
* function postTNTRender(tnt: GridEntityTNT): void {}
|
|
8487
9251
|
* ```
|
|
8488
9252
|
*/
|
|
8489
|
-
POST_TNT_RENDER =
|
|
9253
|
+
POST_TNT_RENDER = 84,
|
|
8490
9254
|
/**
|
|
8491
9255
|
* Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
|
|
8492
9256
|
*
|
|
8493
|
-
* When registering the callback
|
|
8494
|
-
* only fire if it matches the variant
|
|
9257
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9258
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
9259
|
+
* provided.
|
|
8495
9260
|
*
|
|
8496
9261
|
* ```ts
|
|
8497
9262
|
* function postTNTUpdate(tnt: GridEntityTNT): void {}
|
|
8498
9263
|
* ```
|
|
8499
9264
|
*/
|
|
8500
|
-
POST_TNT_UPDATE =
|
|
9265
|
+
POST_TNT_UPDATE = 85,
|
|
8501
9266
|
/**
|
|
8502
9267
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player gains or loses a new
|
|
8503
9268
|
* transformation.
|
|
8504
9269
|
*
|
|
8505
9270
|
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
8506
9271
|
*
|
|
8507
|
-
* When registering the callback
|
|
8508
|
-
* only fire if it matches the `PlayerForm`
|
|
9272
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9273
|
+
* an optional third argument that will make the callback only fire if it matches the `PlayerForm`
|
|
9274
|
+
* provided.
|
|
8509
9275
|
*
|
|
8510
9276
|
* ```ts
|
|
8511
9277
|
* function postTransformation(
|
|
@@ -8515,12 +9281,13 @@ export declare enum ModCallbackCustom {
|
|
|
8515
9281
|
* ): void {}
|
|
8516
9282
|
* ```
|
|
8517
9283
|
*/
|
|
8518
|
-
POST_TRANSFORMATION =
|
|
9284
|
+
POST_TRANSFORMATION = 86,
|
|
8519
9285
|
/**
|
|
8520
9286
|
* Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
|
|
8521
9287
|
*
|
|
8522
|
-
* When registering the callback
|
|
8523
|
-
* only fire if it matches the
|
|
9288
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
9289
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
9290
|
+
* `TrinketType` provided.
|
|
8524
9291
|
*
|
|
8525
9292
|
* ```ts
|
|
8526
9293
|
* function postTrinketBreak(
|
|
@@ -8529,22 +9296,23 @@ export declare enum ModCallbackCustom {
|
|
|
8529
9296
|
* ): void {}
|
|
8530
9297
|
* ```
|
|
8531
9298
|
*/
|
|
8532
|
-
POST_TRINKET_BREAK =
|
|
9299
|
+
POST_TRINKET_BREAK = 87,
|
|
8533
9300
|
/**
|
|
8534
9301
|
* Fires from the `POST_PEFFECT_UPDATE` callback on the frame before a Berserk effect ends when
|
|
8535
9302
|
* the player is predicted to die (e.g. they currently have no health left or they took damage in
|
|
8536
9303
|
* a "Lost" form).
|
|
8537
9304
|
*
|
|
8538
|
-
*
|
|
8539
|
-
*
|
|
8540
|
-
*
|
|
8541
|
-
*
|
|
9305
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9306
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9307
|
+
* matches the `PlayerVariant` provided.
|
|
9308
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9309
|
+
* matches the `PlayerType` provided.
|
|
8542
9310
|
*
|
|
8543
9311
|
* ```ts
|
|
8544
9312
|
* function preBerserkDeath(player: EntityPlayer): void {}
|
|
8545
9313
|
* ```
|
|
8546
9314
|
*/
|
|
8547
|
-
PRE_BERSERK_DEATH =
|
|
9315
|
+
PRE_BERSERK_DEATH = 88,
|
|
8548
9316
|
/**
|
|
8549
9317
|
* Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
|
|
8550
9318
|
* to initiate a custom revival, return an integer that corresponds to the item or type of revival
|
|
@@ -8553,16 +9321,17 @@ export declare enum ModCallbackCustom {
|
|
|
8553
9321
|
* This callback is useful because reviving the player after the game things that player should
|
|
8554
9322
|
* have died will result in the save data for the run getting deleted.
|
|
8555
9323
|
*
|
|
8556
|
-
*
|
|
8557
|
-
*
|
|
8558
|
-
*
|
|
8559
|
-
*
|
|
9324
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9325
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9326
|
+
* matches the `PlayerVariant` provided.
|
|
9327
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9328
|
+
* matches the `PlayerType` provided.
|
|
8560
9329
|
*
|
|
8561
9330
|
* ```ts
|
|
8562
9331
|
* function preCustomRevive(player: EntityPlayer): int | undefined {}
|
|
8563
9332
|
* ```
|
|
8564
9333
|
*/
|
|
8565
|
-
PRE_CUSTOM_REVIVE =
|
|
9334
|
+
PRE_CUSTOM_REVIVE = 89,
|
|
8566
9335
|
/**
|
|
8567
9336
|
* Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
|
|
8568
9337
|
* meets all of the conditions to pick it up.
|
|
@@ -8572,26 +9341,28 @@ export declare enum ModCallbackCustom {
|
|
|
8572
9341
|
* note that this callback will continue to fire for every frame that the player touches the
|
|
8573
9342
|
* pedestal, so you would need to continue returning false.)
|
|
8574
9343
|
*
|
|
8575
|
-
*
|
|
8576
|
-
*
|
|
8577
|
-
*
|
|
8578
|
-
*
|
|
9344
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9345
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9346
|
+
* matches the `PlayerVariant` provided.
|
|
9347
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9348
|
+
* matches the `PlayerType` provided.
|
|
8579
9349
|
*
|
|
8580
9350
|
* ```ts
|
|
8581
9351
|
* function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
|
|
8582
9352
|
* ```
|
|
8583
9353
|
*/
|
|
8584
|
-
PRE_GET_PEDESTAL =
|
|
9354
|
+
PRE_GET_PEDESTAL = 90,
|
|
8585
9355
|
/**
|
|
8586
9356
|
* Fires from the `POST_PEFFECT_UPDATE` callback when an item becomes queued (i.e. when the player
|
|
8587
9357
|
* begins to hold the item above their head).
|
|
8588
9358
|
*
|
|
8589
9359
|
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
8590
9360
|
*
|
|
8591
|
-
*
|
|
8592
|
-
*
|
|
8593
|
-
*
|
|
8594
|
-
*
|
|
9361
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9362
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9363
|
+
* matches the `ItemType` provided.
|
|
9364
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
9365
|
+
* sub-type matches the `CollectibleType` or the `TrinketType` provided.
|
|
8595
9366
|
*
|
|
8596
9367
|
* ```ts
|
|
8597
9368
|
* function preItemPickup(
|
|
@@ -8600,7 +9371,7 @@ export declare enum ModCallbackCustom {
|
|
|
8600
9371
|
* ): void {}
|
|
8601
9372
|
* ```
|
|
8602
9373
|
*/
|
|
8603
|
-
PRE_ITEM_PICKUP =
|
|
9374
|
+
PRE_ITEM_PICKUP = 91,
|
|
8604
9375
|
/**
|
|
8605
9376
|
* Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
|
|
8606
9377
|
* player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
|
|
@@ -8614,7 +9385,78 @@ export declare enum ModCallbackCustom {
|
|
|
8614
9385
|
* function preNewLevel(player: EntityPlayer): void {}
|
|
8615
9386
|
* ```
|
|
8616
9387
|
*/
|
|
8617
|
-
PRE_NEW_LEVEL =
|
|
9388
|
+
PRE_NEW_LEVEL = 92
|
|
9389
|
+
}
|
|
9390
|
+
|
|
9391
|
+
/** TODO */
|
|
9392
|
+
export declare enum ModCallbackCustom2 {
|
|
9393
|
+
POST_AMBUSH_FINISHED = 0,
|
|
9394
|
+
POST_AMBUSH_STARTED = 1,
|
|
9395
|
+
POST_BOMB_EXPLODED = 2,
|
|
9396
|
+
POST_BOMB_INIT_LATE = 3,
|
|
9397
|
+
POST_BONE_SWING = 4,
|
|
9398
|
+
POST_COLLECTIBLE_EMPTY = 5,
|
|
9399
|
+
POST_COLLECTIBLE_INIT_FIRST = 6,
|
|
9400
|
+
POST_CURSED_TELEPORT = 7,
|
|
9401
|
+
POST_CUSTOM_REVIVE = 8,
|
|
9402
|
+
POST_DICE_ROOM_ACTIVATED = 9,
|
|
9403
|
+
POST_DOOR_RENDER = 10,
|
|
9404
|
+
POST_DOOR_UPDATE = 11,
|
|
9405
|
+
POST_EFFECT_INIT_LATE = 12,
|
|
9406
|
+
POST_EFFECT_STATE_CHANGED = 13,
|
|
9407
|
+
POST_ESAU_JR = 14,
|
|
9408
|
+
POST_FAMILIAR_INIT_LATE = 15,
|
|
9409
|
+
POST_FAMILIAR_STATE_CHANGED = 16,
|
|
9410
|
+
POST_FIRST_ESAU_JR = 17,
|
|
9411
|
+
POST_FIRST_FLIP = 18,
|
|
9412
|
+
POST_FLIP = 19,
|
|
9413
|
+
POST_GAME_STARTED_REORDERED = 20,
|
|
9414
|
+
POST_GAME_STARTED_REORDERED_LAST = 21,
|
|
9415
|
+
POST_GREED_MODE_WAVE = 22,
|
|
9416
|
+
POST_GRID_ENTITY_BROKEN = 23,
|
|
9417
|
+
POST_GRID_ENTITY_COLLISION = 24,
|
|
9418
|
+
POST_GRID_ENTITY_CUSTOM_BROKEN = 25,
|
|
9419
|
+
POST_GRID_ENTITY_CUSTOM_COLLISION = 26,
|
|
9420
|
+
POST_GRID_ENTITY_CUSTOM_INIT = 27,
|
|
9421
|
+
POST_GRID_ENTITY_CUSTOM_REMOVE = 28,
|
|
9422
|
+
POST_GRID_ENTITY_CUSTOM_STATE_CHANGED = 29,
|
|
9423
|
+
POST_GRID_ENTITY_CUSTOM_UPDATE = 30,
|
|
9424
|
+
POST_GRID_ENTITY_INIT = 31,
|
|
9425
|
+
POST_GRID_ENTITY_REMOVE = 32,
|
|
9426
|
+
POST_GRID_ENTITY_STATE_CHANGED = 33,
|
|
9427
|
+
POST_GRID_ENTITY_UPDATE = 34,
|
|
9428
|
+
POST_HOLY_MANTLE_REMOVED = 35,
|
|
9429
|
+
POST_KNIFE_INIT_LATE = 36,
|
|
9430
|
+
POST_NEW_LEVEL_REORDERED = 37,
|
|
9431
|
+
POST_NEW_ROOM_EARLY = 38,
|
|
9432
|
+
POST_NEW_ROOM_REORDERED = 39,
|
|
9433
|
+
POST_PEFFECT_UPDATE_REORDERED = 40,
|
|
9434
|
+
POST_PIT_RENDER = 41,
|
|
9435
|
+
POST_PLAYER_FATAL_DAMAGE = 42,
|
|
9436
|
+
POST_PLAYER_RENDER_REORDERED = 43,
|
|
9437
|
+
POST_PLAYER_UPDATE_REORDERED = 44,
|
|
9438
|
+
POST_ROOM_CLEAR_CHANGED = 45,
|
|
9439
|
+
POST_SPIKES_RENDER = 46,
|
|
9440
|
+
PRE_BERSERK_DEATH = 47,
|
|
9441
|
+
PRE_CUSTOM_REVIVE = 48
|
|
9442
|
+
}
|
|
9443
|
+
|
|
9444
|
+
declare type ModCallbackCustomGridEntity = MatchingCallbackCustom<CallbackSignatureGridEntity>;
|
|
9445
|
+
|
|
9446
|
+
declare type ModCallbackCustomGridEntityCustom = MatchingCallbackCustom<CallbackSignatureGridEntityCustom>;
|
|
9447
|
+
|
|
9448
|
+
declare type ModCallbackCustomPlayer = MatchingCallbackCustom<CallbackSignaturePlayer>;
|
|
9449
|
+
|
|
9450
|
+
declare type ModCallbackCustomRevive = MatchingCallbackCustom<CallbackSignatureRevive>;
|
|
9451
|
+
|
|
9452
|
+
/**
|
|
9453
|
+
* A helper class for a mod that wants to represent its individual features as classes. This is
|
|
9454
|
+
* useful if you are using decorators to represent class methods that should be automatically
|
|
9455
|
+
* subscribed to callbacks.
|
|
9456
|
+
*/
|
|
9457
|
+
export declare class ModFeature {
|
|
9458
|
+
private mod;
|
|
9459
|
+
constructor(mod: ModUpgraded);
|
|
8618
9460
|
}
|
|
8619
9461
|
|
|
8620
9462
|
/**
|
|
@@ -8626,33 +9468,76 @@ export declare enum ModCallbackCustom {
|
|
|
8626
9468
|
*/
|
|
8627
9469
|
export declare class ModUpgraded implements Mod {
|
|
8628
9470
|
/**
|
|
8629
|
-
* The
|
|
8630
|
-
* referenced.
|
|
9471
|
+
* The `RegisterMod` function stores the name of the mod on the mod object for some reason. (It is
|
|
9472
|
+
* never used or referenced.)
|
|
8631
9473
|
*/
|
|
8632
9474
|
Name: string;
|
|
8633
9475
|
/** We store a copy of the original mod object so that we can re-implement its functions. */
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
9476
|
+
private mod;
|
|
9477
|
+
private debug;
|
|
9478
|
+
private timeThreshold;
|
|
9479
|
+
private callbacks;
|
|
8637
9480
|
constructor(mod: Mod, debug: boolean, timeThreshold?: float);
|
|
9481
|
+
/**
|
|
9482
|
+
* Registers a function to be executed when an in-game event happens. For example, the
|
|
9483
|
+
* `ModCallback.POST_UPDATE` event corresponds to being executed once at the end of every game
|
|
9484
|
+
* logic frame.
|
|
9485
|
+
*/
|
|
8638
9486
|
AddCallback<T extends ModCallback>(modCallback: T, ...args: AddCallbackParameters[T]): void;
|
|
9487
|
+
/** Returns whether or not a corresponding "save#.dat" file exists for the current mod. */
|
|
8639
9488
|
HasData(): boolean;
|
|
9489
|
+
/**
|
|
9490
|
+
* Returns a string containing all of the data inside of the corresponding "save#.dat" file for
|
|
9491
|
+
* this mod.
|
|
9492
|
+
*/
|
|
8640
9493
|
LoadData(): string;
|
|
8641
9494
|
/**
|
|
8642
|
-
*
|
|
8643
|
-
*
|
|
9495
|
+
* Unregisters a function that was previously registered with the `AddCallback` method.
|
|
9496
|
+
*
|
|
9497
|
+
* This method does not care about the tertiary argument. In other words, regardless of the
|
|
9498
|
+
* conditions of how you registered the callback, it will be removed.
|
|
8644
9499
|
*/
|
|
8645
9500
|
RemoveCallback<T extends ModCallback>(modCallback: T, callback: AddCallbackParameters[T][0]): void;
|
|
9501
|
+
/** Deletes the corresponding "save#.dat" file for this mod, if it exists. */
|
|
8646
9502
|
RemoveData(): void;
|
|
9503
|
+
/**
|
|
9504
|
+
* Creates or updates the corresponding "save#.dat" file for this mod with the provided string.
|
|
9505
|
+
*/
|
|
8647
9506
|
SaveData(data: string): void;
|
|
9507
|
+
/**
|
|
9508
|
+
* Registers a function to be executed when an in-game event happens. This method is specifically
|
|
9509
|
+
* for events that are provided by the IsaacScript standard library. For example, the
|
|
9510
|
+
* `ModCallbackCustom.POST_BOMB_EXPLODE` event corresponds to when a bomb explodes.
|
|
9511
|
+
*/
|
|
8648
9512
|
AddCallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, ...args: AddCallbackParametersCustom[T]): void;
|
|
9513
|
+
/** Adds a callback in the new callback system format. This method is only temporary. */
|
|
9514
|
+
AddCallbackCustom2<T extends ModCallbackCustom2>(modCallbackCustom: T, ...args: AddCallbackParametersCustom2[T]): void;
|
|
9515
|
+
/**
|
|
9516
|
+
* Unregisters a function that was previously registered with the `AddCallbackCustom` method.
|
|
9517
|
+
*
|
|
9518
|
+
* This method does not care about the tertiary argument. In other words, regardless of the
|
|
9519
|
+
* conditions of how you registered the callback, it will be removed.
|
|
9520
|
+
*/
|
|
9521
|
+
RemoveCallbackCustom<T extends ModCallbackCustom2>(modCallbackCustom: T, callback: AddCallbackParametersCustom2[T][0]): void;
|
|
8649
9522
|
/**
|
|
8650
|
-
* This method
|
|
8651
|
-
*
|
|
9523
|
+
* This method should only be used by the `upgradeMod` function. Returns the class methods from
|
|
9524
|
+
* the features that were added.
|
|
8652
9525
|
*/
|
|
8653
|
-
|
|
9526
|
+
initOptionalFeature(feature: ISCFeature): FunctionTuple[];
|
|
9527
|
+
/** This is used to initialize both custom callbacks and "extra features". */
|
|
9528
|
+
private initFeature;
|
|
9529
|
+
private uninitFeature;
|
|
8654
9530
|
}
|
|
8655
9531
|
|
|
9532
|
+
/**
|
|
9533
|
+
* By specifying one or more optional features, end-users will get a version of `ModUpgraded` that
|
|
9534
|
+
* has extra methods corresponding to the features.
|
|
9535
|
+
*
|
|
9536
|
+
* We have to explicitly account for the empty array case, since `never` will cause mess up the
|
|
9537
|
+
* union.
|
|
9538
|
+
*/
|
|
9539
|
+
declare type ModUpgradedWithFeatures<T extends ISCFeature> = [T] extends [never] ? ModUpgraded : Omit<ModUpgraded & UnionToIntersection<ISCFeatureToClass[T]>, KeysToScrubFromModClass>;
|
|
9540
|
+
|
|
8656
9541
|
/**
|
|
8657
9542
|
* Helper function to move all of the players to where they would normally go when arriving at a new
|
|
8658
9543
|
* floor. (In normal mode, this is the center of the room. In Greed Mode, this is below the top
|
|
@@ -8689,6 +9574,9 @@ export declare const NEW_RUN_PLAYER_STARTING_POSITION: Vector;
|
|
|
8689
9574
|
/**
|
|
8690
9575
|
* Constructor for a `ChargeBarSprites` object. For more information, see the `renderChargeBar`
|
|
8691
9576
|
* helper function.
|
|
9577
|
+
*
|
|
9578
|
+
* Note that this is for the vertical charge bar that represents the number of charges that an
|
|
9579
|
+
* active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
|
|
8692
9580
|
*/
|
|
8693
9581
|
export declare function newChargeBarSprites(maxCharges: int): ChargeBarSprites;
|
|
8694
9582
|
|
|
@@ -8698,6 +9586,16 @@ export declare function newChargeBarSprites(maxCharges: int): ChargeBarSprites;
|
|
|
8698
9586
|
*/
|
|
8699
9587
|
export declare function newCollectibleSprite(collectibleType: CollectibleType): Sprite;
|
|
8700
9588
|
|
|
9589
|
+
/**
|
|
9590
|
+
* Helper function for creating objects that represent a mapping of an enum value to some other
|
|
9591
|
+
* value in a type-safe way.
|
|
9592
|
+
*
|
|
9593
|
+
* This function will ensure that the provided object has a key for each value in the enum.
|
|
9594
|
+
*
|
|
9595
|
+
* After the `satisfies` operator is released in TypeScript 4.9, this function should be deleted.
|
|
9596
|
+
*/
|
|
9597
|
+
export declare function newObjectWithEnumKeys<Enum extends number | string, T extends Record<Enum, unknown>>(theEnum: Record<string, Enum>, obj: T): T;
|
|
9598
|
+
|
|
8701
9599
|
export declare function newPickingUpItem(): PickingUpItem;
|
|
8702
9600
|
|
|
8703
9601
|
/** Returns a `PlayerHealth` object with all zeros. */
|
|
@@ -8828,6 +9726,8 @@ export declare function openAllDoors(): void;
|
|
|
8828
9726
|
*/
|
|
8829
9727
|
export declare function openDoorFast(door: GridEntityDoor): void;
|
|
8830
9728
|
|
|
9729
|
+
declare type OptionalArgs<T extends ModCallbackCustom2> = AllButFirst_2<AddCallbackParametersCustom2[T]>;
|
|
9730
|
+
|
|
8831
9731
|
/**
|
|
8832
9732
|
* Helper function to parse a string that contains an entity type, a variant, and a sub-type,
|
|
8833
9733
|
* separated by periods.
|
|
@@ -8905,7 +9805,15 @@ export declare type PickupIndex = int & {
|
|
|
8905
9805
|
/** Maps pill effect names to the values of the `PillEffect` enum. */
|
|
8906
9806
|
export declare const PILL_NAME_TO_EFFECT_MAP: ReadonlyMap<string, PillEffect>;
|
|
8907
9807
|
|
|
8908
|
-
|
|
9808
|
+
/**
|
|
9809
|
+
* Helper function to play the appropriate sound effect for a player after getting one or more
|
|
9810
|
+
* charges on their active item. (There is a different sound depending on whether the item is fully
|
|
9811
|
+
* charged or not.)
|
|
9812
|
+
*
|
|
9813
|
+
* @param player The player to play the sound effect for.
|
|
9814
|
+
* @param activeSlot Optional. The slot that was just charged. Default is `ActiveSlot.PRIMARY`.
|
|
9815
|
+
*/
|
|
9816
|
+
export declare function playChargeSoundEffect(player: EntityPlayer, activeSlot?: ActiveSlot): void;
|
|
8909
9817
|
|
|
8910
9818
|
/**
|
|
8911
9819
|
* Helper function to add one or more collectibles to a player.
|
|
@@ -8970,6 +9878,25 @@ export declare type PlayerIndex = int & {
|
|
|
8970
9878
|
readonly __playerIndexBrand: symbol;
|
|
8971
9879
|
};
|
|
8972
9880
|
|
|
9881
|
+
declare class PlayerReorderedCallbacks extends Feature {
|
|
9882
|
+
v: {
|
|
9883
|
+
run: {
|
|
9884
|
+
postGameStartedFiredOnThisRun: boolean;
|
|
9885
|
+
postPEffectUpdateQueue: PlayerIndex[];
|
|
9886
|
+
postPlayerUpdateQueue: PlayerIndex[];
|
|
9887
|
+
postPlayerRenderQueue: PlayerIndex[];
|
|
9888
|
+
};
|
|
9889
|
+
};
|
|
9890
|
+
private postPEffectUpdateReordered;
|
|
9891
|
+
private postPlayerRenderReordered;
|
|
9892
|
+
private postPlayerUpdateReordered;
|
|
9893
|
+
constructor(postPEffectUpdateReordered: PostPEffectUpdateReordered, postPlayerRenderReordered: PostPlayerRenderReordered, postPlayerUpdateReordered: PostPlayerUpdateReordered);
|
|
9894
|
+
private postPEffectUpdate;
|
|
9895
|
+
private postPlayerUpdate;
|
|
9896
|
+
private postPlayerRender;
|
|
9897
|
+
private postGameStartedReorderedLast;
|
|
9898
|
+
}
|
|
9899
|
+
|
|
8973
9900
|
/** This is used by the `getPocketItems` and related helper functions. */
|
|
8974
9901
|
export declare interface PocketItemDescription {
|
|
8975
9902
|
slot: PocketItemSlot;
|
|
@@ -9018,23 +9945,24 @@ callback: (boneClub: EntityKnife) => void
|
|
|
9018
9945
|
];
|
|
9019
9946
|
|
|
9020
9947
|
declare type PostCollectibleEmptyRegisterParameters = [
|
|
9021
|
-
callback: (collectible:
|
|
9948
|
+
callback: (collectible: EntityPickupCollectible, oldCollectibleType: CollectibleType) => void,
|
|
9022
9949
|
collectibleType?: CollectibleType
|
|
9023
9950
|
];
|
|
9024
9951
|
|
|
9025
9952
|
declare type PostCollectibleInitFirstRegisterParameters = [
|
|
9026
|
-
callback: (collectible:
|
|
9953
|
+
callback: (collectible: EntityPickupCollectible) => void,
|
|
9027
9954
|
collectibleType?: CollectibleType
|
|
9028
9955
|
];
|
|
9029
9956
|
|
|
9030
9957
|
declare type PostCursedTeleportRegisterParameters = [
|
|
9031
|
-
callback: (player: EntityPlayer) => void
|
|
9958
|
+
callback: (player: EntityPlayer) => void,
|
|
9959
|
+
playerVariant?: PlayerVariant,
|
|
9960
|
+
character?: PlayerType
|
|
9032
9961
|
];
|
|
9033
9962
|
|
|
9034
|
-
declare
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
];
|
|
9963
|
+
declare class PostCustomRevive extends CustomCallbackRevive<ModCallbackCustom2.POST_CUSTOM_REVIVE> {
|
|
9964
|
+
constructor();
|
|
9965
|
+
}
|
|
9038
9966
|
|
|
9039
9967
|
declare type PostCustomReviveRegisterParameters = [
|
|
9040
9968
|
callback: (player: EntityPlayer, revivalType: int) => void,
|
|
@@ -9066,6 +9994,10 @@ callback: (effect: EntityEffect, previousState: int, currentState: int) => void,
|
|
|
9066
9994
|
effectVariant?: EffectVariant
|
|
9067
9995
|
];
|
|
9068
9996
|
|
|
9997
|
+
declare class PostEsauJr extends CustomCallback<ModCallbackCustom2.POST_ESAU_JR> {
|
|
9998
|
+
constructor();
|
|
9999
|
+
}
|
|
10000
|
+
|
|
9069
10001
|
declare type PostEsauJrRegisterParameters = [
|
|
9070
10002
|
callback: (player: EntityPlayer) => void
|
|
9071
10003
|
];
|
|
@@ -9080,18 +10012,38 @@ callback: (familiar: EntityFamiliar, previousState: int, currentState: int) => v
|
|
|
9080
10012
|
familiarVariant?: FamiliarVariant
|
|
9081
10013
|
];
|
|
9082
10014
|
|
|
10015
|
+
declare class PostFirstEsauJr extends CustomCallback<ModCallbackCustom2.POST_FIRST_ESAU_JR> {
|
|
10016
|
+
constructor();
|
|
10017
|
+
}
|
|
10018
|
+
|
|
9083
10019
|
declare type PostFirstEsauJrRegisterParameters = [
|
|
9084
10020
|
callback: (player: EntityPlayer) => void
|
|
9085
10021
|
];
|
|
9086
10022
|
|
|
10023
|
+
declare class PostFirstFlip extends CustomCallback<ModCallbackCustom2.POST_FIRST_FLIP> {
|
|
10024
|
+
constructor();
|
|
10025
|
+
}
|
|
10026
|
+
|
|
9087
10027
|
declare type PostFirstFlipRegisterParameters = [
|
|
9088
10028
|
callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void
|
|
9089
10029
|
];
|
|
9090
10030
|
|
|
10031
|
+
declare class PostFlip extends CustomCallback<ModCallbackCustom2.POST_FLIP> {
|
|
10032
|
+
constructor();
|
|
10033
|
+
}
|
|
10034
|
+
|
|
9091
10035
|
declare type PostFlipRegisterParameters = [
|
|
9092
10036
|
callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void
|
|
9093
10037
|
];
|
|
9094
10038
|
|
|
10039
|
+
declare class PostGameStartedReordered extends CustomCallback<ModCallbackCustom2.POST_GAME_STARTED_REORDERED> {
|
|
10040
|
+
constructor();
|
|
10041
|
+
}
|
|
10042
|
+
|
|
10043
|
+
declare class PostGameStartedReorderedLast extends CustomCallback<ModCallbackCustom2.POST_GAME_STARTED_REORDERED> {
|
|
10044
|
+
constructor();
|
|
10045
|
+
}
|
|
10046
|
+
|
|
9095
10047
|
declare type PostGameStartedReorderedLastRegisterParameters = [
|
|
9096
10048
|
callback: (isContinued: boolean) => void
|
|
9097
10049
|
];
|
|
@@ -9104,12 +10056,21 @@ declare type PostGreedModeWaveRegisterParameters = [
|
|
|
9104
10056
|
callback: (oldWave: int, newWave: int) => void
|
|
9105
10057
|
];
|
|
9106
10058
|
|
|
10059
|
+
declare class PostGridEntityBroken extends CustomCallbackGridEntity<ModCallbackCustom2.POST_GRID_ENTITY_BROKEN> {
|
|
10060
|
+
constructor();
|
|
10061
|
+
}
|
|
10062
|
+
|
|
9107
10063
|
declare type PostGridEntityBrokenRegisterParameters = [
|
|
9108
10064
|
callback: (gridEntity: GridEntity) => void,
|
|
9109
10065
|
gridEntityType?: GridEntityType,
|
|
9110
|
-
|
|
10066
|
+
variant?: int
|
|
9111
10067
|
];
|
|
9112
10068
|
|
|
10069
|
+
declare class PostGridEntityCollision extends CustomCallback<T> {
|
|
10070
|
+
constructor();
|
|
10071
|
+
protected shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
10072
|
+
}
|
|
10073
|
+
|
|
9113
10074
|
declare type PostGridEntityCollisionRegisterParameters = [
|
|
9114
10075
|
callback: (gridEntity: GridEntity, entity: Entity) => void,
|
|
9115
10076
|
gridEntityType?: GridEntityType,
|
|
@@ -9118,11 +10079,20 @@ entityType?: EntityType,
|
|
|
9118
10079
|
entityVariant?: int
|
|
9119
10080
|
];
|
|
9120
10081
|
|
|
10082
|
+
declare class PostGridEntityCustomBroken extends CustomCallbackGridEntityCustom<ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_BROKEN> {
|
|
10083
|
+
constructor();
|
|
10084
|
+
}
|
|
10085
|
+
|
|
9121
10086
|
declare type PostGridEntityCustomBrokenRegisterParameters = [
|
|
9122
10087
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
|
|
9123
10088
|
gridEntityTypeCustom?: GridEntityType
|
|
9124
10089
|
];
|
|
9125
10090
|
|
|
10091
|
+
declare class PostGridEntityCustomCollision extends CustomCallback<T_2> {
|
|
10092
|
+
constructor();
|
|
10093
|
+
protected shouldFire(fireArgs: FireArgs<T_2>, optionalArgs: OptionalArgs<T_2>): boolean;
|
|
10094
|
+
}
|
|
10095
|
+
|
|
9126
10096
|
declare type PostGridEntityCustomCollisionRegisterParameters = [
|
|
9127
10097
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, entity: Entity) => void,
|
|
9128
10098
|
gridEntityTypeCustom?: GridEntityType,
|
|
@@ -9130,11 +10100,20 @@ entityType?: EntityType,
|
|
|
9130
10100
|
entityVariant?: int
|
|
9131
10101
|
];
|
|
9132
10102
|
|
|
10103
|
+
declare class PostGridEntityCustomInit extends CustomCallbackGridEntityCustom<ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_INIT> {
|
|
10104
|
+
constructor();
|
|
10105
|
+
}
|
|
10106
|
+
|
|
9133
10107
|
declare type PostGridEntityCustomInitRegisterParameters = [
|
|
9134
10108
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
|
|
9135
10109
|
gridEntityTypeCustom?: GridEntityType
|
|
9136
10110
|
];
|
|
9137
10111
|
|
|
10112
|
+
declare class PostGridEntityCustomRemove extends CustomCallback<T_4> {
|
|
10113
|
+
constructor();
|
|
10114
|
+
protected shouldFire(fireArgs: FireArgs<T_4>, optionalArgs: OptionalArgs<T_4>): boolean;
|
|
10115
|
+
}
|
|
10116
|
+
|
|
9138
10117
|
declare type PostGridEntityCustomRemoveRegisterParameters = [
|
|
9139
10118
|
callback: (gridIndex: int, gridEntityTypeCustom: GridEntityType) => void,
|
|
9140
10119
|
gridEntityTypeCustom?: GridEntityType
|
|
@@ -9145,44 +10124,69 @@ callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void
|
|
|
9145
10124
|
gridEntityTypeCustom?: GridEntityType
|
|
9146
10125
|
];
|
|
9147
10126
|
|
|
10127
|
+
declare class PostGridEntityCustomStateChanged extends CustomCallbackGridEntityCustom<ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_STATE_CHANGED> {
|
|
10128
|
+
constructor();
|
|
10129
|
+
}
|
|
10130
|
+
|
|
9148
10131
|
declare type PostGridEntityCustomStateChangedRegisterParameters = [
|
|
9149
10132
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, oldState: int, newState: int) => void,
|
|
9150
10133
|
gridEntityTypeCustom?: GridEntityType
|
|
9151
10134
|
];
|
|
9152
10135
|
|
|
10136
|
+
declare class PostGridEntityCustomUpdate extends CustomCallbackGridEntityCustom<ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_UPDATE> {
|
|
10137
|
+
constructor();
|
|
10138
|
+
}
|
|
10139
|
+
|
|
9153
10140
|
declare type PostGridEntityCustomUpdateRegisterParameters = [
|
|
9154
10141
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
|
|
9155
10142
|
gridEntityTypeCustom?: GridEntityType
|
|
9156
10143
|
];
|
|
9157
10144
|
|
|
10145
|
+
declare class PostGridEntityInit extends CustomCallbackGridEntity<ModCallbackCustom2.POST_GRID_ENTITY_INIT> {
|
|
10146
|
+
constructor();
|
|
10147
|
+
}
|
|
10148
|
+
|
|
9158
10149
|
declare type PostGridEntityInitRegisterParameters = [
|
|
9159
10150
|
callback: (gridEntity: GridEntity) => void,
|
|
9160
10151
|
gridEntityType?: GridEntityType,
|
|
9161
|
-
|
|
10152
|
+
variant?: int
|
|
9162
10153
|
];
|
|
9163
10154
|
|
|
10155
|
+
declare class PostGridEntityRemove extends CustomCallback<T_3> {
|
|
10156
|
+
constructor();
|
|
10157
|
+
protected shouldFire(fireArgs: FireArgs<T_3>, optionalArgs: OptionalArgs<T_3>): boolean;
|
|
10158
|
+
}
|
|
10159
|
+
|
|
9164
10160
|
declare type PostGridEntityRemoveRegisterParameters = [
|
|
9165
|
-
callback: (gridIndex: int, gridEntityType: GridEntityType) => void,
|
|
10161
|
+
callback: (gridIndex: int, gridEntityType: GridEntityType, variant: int) => void,
|
|
9166
10162
|
gridEntityType?: GridEntityType,
|
|
9167
|
-
|
|
10163
|
+
variant?: int
|
|
9168
10164
|
];
|
|
9169
10165
|
|
|
9170
10166
|
declare type PostGridEntityRenderRegisterParameters = [
|
|
9171
10167
|
callback: (gridEntity: GridEntity) => void,
|
|
9172
10168
|
gridEntityType?: GridEntityType,
|
|
9173
|
-
|
|
10169
|
+
variant?: int
|
|
9174
10170
|
];
|
|
9175
10171
|
|
|
10172
|
+
declare class PostGridEntityStateChanged extends CustomCallbackGridEntity<ModCallbackCustom2.POST_GRID_ENTITY_STATE_CHANGED> {
|
|
10173
|
+
constructor();
|
|
10174
|
+
}
|
|
10175
|
+
|
|
9176
10176
|
declare type PostGridEntityStateChangedRegisterParameters = [
|
|
9177
10177
|
callback: (gridEntity: GridEntity, oldState: int, newState: int) => void,
|
|
9178
10178
|
gridEntityType?: GridEntityType,
|
|
9179
|
-
|
|
10179
|
+
variant?: int
|
|
9180
10180
|
];
|
|
9181
10181
|
|
|
10182
|
+
declare class PostGridEntityUpdate extends CustomCallbackGridEntity<ModCallbackCustom2.POST_GRID_ENTITY_UPDATE> {
|
|
10183
|
+
constructor();
|
|
10184
|
+
}
|
|
10185
|
+
|
|
9182
10186
|
declare type PostGridEntityUpdateRegisterParameters = [
|
|
9183
10187
|
callback: (gridEntity: GridEntity) => void,
|
|
9184
10188
|
gridEntityType?: GridEntityType,
|
|
9185
|
-
|
|
10189
|
+
variant?: int
|
|
9186
10190
|
];
|
|
9187
10191
|
|
|
9188
10192
|
declare type PostHolyMantleRemovedRegisterParameters = [
|
|
@@ -9216,10 +10220,18 @@ callback: (laser: EntityLaser) => void,
|
|
|
9216
10220
|
laserVariant?: LaserVariant
|
|
9217
10221
|
];
|
|
9218
10222
|
|
|
10223
|
+
declare class PostNewLevelReordered extends CustomCallback<ModCallbackCustom2.POST_NEW_LEVEL_REORDERED> {
|
|
10224
|
+
constructor();
|
|
10225
|
+
}
|
|
10226
|
+
|
|
9219
10227
|
declare type PostNewLevelReorderedRegisterParameters = [callback: () => void];
|
|
9220
10228
|
|
|
9221
10229
|
declare type PostNewRoomEarlyRegisterParameters = [callback: () => void];
|
|
9222
10230
|
|
|
10231
|
+
declare class PostNewRoomReordered extends CustomCallback<ModCallbackCustom2.POST_NEW_ROOM_REORDERED> {
|
|
10232
|
+
constructor();
|
|
10233
|
+
}
|
|
10234
|
+
|
|
9223
10235
|
declare type PostNewRoomReorderedRegisterParameters = [callback: () => void];
|
|
9224
10236
|
|
|
9225
10237
|
declare type PostNPCInitLateRegisterParameters = [
|
|
@@ -9233,6 +10245,10 @@ entityType?: EntityType,
|
|
|
9233
10245
|
variant?: int
|
|
9234
10246
|
];
|
|
9235
10247
|
|
|
10248
|
+
declare class PostPEffectUpdateReordered extends CustomCallbackPlayer<ModCallbackCustom2.POST_PEFFECT_UPDATE_REORDERED> {
|
|
10249
|
+
constructor();
|
|
10250
|
+
}
|
|
10251
|
+
|
|
9236
10252
|
declare type PostPEffectUpdateReorderedRegisterParameters = [
|
|
9237
10253
|
callback: (player: EntityPlayer) => void,
|
|
9238
10254
|
playerVariant?: PlayerVariant,
|
|
@@ -9314,12 +10330,20 @@ playerVariant?: PlayerVariant,
|
|
|
9314
10330
|
character?: PlayerType
|
|
9315
10331
|
];
|
|
9316
10332
|
|
|
10333
|
+
declare class PostPlayerRenderReordered extends CustomCallbackPlayer<ModCallbackCustom2.POST_PLAYER_RENDER_REORDERED> {
|
|
10334
|
+
constructor();
|
|
10335
|
+
}
|
|
10336
|
+
|
|
9317
10337
|
declare type PostPlayerRenderReorderedRegisterParameters = [
|
|
9318
10338
|
callback: (player: EntityPlayer) => void,
|
|
9319
10339
|
playerVariant?: PlayerVariant,
|
|
9320
10340
|
character?: PlayerType
|
|
9321
10341
|
];
|
|
9322
10342
|
|
|
10343
|
+
declare class PostPlayerUpdateReordered extends CustomCallbackPlayer<ModCallbackCustom2.POST_PLAYER_UPDATE_REORDERED> {
|
|
10344
|
+
constructor();
|
|
10345
|
+
}
|
|
10346
|
+
|
|
9323
10347
|
declare type PostPlayerUpdateReorderedRegisterParameters = [
|
|
9324
10348
|
callback: (player: EntityPlayer) => void,
|
|
9325
10349
|
playerVariant?: PlayerVariant,
|
|
@@ -9359,12 +10383,12 @@ pickupSubType?: int
|
|
|
9359
10383
|
|
|
9360
10384
|
declare type PostRockRenderRegisterParameters = [
|
|
9361
10385
|
callback: (rock: GridEntityRock) => void,
|
|
9362
|
-
|
|
10386
|
+
variant?: int
|
|
9363
10387
|
];
|
|
9364
10388
|
|
|
9365
10389
|
declare type PostRockUpdateRegisterParameters = [
|
|
9366
10390
|
callback: (rock: GridEntityRock) => void,
|
|
9367
|
-
|
|
10391
|
+
variant?: int
|
|
9368
10392
|
];
|
|
9369
10393
|
|
|
9370
10394
|
declare type PostRoomClearChangedRegisterParameters = [
|
|
@@ -9411,12 +10435,12 @@ slotVariant?: SlotVariant
|
|
|
9411
10435
|
|
|
9412
10436
|
declare type PostSpikesRenderRegisterParameters = [
|
|
9413
10437
|
callback: (spikes: GridEntitySpikes) => void,
|
|
9414
|
-
|
|
10438
|
+
variant?: int
|
|
9415
10439
|
];
|
|
9416
10440
|
|
|
9417
10441
|
declare type PostSpikesUpdateRegisterParameters = [
|
|
9418
10442
|
callback: (spikes: GridEntitySpikes) => void,
|
|
9419
|
-
|
|
10443
|
+
variant?: int
|
|
9420
10444
|
];
|
|
9421
10445
|
|
|
9422
10446
|
declare type PostTearInitLateRegisterParameters = [
|
|
@@ -9431,12 +10455,12 @@ tearVariant?: TearVariant
|
|
|
9431
10455
|
|
|
9432
10456
|
declare type PostTNTRenderRegisterParameters = [
|
|
9433
10457
|
callback: (tnt: GridEntityTNT) => void,
|
|
9434
|
-
|
|
10458
|
+
variant?: int
|
|
9435
10459
|
];
|
|
9436
10460
|
|
|
9437
10461
|
declare type PostTNTUpdateRegisterParameters = [
|
|
9438
10462
|
callback: (tnt: GridEntityTNT) => void,
|
|
9439
|
-
|
|
10463
|
+
variant?: int
|
|
9440
10464
|
];
|
|
9441
10465
|
|
|
9442
10466
|
declare type PostTransformationRegisterParameters = [
|
|
@@ -9455,6 +10479,10 @@ playerVariant?: PlayerVariant,
|
|
|
9455
10479
|
character?: PlayerType
|
|
9456
10480
|
];
|
|
9457
10481
|
|
|
10482
|
+
declare class PreCustomRevive extends CustomCallbackPlayer<ModCallbackCustom2.PRE_CUSTOM_REVIVE> {
|
|
10483
|
+
constructor();
|
|
10484
|
+
}
|
|
10485
|
+
|
|
9458
10486
|
declare type PreCustomReviveRegisterParameters = [
|
|
9459
10487
|
callback: (player: EntityPlayer) => int | undefined,
|
|
9460
10488
|
playerVariant?: PlayerVariant,
|
|
@@ -9534,6 +10562,9 @@ export declare function printConsole(msg: string): void;
|
|
|
9534
10562
|
/** Helper function to print whether something was enabled or disabled to the in-game console. */
|
|
9535
10563
|
export declare function printEnabled(enabled: boolean, description: string): void;
|
|
9536
10564
|
|
|
10565
|
+
/** Used for `runInNFrames` functions. */
|
|
10566
|
+
declare type QueuedFunctionTuple = [frameCountToFire: int, func: () => void];
|
|
10567
|
+
|
|
9537
10568
|
/**
|
|
9538
10569
|
* Helper function to make a character that has the same health mechanic as Blue Baby (red heart
|
|
9539
10570
|
* containers --> soul hearts) or Dark Judas (red heart containers --> black hearts).
|
|
@@ -10207,6 +11238,9 @@ export declare const RENDER_FRAMES_PER_SECOND = 60;
|
|
|
10207
11238
|
/**
|
|
10208
11239
|
* Helper function to render a charge bar on the screen. First, call the `newChargeBarSprites`
|
|
10209
11240
|
* function to initialize the sprites, and then call this function on every render frame.
|
|
11241
|
+
*
|
|
11242
|
+
* Note that this is for the vertical charge bar that represents the number of charges that an
|
|
11243
|
+
* active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
|
|
10210
11244
|
*/
|
|
10211
11245
|
export declare function renderChargeBar(sprites: ChargeBarSprites, position: Vector, normalCharges: int, batteryCharges: int): void;
|
|
10212
11246
|
|
|
@@ -10359,6 +11393,114 @@ export declare function round(num: float, numDecimalPlaces?: number): float;
|
|
|
10359
11393
|
*/
|
|
10360
11394
|
export declare function runDeepCopyTests(): void;
|
|
10361
11395
|
|
|
11396
|
+
declare class RunInNFrames extends Feature {
|
|
11397
|
+
v: {
|
|
11398
|
+
run: {
|
|
11399
|
+
queuedGameFunctionTuples: QueuedFunctionTuple[];
|
|
11400
|
+
queuedRenderFunctionTuples: QueuedFunctionTuple[];
|
|
11401
|
+
intervalGameFunctionTuples: IntervalFunctionTuple[];
|
|
11402
|
+
intervalRenderFunctionTuples: IntervalFunctionTuple[];
|
|
11403
|
+
};
|
|
11404
|
+
};
|
|
11405
|
+
constructor();
|
|
11406
|
+
private postUpdate;
|
|
11407
|
+
private postRender;
|
|
11408
|
+
/**
|
|
11409
|
+
* Supply a function to run N game frames from now in the `POST_UPDATE` callback.
|
|
11410
|
+
*
|
|
11411
|
+
* For a usage example, see the documentation for the `runNextGameFrame`, which is used in a
|
|
11412
|
+
* similar way.
|
|
11413
|
+
*
|
|
11414
|
+
* Note that this function will not handle saving and quitting. If a player saving and quitting
|
|
11415
|
+
* before the deferred function fires would cause a bug in your mod, then you should handle
|
|
11416
|
+
* deferred functions manually using serializable data.
|
|
11417
|
+
*/
|
|
11418
|
+
runInNGameFrames(func: () => void, gameFrames: int): void;
|
|
11419
|
+
/**
|
|
11420
|
+
* Supply a function to run N render frames from now in the `POST_RENDER` callback.
|
|
11421
|
+
*
|
|
11422
|
+
* For a usage example, see the documentation for the `runNextGameFrame`, which is used in a
|
|
11423
|
+
* similar way.
|
|
11424
|
+
*
|
|
11425
|
+
* Note that this function will not handle saving and quitting. If a player saving and quitting
|
|
11426
|
+
* before the deferred function fires would cause a bug in your mod, then you should handle
|
|
11427
|
+
* deferred functions manually using serializable data.
|
|
11428
|
+
*/
|
|
11429
|
+
runInNRenderFrames(func: () => void, renderFrames: int): void;
|
|
11430
|
+
/**
|
|
11431
|
+
* Supply a function to run on the next `POST_UPDATE` callback.
|
|
11432
|
+
*
|
|
11433
|
+
* For example:
|
|
11434
|
+
*
|
|
11435
|
+
* ```ts
|
|
11436
|
+
* const NUM_EXPLODER_EXPLOSIONS = 5;
|
|
11437
|
+
*
|
|
11438
|
+
* function useItemExploder(player: EntityPlayer) {
|
|
11439
|
+
* playSound("exploderBegin");
|
|
11440
|
+
* explode(player, NUM_EXPLODER_EXPLOSIONS);
|
|
11441
|
+
* }
|
|
11442
|
+
*
|
|
11443
|
+
* function explode(player: EntityPlayer, numFramesLeft: int) {
|
|
11444
|
+
* Isaac.Explode(player, undefined, 1);
|
|
11445
|
+
* numFramesLeft -= 1;
|
|
11446
|
+
* if (numFramesLeft === 0) {
|
|
11447
|
+
* runNextFrame(() => {
|
|
11448
|
+
* explode(player, numFramesLeft);
|
|
11449
|
+
* });
|
|
11450
|
+
* }
|
|
11451
|
+
* }
|
|
11452
|
+
* ```
|
|
11453
|
+
*
|
|
11454
|
+
* Note that this function will not handle saving and quitting. If a player saving and quitting
|
|
11455
|
+
* before the deferred function fires would cause a bug in your mod, then you should handle
|
|
11456
|
+
* deferred functions manually using serializable data.
|
|
11457
|
+
*/
|
|
11458
|
+
runNextGameFrame(func: () => void): void;
|
|
11459
|
+
/**
|
|
11460
|
+
* Supply a function to run on the next `POST_RENDER` callback.
|
|
11461
|
+
*
|
|
11462
|
+
* For a usage example, see the documentation for the `runNextGameFrame`, which is used in a
|
|
11463
|
+
* similar way.
|
|
11464
|
+
*
|
|
11465
|
+
* Note that this function will not handle saving and quitting.
|
|
11466
|
+
*/
|
|
11467
|
+
runNextRenderFrame(func: () => void): void;
|
|
11468
|
+
/**
|
|
11469
|
+
* Supply a function to be repeatedly run on an interval of N game frames in the `POST_UPDATE`
|
|
11470
|
+
* callback. The function will continue to be fired until `false` is returned from the function.
|
|
11471
|
+
*
|
|
11472
|
+
* This is similar to the `setInterval` vanilla JavaScript function, except there is no
|
|
11473
|
+
* corresponding `clearInterval` function. (Instead, the return value from the supplied function
|
|
11474
|
+
* is used to stop the interval.)
|
|
11475
|
+
*
|
|
11476
|
+
* Note that this function will not handle saving and quitting. You must manually restart any
|
|
11477
|
+
* intervals if the player saves and quits in the middle of a run.
|
|
11478
|
+
*
|
|
11479
|
+
* @param func The function to repeatedly run on an interval.
|
|
11480
|
+
* @param gameFrames The amount of game frames to wait between each run.
|
|
11481
|
+
* @param runImmediately Whether or not to execute the function right now before waiting for the
|
|
11482
|
+
* interval.
|
|
11483
|
+
*/
|
|
11484
|
+
setIntervalGameFrames(func: () => boolean, gameFrames: int, runImmediately: boolean): void;
|
|
11485
|
+
/**
|
|
11486
|
+
* Supply a function to be repeatedly run on an interval of N render frames in the `POST_RENDER`
|
|
11487
|
+
* callback. The function will continue to be fired until `false` is returned from the function.
|
|
11488
|
+
*
|
|
11489
|
+
* This is similar to the `setInterval` vanilla JavaScript function, except there is no
|
|
11490
|
+
* corresponding `clearInterval` function. (Instead, the return value from the supplied function
|
|
11491
|
+
* is used to stop the interval.)
|
|
11492
|
+
*
|
|
11493
|
+
* Note that this function will not handle saving and quitting. You must manually restart any
|
|
11494
|
+
* intervals if the player saves and quits in the middle of a run.
|
|
11495
|
+
*
|
|
11496
|
+
* @param func The function to repeatedly run on an interval.
|
|
11497
|
+
* @param renderFrames The amount of game frames to wait between each run.
|
|
11498
|
+
* @param runImmediately Whether or not to execute the function right now before waiting for the
|
|
11499
|
+
* interval.
|
|
11500
|
+
*/
|
|
11501
|
+
setIntervalRenderFrames(func: () => boolean, renderFrames: int, runImmediately: boolean): void;
|
|
11502
|
+
}
|
|
11503
|
+
|
|
10362
11504
|
/**
|
|
10363
11505
|
* Supply a function to run N game frames from now in the `POST_UPDATE` callback.
|
|
10364
11506
|
*
|
|
@@ -10582,6 +11724,12 @@ v: SaveData, conditionalFunc: false): void;
|
|
|
10582
11724
|
*/
|
|
10583
11725
|
export declare function saveDataManagerLoad(): void;
|
|
10584
11726
|
|
|
11727
|
+
/**
|
|
11728
|
+
* Removes a previously registered key from the save data manager. This is the opposite of the
|
|
11729
|
+
* "saveDataManager" function.
|
|
11730
|
+
*/
|
|
11731
|
+
export declare function saveDataManagerRemove(key: string): void;
|
|
11732
|
+
|
|
10585
11733
|
/**
|
|
10586
11734
|
* The save data manager will automatically reset variables at the appropriate times (i.e. when a
|
|
10587
11735
|
* player enters a new room). Use this function to explicitly force the save data manager to reset a
|
|
@@ -10745,12 +11893,12 @@ export declare function serializeVector(vector: Vector): SerializedVector;
|
|
|
10745
11893
|
*
|
|
10746
11894
|
* @param player The player to give the item to.
|
|
10747
11895
|
* @param collectibleType The collectible type of the item to give.
|
|
10748
|
-
* @param activeSlot The slot to set.
|
|
11896
|
+
* @param activeSlot Optional. The slot to set. Default is `ActiveSlot.PRIMARY`.
|
|
10749
11897
|
* @param charge Optional. The argument of charges to set. If not specified, the item will be set
|
|
10750
11898
|
* with maximum charges.
|
|
10751
11899
|
* @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
|
|
10752
11900
|
*/
|
|
10753
|
-
export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot
|
|
11901
|
+
export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot?: ActiveSlot, charge?: int, keepInPools?: boolean): void;
|
|
10754
11902
|
|
|
10755
11903
|
/**
|
|
10756
11904
|
* Helper function to add one or more elements to a set at once without having to repeatedly call
|
|
@@ -10778,7 +11926,7 @@ export declare function setAllRNGToSeed(object: unknown, seed: Seed): void;
|
|
|
10778
11926
|
*/
|
|
10779
11927
|
export declare function setAllRNGToStartSeed(object: unknown): void;
|
|
10780
11928
|
|
|
10781
|
-
/** Helper function to set the backdrop of the current room. */
|
|
11929
|
+
/** Helper function to set the backdrop (i.e. background) of the current room. */
|
|
10782
11930
|
export declare function setBackdrop(backdropType: BackdropType): void;
|
|
10783
11931
|
|
|
10784
11932
|
/**
|
|
@@ -10892,6 +12040,8 @@ export declare function setDeletePlayer(set: Set<PlayerIndex>, player: EntityPla
|
|
|
10892
12040
|
* This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
|
|
10893
12041
|
* the changes will be immediately visible.
|
|
10894
12042
|
*
|
|
12043
|
+
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
12044
|
+
*
|
|
10895
12045
|
* @param displayFlagsMap A map of the display flags that is indexed by the room's safe grid index.
|
|
10896
12046
|
*/
|
|
10897
12047
|
export declare function setDisplayFlags(displayFlagsMap: Map<int, BitFlags<DisplayFlag>>): void;
|
|
@@ -11430,10 +12580,11 @@ export declare function spawnCoin(coinSubType: CoinSubType, position: Vector, ve
|
|
|
11430
12580
|
export declare function spawnCoinWithSeed(coinSubType: CoinSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
|
|
11431
12581
|
|
|
11432
12582
|
/**
|
|
11433
|
-
* Helper function to spawn a collectible.
|
|
11434
|
-
*
|
|
11435
|
-
*
|
|
11436
|
-
*
|
|
12583
|
+
* Helper function to spawn a collectible.
|
|
12584
|
+
*
|
|
12585
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
12586
|
+
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
12587
|
+
* rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
11437
12588
|
*
|
|
11438
12589
|
* @param collectibleType The collectible type to spawn.
|
|
11439
12590
|
* @param position The position to spawn the collectible at.
|
|
@@ -11447,35 +12598,31 @@ export declare function spawnCoinWithSeed(coinSubType: CoinSubType, position: Ve
|
|
|
11447
12598
|
*/
|
|
11448
12599
|
export declare function spawnCollectible(collectibleType: CollectibleType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
11449
12600
|
|
|
12601
|
+
/**
|
|
12602
|
+
* Helper function to spawn a collectible from a specific item pool.
|
|
12603
|
+
*
|
|
12604
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
12605
|
+
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
12606
|
+
* rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
12607
|
+
*
|
|
12608
|
+
* @param itemPoolType The item pool to draw the collectible type from.
|
|
12609
|
+
* @param position The position to spawn the collectible at.
|
|
12610
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
12611
|
+
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
12612
|
+
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
12613
|
+
* collectible. Default is false.
|
|
12614
|
+
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
12615
|
+
* Tainted Keeper. Default is false.
|
|
12616
|
+
* @param spawner Optional.
|
|
12617
|
+
*/
|
|
12618
|
+
export declare function spawnCollectibleFromPool(itemPoolType: ItemPoolType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
12619
|
+
|
|
11450
12620
|
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18). */
|
|
11451
12621
|
export declare function spawnCrawlSpace(gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
11452
12622
|
|
|
11453
12623
|
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18) with a specific variant. */
|
|
11454
12624
|
export declare function spawnCrawlSpaceWithVariant(crawlSpaceVariant: CrawlSpaceVariant, gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
11455
12625
|
|
|
11456
|
-
/**
|
|
11457
|
-
* Helper function to spawn a custom door. This is intended to be called from the `POST_NEW_ROOM`
|
|
11458
|
-
* callback when the player enters a room that should have a custom door. (You could also call it
|
|
11459
|
-
* from another callback if you want the door to appear e.g. after clearing all enemies.)
|
|
11460
|
-
*
|
|
11461
|
-
* Like other entities, the door is not persistent, so you must spawn it every time when re-entering
|
|
11462
|
-
* the room.
|
|
11463
|
-
*
|
|
11464
|
-
* Handle when a player enters the door by hooking the custom `POST_CUSTOM_DOOR_ENTER` callback.
|
|
11465
|
-
*
|
|
11466
|
-
* The custom door is an `EntityEffect`. You can manually open or close the door by modifying its
|
|
11467
|
-
* state. (The values to use correspond to the `DoorState` enum.)
|
|
11468
|
-
*
|
|
11469
|
-
* This function will throw a run-time error if:
|
|
11470
|
-
* - the door slot already has a vanilla door
|
|
11471
|
-
* - the door slot already has a custom door
|
|
11472
|
-
* - the tile at the door slot does not have a wall
|
|
11473
|
-
*
|
|
11474
|
-
* Before using this function, you must first initialize the effect/door variant with the
|
|
11475
|
-
* `initCustomDoor` function.
|
|
11476
|
-
*/
|
|
11477
|
-
export declare function spawnCustomDoor(effectVariant: EffectVariant, doorSlot: DoorSlot): EntityEffect;
|
|
11478
|
-
|
|
11479
12626
|
/**
|
|
11480
12627
|
* Helper function to spawn a custom grid entity. Custom grid entities are persistent in that they
|
|
11481
12628
|
* will reappear if the player leaves and re-enters the room. (It will be manually respawned in the
|
|
@@ -11881,6 +13028,10 @@ export declare function stageTypeToLetter(stageType: StageType): string;
|
|
|
11881
13028
|
*/
|
|
11882
13029
|
export declare function startAmbush(): void;
|
|
11883
13030
|
|
|
13031
|
+
export declare type StartsWithLowercase<S> = S extends string ? Extract<S, Uncapitalize<S>> : never;
|
|
13032
|
+
|
|
13033
|
+
export declare type StartsWithUppercase<S> = S extends string ? Extract<S, Capitalize<S>> : never;
|
|
13034
|
+
|
|
11884
13035
|
/** This represents the kinds of stats that a player can have. */
|
|
11885
13036
|
export declare enum StatType {
|
|
11886
13037
|
/** Corresponds to `CacheFlag.DAMAGE` (1 << 0) and `EntityPlayer.Damage`. */
|
|
@@ -11947,6 +13098,14 @@ export declare function sumSet(set: Set<number> | ReadonlySet<number>): number;
|
|
|
11947
13098
|
*/
|
|
11948
13099
|
export declare function swapArrayElements<T>(array: T[], i: number, j: number): void;
|
|
11949
13100
|
|
|
13101
|
+
declare type T = ModCallbackCustom2.POST_GRID_ENTITY_COLLISION;
|
|
13102
|
+
|
|
13103
|
+
declare type T_2 = ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_COLLISION;
|
|
13104
|
+
|
|
13105
|
+
declare type T_3 = ModCallbackCustom2.POST_GRID_ENTITY_REMOVE;
|
|
13106
|
+
|
|
13107
|
+
declare type T_4 = ModCallbackCustom2.POST_GRID_ENTITY_CUSTOM_REMOVE;
|
|
13108
|
+
|
|
11950
13109
|
/**
|
|
11951
13110
|
* Helper function to check if a Lua table has all of the provided keys.
|
|
11952
13111
|
*
|
|
@@ -11968,15 +13127,14 @@ export declare function tanh(x: number): number;
|
|
|
11968
13127
|
* Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
|
|
11969
13128
|
* - you do not forget to set the `Level.LeaveDoor` field
|
|
11970
13129
|
* - to prevent crashing on invalid room grid indexes
|
|
11971
|
-
*
|
|
13130
|
+
*
|
|
13131
|
+
* Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
|
|
11972
13132
|
*
|
|
11973
13133
|
* @param roomGridIndex The room grid index of the destination room.
|
|
11974
13134
|
* @param direction Optional. Default is `Direction.NO_DIRECTION`.
|
|
11975
13135
|
* @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
|
|
11976
|
-
* @param force Optional. Whether to temporarily disable Curse of the Maze. Default is false. If set
|
|
11977
|
-
* to false, then this function may not go to the provided room grid index.
|
|
11978
13136
|
*/
|
|
11979
|
-
export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim
|
|
13137
|
+
export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim): void;
|
|
11980
13138
|
|
|
11981
13139
|
/** For `GridEntityType.TELEPORTER` (23). */
|
|
11982
13140
|
export declare const TELEPORTER_ACTIVATION_DISTANCE: number;
|
|
@@ -12217,6 +13375,15 @@ export declare type TSTLClass = LuaMap<AnyNotNil, unknown> & {
|
|
|
12217
13375
|
readonly __tstlClassBrand: symbol;
|
|
12218
13376
|
};
|
|
12219
13377
|
|
|
13378
|
+
declare interface TSTLClassMetatable {
|
|
13379
|
+
____constructor: () => void;
|
|
13380
|
+
__index: unknown;
|
|
13381
|
+
constructor: {
|
|
13382
|
+
name: string;
|
|
13383
|
+
prototype: LuaMetatable<LuaMap<AnyNotNil, unknown>>;
|
|
13384
|
+
};
|
|
13385
|
+
}
|
|
13386
|
+
|
|
12220
13387
|
/**
|
|
12221
13388
|
* Helper function to sort a two-dimensional array by the first element.
|
|
12222
13389
|
*
|
|
@@ -12238,6 +13405,9 @@ export declare function twoDimensionalSort<T>(array1: T[], array2: T[]): -1 | 0
|
|
|
12238
13405
|
*/
|
|
12239
13406
|
export declare const UI_HEART_WIDTH = 12;
|
|
12240
13407
|
|
|
13408
|
+
/** A helper type to convert a union to an intersection. */
|
|
13409
|
+
declare type UnionToIntersection<U> = (U extends U ? (u: U) => 0 : never) extends (i: infer I) => 0 ? Extract<I, U> : never;
|
|
13410
|
+
|
|
12241
13411
|
/** Helper function to put things back to normal after the `pause` function was used. */
|
|
12242
13412
|
export declare function unpause(): void;
|
|
12243
13413
|
|
|
@@ -12275,6 +13445,8 @@ export declare function unsetHotkey(keyboard: Keyboard): void;
|
|
|
12275
13445
|
* ```
|
|
12276
13446
|
*
|
|
12277
13447
|
* @param modVanilla The mod object returned by the `RegisterMod` function.
|
|
13448
|
+
* @param features Optional. An array containing the optional standard library features that you
|
|
13449
|
+
* want to enable, if any. Default is an empty array.
|
|
12278
13450
|
* @param debug Optional. Whether to log additional output when a callback is fired. Default is
|
|
12279
13451
|
* false.
|
|
12280
13452
|
* @param timeThreshold Optional. If provided, will only log callbacks that take longer than the
|
|
@@ -12282,7 +13454,9 @@ export declare function unsetHotkey(keyboard: Keyboard): void;
|
|
|
12282
13454
|
* or milliseconds (if the "--luadebug" launch flag is turned off).
|
|
12283
13455
|
* @returns The upgraded mod object.
|
|
12284
13456
|
*/
|
|
12285
|
-
export declare function upgradeMod(modVanilla: Mod, debug?: boolean, timeThreshold?: float):
|
|
13457
|
+
export declare function upgradeMod<T extends ISCFeature = never>(modVanilla: Mod, features?: T[], debug?: boolean, timeThreshold?: float): ModUpgradedWithFeatures<T>;
|
|
13458
|
+
|
|
13459
|
+
export declare type UppercaseKeys<T> = StartsWithUppercase<keyof T>;
|
|
12286
13460
|
|
|
12287
13461
|
/**
|
|
12288
13462
|
* Helper function to use an active item without showing an animation, keeping the item, or adding
|
|
@@ -12314,6 +13488,35 @@ export declare function validateCustomEnum(transpiledEnumName: string, transpile
|
|
|
12314
13488
|
*/
|
|
12315
13489
|
export declare function validateEnumContiguous<T>(transpiledEnumName: string, transpiledEnum: T): void;
|
|
12316
13490
|
|
|
13491
|
+
/**
|
|
13492
|
+
* Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
13493
|
+
* specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
13494
|
+
* the enum).
|
|
13495
|
+
*
|
|
13496
|
+
* For example:
|
|
13497
|
+
*
|
|
13498
|
+
* ```ts
|
|
13499
|
+
* enum MyEnum {
|
|
13500
|
+
* Value1,
|
|
13501
|
+
* Value2,
|
|
13502
|
+
* Value3,
|
|
13503
|
+
* }
|
|
13504
|
+
*
|
|
13505
|
+
* interface MyEnumToType {
|
|
13506
|
+
* [MyEnum.Value1]: boolean;
|
|
13507
|
+
* [MyEnum.Value2]: number;
|
|
13508
|
+
* [MyEnum.Value3]: string;
|
|
13509
|
+
* }
|
|
13510
|
+
*
|
|
13511
|
+
* validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
|
|
13512
|
+
* ```
|
|
13513
|
+
*
|
|
13514
|
+
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
13515
|
+
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
13516
|
+
* `newObjectWithEnumKeys` helper function instead.
|
|
13517
|
+
*/
|
|
13518
|
+
export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
|
|
13519
|
+
|
|
12317
13520
|
export declare function vectorEquals(vector1: Vector, vector2: Vector): boolean;
|
|
12318
13521
|
|
|
12319
13522
|
/**
|