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
|
@@ -84,7 +84,7 @@ end
|
|
|
84
84
|
-- If the player is the Tainted Soul, this always returns false, since that character cannot pick up
|
|
85
85
|
-- items. (Only Tainted Forgotten can pick up items.)
|
|
86
86
|
function ____exports.hasOpenPocketItemSlot(self, player)
|
|
87
|
-
if isCharacter(nil, player, PlayerType.
|
|
87
|
+
if isCharacter(nil, player, PlayerType.SOUL_B) then
|
|
88
88
|
return false
|
|
89
89
|
end
|
|
90
90
|
local pocketItems = ____exports.getPocketItems(nil, player)
|
|
@@ -14,13 +14,12 @@ export declare function reloadRoom(): void;
|
|
|
14
14
|
* Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
|
|
15
15
|
* - you do not forget to set the `Level.LeaveDoor` field
|
|
16
16
|
* - to prevent crashing on invalid room grid indexes
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
|
+
* Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
|
|
18
19
|
*
|
|
19
20
|
* @param roomGridIndex The room grid index of the destination room.
|
|
20
21
|
* @param direction Optional. Default is `Direction.NO_DIRECTION`.
|
|
21
22
|
* @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
|
|
22
|
-
* @param force Optional. Whether to temporarily disable Curse of the Maze. Default is false. If set
|
|
23
|
-
* to false, then this function may not go to the provided room grid index.
|
|
24
23
|
*/
|
|
25
|
-
export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim
|
|
24
|
+
export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim): void;
|
|
26
25
|
//# sourceMappingURL=roomTransition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomTransition.d.ts","sourceRoot":"","sources":["../../../src/functions/roomTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"roomTransition.d.ts","sourceRoot":"","sources":["../../../src/functions/roomTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAItC;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAGjC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CACtB,aAAa,EAAE,GAAG,EAClB,SAAS,YAAyB,EAClC,kBAAkB,qBAA8B,GAC/C,IAAI,CAeN"}
|
|
@@ -2,14 +2,9 @@ local ____exports = {}
|
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
4
4
|
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
5
|
-
local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
|
|
6
5
|
local RoomTransitionAnim = ____isaac_2Dtypescript_2Ddefinitions.RoomTransitionAnim
|
|
7
6
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
8
7
|
local game = ____cachedClasses.game
|
|
9
|
-
local ____runNextRoom = require("src.features.runNextRoom")
|
|
10
|
-
local runNextRoom = ____runNextRoom.runNextRoom
|
|
11
|
-
local ____curses = require("src.functions.curses")
|
|
12
|
-
local hasCurse = ____curses.hasCurse
|
|
13
8
|
local ____roomData = require("src.functions.roomData")
|
|
14
9
|
local getRoomData = ____roomData.getRoomData
|
|
15
10
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
@@ -20,43 +15,26 @@ local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
|
20
15
|
-- Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
|
|
21
16
|
-- - you do not forget to set the `Level.LeaveDoor` field
|
|
22
17
|
-- - to prevent crashing on invalid room grid indexes
|
|
23
|
-
--
|
|
18
|
+
--
|
|
19
|
+
-- Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
|
|
24
20
|
--
|
|
25
21
|
-- @param roomGridIndex The room grid index of the destination room.
|
|
26
22
|
-- @param direction Optional. Default is `Direction.NO_DIRECTION`.
|
|
27
23
|
-- @param roomTransitionAnim Optional. Default is `RoomTransitionAnim.TELEPORT`.
|
|
28
|
-
|
|
29
|
-
-- to false, then this function may not go to the provided room grid index.
|
|
30
|
-
function ____exports.teleport(self, roomGridIndex, direction, roomTransitionAnim, force)
|
|
24
|
+
function ____exports.teleport(self, roomGridIndex, direction, roomTransitionAnim)
|
|
31
25
|
if direction == nil then
|
|
32
26
|
direction = Direction.NO_DIRECTION
|
|
33
27
|
end
|
|
34
28
|
if roomTransitionAnim == nil then
|
|
35
29
|
roomTransitionAnim = RoomTransitionAnim.TELEPORT
|
|
36
30
|
end
|
|
37
|
-
if force == nil then
|
|
38
|
-
force = false
|
|
39
|
-
end
|
|
40
31
|
local level = game:GetLevel()
|
|
41
|
-
local shouldTempDisableCurse = force and hasCurse(nil, LevelCurse.MAZE)
|
|
42
|
-
if shouldTempDisableCurse then
|
|
43
|
-
level:RemoveCurses(LevelCurse.MAZE)
|
|
44
|
-
end
|
|
45
32
|
local roomData = getRoomData(nil, roomGridIndex)
|
|
46
33
|
if roomData == nil then
|
|
47
34
|
error(("Failed to change the room to grid index " .. tostring(roomGridIndex)) .. " because that room does not exist.")
|
|
48
35
|
end
|
|
49
36
|
level.LeaveDoor = DoorSlot.NO_DOOR_SLOT
|
|
50
37
|
game:StartRoomTransition(roomGridIndex, direction, roomTransitionAnim)
|
|
51
|
-
if shouldTempDisableCurse then
|
|
52
|
-
runNextRoom(
|
|
53
|
-
nil,
|
|
54
|
-
function()
|
|
55
|
-
local futureLevel = game:GetLevel()
|
|
56
|
-
futureLevel:AddCurse(LevelCurse.MAZE, false)
|
|
57
|
-
end
|
|
58
|
-
)
|
|
59
|
-
end
|
|
60
38
|
end
|
|
61
39
|
--- Helper function to reload the current room using `Game.StartRoomTransition`.
|
|
62
40
|
--
|
|
@@ -64,12 +42,6 @@ end
|
|
|
64
42
|
-- take effect.
|
|
65
43
|
function ____exports.reloadRoom(self)
|
|
66
44
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
67
|
-
____exports.teleport(
|
|
68
|
-
nil,
|
|
69
|
-
roomGridIndex,
|
|
70
|
-
Direction.NO_DIRECTION,
|
|
71
|
-
RoomTransitionAnim.FADE,
|
|
72
|
-
true
|
|
73
|
-
)
|
|
45
|
+
____exports.teleport(nil, roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.FADE)
|
|
74
46
|
end
|
|
75
47
|
return ____exports
|
|
@@ -188,7 +188,7 @@ export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolea
|
|
|
188
188
|
* positions/velocities before updating the room, and then restore those positions/velocities.
|
|
189
189
|
*/
|
|
190
190
|
export declare function roomUpdateSafe(): void;
|
|
191
|
-
/** Helper function to set the backdrop of the current room. */
|
|
191
|
+
/** Helper function to set the backdrop (i.e. background) of the current room. */
|
|
192
192
|
export declare function setBackdrop(backdropType: BackdropType): void;
|
|
193
193
|
/**
|
|
194
194
|
* Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ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gB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAgBxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
|
|
@@ -408,7 +408,7 @@ function ____exports.roomUpdateSafe(self)
|
|
|
408
408
|
setEntityPositions(nil, entityPositions, entities)
|
|
409
409
|
setEntityVelocities(nil, entityVelocities, entities)
|
|
410
410
|
end
|
|
411
|
-
--- Helper function to set the backdrop of the current room.
|
|
411
|
+
--- Helper function to set the backdrop (i.e. background) of the current room.
|
|
412
412
|
function ____exports.setBackdrop(self, backdropType)
|
|
413
413
|
game:ShowHallucination(0, backdropType)
|
|
414
414
|
sfxManager:Stop(SoundEffect.DEATH_CARD)
|
|
@@ -4,6 +4,11 @@ import { PlayerType } from "isaac-typescript-definitions";
|
|
|
4
4
|
* set seed or in a victory lap, achievements are disabled.
|
|
5
5
|
*/
|
|
6
6
|
export declare function canRunUnlockAchievements(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
9
|
+
* `Difficulty.GREEDIER`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isGreedMode(): boolean;
|
|
7
12
|
/**
|
|
8
13
|
* Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
|
|
9
14
|
* pressing tab on the character selection screen). When the player resets the game on a set seed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAQtC;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAiBpD;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAInE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAUlC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
4
|
+
local Difficulty = ____isaac_2Dtypescript_2Ddefinitions.Difficulty
|
|
4
5
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
5
6
|
local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
|
|
6
7
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
@@ -23,6 +24,11 @@ function ____exports.canRunUnlockAchievements(self)
|
|
|
23
24
|
greedDonationMachine:Remove()
|
|
24
25
|
return canUnlockAchievements
|
|
25
26
|
end
|
|
27
|
+
--- Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
28
|
+
-- `Difficulty.GREEDIER`.
|
|
29
|
+
function ____exports.isGreedMode(self)
|
|
30
|
+
return game.Difficulty == Difficulty.GREED or game.Difficulty == Difficulty.GREEDIER
|
|
31
|
+
end
|
|
26
32
|
--- Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
|
|
27
33
|
-- pressing tab on the character selection screen). When the player resets the game on a set seed,
|
|
28
34
|
-- the game will not switch to a different seed.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CollectibleType } from "isaac-typescript-definitions";
|
|
1
|
+
import { CollectibleType, ItemPoolType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
|
-
* Helper function to spawn a collectible.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Helper function to spawn a collectible.
|
|
4
|
+
*
|
|
5
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
6
|
+
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
7
|
+
* rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
7
8
|
*
|
|
8
9
|
* @param collectibleType The collectible type to spawn.
|
|
9
10
|
* @param position The position to spawn the collectible at.
|
|
@@ -16,6 +17,24 @@ import { CollectibleType } from "isaac-typescript-definitions";
|
|
|
16
17
|
* @param spawner Optional.
|
|
17
18
|
*/
|
|
18
19
|
export declare function spawnCollectible(collectibleType: CollectibleType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
20
|
+
/**
|
|
21
|
+
* Helper function to spawn a collectible from a specific item pool.
|
|
22
|
+
*
|
|
23
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
24
|
+
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
25
|
+
* rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
26
|
+
*
|
|
27
|
+
* @param itemPoolType The item pool to draw the collectible type from.
|
|
28
|
+
* @param position The position to spawn the collectible at.
|
|
29
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
30
|
+
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
31
|
+
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
32
|
+
* collectible. Default is false.
|
|
33
|
+
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
34
|
+
* Tainted Keeper. Default is false.
|
|
35
|
+
* @param spawner Optional.
|
|
36
|
+
*/
|
|
37
|
+
export declare function spawnCollectibleFromPool(itemPoolType: ItemPoolType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
19
38
|
/**
|
|
20
39
|
* Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
|
|
21
40
|
* with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawnCollectible.d.ts","sourceRoot":"","sources":["../../../src/functions/spawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,
|
|
1
|
+
{"version":3,"file":"spawnCollectible.d.ts","sourceRoot":"","sources":["../../../src/functions/spawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAWtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAqCzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAWzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,YAAY,CAWd"}
|
|
@@ -3,6 +3,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
3
3
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
4
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
5
5
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
6
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
7
|
+
local game = ____cachedClasses.game
|
|
6
8
|
local ____constants = require("src.core.constants")
|
|
7
9
|
local VectorZero = ____constants.VectorZero
|
|
8
10
|
local ____preventCollectibleRotation = require("src.features.preventCollectibleRotation")
|
|
@@ -20,10 +22,11 @@ local anyPlayerIs = ____players.anyPlayerIs
|
|
|
20
22
|
local ____rng = require("src.functions.rng")
|
|
21
23
|
local getRandomSeed = ____rng.getRandomSeed
|
|
22
24
|
local isRNG = ____rng.isRNG
|
|
23
|
-
--- Helper function to spawn a collectible.
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
25
|
+
--- Helper function to spawn a collectible.
|
|
26
|
+
--
|
|
27
|
+
-- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
28
|
+
-- collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
29
|
+
-- rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
27
30
|
--
|
|
28
31
|
-- @param collectibleType The collectible type to spawn.
|
|
29
32
|
-- @param position The position to spawn the collectible at.
|
|
@@ -66,6 +69,43 @@ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG
|
|
|
66
69
|
end
|
|
67
70
|
return collectible
|
|
68
71
|
end
|
|
72
|
+
--- Helper function to spawn a collectible from a specific item pool.
|
|
73
|
+
--
|
|
74
|
+
-- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
75
|
+
-- collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
76
|
+
-- rotation mechanic. (Rotation prevention will only occur in upgraded mods.)
|
|
77
|
+
--
|
|
78
|
+
-- @param itemPoolType The item pool to draw the collectible type from.
|
|
79
|
+
-- @param position The position to spawn the collectible at.
|
|
80
|
+
-- @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
81
|
+
-- `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
82
|
+
-- @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
83
|
+
-- collectible. Default is false.
|
|
84
|
+
-- @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
85
|
+
-- Tainted Keeper. Default is false.
|
|
86
|
+
-- @param spawner Optional.
|
|
87
|
+
function ____exports.spawnCollectibleFromPool(self, itemPoolType, position, seedOrRNG, options, forceFreeItem, spawner)
|
|
88
|
+
if seedOrRNG == nil then
|
|
89
|
+
seedOrRNG = getRandomSeed(nil)
|
|
90
|
+
end
|
|
91
|
+
if options == nil then
|
|
92
|
+
options = false
|
|
93
|
+
end
|
|
94
|
+
if forceFreeItem == nil then
|
|
95
|
+
forceFreeItem = false
|
|
96
|
+
end
|
|
97
|
+
local itemPool = game:GetItemPool()
|
|
98
|
+
local collectibleType = itemPool:GetCollectible(itemPoolType)
|
|
99
|
+
return ____exports.spawnCollectible(
|
|
100
|
+
nil,
|
|
101
|
+
collectibleType,
|
|
102
|
+
position,
|
|
103
|
+
seedOrRNG,
|
|
104
|
+
options,
|
|
105
|
+
forceFreeItem,
|
|
106
|
+
spawner
|
|
107
|
+
)
|
|
108
|
+
end
|
|
69
109
|
--- Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
|
|
70
110
|
-- with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
|
|
71
111
|
-- current room's item pool.
|
|
@@ -27,6 +27,8 @@ export declare function getNumbersFromTable(luaMap: LuaMap<string, unknown>, obj
|
|
|
27
27
|
* This function is variadic, meaning that you can specify N arguments to get N values.
|
|
28
28
|
*/
|
|
29
29
|
export declare function getStringsFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): string[];
|
|
30
|
+
/** Helper function to check if a Lua table has 0 keys. */
|
|
31
|
+
export declare function isTableEmpty(luaMap: LuaMap<AnyNotNil, unknown>): boolean;
|
|
30
32
|
/**
|
|
31
33
|
* Helper function to iterate over a table deterministically. This is useful because by default, the
|
|
32
34
|
* `pairs` function will return the keys of a Lua table in a random order.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/functions/table.ts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,IAAI,CAInE;AAED,iGAAiG;AACjG,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAgBN;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,EAAE,CAoBX;AAED;;;;;GAK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M,EAAE,GAChB,OAAO,EAAE,CAoBX;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CA4BV;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CAmBV;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,OAAO,CAQxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EACxD,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,EAChC,OAAO,UAAO,GACb,IAAI,CA6BN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAClC,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,CAET"}
|
|
@@ -94,6 +94,13 @@ function ____exports.getStringsFromTable(self, luaMap, objectName, ...)
|
|
|
94
94
|
end
|
|
95
95
|
return strings
|
|
96
96
|
end
|
|
97
|
+
--- Helper function to check if a Lua table has 0 keys.
|
|
98
|
+
function ____exports.isTableEmpty(self, luaMap)
|
|
99
|
+
for _key, _value in pairs(luaMap) do
|
|
100
|
+
return false
|
|
101
|
+
end
|
|
102
|
+
return true
|
|
103
|
+
end
|
|
97
104
|
--- Helper function to iterate over a table deterministically. This is useful because by default, the
|
|
98
105
|
-- `pairs` function will return the keys of a Lua table in a random order.
|
|
99
106
|
--
|
|
@@ -128,7 +128,7 @@ end
|
|
|
128
128
|
-- If the player is the Tainted Soul, this always returns false, since that character cannot pick up
|
|
129
129
|
-- items. (Only Tainted Forgotten can pick up items.)
|
|
130
130
|
function ____exports.hasOpenTrinketSlot(self, player)
|
|
131
|
-
if isCharacter(nil, player, PlayerType.
|
|
131
|
+
if isCharacter(nil, player, PlayerType.SOUL_B) then
|
|
132
132
|
return false
|
|
133
133
|
end
|
|
134
134
|
local openTrinketSlot = ____exports.getOpenTrinketSlot(nil, player)
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
/// <reference types="@typescript-to-lua/language-extensions" />
|
|
2
2
|
import { DefaultMap } from "../classes/DefaultMap";
|
|
3
|
+
import { TSTLClassMetatable } from "../interfaces/TSTLClassMetatable";
|
|
4
|
+
import { FunctionTuple } from "../types/FunctionTuple";
|
|
3
5
|
import { TSTLClass } from "../types/TSTLClass";
|
|
4
6
|
/**
|
|
5
|
-
* Helper function to get the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
|
|
8
|
+
* located on the metatable.
|
|
9
|
+
*
|
|
10
|
+
* Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTSTLClassConstructor(object: unknown): TSTLClassMetatable["constructor"] | undefined;
|
|
13
|
+
export declare function getTSTLClassMethods(object: unknown): FunctionTuple[];
|
|
14
|
+
/**
|
|
15
|
+
* Helper function to get the name of a TypeScriptToLua class from the instantiated class object.
|
|
16
|
+
*
|
|
17
|
+
* TSTL classes are Lua tables created with the `__TS__Class` Lua function from the TSTL lualib.
|
|
18
|
+
* Their name is contained within "constructor.name" metatable key.
|
|
8
19
|
*
|
|
9
20
|
* For example, a `Map` class is has a name of "Map".
|
|
10
21
|
*
|
|
11
|
-
* Returns undefined if
|
|
12
|
-
* exist.
|
|
22
|
+
* Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
13
23
|
*/
|
|
14
24
|
export declare function getTSTLClassName(object: unknown): string | undefined;
|
|
15
25
|
/**
|
|
@@ -27,15 +37,17 @@ export declare function isIsaacScriptCommonClass(object: unknown): boolean;
|
|
|
27
37
|
/**
|
|
28
38
|
* Helper function to determine if a given object is a TypeScriptToLua `Map`.
|
|
29
39
|
*
|
|
30
|
-
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
31
|
-
* their own
|
|
40
|
+
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
41
|
+
* might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
42
|
+
* `Map`.
|
|
32
43
|
*/
|
|
33
44
|
export declare function isTSTLMap(object: unknown): object is Map<AnyNotNil, unknown>;
|
|
34
45
|
/**
|
|
35
46
|
* Helper function to determine if a given object is a TypeScriptToLua `Set`.
|
|
36
47
|
*
|
|
37
|
-
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
38
|
-
* their own
|
|
48
|
+
* It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
49
|
+
* might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
50
|
+
* `Set`.
|
|
39
51
|
*/
|
|
40
52
|
export declare function isTSTLSet(object: unknown): object is Set<AnyNotNil>;
|
|
41
53
|
/** TypeScriptToLua classes are Lua tables that have a metatable with a certain amount of keys. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tstlClass.d.ts","sourceRoot":"","sources":["../../../src/functions/tstlClass.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"tstlClass.d.ts","sourceRoot":"","sources":["../../../src/functions/tstlClass.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAW/C;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,GACd,kBAAkB,CAAC,aAAa,CAAC,GAAG,SAAS,CAW/C;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,EAAE,CAYpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAOpE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAG1C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAEjE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAG5E;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAAC,SAAS,CAAC,CAGnE;AAED,kGAAkG;AAClG,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,SAAS,CA4B3E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAO3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAiB3D"}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
5
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
4
6
|
local ____exports = {}
|
|
5
|
-
local
|
|
7
|
+
local VANILLA_TSTL_CLASSES
|
|
6
8
|
local ____types = require("src.functions.types")
|
|
7
9
|
local isString = ____types.isString
|
|
8
10
|
local isTable = ____types.isTable
|
|
9
|
-
--- Helper function to get the
|
|
10
|
-
--
|
|
11
|
-
-- "constructor.name" metatable key.
|
|
11
|
+
--- Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
|
|
12
|
+
-- located on the metatable.
|
|
12
13
|
--
|
|
13
|
-
--
|
|
14
|
-
|
|
15
|
-
-- Returns undefined if the object is not a table or if the aforementioned metatable key does not
|
|
16
|
-
-- exist.
|
|
17
|
-
function ____exports.getTSTLClassName(self, object)
|
|
14
|
+
-- Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
15
|
+
function ____exports.getTSTLClassConstructor(self, object)
|
|
18
16
|
if not isTable(nil, object) then
|
|
19
17
|
return nil
|
|
20
18
|
end
|
|
@@ -22,7 +20,18 @@ function ____exports.getTSTLClassName(self, object)
|
|
|
22
20
|
if metatable == nil then
|
|
23
21
|
return nil
|
|
24
22
|
end
|
|
25
|
-
|
|
23
|
+
return metatable.constructor
|
|
24
|
+
end
|
|
25
|
+
--- Helper function to get the name of a TypeScriptToLua class from the instantiated class object.
|
|
26
|
+
--
|
|
27
|
+
-- TSTL classes are Lua tables created with the `__TS__Class` Lua function from the TSTL lualib.
|
|
28
|
+
-- Their name is contained within "constructor.name" metatable key.
|
|
29
|
+
--
|
|
30
|
+
-- For example, a `Map` class is has a name of "Map".
|
|
31
|
+
--
|
|
32
|
+
-- Returns undefined if passed a non-table or if the provided table does not have a metatable.
|
|
33
|
+
function ____exports.getTSTLClassName(self, object)
|
|
34
|
+
local constructor = ____exports.getTSTLClassConstructor(nil, object)
|
|
26
35
|
if constructor == nil then
|
|
27
36
|
return nil
|
|
28
37
|
end
|
|
@@ -37,14 +46,25 @@ function ____exports.isVanillaTSTLClass(self, object)
|
|
|
37
46
|
end
|
|
38
47
|
return VANILLA_TSTL_CLASSES:has(className)
|
|
39
48
|
end
|
|
40
|
-
function newTSTLClassFromMetatable(self, metatable)
|
|
41
|
-
local newClass = {}
|
|
42
|
-
local newClassMetatable = setmetatable(newClass, metatable.constructor.prototype)
|
|
43
|
-
newClassMetatable:____constructor()
|
|
44
|
-
return newClass
|
|
45
|
-
end
|
|
46
49
|
VANILLA_TSTL_CLASSES = __TS__New(Set, {"Map", "Set", "WeakMap", "WeakSet"})
|
|
47
50
|
local TSTL_CLASS_METATABLE_KEYS = __TS__New(Set, {"____constructor", "__index", "constructor"})
|
|
51
|
+
function ____exports.getTSTLClassMethods(self, object)
|
|
52
|
+
local constructor = ____exports.getTSTLClassConstructor(nil, object)
|
|
53
|
+
if constructor == nil then
|
|
54
|
+
return {}
|
|
55
|
+
end
|
|
56
|
+
local classEntries = __TS__ObjectEntries(constructor.prototype)
|
|
57
|
+
return __TS__ArrayFilter(
|
|
58
|
+
classEntries,
|
|
59
|
+
function(____, ____bindingPattern0)
|
|
60
|
+
local value
|
|
61
|
+
local key
|
|
62
|
+
key = ____bindingPattern0[1]
|
|
63
|
+
value = ____bindingPattern0[2]
|
|
64
|
+
return not TSTL_CLASS_METATABLE_KEYS:has(key) and type(value) == "function"
|
|
65
|
+
end
|
|
66
|
+
)
|
|
67
|
+
end
|
|
48
68
|
--- Helper function to determine if a given object is a TypeScriptToLua `Map`.
|
|
49
69
|
--
|
|
50
70
|
-- It is not reliable to use the `instanceof` operator to determine this because each Lua module has
|
|
@@ -60,16 +80,18 @@ function ____exports.isIsaacScriptCommonClass(self, object)
|
|
|
60
80
|
end
|
|
61
81
|
--- Helper function to determine if a given object is a TypeScriptToLua `Map`.
|
|
62
82
|
--
|
|
63
|
-
-- It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
64
|
-
-- their own
|
|
83
|
+
-- It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
84
|
+
-- might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
85
|
+
-- `Map`.
|
|
65
86
|
function ____exports.isTSTLMap(self, object)
|
|
66
87
|
local className = ____exports.getTSTLClassName(nil, object)
|
|
67
88
|
return className == "Map"
|
|
68
89
|
end
|
|
69
90
|
--- Helper function to determine if a given object is a TypeScriptToLua `Set`.
|
|
70
91
|
--
|
|
71
|
-
-- It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
72
|
-
-- their own
|
|
92
|
+
-- It is not reliable to use the `instanceof` operator to determine this because each Lua module
|
|
93
|
+
-- might have their own copy of the entire lualib and thus their own instantiated version of a
|
|
94
|
+
-- `Set`.
|
|
73
95
|
function ____exports.isTSTLSet(self, object)
|
|
74
96
|
local className = ____exports.getTSTLClassName(nil, object)
|
|
75
97
|
return className == "Set"
|
|
@@ -103,10 +125,13 @@ end
|
|
|
103
125
|
-- use the class constructor that is present on the other object's metatable to initialize the new
|
|
104
126
|
-- class.
|
|
105
127
|
function ____exports.newTSTLClass(self, oldClass)
|
|
106
|
-
local
|
|
107
|
-
if
|
|
108
|
-
error("Failed to instantiate a new TypeScriptToLua class since the provided old class does not have a metatable.")
|
|
128
|
+
local constructor = ____exports.getTSTLClassConstructor(nil, oldClass)
|
|
129
|
+
if constructor == nil then
|
|
130
|
+
error("Failed to instantiate a new TypeScriptToLua class since the provided old class does not have a metatable/constructor.")
|
|
109
131
|
end
|
|
110
|
-
|
|
132
|
+
local newClass = {}
|
|
133
|
+
local newClassMetatable = setmetatable(newClass, constructor.prototype)
|
|
134
|
+
newClassMetatable:____constructor()
|
|
135
|
+
return newClass
|
|
111
136
|
end
|
|
112
137
|
return ____exports
|
|
@@ -31,8 +31,13 @@ export declare function getTraversalDescription(key: unknown, traversalDescripti
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function iRange(start: int, end?: int, increment?: number): int[];
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* Helper function to see if the current render callback is rendering a water reflection.
|
|
35
|
+
*
|
|
36
|
+
* When the player is in a room with water, things will be rendered twice: once for the normal
|
|
37
|
+
* rendering, and once for the reflecting rendering. Thus, any mod code in a render callback will
|
|
38
|
+
* run twice per frame in these situations, which may be unexpected or cause bugs.
|
|
39
|
+
*
|
|
40
|
+
* This function is typically used to early return from a render function if it returns true.
|
|
36
41
|
*/
|
|
37
42
|
export declare function isReflectionRender(): boolean;
|
|
38
43
|
/**
|
|
@@ -40,6 +45,15 @@ export declare function isReflectionRender(): boolean;
|
|
|
40
45
|
* because the `EXECUTE_CMD` callback will not fire for any vanilla commands.
|
|
41
46
|
*/
|
|
42
47
|
export declare function isVanillaConsoleCommand(commandName: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Helper function for creating objects that represent a mapping of an enum value to some other
|
|
50
|
+
* value in a type-safe way.
|
|
51
|
+
*
|
|
52
|
+
* This function will ensure that the provided object has a key for each value in the enum.
|
|
53
|
+
*
|
|
54
|
+
* After the `satisfies` operator is released in TypeScript 4.9, this function should be deleted.
|
|
55
|
+
*/
|
|
56
|
+
export declare function newObjectWithEnumKeys<Enum extends number | string, T extends Record<Enum, unknown>>(theEnum: Record<string, Enum>, obj: T): T;
|
|
43
57
|
/**
|
|
44
58
|
* Helper function to print something to the in-game console. Use this instead of invoking the
|
|
45
59
|
* `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
|
|
@@ -97,4 +111,32 @@ export declare function todo(...args: unknown[]): void;
|
|
|
97
111
|
* https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
|
|
98
112
|
*/
|
|
99
113
|
export declare function twoDimensionalSort<T>(array1: T[], array2: T[]): -1 | 0 | 1;
|
|
114
|
+
/**
|
|
115
|
+
* Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
116
|
+
* specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
117
|
+
* the enum).
|
|
118
|
+
*
|
|
119
|
+
* For example:
|
|
120
|
+
*
|
|
121
|
+
* ```ts
|
|
122
|
+
* enum MyEnum {
|
|
123
|
+
* Value1,
|
|
124
|
+
* Value2,
|
|
125
|
+
* Value3,
|
|
126
|
+
* }
|
|
127
|
+
*
|
|
128
|
+
* interface MyEnumToType {
|
|
129
|
+
* [MyEnum.Value1]: boolean;
|
|
130
|
+
* [MyEnum.Value2]: number;
|
|
131
|
+
* [MyEnum.Value3]: string;
|
|
132
|
+
* }
|
|
133
|
+
*
|
|
134
|
+
* validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
138
|
+
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
139
|
+
* `newObjectWithEnumKeys` helper function instead.
|
|
140
|
+
*/
|
|
141
|
+
export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
|
|
100
142
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/functions/utils.ts"],"names":[],"mappings":";AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAYlE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAQR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAYlE;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/functions/utils.ts"],"names":[],"mappings":";AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAA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