isaacscript-common 87.4.0 → 87.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/callbackClasses.d.ts +6 -6
- package/dist/callbackClasses.d.ts.map +1 -1
- package/dist/callbackClasses.js +14 -14
- package/dist/callbackClasses.lua +159 -300
- package/dist/callbacks.js +18 -9
- package/dist/classes/DefaultMap.d.ts +5 -1
- package/dist/classes/DefaultMap.d.ts.map +1 -1
- package/dist/classes/ModFeature.js +3 -3
- package/dist/classes/ModUpgraded.d.ts.map +1 -1
- package/dist/classes/ModUpgraded.js +2 -4
- package/dist/classes/callbacks/InputActionFilter.d.ts +2 -2
- package/dist/classes/callbacks/InputActionFilter.d.ts.map +1 -1
- package/dist/classes/callbacks/InputActionPlayer.d.ts +2 -2
- package/dist/classes/callbacks/InputActionPlayer.d.ts.map +1 -1
- package/dist/classes/callbacks/PostCollectibleEmpty.d.ts +2 -2
- package/dist/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
- package/dist/classes/callbacks/PostCollectibleEmpty.js +1 -3
- package/dist/classes/callbacks/PostCustomRevive.d.ts +2 -4
- package/dist/classes/callbacks/PostCustomRevive.d.ts.map +1 -1
- package/dist/classes/callbacks/PostDiceRoomActivated.d.ts +2 -3
- package/dist/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityCollision.d.ts +2 -4
- package/dist/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityCustomCollision.d.ts +2 -4
- package/dist/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityCustomRemove.d.ts +2 -3
- package/dist/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityRemove.d.ts +2 -2
- package/dist/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -1
- package/dist/classes/callbacks/PostItemDischarge.d.ts +2 -2
- package/dist/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
- package/dist/classes/callbacks/PostItemDischarge.js +3 -6
- package/dist/classes/callbacks/PostKeyboardChanged.d.ts +2 -1
- package/dist/classes/callbacks/PostKeyboardChanged.d.ts.map +1 -1
- package/dist/classes/callbacks/PostNewRoomEarly.js +1 -1
- package/dist/classes/callbacks/PostPickupSelectionFilter.d.ts +2 -2
- package/dist/classes/callbacks/PostPickupSelectionFilter.d.ts.map +1 -1
- package/dist/classes/callbacks/PostPlayerChangeType.js +1 -1
- package/dist/classes/callbacks/PostPurchase.d.ts +2 -4
- package/dist/classes/callbacks/PostPurchase.d.ts.map +1 -1
- package/dist/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -1
- package/dist/classes/callbacks/PostTransformation.d.ts +2 -2
- package/dist/classes/callbacks/PostTransformation.d.ts.map +1 -1
- package/dist/classes/callbacks/PostTransformation.js +1 -3
- package/dist/classes/callbacks/PostTrinketBreak.d.ts.map +1 -1
- package/dist/classes/callbacks/PostTrinketBreak.js +1 -3
- package/dist/classes/callbacks/PreEntitySpawnFilter.d.ts +2 -2
- package/dist/classes/callbacks/PreEntitySpawnFilter.d.ts.map +1 -1
- package/dist/classes/callbacks/PreNewLevel.d.ts.map +1 -1
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.d.ts +2 -2
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/CustomGridEntities.d.ts +1 -1
- package/dist/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +4 -6
- package/dist/classes/features/callbackLogic/ItemPickupDetection.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/ItemPickupDetection.js +6 -2
- package/dist/classes/features/callbackLogic/ItemPickupDetection.lua +6 -1
- package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts +0 -1
- package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.js +4 -4
- package/dist/classes/features/other/CustomPickups.d.ts.map +1 -1
- package/dist/classes/features/other/CustomPickups.js +1 -0
- package/dist/classes/features/other/CustomStages.js +19 -9
- package/dist/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
- package/dist/classes/features/other/CustomTrapdoors.js +23 -17
- package/dist/classes/features/other/CustomTrapdoors.lua +14 -7
- package/dist/classes/features/other/DebugDisplay.d.ts +0 -18
- package/dist/classes/features/other/DebugDisplay.d.ts.map +1 -1
- package/dist/classes/features/other/DeployJSONRoom.d.ts +0 -2
- package/dist/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/classes/features/other/DeployJSONRoom.js +2 -0
- package/dist/classes/features/other/EdenStartingStatsHealth.d.ts +1 -1
- package/dist/classes/features/other/EdenStartingStatsHealth.d.ts.map +1 -1
- package/dist/classes/features/other/ExtraConsoleCommands.d.ts +14 -10
- package/dist/classes/features/other/ExtraConsoleCommands.d.ts.map +1 -1
- package/dist/classes/features/other/ExtraConsoleCommands.js +31 -17
- package/dist/classes/features/other/ExtraConsoleCommands.lua +2 -1
- package/dist/classes/features/other/FlyingDetection.d.ts +0 -1
- package/dist/classes/features/other/FlyingDetection.d.ts.map +1 -1
- package/dist/classes/features/other/ForgottenSwitch.d.ts +0 -1
- package/dist/classes/features/other/ForgottenSwitch.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementDetection.js +4 -4
- package/dist/classes/features/other/ModdedElementSets.d.ts +2 -2
- package/dist/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementSets.js +1 -1
- package/dist/classes/features/other/PickupIndexCreation.d.ts +0 -1
- package/dist/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
- package/dist/classes/features/other/PickupIndexCreation.js +2 -3
- package/dist/classes/features/other/PickupIndexCreation.lua +10 -10
- package/dist/classes/features/other/PonyDetection.d.ts +0 -1
- package/dist/classes/features/other/PonyDetection.d.ts.map +1 -1
- package/dist/classes/features/other/PreventChildEntities.d.ts +0 -1
- package/dist/classes/features/other/PreventChildEntities.d.ts.map +1 -1
- package/dist/classes/features/other/RoomClearFrame.d.ts +0 -1
- package/dist/classes/features/other/RoomClearFrame.d.ts.map +1 -1
- package/dist/classes/features/other/RoomHistory.d.ts +0 -1
- package/dist/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/classes/features/other/RunInNFrames.js +2 -2
- package/dist/classes/features/other/SaveDataManager.js +1 -1
- package/dist/classes/features/other/SpawnRockAltRewards.d.ts +0 -4
- package/dist/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
- package/dist/classes/features/other/TaintedLazarusPlayers.d.ts +0 -1
- package/dist/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
- package/dist/classes/features/other/customStages/backdrop.js +2 -3
- package/dist/classes/features/other/customStages/constants.d.ts.map +1 -1
- package/dist/classes/features/other/customStages/gridEntities.d.ts +0 -1
- package/dist/classes/features/other/customStages/gridEntities.d.ts.map +1 -1
- package/dist/classes/features/other/customStages/gridEntities.js +5 -6
- package/dist/classes/features/other/customStages/shadows.js +1 -2
- package/dist/classes/features/other/customStages/streakText.js +3 -4
- package/dist/classes/features/other/customStages/utils.d.ts +0 -2
- package/dist/classes/features/other/customStages/utils.d.ts.map +1 -1
- package/dist/classes/features/other/customStages/utils.js +2 -3
- package/dist/classes/features/other/customStages/v.d.ts.map +1 -1
- package/dist/classes/features/other/customStages/versusScreen.js +2 -3
- package/dist/classes/features/other/debugDisplay/DebugDisplayBomb.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayBomb.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayDoor.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayDoor.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayEffect.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayEffect.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayFamiliar.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayFamiliar.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayKnife.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayKnife.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayLaser.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayLaser.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayNPC.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayNPC.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPickup.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPickup.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPit.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPit.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPlayer.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPlayer.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPoop.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPoop.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPressurePlate.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayPressurePlate.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayProjectile.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayProjectile.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayRock.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayRock.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplaySlot.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplaySlot.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplaySpikes.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplaySpikes.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayTNT.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayTNT.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayTear.d.ts +0 -1
- package/dist/classes/features/other/debugDisplay/DebugDisplayTear.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/utils.d.ts +0 -2
- package/dist/classes/features/other/debugDisplay/utils.d.ts.map +1 -1
- package/dist/classes/features/other/debugDisplay/utils.js +2 -3
- package/dist/classes/features/other/extraConsoleCommands/commands.js +147 -150
- package/dist/classes/features/other/extraConsoleCommands/subroutines.js +8 -9
- package/dist/classes/features/other/saveDataManager/constants.d.ts.map +1 -1
- package/dist/classes/features/other/saveDataManager/glowingHourGlass.d.ts +0 -1
- package/dist/classes/features/other/saveDataManager/glowingHourGlass.d.ts.map +1 -1
- package/dist/classes/features/other/saveDataManager/glowingHourGlass.js +2 -3
- package/dist/classes/features/other/saveDataManager/loadFromDisk.d.ts +0 -2
- package/dist/classes/features/other/saveDataManager/loadFromDisk.d.ts.map +1 -1
- package/dist/classes/features/other/saveDataManager/loadFromDisk.js +5 -2
- package/dist/classes/features/other/saveDataManager/loadFromDisk.lua +3 -0
- package/dist/classes/features/other/saveDataManager/restoreDefaults.d.ts +0 -1
- package/dist/classes/features/other/saveDataManager/restoreDefaults.d.ts.map +1 -1
- package/dist/classes/features/other/saveDataManager/restoreDefaults.js +3 -4
- package/dist/classes/features/other/saveDataManager/saveToDisk.d.ts +0 -2
- package/dist/classes/features/other/saveDataManager/saveToDisk.d.ts.map +1 -1
- package/dist/classes/features/other/saveDataManager/saveToDisk.js +1 -2
- package/dist/classes/private/CustomCallback.d.ts.map +1 -1
- package/dist/core/cachedClasses.d.ts +0 -5
- package/dist/core/cachedClasses.d.ts.map +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/constantsVanilla.js +4 -4
- package/dist/core/upgradeMod.d.ts +0 -2
- package/dist/core/upgradeMod.d.ts.map +1 -1
- package/dist/core/upgradeMod.js +1 -2
- package/dist/decorators.js +2 -2
- package/dist/enums/ModCallbackCustom.d.ts +5 -4
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.js +5 -4
- package/dist/enums/private/GridEntityTypeCustom.d.ts.map +1 -1
- package/dist/features.js +1 -2
- package/dist/functions/ambush.js +1 -2
- package/dist/functions/array.d.ts +5 -8
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/functions/array.js +55 -55
- package/dist/functions/array.lua +2 -2
- package/dist/functions/arrayLua.d.ts +1 -1
- package/dist/functions/arrayLua.d.ts.map +1 -1
- package/dist/functions/arrayLua.js +7 -8
- package/dist/functions/benchmark.d.ts +0 -1
- package/dist/functions/benchmark.d.ts.map +1 -1
- package/dist/functions/benchmark.js +1 -2
- package/dist/functions/bitSet128.d.ts +0 -1
- package/dist/functions/bitSet128.d.ts.map +1 -1
- package/dist/functions/bitSet128.js +5 -6
- package/dist/functions/bitwise.d.ts +0 -4
- package/dist/functions/bitwise.d.ts.map +1 -1
- package/dist/functions/bitwise.js +7 -8
- package/dist/functions/bitwise.lua +3 -3
- package/dist/functions/bombs.d.ts +0 -1
- package/dist/functions/bombs.d.ts.map +1 -1
- package/dist/functions/bombs.js +1 -2
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.js +17 -17
- package/dist/functions/cards.js +16 -17
- package/dist/functions/challenges.js +9 -10
- package/dist/functions/characters.js +17 -18
- package/dist/functions/charge.d.ts.map +1 -1
- package/dist/functions/charge.js +10 -11
- package/dist/functions/charge.lua +1 -1
- package/dist/functions/chargeBar.d.ts +0 -2
- package/dist/functions/chargeBar.d.ts.map +1 -1
- package/dist/functions/chargeBar.js +2 -3
- package/dist/functions/collectibleTag.js +2 -3
- package/dist/functions/collectibles.js +37 -38
- package/dist/functions/color.d.ts +0 -1
- package/dist/functions/color.d.ts.map +1 -1
- package/dist/functions/color.js +7 -8
- package/dist/functions/console.js +2 -3
- package/dist/functions/curses.js +2 -3
- package/dist/functions/debugFunctions.d.ts +0 -1
- package/dist/functions/debugFunctions.d.ts.map +1 -1
- package/dist/functions/debugFunctions.js +5 -6
- package/dist/functions/decorators.d.ts +4 -4
- package/dist/functions/decorators.d.ts.map +1 -1
- package/dist/functions/decorators.js +4 -5
- package/dist/functions/deepCopy.d.ts +0 -1
- package/dist/functions/deepCopy.d.ts.map +1 -1
- package/dist/functions/deepCopy.js +1 -4
- package/dist/functions/deepCopy.lua +0 -2
- package/dist/functions/deepCopyTests.js +5 -6
- package/dist/functions/dimensions.js +2 -3
- package/dist/functions/direction.js +6 -7
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.js +53 -49
- package/dist/functions/easing.js +30 -31
- package/dist/functions/effects.d.ts +0 -2
- package/dist/functions/effects.d.ts.map +1 -1
- package/dist/functions/effects.js +2 -2
- package/dist/functions/emptyRoom.js +2 -3
- package/dist/functions/entities.d.ts +3 -4
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.js +32 -33
- package/dist/functions/entities.lua +4 -11
- package/dist/functions/entitiesSpecific.js +40 -41
- package/dist/functions/entityTypes.d.ts +0 -1
- package/dist/functions/entityTypes.d.ts.map +1 -1
- package/dist/functions/entityTypes.js +1 -2
- package/dist/functions/enums.d.ts +1 -6
- package/dist/functions/enums.d.ts.map +1 -1
- package/dist/functions/enums.js +12 -13
- package/dist/functions/external.js +2 -3
- package/dist/functions/familiars.js +6 -7
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/flag.d.ts.map +1 -1
- package/dist/functions/flag.js +7 -8
- package/dist/functions/frames.d.ts +0 -1
- package/dist/functions/frames.d.ts.map +1 -1
- package/dist/functions/frames.js +18 -19
- package/dist/functions/globals.d.ts +0 -1
- package/dist/functions/globals.d.ts.map +1 -1
- package/dist/functions/globals.js +23 -15
- package/dist/functions/gridEntities.d.ts.map +1 -1
- package/dist/functions/gridEntities.js +51 -39
- package/dist/functions/gridEntities.lua +9 -5
- package/dist/functions/gridEntitiesSpecific.js +38 -39
- package/dist/functions/gridIndex.js +1 -2
- package/dist/functions/hash.js +1 -2
- package/dist/functions/hex.d.ts +0 -2
- package/dist/functions/hex.d.ts.map +1 -1
- package/dist/functions/hex.js +2 -3
- package/dist/functions/input.js +21 -21
- package/dist/functions/isaacAPIClass.d.ts +0 -20
- package/dist/functions/isaacAPIClass.d.ts.map +1 -1
- package/dist/functions/isaacAPIClass.js +23 -24
- package/dist/functions/itemPool.js +7 -8
- package/dist/functions/jsonHelpers.d.ts +4 -5
- package/dist/functions/jsonHelpers.d.ts.map +1 -1
- package/dist/functions/jsonHelpers.js +23 -14
- package/dist/functions/jsonHelpers.lua +4 -4
- package/dist/functions/jsonRoom.js +5 -6
- package/dist/functions/kColor.d.ts +0 -1
- package/dist/functions/kColor.d.ts.map +1 -1
- package/dist/functions/kColor.js +7 -8
- package/dist/functions/language.js +1 -2
- package/dist/functions/level.js +4 -5
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/levelGrid.js +27 -32
- package/dist/functions/log.js +4 -5
- package/dist/functions/logEntities.d.ts.map +1 -1
- package/dist/functions/logEntities.js +11 -9
- package/dist/functions/logMisc.d.ts +1 -2
- package/dist/functions/logMisc.d.ts.map +1 -1
- package/dist/functions/logMisc.js +35 -48
- package/dist/functions/logMisc.lua +3 -3
- package/dist/functions/map.d.ts +0 -2
- package/dist/functions/map.d.ts.map +1 -1
- package/dist/functions/map.js +12 -13
- package/dist/functions/math.js +13 -14
- package/dist/functions/merge.d.ts +0 -1
- package/dist/functions/merge.d.ts.map +1 -1
- package/dist/functions/merge.js +2 -3
- package/dist/functions/mergeTests.js +1 -2
- package/dist/functions/minimap.d.ts.map +1 -1
- package/dist/functions/minimap.js +12 -17
- package/dist/functions/modFeatures.js +1 -2
- package/dist/functions/newArray.d.ts +0 -1
- package/dist/functions/newArray.d.ts.map +1 -1
- package/dist/functions/newArray.js +2 -3
- package/dist/functions/nextStage.d.ts.map +1 -1
- package/dist/functions/nextStage.js +6 -3
- package/dist/functions/npcDataStructures.d.ts +0 -2
- package/dist/functions/npcDataStructures.d.ts.map +1 -1
- package/dist/functions/npcDataStructures.js +14 -15
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.js +9 -7
- package/dist/functions/pickupVariants.d.ts +0 -1
- package/dist/functions/pickupVariants.d.ts.map +1 -1
- package/dist/functions/pickupVariants.js +11 -12
- package/dist/functions/pickups.js +14 -15
- package/dist/functions/pickupsSpecific.js +40 -41
- package/dist/functions/pills.js +18 -19
- package/dist/functions/playerCenter.d.ts +0 -1
- package/dist/functions/playerCenter.d.ts.map +1 -1
- package/dist/functions/playerCenter.js +1 -2
- package/dist/functions/playerCollectibles.d.ts.map +1 -1
- package/dist/functions/playerCollectibles.js +19 -22
- package/dist/functions/playerCollectibles.lua +9 -9
- package/dist/functions/playerDataStructures.d.ts +0 -1
- package/dist/functions/playerDataStructures.d.ts.map +1 -1
- package/dist/functions/playerDataStructures.js +14 -15
- package/dist/functions/playerEffects.js +5 -6
- package/dist/functions/playerHealth.d.ts +0 -2
- package/dist/functions/playerHealth.d.ts.map +1 -1
- package/dist/functions/playerHealth.js +20 -21
- package/dist/functions/playerHealth.lua +26 -26
- package/dist/functions/playerIndex.d.ts +0 -3
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.js +9 -10
- package/dist/functions/playerTrinkets.js +10 -11
- package/dist/functions/players.d.ts +2 -0
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.js +39 -38
- package/dist/functions/players.lua +2 -0
- package/dist/functions/pocketItems.js +8 -9
- package/dist/functions/positionVelocity.d.ts +0 -4
- package/dist/functions/positionVelocity.d.ts.map +1 -1
- package/dist/functions/positionVelocity.js +11 -20
- package/dist/functions/positionVelocity.lua +4 -4
- package/dist/functions/pressurePlate.js +1 -2
- package/dist/functions/projectiles.js +2 -3
- package/dist/functions/random.d.ts +0 -3
- package/dist/functions/random.d.ts.map +1 -1
- package/dist/functions/random.js +3 -4
- package/dist/functions/readOnly.d.ts +0 -4
- package/dist/functions/readOnly.d.ts.map +1 -1
- package/dist/functions/readOnly.js +3 -4
- package/dist/functions/render.d.ts +0 -3
- package/dist/functions/render.d.ts.map +1 -1
- package/dist/functions/render.js +3 -4
- package/dist/functions/revive.d.ts +0 -3
- package/dist/functions/revive.d.ts.map +1 -1
- package/dist/functions/revive.js +5 -6
- package/dist/functions/rng.d.ts +0 -1
- package/dist/functions/rng.d.ts.map +1 -1
- package/dist/functions/rng.js +15 -15
- package/dist/functions/rockAlt.d.ts +0 -1
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.js +2 -3
- package/dist/functions/roomData.d.ts.map +1 -1
- package/dist/functions/roomData.js +15 -18
- package/dist/functions/roomGrid.js +6 -7
- package/dist/functions/roomShape.js +14 -15
- package/dist/functions/roomShapeWalls.js +2 -3
- package/dist/functions/roomTransition.js +2 -3
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.js +77 -64
- package/dist/functions/rooms.lua +2 -2
- package/dist/functions/run.js +8 -9
- package/dist/functions/seeds.d.ts +0 -1
- package/dist/functions/seeds.d.ts.map +1 -1
- package/dist/functions/seeds.js +2 -3
- package/dist/functions/serialization.js +5 -6
- package/dist/functions/set.d.ts +0 -2
- package/dist/functions/set.d.ts.map +1 -1
- package/dist/functions/set.js +22 -23
- package/dist/functions/slots.js +2 -3
- package/dist/functions/sort.d.ts.map +1 -1
- package/dist/functions/sort.js +6 -7
- package/dist/functions/sound.d.ts.map +1 -1
- package/dist/functions/sound.js +4 -9
- package/dist/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/functions/spawnCollectible.js +4 -7
- package/dist/functions/sprites.d.ts +0 -3
- package/dist/functions/sprites.d.ts.map +1 -1
- package/dist/functions/sprites.js +6 -7
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.js +44 -53
- package/dist/functions/stage.lua +5 -5
- package/dist/functions/stats.js +4 -5
- package/dist/functions/storyBosses.js +2 -3
- package/dist/functions/string.d.ts +0 -1
- package/dist/functions/string.d.ts.map +1 -1
- package/dist/functions/string.js +12 -13
- package/dist/functions/table.d.ts +0 -1
- package/dist/functions/table.d.ts.map +1 -1
- package/dist/functions/table.js +8 -9
- package/dist/functions/tears.js +6 -7
- package/dist/functions/transformations.js +5 -6
- package/dist/functions/trinketGive.js +5 -6
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.js +14 -17
- package/dist/functions/tstlClass.d.ts +2 -3
- package/dist/functions/tstlClass.d.ts.map +1 -1
- package/dist/functions/tstlClass.js +9 -10
- package/dist/functions/tstlClass.lua +2 -2
- package/dist/functions/types.d.ts +15 -17
- package/dist/functions/types.d.ts.map +1 -1
- package/dist/functions/types.js +38 -39
- package/dist/functions/types.lua +14 -14
- package/dist/functions/ui.d.ts +0 -3
- package/dist/functions/ui.d.ts.map +1 -1
- package/dist/functions/ui.js +13 -14
- package/dist/functions/utils.d.ts +0 -1
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.js +11 -12
- package/dist/functions/vector.d.ts +0 -1
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/functions/vector.js +11 -12
- package/dist/functions/versusScreen.js +4 -5
- package/dist/functions/weighted.d.ts +0 -3
- package/dist/functions/weighted.d.ts.map +1 -1
- package/dist/functions/weighted.js +2 -3
- package/dist/index.d.ts +58 -58
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -58
- package/dist/index.lua +443 -11
- package/dist/index.rollup.d.ts +86 -69
- package/dist/indexLua.d.ts +58 -58
- package/dist/indexLua.d.ts.map +1 -1
- package/dist/indexLua.js +4 -58
- package/dist/indexLua.lua +443 -11
- package/dist/interfaces/ChargeBarSprites.d.ts +0 -2
- package/dist/interfaces/ChargeBarSprites.d.ts.map +1 -1
- package/dist/interfaces/Corner.d.ts +0 -2
- package/dist/interfaces/Corner.d.ts.map +1 -1
- package/dist/interfaces/SaveData.d.ts +0 -1
- package/dist/interfaces/SaveData.d.ts.map +1 -1
- package/dist/interfaces/TSTLClassMetatable.d.ts +0 -4
- package/dist/interfaces/TSTLClassMetatable.d.ts.map +1 -1
- package/dist/interfaces/private/AddCallbackParametersCustom.d.ts +5 -3
- package/dist/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/dist/interfaces/private/ModUpgradedInterface.d.ts +0 -1
- package/dist/interfaces/private/ModUpgradedInterface.d.ts.map +1 -1
- package/dist/isaacscript-common.lua +1561 -1186
- package/dist/lib/jsonLua.js +2 -2
- package/dist/lualib_bundle.lua +107 -38
- package/dist/objects/LRoomShapeToRectangles.js +1 -1
- package/dist/objects/colors.d.ts +0 -1
- package/dist/objects/colors.d.ts.map +1 -1
- package/dist/objects/directionToVector.d.ts +0 -1
- package/dist/objects/directionToVector.d.ts.map +1 -1
- package/dist/objects/doorSlotFlagToDoorSlot.d.ts +9 -2
- package/dist/objects/doorSlotFlagToDoorSlot.d.ts.map +1 -1
- package/dist/objects/doorSlotToDoorSlotFlag.d.ts +0 -1
- package/dist/objects/doorSlotToDoorSlotFlag.d.ts.map +1 -1
- package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +17 -7
- package/dist/objects/kColors.d.ts +0 -1
- package/dist/objects/kColors.d.ts.map +1 -1
- package/dist/objects/roomShapeToBottomRightPosition.d.ts +0 -1
- package/dist/objects/roomShapeToBottomRightPosition.d.ts.map +1 -1
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.js +1 -1
- package/dist/objects/roomShapeToTopLeftPosition.d.ts +0 -1
- package/dist/objects/roomShapeToTopLeftPosition.d.ts.map +1 -1
- package/dist/objects/versusScreenBackgroundColors.d.ts +0 -1
- package/dist/objects/versusScreenBackgroundColors.d.ts.map +1 -1
- package/dist/objects/versusScreenDirtSpotColors.d.ts +0 -1
- package/dist/objects/versusScreenDirtSpotColors.d.ts.map +1 -1
- package/dist/patchErrorFunctions.js +1 -2
- package/dist/serialization.js +1 -2
- package/dist/shaderCrashFix.d.ts +0 -1
- package/dist/shaderCrashFix.d.ts.map +1 -1
- package/dist/shaderCrashFix.js +1 -2
- package/dist/shouldFire.d.ts.map +1 -1
- package/dist/shouldFire.js +30 -30
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/AddSubtract.d.ts +10 -2
- package/dist/types/AddSubtract.d.ts.map +1 -1
- package/dist/types/AnyEntity.d.ts +0 -11
- package/dist/types/AnyEntity.d.ts.map +1 -1
- package/dist/types/AnyGridEntity.d.ts +0 -8
- package/dist/types/AnyGridEntity.d.ts.map +1 -1
- package/dist/types/PickingUpItem.js +5 -6
- package/dist/types/PickupIndex.d.ts +0 -1
- package/dist/types/PickupIndex.d.ts.map +1 -1
- package/dist/types/PlayerIndex.d.ts +0 -1
- package/dist/types/PlayerIndex.d.ts.map +1 -1
- package/dist/types/ReadonlyMap.d.ts.map +1 -1
- package/dist/types/ReadonlySet.d.ts.map +1 -1
- package/dist/types/TSTLClass.d.ts +0 -1
- package/dist/types/TSTLClass.d.ts.map +1 -1
- package/dist/types/TupleWithLengthBetween.js +2 -2
- package/dist/types/TupleWithMaxLength.js +2 -2
- package/dist/types/WeightedArray.d.ts +0 -1
- package/dist/types/WeightedArray.d.ts.map +1 -1
- package/package.json +9 -2
- package/src/callbackClasses.ts +6 -6
- package/src/classes/DefaultMap.ts +5 -2
- package/src/classes/ModFeature.ts +3 -3
- package/src/classes/ModUpgraded.ts +2 -4
- package/src/classes/callbacks/PostCollectibleEmpty.ts +1 -3
- package/src/classes/callbacks/PostItemDischarge.ts +3 -6
- package/src/classes/callbacks/PostNPCStateChanged.ts +1 -1
- package/src/classes/callbacks/PostNewRoomEarly.ts +1 -1
- package/src/classes/callbacks/PostPlayerChangeType.ts +1 -1
- package/src/classes/callbacks/PostTransformation.ts +1 -3
- package/src/classes/callbacks/PostTrinketBreak.ts +1 -3
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +1 -1
- package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +4 -6
- package/src/classes/features/callbackLogic/ItemPickupDetection.ts +6 -2
- package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +4 -4
- package/src/classes/features/other/CustomPickups.ts +1 -0
- package/src/classes/features/other/CustomStages.ts +2 -2
- package/src/classes/features/other/CustomTrapdoors.ts +23 -18
- package/src/classes/features/other/DeployJSONRoom.ts +2 -0
- package/src/classes/features/other/EdenStartingStatsHealth.ts +3 -1
- package/src/classes/features/other/ExtraConsoleCommands.ts +14 -10
- package/src/classes/features/other/ModdedElementDetection.ts +4 -4
- package/src/classes/features/other/ModdedElementSets.ts +3 -3
- package/src/classes/features/other/PickupIndexCreation.ts +2 -3
- package/src/classes/features/other/RunInNFrames.ts +2 -2
- package/src/classes/features/other/SaveDataManager.ts +1 -1
- package/src/classes/features/other/customStages/backdrop.ts +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +7 -7
- package/src/classes/features/other/saveDataManager/loadFromDisk.ts +5 -0
- package/src/core/constants.ts +1 -1
- package/src/core/constantsVanilla.ts +4 -4
- package/src/enums/ModCallbackCustom.ts +5 -4
- package/src/functions/array.ts +33 -29
- package/src/functions/arrayLua.ts +1 -1
- package/src/functions/bosses.ts +2 -1
- package/src/functions/charge.ts +1 -2
- package/src/functions/decorators.ts +6 -9
- package/src/functions/deepCopy.ts +0 -4
- package/src/functions/deepCopyTests.ts +4 -4
- package/src/functions/doors.ts +5 -0
- package/src/functions/entities.ts +7 -14
- package/src/functions/enums.ts +4 -4
- package/src/functions/flag.ts +1 -1
- package/src/functions/globals.ts +2 -3
- package/src/functions/gridEntities.ts +19 -1
- package/src/functions/jsonHelpers.ts +7 -5
- package/src/functions/levelGrid.ts +3 -6
- package/src/functions/logEntities.ts +3 -0
- package/src/functions/logMisc.ts +9 -20
- package/src/functions/map.ts +4 -4
- package/src/functions/merge.ts +1 -1
- package/src/functions/minimap.ts +2 -6
- package/src/functions/newArray.ts +1 -1
- package/src/functions/nextStage.ts +4 -0
- package/src/functions/npcDataStructures.ts +5 -5
- package/src/functions/npcs.ts +3 -0
- package/src/functions/playerCollectibles.ts +1 -3
- package/src/functions/playerDataStructures.ts +5 -5
- package/src/functions/players.ts +2 -0
- package/src/functions/positionVelocity.ts +4 -12
- package/src/functions/rng.ts +4 -3
- package/src/functions/roomData.ts +1 -3
- package/src/functions/rooms.ts +16 -1
- package/src/functions/set.ts +8 -8
- package/src/functions/sort.ts +2 -2
- package/src/functions/sound.ts +2 -7
- package/src/functions/spawnCollectible.ts +1 -3
- package/src/functions/stage.ts +4 -14
- package/src/functions/trinkets.ts +1 -3
- package/src/functions/tstlClass.ts +2 -2
- package/src/functions/types.ts +16 -16
- package/src/index.ts +58 -58
- package/src/interfaces/SaveData.ts +2 -1
- package/src/interfaces/private/AddCallbackParametersCustom.ts +8 -3
- package/src/lib/jsonLua.js +2 -2
- package/src/objects/LRoomShapeToRectangles.ts +1 -1
- package/src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts +1 -1
- package/src/shouldFire.ts +2 -1
- package/src/types/AddSubtract.ts +10 -2
- package/src/types/HasFunction.ts +1 -1
- package/src/types/Immutable.ts +1 -1
- package/src/types/TupleWithLengthBetween.ts +2 -2
- package/src/types/TupleWithMaxLength.ts +2 -2
package/dist/functions/stage.js
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.calculateStageType = calculateStageType;
|
|
4
|
+
exports.calculateStageTypeRepentance = calculateStageTypeRepentance;
|
|
5
|
+
exports.getEffectiveStage = getEffectiveStage;
|
|
6
|
+
exports.getGotoCommand = getGotoCommand;
|
|
7
|
+
exports.getLevelName = getLevelName;
|
|
8
|
+
exports.getStage = getStage;
|
|
9
|
+
exports.getStageID = getStageID;
|
|
10
|
+
exports.getStageIDName = getStageIDName;
|
|
11
|
+
exports.getStageType = getStageType;
|
|
12
|
+
exports.getStageTypeSuffix = getStageTypeSuffix;
|
|
13
|
+
exports.isFinalFloor = isFinalFloor;
|
|
14
|
+
exports.isRepentanceStage = isRepentanceStage;
|
|
15
|
+
exports.isStageWithNaturalDevilRoom = isStageWithNaturalDevilRoom;
|
|
16
|
+
exports.isStageWithRandomBossCollectible = isStageWithRandomBossCollectible;
|
|
17
|
+
exports.isStageWithSecretExitToDownpour = isStageWithSecretExitToDownpour;
|
|
18
|
+
exports.isStageWithSecretExitToMausoleum = isStageWithSecretExitToMausoleum;
|
|
19
|
+
exports.isStageWithSecretExitToMines = isStageWithSecretExitToMines;
|
|
20
|
+
exports.isStageWithShovelTrapdoors = isStageWithShovelTrapdoors;
|
|
21
|
+
exports.isStageWithStoryBoss = isStageWithStoryBoss;
|
|
22
|
+
exports.onAscent = onAscent;
|
|
23
|
+
exports.onCathedral = onCathedral;
|
|
24
|
+
exports.onChest = onChest;
|
|
25
|
+
exports.onDarkRoom = onDarkRoom;
|
|
26
|
+
exports.onEffectiveStage = onEffectiveStage;
|
|
27
|
+
exports.onFinalFloor = onFinalFloor;
|
|
28
|
+
exports.onFirstFloor = onFirstFloor;
|
|
29
|
+
exports.onRepentanceStage = onRepentanceStage;
|
|
30
|
+
exports.onSheol = onSheol;
|
|
31
|
+
exports.onStage = onStage;
|
|
32
|
+
exports.onStageOrHigher = onStageOrHigher;
|
|
33
|
+
exports.onStageOrLower = onStageOrLower;
|
|
34
|
+
exports.onStageType = onStageType;
|
|
35
|
+
exports.onStageWithNaturalDevilRoom = onStageWithNaturalDevilRoom;
|
|
36
|
+
exports.onStageWithRandomBossCollectible = onStageWithRandomBossCollectible;
|
|
37
|
+
exports.onStageWithSecretExitToDownpour = onStageWithSecretExitToDownpour;
|
|
38
|
+
exports.onStageWithSecretExitToMausoleum = onStageWithSecretExitToMausoleum;
|
|
39
|
+
exports.onStageWithSecretExitToMines = onStageWithSecretExitToMines;
|
|
40
|
+
exports.onStageWithShovelTrapdoors = onStageWithShovelTrapdoors;
|
|
41
|
+
exports.onStageWithStoryBoss = onStageWithStoryBoss;
|
|
42
|
+
exports.setStage = setStage;
|
|
4
43
|
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
5
44
|
const cachedClasses_1 = require("../core/cachedClasses");
|
|
6
45
|
const roomTypeSpecialGotoPrefixes_1 = require("../objects/roomTypeSpecialGotoPrefixes");
|
|
@@ -39,7 +78,6 @@ function calculateStageType(stage) {
|
|
|
39
78
|
}
|
|
40
79
|
return isaac_typescript_definitions_1.StageType.ORIGINAL;
|
|
41
80
|
}
|
|
42
|
-
exports.calculateStageType = calculateStageType;
|
|
43
81
|
/**
|
|
44
82
|
* Helper function that calculates what the Repentance stage type should be for the provided stage.
|
|
45
83
|
* This emulates what the game's internal code does.
|
|
@@ -61,7 +99,6 @@ function calculateStageTypeRepentance(stage) {
|
|
|
61
99
|
}
|
|
62
100
|
return isaac_typescript_definitions_1.StageType.REPENTANCE;
|
|
63
101
|
}
|
|
64
|
-
exports.calculateStageTypeRepentance = calculateStageTypeRepentance;
|
|
65
102
|
/**
|
|
66
103
|
* Helper function to account for Repentance floors being offset by 1. For example, Downpour 2 is
|
|
67
104
|
* the third level of the run, but the game considers it to have a stage of 2. This function will
|
|
@@ -75,7 +112,6 @@ function getEffectiveStage() {
|
|
|
75
112
|
}
|
|
76
113
|
return stage;
|
|
77
114
|
}
|
|
78
|
-
exports.getEffectiveStage = getEffectiveStage;
|
|
79
115
|
/**
|
|
80
116
|
* Helper function to get the corresponding "goto" console command that would correspond to the
|
|
81
117
|
* provided room type and room variant.
|
|
@@ -92,7 +128,6 @@ function getGotoCommand(roomType, roomVariant, useSpecialRoomsForRoomTypeDefault
|
|
|
92
128
|
const prefix = isNormalRoom ? "d" : `s.${roomTypeSpecialGotoPrefix}`;
|
|
93
129
|
return `goto ${prefix}.${roomVariant}`;
|
|
94
130
|
}
|
|
95
|
-
exports.getGotoCommand = getGotoCommand;
|
|
96
131
|
/**
|
|
97
132
|
* Helper function to get the English name of the level. For example, "Caves 1".
|
|
98
133
|
*
|
|
@@ -106,12 +141,8 @@ exports.getGotoCommand = getGotoCommand;
|
|
|
106
141
|
*/
|
|
107
142
|
function getLevelName(stage, stageType) {
|
|
108
143
|
const level = cachedClasses_1.game.GetLevel();
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
if (stageType === undefined) {
|
|
113
|
-
stageType = level.GetStageType();
|
|
114
|
-
}
|
|
144
|
+
stage ??= level.GetStage();
|
|
145
|
+
stageType ??= level.GetStageType();
|
|
115
146
|
const stageID = getStageID(stage, stageType);
|
|
116
147
|
const stageIDName = getStageIDName(stageID);
|
|
117
148
|
let suffix;
|
|
@@ -137,13 +168,11 @@ function getLevelName(stage, stageType) {
|
|
|
137
168
|
}
|
|
138
169
|
return stageIDName + suffix;
|
|
139
170
|
}
|
|
140
|
-
exports.getLevelName = getLevelName;
|
|
141
171
|
/** Alias for the `Level.GetStage` method. */
|
|
142
172
|
function getStage() {
|
|
143
173
|
const level = cachedClasses_1.game.GetLevel();
|
|
144
174
|
return level.GetStage();
|
|
145
175
|
}
|
|
146
|
-
exports.getStage = getStage;
|
|
147
176
|
/**
|
|
148
177
|
* Helper function to get the stage ID that corresponds to a particular stage and stage type.
|
|
149
178
|
*
|
|
@@ -160,12 +189,8 @@ exports.getStage = getStage;
|
|
|
160
189
|
*/
|
|
161
190
|
function getStageID(stage, stageType) {
|
|
162
191
|
const level = cachedClasses_1.game.GetLevel();
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
if (stageType === undefined) {
|
|
167
|
-
stageType = level.GetStageType();
|
|
168
|
-
}
|
|
192
|
+
stage ??= level.GetStage();
|
|
193
|
+
stageType ??= level.GetStageType();
|
|
169
194
|
if (cachedClasses_1.game.IsGreedMode()) {
|
|
170
195
|
const stageTypeToStageID = stageToStageID_1.STAGE_TO_STAGE_ID_GREED_MODE.get(stage);
|
|
171
196
|
if (stageTypeToStageID === undefined) {
|
|
@@ -176,7 +201,6 @@ function getStageID(stage, stageType) {
|
|
|
176
201
|
const stageTypeToStageID = stageToStageID_1.STAGE_TO_STAGE_ID[stage];
|
|
177
202
|
return stageTypeToStageID[stageType];
|
|
178
203
|
}
|
|
179
|
-
exports.getStageID = getStageID;
|
|
180
204
|
/**
|
|
181
205
|
* Helper function to get the English name corresponding to a stage ID. For example, "Caves".
|
|
182
206
|
*
|
|
@@ -188,13 +212,11 @@ exports.getStageID = getStageID;
|
|
|
188
212
|
function getStageIDName(stageID) {
|
|
189
213
|
return stageIDNames_1.STAGE_ID_NAMES[stageID];
|
|
190
214
|
}
|
|
191
|
-
exports.getStageIDName = getStageIDName;
|
|
192
215
|
/** Alias for the `Level.GetStageType` method. */
|
|
193
216
|
function getStageType() {
|
|
194
217
|
const level = cachedClasses_1.game.GetLevel();
|
|
195
218
|
return level.GetStageType();
|
|
196
219
|
}
|
|
197
|
-
exports.getStageType = getStageType;
|
|
198
220
|
/**
|
|
199
221
|
* Helper function to convert a numerical `StageType` into the letter suffix supplied to the "stage"
|
|
200
222
|
* console command. For example, `StageType.REPENTANCE` is the stage type for Downpour, and the
|
|
@@ -204,7 +226,6 @@ exports.getStageType = getStageType;
|
|
|
204
226
|
function getStageTypeSuffix(stageType) {
|
|
205
227
|
return stageTypeSuffixes_1.STAGE_TYPE_SUFFIXES[stageType];
|
|
206
228
|
}
|
|
207
|
-
exports.getStageTypeSuffix = getStageTypeSuffix;
|
|
208
229
|
/**
|
|
209
230
|
* Returns whether the provided stage and stage type represent a "final floor". This is defined as a
|
|
210
231
|
* floor that prevents the player from entering the I AM ERROR room on.
|
|
@@ -220,7 +241,6 @@ function isFinalFloor(stage, stageType) {
|
|
|
220
241
|
(stage === isaac_typescript_definitions_1.LevelStage.WOMB_2 && isRepentanceStage(stageType)) // Corpse 2
|
|
221
242
|
);
|
|
222
243
|
}
|
|
223
|
-
exports.isFinalFloor = isFinalFloor;
|
|
224
244
|
/**
|
|
225
245
|
* Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
226
246
|
* `StageType.REPENTANCE_B`.
|
|
@@ -228,7 +248,6 @@ exports.isFinalFloor = isFinalFloor;
|
|
|
228
248
|
function isRepentanceStage(stageType) {
|
|
229
249
|
return (stageType === isaac_typescript_definitions_1.StageType.REPENTANCE || stageType === isaac_typescript_definitions_1.StageType.REPENTANCE_B);
|
|
230
250
|
}
|
|
231
|
-
exports.isRepentanceStage = isRepentanceStage;
|
|
232
251
|
/**
|
|
233
252
|
* Helper function to check if the provided effective stage is one that has the possibility to grant
|
|
234
253
|
* a natural Devil Room or Angel Room after killing the boss.
|
|
@@ -241,7 +260,6 @@ function isStageWithNaturalDevilRoom(effectiveStage) {
|
|
|
241
260
|
return ((0, utils_1.inRange)(effectiveStage, isaac_typescript_definitions_1.LevelStage.BASEMENT_2, isaac_typescript_definitions_1.LevelStage.WOMB_2) &&
|
|
242
261
|
effectiveStage !== isaac_typescript_definitions_1.LevelStage.BLUE_WOMB);
|
|
243
262
|
}
|
|
244
|
-
exports.isStageWithNaturalDevilRoom = isStageWithNaturalDevilRoom;
|
|
245
263
|
/**
|
|
246
264
|
* Helper function to check if the provided stage is one that will have a random collectible drop
|
|
247
265
|
* upon defeating the boss of the floor.
|
|
@@ -256,7 +274,6 @@ exports.isStageWithNaturalDevilRoom = isStageWithNaturalDevilRoom;
|
|
|
256
274
|
function isStageWithRandomBossCollectible(stage) {
|
|
257
275
|
return !isStageWithStoryBoss(stage) || stage === isaac_typescript_definitions_1.LevelStage.VOID;
|
|
258
276
|
}
|
|
259
|
-
exports.isStageWithRandomBossCollectible = isStageWithRandomBossCollectible;
|
|
260
277
|
/**
|
|
261
278
|
* Helper function to check if the provided stage will spawn a locked door to Downpour/Dross after
|
|
262
279
|
* defeating the boss.
|
|
@@ -264,7 +281,6 @@ exports.isStageWithRandomBossCollectible = isStageWithRandomBossCollectible;
|
|
|
264
281
|
function isStageWithSecretExitToDownpour(stage) {
|
|
265
282
|
return stage === isaac_typescript_definitions_1.LevelStage.BASEMENT_1 || stage === isaac_typescript_definitions_1.LevelStage.BASEMENT_2;
|
|
266
283
|
}
|
|
267
|
-
exports.isStageWithSecretExitToDownpour = isStageWithSecretExitToDownpour;
|
|
268
284
|
/**
|
|
269
285
|
* Helper function to check if the provided stage and stage type will spawn a spiked door to
|
|
270
286
|
* Mausoleum/Gehenna after defeating the boss.
|
|
@@ -274,7 +290,6 @@ function isStageWithSecretExitToMausoleum(stage, stageType) {
|
|
|
274
290
|
return ((stage === isaac_typescript_definitions_1.LevelStage.DEPTHS_1 && !repentanceStage) ||
|
|
275
291
|
(stage === isaac_typescript_definitions_1.LevelStage.CAVES_2 && repentanceStage));
|
|
276
292
|
}
|
|
277
|
-
exports.isStageWithSecretExitToMausoleum = isStageWithSecretExitToMausoleum;
|
|
278
293
|
/**
|
|
279
294
|
* Helper function to check if the provided stage and stage type will spawn a wooden door to
|
|
280
295
|
* Mines/Ashpit after defeating the boss.
|
|
@@ -284,7 +299,6 @@ function isStageWithSecretExitToMines(stage, stageType) {
|
|
|
284
299
|
return ((stage === isaac_typescript_definitions_1.LevelStage.CAVES_1 && !repentanceStage) ||
|
|
285
300
|
(stage === isaac_typescript_definitions_1.LevelStage.BASEMENT_2 && repentanceStage));
|
|
286
301
|
}
|
|
287
|
-
exports.isStageWithSecretExitToMines = isStageWithSecretExitToMines;
|
|
288
302
|
/**
|
|
289
303
|
* Helper function to check if the current stage is one that would create a trapdoor if We Need to
|
|
290
304
|
* Go Deeper was used.
|
|
@@ -294,7 +308,6 @@ function isStageWithShovelTrapdoors(stage, stageType) {
|
|
|
294
308
|
return (stage < isaac_typescript_definitions_1.LevelStage.WOMB_2 ||
|
|
295
309
|
(stage === isaac_typescript_definitions_1.LevelStage.WOMB_2 && !repentanceStage));
|
|
296
310
|
}
|
|
297
|
-
exports.isStageWithShovelTrapdoors = isStageWithShovelTrapdoors;
|
|
298
311
|
/**
|
|
299
312
|
* Helper function to check if the provided stage is one with a story boss. Specifically, this is
|
|
300
313
|
* Depths 2 (Mom), Womb 2 (Mom's Heart / It Lives), Blue Womb (Hush), Sheol (Satan), Cathedral
|
|
@@ -304,7 +317,6 @@ exports.isStageWithShovelTrapdoors = isStageWithShovelTrapdoors;
|
|
|
304
317
|
function isStageWithStoryBoss(stage) {
|
|
305
318
|
return stage === isaac_typescript_definitions_1.LevelStage.DEPTHS_2 || stage >= isaac_typescript_definitions_1.LevelStage.WOMB_2;
|
|
306
319
|
}
|
|
307
|
-
exports.isStageWithStoryBoss = isStageWithStoryBoss;
|
|
308
320
|
/**
|
|
309
321
|
* Helper function to check if the player has taken Dad's Note. This sets the game state flag of
|
|
310
322
|
* `GameStateFlag.BACKWARDS_PATH` and causes floor generation to change.
|
|
@@ -312,7 +324,6 @@ exports.isStageWithStoryBoss = isStageWithStoryBoss;
|
|
|
312
324
|
function onAscent() {
|
|
313
325
|
return cachedClasses_1.game.GetStateFlag(isaac_typescript_definitions_1.GameStateFlag.BACKWARDS_PATH);
|
|
314
326
|
}
|
|
315
|
-
exports.onAscent = onAscent;
|
|
316
327
|
function onCathedral() {
|
|
317
328
|
const level = cachedClasses_1.game.GetLevel();
|
|
318
329
|
const stage = level.GetStage();
|
|
@@ -320,7 +331,6 @@ function onCathedral() {
|
|
|
320
331
|
return (stage === isaac_typescript_definitions_1.LevelStage.SHEOL_CATHEDRAL &&
|
|
321
332
|
stageType === isaac_typescript_definitions_1.StageType.WRATH_OF_THE_LAMB);
|
|
322
333
|
}
|
|
323
|
-
exports.onCathedral = onCathedral;
|
|
324
334
|
function onChest() {
|
|
325
335
|
const level = cachedClasses_1.game.GetLevel();
|
|
326
336
|
const stage = level.GetStage();
|
|
@@ -328,14 +338,12 @@ function onChest() {
|
|
|
328
338
|
return (stage === isaac_typescript_definitions_1.LevelStage.DARK_ROOM_CHEST &&
|
|
329
339
|
stageType === isaac_typescript_definitions_1.StageType.WRATH_OF_THE_LAMB);
|
|
330
340
|
}
|
|
331
|
-
exports.onChest = onChest;
|
|
332
341
|
function onDarkRoom() {
|
|
333
342
|
const level = cachedClasses_1.game.GetLevel();
|
|
334
343
|
const stage = level.GetStage();
|
|
335
344
|
const stageType = level.GetStageType();
|
|
336
345
|
return (stage === isaac_typescript_definitions_1.LevelStage.DARK_ROOM_CHEST && stageType === isaac_typescript_definitions_1.StageType.ORIGINAL);
|
|
337
346
|
}
|
|
338
|
-
exports.onDarkRoom = onDarkRoom;
|
|
339
347
|
/**
|
|
340
348
|
* Helper function to check if the current stage matches one of the given stages. This uses the
|
|
341
349
|
* `getEffectiveStage` helper function so that the Repentance floors are correctly adjusted.
|
|
@@ -346,7 +354,6 @@ function onEffectiveStage(...effectiveStages) {
|
|
|
346
354
|
const thisEffectiveStage = getEffectiveStage();
|
|
347
355
|
return effectiveStages.includes(thisEffectiveStage);
|
|
348
356
|
}
|
|
349
|
-
exports.onEffectiveStage = onEffectiveStage;
|
|
350
357
|
/**
|
|
351
358
|
* Returns whether the player is on the "final floor" of the particular run. The final floor is
|
|
352
359
|
* defined as one that prevents the player from entering the I AM ERROR room on.
|
|
@@ -361,7 +368,6 @@ function onFinalFloor() {
|
|
|
361
368
|
const stageType = level.GetStageType();
|
|
362
369
|
return isFinalFloor(stage, stageType);
|
|
363
370
|
}
|
|
364
|
-
exports.onFinalFloor = onFinalFloor;
|
|
365
371
|
/**
|
|
366
372
|
* Returns whether the player is on the first floor of the particular run.
|
|
367
373
|
*
|
|
@@ -373,7 +379,6 @@ function onFirstFloor() {
|
|
|
373
379
|
const isOnAscent = onAscent();
|
|
374
380
|
return effectiveStage === isaac_typescript_definitions_1.LevelStage.BASEMENT_1 && !isOnAscent;
|
|
375
381
|
}
|
|
376
|
-
exports.onFirstFloor = onFirstFloor;
|
|
377
382
|
/**
|
|
378
383
|
* Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
|
|
379
384
|
* `StageType.REPENTANCE_B`.
|
|
@@ -383,14 +388,12 @@ function onRepentanceStage() {
|
|
|
383
388
|
const stageType = level.GetStageType();
|
|
384
389
|
return isRepentanceStage(stageType);
|
|
385
390
|
}
|
|
386
|
-
exports.onRepentanceStage = onRepentanceStage;
|
|
387
391
|
function onSheol() {
|
|
388
392
|
const level = cachedClasses_1.game.GetLevel();
|
|
389
393
|
const stage = level.GetStage();
|
|
390
394
|
const stageType = level.GetStageType();
|
|
391
395
|
return (stage === isaac_typescript_definitions_1.LevelStage.SHEOL_CATHEDRAL && stageType === isaac_typescript_definitions_1.StageType.ORIGINAL);
|
|
392
396
|
}
|
|
393
|
-
exports.onSheol = onSheol;
|
|
394
397
|
/**
|
|
395
398
|
* Helper function to check if the current stage matches one of the given stages.
|
|
396
399
|
*
|
|
@@ -401,21 +404,18 @@ function onStage(...stages) {
|
|
|
401
404
|
const thisStage = level.GetStage();
|
|
402
405
|
return stages.includes(thisStage);
|
|
403
406
|
}
|
|
404
|
-
exports.onStage = onStage;
|
|
405
407
|
/** Helper function to check if the current stage is equal to or higher than the given stage. */
|
|
406
408
|
function onStageOrHigher(stage) {
|
|
407
409
|
const level = cachedClasses_1.game.GetLevel();
|
|
408
410
|
const thisStage = level.GetStage();
|
|
409
411
|
return thisStage >= stage;
|
|
410
412
|
}
|
|
411
|
-
exports.onStageOrHigher = onStageOrHigher;
|
|
412
413
|
/** Helper function to check if the current stage is equal to or higher than the given stage. */
|
|
413
414
|
function onStageOrLower(stage) {
|
|
414
415
|
const level = cachedClasses_1.game.GetLevel();
|
|
415
416
|
const thisStage = level.GetStage();
|
|
416
417
|
return thisStage <= stage;
|
|
417
418
|
}
|
|
418
|
-
exports.onStageOrLower = onStageOrLower;
|
|
419
419
|
/**
|
|
420
420
|
* Helper function to check if the current stage matches one of the given stage types.
|
|
421
421
|
*
|
|
@@ -426,7 +426,6 @@ function onStageType(...stageTypes) {
|
|
|
426
426
|
const thisStageType = level.GetStageType();
|
|
427
427
|
return stageTypes.includes(thisStageType);
|
|
428
428
|
}
|
|
429
|
-
exports.onStageType = onStageType;
|
|
430
429
|
/**
|
|
431
430
|
* Helper function to check if the current stage is one that has the possibility to grant a natural
|
|
432
431
|
* Devil Room or Angel Room after killing the boss.
|
|
@@ -435,7 +434,6 @@ function onStageWithNaturalDevilRoom() {
|
|
|
435
434
|
const effectiveStage = getEffectiveStage();
|
|
436
435
|
return isStageWithNaturalDevilRoom(effectiveStage);
|
|
437
436
|
}
|
|
438
|
-
exports.onStageWithNaturalDevilRoom = onStageWithNaturalDevilRoom;
|
|
439
437
|
/**
|
|
440
438
|
* Helper function to check if the current stage is one that will have a random collectible drop
|
|
441
439
|
* upon defeating the boss of the floor.
|
|
@@ -452,7 +450,6 @@ function onStageWithRandomBossCollectible() {
|
|
|
452
450
|
const stage = level.GetStage();
|
|
453
451
|
return isStageWithRandomBossCollectible(stage);
|
|
454
452
|
}
|
|
455
|
-
exports.onStageWithRandomBossCollectible = onStageWithRandomBossCollectible;
|
|
456
453
|
/**
|
|
457
454
|
* Helper function to check if the current stage will spawn a locked door to Downpour/Dross after
|
|
458
455
|
* defeating the boss.
|
|
@@ -462,7 +459,6 @@ function onStageWithSecretExitToDownpour() {
|
|
|
462
459
|
const stage = level.GetStage();
|
|
463
460
|
return isStageWithSecretExitToDownpour(stage);
|
|
464
461
|
}
|
|
465
|
-
exports.onStageWithSecretExitToDownpour = onStageWithSecretExitToDownpour;
|
|
466
462
|
/**
|
|
467
463
|
* Helper function to check if the current stage will spawn a spiked door to Mausoleum/Gehenna after
|
|
468
464
|
* defeating the boss.
|
|
@@ -473,7 +469,6 @@ function onStageWithSecretExitToMausoleum() {
|
|
|
473
469
|
const stageType = level.GetStageType();
|
|
474
470
|
return isStageWithSecretExitToMausoleum(stage, stageType);
|
|
475
471
|
}
|
|
476
|
-
exports.onStageWithSecretExitToMausoleum = onStageWithSecretExitToMausoleum;
|
|
477
472
|
/**
|
|
478
473
|
* Helper function to check if the current stage will spawn a wooden door to Mines/Ashpit after
|
|
479
474
|
* defeating the boss.
|
|
@@ -484,7 +479,6 @@ function onStageWithSecretExitToMines() {
|
|
|
484
479
|
const stageType = level.GetStageType();
|
|
485
480
|
return isStageWithSecretExitToMines(stage, stageType);
|
|
486
481
|
}
|
|
487
|
-
exports.onStageWithSecretExitToMines = onStageWithSecretExitToMines;
|
|
488
482
|
/**
|
|
489
483
|
* Helper function to check if the current stage is one that would create a trapdoor if We Need to
|
|
490
484
|
* Go Deeper was used.
|
|
@@ -495,7 +489,6 @@ function onStageWithShovelTrapdoors() {
|
|
|
495
489
|
const stageType = level.GetStageType();
|
|
496
490
|
return isStageWithShovelTrapdoors(stage, stageType);
|
|
497
491
|
}
|
|
498
|
-
exports.onStageWithShovelTrapdoors = onStageWithShovelTrapdoors;
|
|
499
492
|
/**
|
|
500
493
|
* Helper function to check if the current stage is one with a story boss. Specifically, this is
|
|
501
494
|
* Depths 2 (Mom), Womb 2 (Mom's Heart / It Lives), Blue Womb (Hush), Sheol (Satan), Cathedral
|
|
@@ -507,7 +500,6 @@ function onStageWithStoryBoss() {
|
|
|
507
500
|
const stage = level.GetStage();
|
|
508
501
|
return isStageWithStoryBoss(stage);
|
|
509
502
|
}
|
|
510
|
-
exports.onStageWithStoryBoss = onStageWithStoryBoss;
|
|
511
503
|
/**
|
|
512
504
|
* Helper function to directly warp to a specific stage using the "stage" console command.
|
|
513
505
|
*
|
|
@@ -537,4 +529,3 @@ function setStage(stage, stageType, reseed = false) {
|
|
|
537
529
|
Isaac.ExecuteCommand("reseed");
|
|
538
530
|
}
|
|
539
531
|
}
|
|
540
|
-
exports.setStage = setStage;
|
package/dist/functions/stage.lua
CHANGED
|
@@ -159,16 +159,16 @@ function ____exports.getLevelName(self, stage, stageType)
|
|
|
159
159
|
local stageIDName = ____exports.getStageIDName(nil, stageID)
|
|
160
160
|
local suffix
|
|
161
161
|
repeat
|
|
162
|
-
local
|
|
163
|
-
local
|
|
164
|
-
if
|
|
162
|
+
local ____switch12 = stage
|
|
163
|
+
local ____cond12 = ____switch12 == LevelStage.BASEMENT_1 or ____switch12 == LevelStage.CAVES_1 or ____switch12 == LevelStage.DEPTHS_1 or ____switch12 == LevelStage.WOMB_1
|
|
164
|
+
if ____cond12 then
|
|
165
165
|
do
|
|
166
166
|
suffix = " 1"
|
|
167
167
|
break
|
|
168
168
|
end
|
|
169
169
|
end
|
|
170
|
-
|
|
171
|
-
if
|
|
170
|
+
____cond12 = ____cond12 or (____switch12 == LevelStage.BASEMENT_2 or ____switch12 == LevelStage.CAVES_2 or ____switch12 == LevelStage.DEPTHS_2 or ____switch12 == LevelStage.WOMB_2)
|
|
171
|
+
if ____cond12 then
|
|
172
172
|
do
|
|
173
173
|
suffix = " 2"
|
|
174
174
|
break
|
package/dist/functions/stats.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.addPlayerStat = addPlayerStat;
|
|
4
|
+
exports.getDefaultPlayerStat = getDefaultPlayerStat;
|
|
5
|
+
exports.getPlayerStat = getPlayerStat;
|
|
6
|
+
exports.getPlayerStats = getPlayerStats;
|
|
4
7
|
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
5
8
|
const PlayerStat_1 = require("../enums/PlayerStat");
|
|
6
9
|
const defaultPlayerStatMap_1 = require("../maps/defaultPlayerStatMap");
|
|
@@ -69,7 +72,6 @@ function addPlayerStat(player, cacheFlag, amount) {
|
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
|
-
exports.addPlayerStat = addPlayerStat;
|
|
73
75
|
/**
|
|
74
76
|
* Returns the starting stat that Isaac (the default character) starts with. For example, if you
|
|
75
77
|
* pass this function `CacheFlag.DAMAGE`, it will return 3.5.
|
|
@@ -79,13 +81,11 @@ exports.addPlayerStat = addPlayerStat;
|
|
|
79
81
|
function getDefaultPlayerStat(cacheFlag) {
|
|
80
82
|
return defaultPlayerStatMap_1.DEFAULT_PLAYER_STAT_MAP.get(cacheFlag);
|
|
81
83
|
}
|
|
82
|
-
exports.getDefaultPlayerStat = getDefaultPlayerStat;
|
|
83
84
|
/** Helper function to get the stat for a player corresponding to the `StatType`. */
|
|
84
85
|
function getPlayerStat(player, playerStat) {
|
|
85
86
|
const playerStats = getPlayerStats(player);
|
|
86
87
|
return playerStats[playerStat];
|
|
87
88
|
}
|
|
88
|
-
exports.getPlayerStat = getPlayerStat;
|
|
89
89
|
/** Helper function to get all of the stat for a player. */
|
|
90
90
|
function getPlayerStats(player) {
|
|
91
91
|
return {
|
|
@@ -104,4 +104,3 @@ function getPlayerStats(player) {
|
|
|
104
104
|
[PlayerStat_1.PlayerStat.SIZE]: player.SpriteScale, // 1 << 11
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
exports.getPlayerStats = getPlayerStats;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isStoryBoss = isStoryBoss;
|
|
4
|
+
exports.isStoryBossID = isStoryBossID;
|
|
4
5
|
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
5
6
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
6
7
|
const STORY_BOSS_IDS = [
|
|
@@ -51,7 +52,6 @@ const STORY_BOSS_IDS_SET = new ReadonlySet_1.ReadonlySet(STORY_BOSS_IDS);
|
|
|
51
52
|
function isStoryBoss(entityType) {
|
|
52
53
|
return STORY_BOSS_ENTITY_TYPES_SET.has(entityType);
|
|
53
54
|
}
|
|
54
|
-
exports.isStoryBoss = isStoryBoss;
|
|
55
55
|
/**
|
|
56
56
|
* Helper function to determine if the specified boss ID is an end-game story boss, like Isaac, Blue
|
|
57
57
|
* Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only apply
|
|
@@ -60,4 +60,3 @@ exports.isStoryBoss = isStoryBoss;
|
|
|
60
60
|
function isStoryBossID(bossID) {
|
|
61
61
|
return STORY_BOSS_IDS_SET.has(bossID);
|
|
62
62
|
}
|
|
63
|
-
exports.isStoryBossID = isStoryBossID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/functions/string.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/functions/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAU5D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,GAC1B,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,CAezB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,GAChC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,CAezB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,MAAM,GAAG,SAAS,CAYpB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GACtD;IACE,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,GAAG,CAAC;CACnB,GACD,SAAS,CAyBZ;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,MAAM,CAGR;AAED,8FAA8F;AAC9F,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,GAAG,UAAU,EAAE,SAAS,MAAM,EAAE,GAC/B,MAAM,CAMR;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOjE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAU9D"}
|
package/dist/functions/string.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
4
|
+
exports.getMapPartialMatch = getMapPartialMatch;
|
|
5
|
+
exports.getObjectPartialMatch = getObjectPartialMatch;
|
|
6
|
+
exports.getPartialMatch = getPartialMatch;
|
|
7
|
+
exports.parseSemanticVersion = parseSemanticVersion;
|
|
8
|
+
exports.removeAllCharacters = removeAllCharacters;
|
|
9
|
+
exports.removeCharactersBefore = removeCharactersBefore;
|
|
10
|
+
exports.removeNonAlphanumericCharacters = removeNonAlphanumericCharacters;
|
|
11
|
+
exports.removeSubstring = removeSubstring;
|
|
12
|
+
exports.trimPrefix = trimPrefix;
|
|
13
|
+
exports.trimSuffix = trimSuffix;
|
|
14
|
+
exports.uncapitalizeFirstLetter = uncapitalizeFirstLetter;
|
|
4
15
|
const types_1 = require("./types");
|
|
5
16
|
const utils_1 = require("./utils");
|
|
6
17
|
function capitalizeFirstLetter(string) {
|
|
@@ -12,7 +23,6 @@ function capitalizeFirstLetter(string) {
|
|
|
12
23
|
const restOfString = string.slice(1);
|
|
13
24
|
return `${capitalizedFirstLetter}${restOfString}`;
|
|
14
25
|
}
|
|
15
|
-
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
16
26
|
/**
|
|
17
27
|
* Helper function to get the closest key from a map based on partial search text. (It only searches
|
|
18
28
|
* through the keys, not the values.)
|
|
@@ -46,7 +56,6 @@ function getMapPartialMatch(searchText, map) {
|
|
|
46
56
|
(0, utils_1.assertDefined)(value, `Failed to get the map value corresponding to the partial match of: ${matchingKey}`);
|
|
47
57
|
return [matchingKey, value];
|
|
48
58
|
}
|
|
49
|
-
exports.getMapPartialMatch = getMapPartialMatch;
|
|
50
59
|
/**
|
|
51
60
|
* Helper function to get the closest key from an object based on partial search text. (It only
|
|
52
61
|
* searches through the keys, not the values.)
|
|
@@ -80,7 +89,6 @@ function getObjectPartialMatch(searchText, object) {
|
|
|
80
89
|
(0, utils_1.assertDefined)(value, `Failed to get the object value corresponding to the partial match of: ${matchingKey}`);
|
|
81
90
|
return [matchingKey, value];
|
|
82
91
|
}
|
|
83
|
-
exports.getObjectPartialMatch = getObjectPartialMatch;
|
|
84
92
|
/**
|
|
85
93
|
* Helper function to get the closest value from an array of strings based on partial search text.
|
|
86
94
|
*
|
|
@@ -108,7 +116,6 @@ function getPartialMatch(searchText, array) {
|
|
|
108
116
|
matchingElements.sort();
|
|
109
117
|
return matchingElements[0];
|
|
110
118
|
}
|
|
111
|
-
exports.getPartialMatch = getPartialMatch;
|
|
112
119
|
/**
|
|
113
120
|
* Helper function to parse a Semantic Versioning string into its individual constituents. Returns
|
|
114
121
|
* undefined if the submitted string was not a proper Semantic Version string.
|
|
@@ -132,11 +139,9 @@ function parseSemanticVersion(versionString) {
|
|
|
132
139
|
}
|
|
133
140
|
return { majorVersion, minorVersion, patchVersion };
|
|
134
141
|
}
|
|
135
|
-
exports.parseSemanticVersion = parseSemanticVersion;
|
|
136
142
|
function removeAllCharacters(string, character) {
|
|
137
143
|
return string.replaceAll(character, "");
|
|
138
144
|
}
|
|
139
|
-
exports.removeAllCharacters = removeAllCharacters;
|
|
140
145
|
/**
|
|
141
146
|
* Helper function to remove all of the characters in a string before a given substring. Returns the
|
|
142
147
|
* modified string.
|
|
@@ -145,13 +150,11 @@ function removeCharactersBefore(string, substring) {
|
|
|
145
150
|
const index = string.indexOf(substring);
|
|
146
151
|
return string.slice(index);
|
|
147
152
|
}
|
|
148
|
-
exports.removeCharactersBefore = removeCharactersBefore;
|
|
149
153
|
/** Helper function to remove all characters from a string that are not letters or numbers. */
|
|
150
154
|
function removeNonAlphanumericCharacters(str) {
|
|
151
155
|
const [returnValue, _] = string.gsub(str, "%W", "");
|
|
152
156
|
return returnValue;
|
|
153
157
|
}
|
|
154
|
-
exports.removeNonAlphanumericCharacters = removeNonAlphanumericCharacters;
|
|
155
158
|
/**
|
|
156
159
|
* Helper function to remove one or more substrings from a string, if they exist. Returns the
|
|
157
160
|
* modified string.
|
|
@@ -164,7 +167,6 @@ function removeSubstring(string, ...substrings) {
|
|
|
164
167
|
}
|
|
165
168
|
return string;
|
|
166
169
|
}
|
|
167
|
-
exports.removeSubstring = removeSubstring;
|
|
168
170
|
/** Helper function to trim a prefix from a string, if it exists. Returns the trimmed string. */
|
|
169
171
|
function trimPrefix(string, prefix) {
|
|
170
172
|
if (!string.startsWith(prefix)) {
|
|
@@ -172,7 +174,6 @@ function trimPrefix(string, prefix) {
|
|
|
172
174
|
}
|
|
173
175
|
return string.slice(prefix.length);
|
|
174
176
|
}
|
|
175
|
-
exports.trimPrefix = trimPrefix;
|
|
176
177
|
/** Helper function to trim a suffix from a string, if it exists. Returns the trimmed string. */
|
|
177
178
|
function trimSuffix(string, prefix) {
|
|
178
179
|
if (!string.endsWith(prefix)) {
|
|
@@ -181,7 +182,6 @@ function trimSuffix(string, prefix) {
|
|
|
181
182
|
const endCharacter = string.length - prefix.length;
|
|
182
183
|
return string.slice(0, endCharacter);
|
|
183
184
|
}
|
|
184
|
-
exports.trimSuffix = trimSuffix;
|
|
185
185
|
function uncapitalizeFirstLetter(string) {
|
|
186
186
|
if (string === "") {
|
|
187
187
|
return string;
|
|
@@ -191,4 +191,3 @@ function uncapitalizeFirstLetter(string) {
|
|
|
191
191
|
const restOfString = string.slice(1);
|
|
192
192
|
return `${uncapitalizedFirstLetter}${restOfString}`;
|
|
193
193
|
}
|
|
194
|
-
exports.uncapitalizeFirstLetter = uncapitalizeFirstLetter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/functions/table.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/functions/table.ts"],"names":[],"mappings":"AAGA;;;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,SAAS,MAAM,EAAE,EACvB,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,SAAS,MAAM,EAAE,GACzB,SAAS,OAAO,EAAE,CAmBpB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,SAAS,MAAM,EAAE,GACzB,SAAS,MAAM,EAAE,CA2BnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,SAAS,MAAM,EAAE,GACzB,SAAS,MAAM,EAAE,CAkBnB;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,SAAS,MAAM,EAAE,GACzB,OAAO,CAET"}
|
package/dist/functions/table.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.clearTable = clearTable;
|
|
4
|
+
exports.copyUserdataValuesToTable = copyUserdataValuesToTable;
|
|
5
|
+
exports.getBooleansFromTable = getBooleansFromTable;
|
|
6
|
+
exports.getNumbersFromTable = getNumbersFromTable;
|
|
7
|
+
exports.getStringsFromTable = getStringsFromTable;
|
|
8
|
+
exports.isTableEmpty = isTableEmpty;
|
|
9
|
+
exports.iterateTableInOrder = iterateTableInOrder;
|
|
10
|
+
exports.tableHasKeys = tableHasKeys;
|
|
4
11
|
const types_1 = require("./types");
|
|
5
12
|
const utils_1 = require("./utils");
|
|
6
13
|
/**
|
|
@@ -12,7 +19,6 @@ function clearTable(luaMap) {
|
|
|
12
19
|
luaMap.delete(key);
|
|
13
20
|
}
|
|
14
21
|
}
|
|
15
|
-
exports.clearTable = clearTable;
|
|
16
22
|
/** Helper function to copy specific values from a userdata object (e.g. `Vector`) to a table. */
|
|
17
23
|
function copyUserdataValuesToTable(object, keys, luaMap) {
|
|
18
24
|
if (!(0, types_1.isUserdata)(object)) {
|
|
@@ -25,7 +31,6 @@ function copyUserdataValuesToTable(object, keys, luaMap) {
|
|
|
25
31
|
luaMap.set(key, value);
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
|
-
exports.copyUserdataValuesToTable = copyUserdataValuesToTable;
|
|
29
34
|
/**
|
|
30
35
|
* Helper function to safely get boolean values from a Lua table. Will throw an error if the
|
|
31
36
|
* specific value does not exist on the table.
|
|
@@ -46,7 +51,6 @@ function getBooleansFromTable(luaMap, objectName, ...keys) {
|
|
|
46
51
|
}
|
|
47
52
|
return booleans;
|
|
48
53
|
}
|
|
49
|
-
exports.getBooleansFromTable = getBooleansFromTable;
|
|
50
54
|
/**
|
|
51
55
|
* Helper function to safely get number values from specific keys on a Lua table. If the values are
|
|
52
56
|
* strings, they will be converted to numbers. Will throw an error if the specific value does not
|
|
@@ -73,7 +77,6 @@ function getNumbersFromTable(luaMap, objectName, ...keys) {
|
|
|
73
77
|
}
|
|
74
78
|
return numbers;
|
|
75
79
|
}
|
|
76
|
-
exports.getNumbersFromTable = getNumbersFromTable;
|
|
77
80
|
/**
|
|
78
81
|
* Helper function to safely get string values from a Lua table. Will throw an error if the specific
|
|
79
82
|
* value does not exist on the table.
|
|
@@ -95,7 +98,6 @@ function getStringsFromTable(luaMap, objectName, ...keys) {
|
|
|
95
98
|
}
|
|
96
99
|
return strings;
|
|
97
100
|
}
|
|
98
|
-
exports.getStringsFromTable = getStringsFromTable;
|
|
99
101
|
/** Helper function to check if a Lua table has 0 keys. */
|
|
100
102
|
function isTableEmpty(luaMap) {
|
|
101
103
|
// Using `next` does not seem to work properly, so we use `pairs` instead.
|
|
@@ -105,7 +107,6 @@ function isTableEmpty(luaMap) {
|
|
|
105
107
|
}
|
|
106
108
|
return true;
|
|
107
109
|
}
|
|
108
|
-
exports.isTableEmpty = isTableEmpty;
|
|
109
110
|
/**
|
|
110
111
|
* Helper function to iterate over a table deterministically. This is useful because by default, the
|
|
111
112
|
* `pairs` function will return the keys of a Lua table in a random order.
|
|
@@ -149,7 +150,6 @@ function iterateTableInOrder(luaMap, func, inOrder = true) {
|
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
|
-
exports.iterateTableInOrder = iterateTableInOrder;
|
|
153
153
|
/**
|
|
154
154
|
* Helper function to check if a Lua table has all of the provided keys.
|
|
155
155
|
*
|
|
@@ -159,4 +159,3 @@ exports.iterateTableInOrder = iterateTableInOrder;
|
|
|
159
159
|
function tableHasKeys(luaMap, ...keys) {
|
|
160
160
|
return keys.every((key) => luaMap.has(key));
|
|
161
161
|
}
|
|
162
|
-
exports.tableHasKeys = tableHasKeys;
|