isaacscript-common 87.5.0 → 87.6.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/README.md +1 -1
- package/dist/callbackClasses.d.ts +7 -6
- package/dist/callbackClasses.d.ts.map +1 -1
- package/dist/callbackClasses.js +17 -15
- package/dist/callbackClasses.lua +163 -300
- package/dist/callbacks.d.ts +118 -117
- package/dist/callbacks.d.ts.map +1 -1
- package/dist/callbacks.js +19 -9
- package/dist/callbacks.lua +1 -0
- 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 +4 -6
- package/dist/classes/callbacks/InputActionFilter.d.ts +2 -2
- package/dist/classes/callbacks/InputActionFilter.d.ts.map +1 -1
- package/dist/classes/callbacks/InputActionFilter.js +3 -3
- package/dist/classes/callbacks/InputActionPlayer.d.ts +2 -2
- package/dist/classes/callbacks/InputActionPlayer.d.ts.map +1 -1
- package/dist/classes/callbacks/InputActionPlayer.js +6 -6
- package/dist/classes/callbacks/PostBoneSwing.js +2 -2
- 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 +3 -5
- package/dist/classes/callbacks/PostCursedTeleport.js +5 -5
- 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/PostDiceRoomActivated.js +2 -2
- package/dist/classes/callbacks/PostEntityRemoveFilter.d.ts +9 -0
- package/dist/classes/callbacks/PostEntityRemoveFilter.d.ts.map +1 -0
- package/dist/classes/callbacks/PostEntityRemoveFilter.js +21 -0
- package/dist/classes/callbacks/PostEntityRemoveFilter.lua +23 -0
- package/dist/classes/callbacks/PostGridEntityCollision.d.ts +2 -4
- package/dist/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityCollision.js +10 -10
- package/dist/classes/callbacks/PostGridEntityCustomCollision.d.ts +2 -4
- package/dist/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityCustomCollision.js +8 -8
- package/dist/classes/callbacks/PostGridEntityCustomRemove.d.ts +2 -3
- package/dist/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityCustomRemove.js +2 -2
- package/dist/classes/callbacks/PostGridEntityRemove.d.ts +2 -2
- package/dist/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -1
- package/dist/classes/callbacks/PostGridEntityRemove.js +3 -3
- 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 +5 -8
- package/dist/classes/callbacks/PostKeyboardChanged.d.ts +2 -1
- package/dist/classes/callbacks/PostKeyboardChanged.d.ts.map +1 -1
- package/dist/classes/callbacks/PostKeyboardChanged.js +2 -2
- package/dist/classes/callbacks/PostNewRoomEarly.js +3 -3
- package/dist/classes/callbacks/PostPickupSelectionFilter.d.ts +2 -2
- package/dist/classes/callbacks/PostPickupSelectionFilter.d.ts.map +1 -1
- package/dist/classes/callbacks/PostPickupSelectionFilter.js +4 -3
- package/dist/classes/callbacks/PostPlayerChangeHealth.js +2 -2
- 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/PostPurchase.js +9 -9
- 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/PostUsePillFilter.js +2 -2
- package/dist/classes/callbacks/PreBerserkDeath.js +4 -4
- package/dist/classes/callbacks/PreEntitySpawnFilter.d.ts +2 -2
- package/dist/classes/callbacks/PreEntitySpawnFilter.d.ts.map +1 -1
- package/dist/classes/callbacks/PreEntitySpawnFilter.js +3 -3
- 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/callbacks/PreRoomEntitySpawnFilter.js +5 -5
- 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/EsauJrDetection.js +2 -2
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +9 -11
- package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.js +4 -4
- package/dist/classes/features/callbackLogic/ItemPickupDetection.js +4 -4
- package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +2 -2
- 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 +44 -38
- 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 +6 -4
- package/dist/classes/features/other/DisableInputs.js +3 -3
- 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 +3 -3
- package/dist/classes/features/other/NoSirenSteal.js +4 -4
- 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 +7 -8
- 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/PonyDetection.js +2 -2
- package/dist/classes/features/other/PressInput.js +2 -2
- 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/PreventChildEntities.js +4 -4
- 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/RoomHistory.js +5 -5
- package/dist/classes/features/other/RunInNFrames.js +2 -2
- package/dist/classes/features/other/SaveDataManager.js +3 -3
- 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/StageHistory.js +2 -2
- package/dist/classes/features/other/StartAmbush.js +2 -2
- 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/TaintedLazarusPlayers.js +2 -2
- 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 +9 -10
- package/dist/classes/features/other/customStages/shadows.js +1 -2
- package/dist/classes/features/other/customStages/streakText.js +7 -8
- 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 +155 -158
- 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 +4 -5
- 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 +134 -117
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.js +134 -117
- package/dist/enums/ModCallbackCustom.lua +119 -117
- 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 +19 -19
- 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 +12 -13
- 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 +39 -40
- 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 +7 -10
- 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 +56 -52
- package/dist/functions/easing.js +32 -33
- 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 +7 -8
- package/dist/functions/entities.d.ts +0 -1
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.js +36 -38
- 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 +8 -9
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/flag.d.ts.map +1 -1
- package/dist/functions/flag.js +9 -10
- 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 +68 -62
- package/dist/functions/gridEntitiesSpecific.js +40 -41
- 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 +25 -26
- 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 +7 -8
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/levelGrid.js +33 -38
- package/dist/functions/log.js +4 -5
- package/dist/functions/logEntities.d.ts.map +1 -1
- package/dist/functions/logEntities.js +19 -17
- 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 +17 -18
- 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 +16 -13
- 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 +19 -17
- package/dist/functions/pickupVariants.d.ts +0 -1
- package/dist/functions/pickupVariants.d.ts.map +1 -1
- package/dist/functions/pickupVariants.js +17 -18
- 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 +21 -24
- 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 +28 -29
- 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 +12 -13
- package/dist/functions/playerTrinkets.js +10 -11
- package/dist/functions/players.js +41 -42
- package/dist/functions/pocketItems.js +10 -11
- 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 +20 -21
- 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 +8 -9
- 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 +1 -2
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.js +116 -105
- package/dist/functions/rooms.lua +3 -4
- 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 +8 -9
- 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 +7 -10
- 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 +60 -69
- 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 +18 -19
- 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 +8 -9
- package/dist/functions/transformations.js +5 -6
- package/dist/functions/trinketGive.js +9 -10
- 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 +41 -42
- 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 +18 -18
- package/dist/index.rollup.d.ts +222 -181
- 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 +18 -18
- 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 +6 -0
- 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 +786 -871
- package/dist/lib/jsonLua.js +34 -34
- package/dist/lualib_bundle.lua +49 -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 +83 -86
- 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/Increment.d.ts.map +1 -1
- package/dist/types/PickingUpItem.d.ts +10 -3
- package/dist/types/PickingUpItem.d.ts.map +1 -1
- package/dist/types/PickingUpItem.js +15 -9
- package/dist/types/PickingUpItem.lua +8 -3
- 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 +7 -6
- package/src/callbacks.ts +1 -0
- package/src/classes/DefaultMap.ts +5 -2
- package/src/classes/ModFeature.ts +3 -3
- package/src/classes/ModUpgraded.ts +4 -6
- package/src/classes/callbacks/InputActionFilter.ts +3 -3
- package/src/classes/callbacks/InputActionPlayer.ts +6 -6
- package/src/classes/callbacks/PostBoneSwing.ts +2 -2
- package/src/classes/callbacks/PostCollectibleEmpty.ts +3 -5
- package/src/classes/callbacks/PostCursedTeleport.ts +5 -5
- package/src/classes/callbacks/PostDiceRoomActivated.ts +2 -2
- package/src/classes/callbacks/PostEntityRemoveFilter.ts +22 -0
- package/src/classes/callbacks/PostGridEntityCollision.ts +10 -10
- package/src/classes/callbacks/PostGridEntityCustomCollision.ts +8 -8
- package/src/classes/callbacks/PostGridEntityCustomRemove.ts +2 -2
- package/src/classes/callbacks/PostGridEntityRemove.ts +3 -3
- package/src/classes/callbacks/PostItemDischarge.ts +5 -8
- package/src/classes/callbacks/PostKeyboardChanged.ts +2 -2
- package/src/classes/callbacks/PostNPCStateChanged.ts +1 -1
- package/src/classes/callbacks/PostNewRoomEarly.ts +3 -3
- package/src/classes/callbacks/PostPickupSelectionFilter.ts +4 -3
- package/src/classes/callbacks/PostPlayerChangeHealth.ts +2 -2
- package/src/classes/callbacks/PostPlayerChangeType.ts +1 -1
- package/src/classes/callbacks/PostPurchase.ts +9 -9
- package/src/classes/callbacks/PostTransformation.ts +1 -3
- package/src/classes/callbacks/PostTrinketBreak.ts +1 -3
- package/src/classes/callbacks/PostUsePillFilter.ts +2 -2
- package/src/classes/callbacks/PreBerserkDeath.ts +4 -4
- package/src/classes/callbacks/PreEntitySpawnFilter.ts +3 -3
- package/src/classes/callbacks/PreRoomEntitySpawnFilter.ts +5 -5
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +1 -1
- package/src/classes/features/callbackLogic/EsauJrDetection.ts +2 -2
- package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +9 -11
- package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +4 -4
- package/src/classes/features/callbackLogic/ItemPickupDetection.ts +4 -4
- package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +2 -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 +46 -39
- package/src/classes/features/other/DeployJSONRoom.ts +6 -4
- package/src/classes/features/other/DisableInputs.ts +3 -3
- 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 +5 -5
- package/src/classes/features/other/NoSirenSteal.ts +4 -4
- package/src/classes/features/other/PickupIndexCreation.ts +7 -8
- package/src/classes/features/other/PonyDetection.ts +2 -2
- package/src/classes/features/other/PressInput.ts +2 -2
- package/src/classes/features/other/PreventChildEntities.ts +4 -4
- package/src/classes/features/other/RoomHistory.ts +5 -5
- package/src/classes/features/other/RunInNFrames.ts +2 -2
- package/src/classes/features/other/SaveDataManager.ts +3 -3
- package/src/classes/features/other/StageHistory.ts +2 -2
- package/src/classes/features/other/StartAmbush.ts +2 -2
- package/src/classes/features/other/TaintedLazarusPlayers.ts +2 -2
- package/src/classes/features/other/customStages/backdrop.ts +1 -1
- package/src/classes/features/other/customStages/gridEntities.ts +4 -4
- package/src/classes/features/other/customStages/streakText.ts +4 -4
- package/src/classes/features/other/extraConsoleCommands/commands.ts +15 -15
- package/src/classes/features/other/saveDataManager/glowingHourGlass.ts +4 -2
- 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 +18 -0
- package/src/functions/array.ts +33 -29
- package/src/functions/arrayLua.ts +1 -1
- package/src/functions/bosses.ts +4 -3
- package/src/functions/charge.ts +3 -4
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/decorators.ts +6 -9
- package/src/functions/deepCopy.ts +6 -10
- package/src/functions/deepCopyTests.ts +4 -4
- package/src/functions/doors.ts +8 -3
- package/src/functions/easing.ts +2 -2
- package/src/functions/emptyRoom.ts +5 -5
- package/src/functions/entities.ts +11 -12
- package/src/functions/enums.ts +4 -4
- package/src/functions/familiars.ts +2 -2
- package/src/functions/flag.ts +3 -3
- package/src/functions/globals.ts +2 -3
- package/src/functions/gridEntities.ts +30 -24
- package/src/functions/gridEntitiesSpecific.ts +2 -2
- package/src/functions/isaacAPIClass.ts +2 -2
- package/src/functions/jsonHelpers.ts +7 -5
- package/src/functions/level.ts +3 -3
- package/src/functions/levelGrid.ts +9 -12
- package/src/functions/logEntities.ts +11 -8
- package/src/functions/logMisc.ts +9 -20
- package/src/functions/map.ts +4 -4
- package/src/functions/math.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 +14 -10
- package/src/functions/npcDataStructures.ts +5 -5
- package/src/functions/npcs.ts +13 -10
- package/src/functions/pickupVariants.ts +6 -6
- package/src/functions/playerCollectibles.ts +3 -5
- package/src/functions/playerDataStructures.ts +5 -5
- package/src/functions/playerHealth.ts +8 -8
- package/src/functions/playerIndex.ts +3 -3
- package/src/functions/players.ts +4 -4
- package/src/functions/pocketItems.ts +2 -2
- package/src/functions/positionVelocity.ts +4 -12
- package/src/functions/revive.ts +15 -15
- package/src/functions/rng.ts +4 -3
- package/src/functions/roomData.ts +1 -3
- package/src/functions/roomGrid.ts +2 -2
- package/src/functions/rooms.ts +55 -42
- package/src/functions/set.ts +8 -8
- package/src/functions/sort.ts +4 -4
- package/src/functions/sound.ts +2 -7
- package/src/functions/spawnCollectible.ts +4 -6
- package/src/functions/stage.ts +20 -30
- package/src/functions/string.ts +6 -6
- package/src/functions/tears.ts +2 -2
- package/src/functions/trinketGive.ts +4 -4
- package/src/functions/trinkets.ts +1 -3
- package/src/functions/tstlClass.ts +2 -2
- package/src/functions/types.ts +19 -19
- package/src/index.ts +58 -58
- package/src/interfaces/SaveData.ts +2 -1
- package/src/interfaces/private/AddCallbackParametersCustom.ts +7 -0
- package/src/lib/jsonLua.js +34 -34
- package/src/objects/LRoomShapeToRectangles.ts +1 -1
- package/src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts +1 -1
- package/src/shouldFire.ts +55 -57
- package/src/types/AddSubtract.ts +10 -2
- package/src/types/HasFunction.ts +1 -1
- package/src/types/Immutable.ts +1 -1
- package/src/types/Increment.ts +2 -2
- package/src/types/PickingUpItem.ts +10 -3
- package/src/types/TupleWithLengthBetween.ts +2 -2
- package/src/types/TupleWithMaxLength.ts +2 -2
package/src/functions/rooms.ts
CHANGED
|
@@ -106,8 +106,8 @@ export function getReadOnlyRooms(): ReadonlyArray<Readonly<RoomDescriptor>> {
|
|
|
106
106
|
for (let i = 0; i < roomList.Size; i++) {
|
|
107
107
|
const readOnlyRoomDescriptor = roomList.Get(i);
|
|
108
108
|
if (
|
|
109
|
-
readOnlyRoomDescriptor !== undefined
|
|
110
|
-
readOnlyRoomDescriptor.Data !== undefined
|
|
109
|
+
readOnlyRoomDescriptor !== undefined
|
|
110
|
+
&& readOnlyRoomDescriptor.Data !== undefined
|
|
111
111
|
) {
|
|
112
112
|
readOnlyRoomDescriptors.push(readOnlyRoomDescriptor);
|
|
113
113
|
}
|
|
@@ -216,8 +216,7 @@ export function getRooms(
|
|
|
216
216
|
* Room descriptors without any data are assumed to be non-existent and are not included.
|
|
217
217
|
*
|
|
218
218
|
* @param includeExtraDimensionalRooms Optional. On some floors (e.g. Downpour 2, Mines 2),
|
|
219
|
-
* extra-dimensional rooms
|
|
220
|
-
* is false.
|
|
219
|
+
* extra-dimensional rooms will be generated. Default is false.
|
|
221
220
|
*/
|
|
222
221
|
export function getRoomsInsideGrid(
|
|
223
222
|
includeExtraDimensionalRooms = false,
|
|
@@ -559,32 +558,32 @@ export function isAllRoomsClear(
|
|
|
559
558
|
const roomTypeWhitelist = new ReadonlySet(onlyCheckRoomTypes);
|
|
560
559
|
matchingRooms = roomsInsideGrid.filter(
|
|
561
560
|
(roomDescriptor) =>
|
|
562
|
-
roomDescriptor.Data !== undefined
|
|
563
|
-
roomTypeWhitelist.has(roomDescriptor.Data.Type),
|
|
561
|
+
roomDescriptor.Data !== undefined
|
|
562
|
+
&& roomTypeWhitelist.has(roomDescriptor.Data.Type),
|
|
564
563
|
);
|
|
565
564
|
}
|
|
566
565
|
|
|
567
566
|
if (!includeSecretRoom) {
|
|
568
567
|
matchingRooms = matchingRooms.filter(
|
|
569
568
|
(roomDescriptor) =>
|
|
570
|
-
roomDescriptor.Data !== undefined
|
|
571
|
-
roomDescriptor.Data.Type !== RoomType.SECRET,
|
|
569
|
+
roomDescriptor.Data !== undefined
|
|
570
|
+
&& roomDescriptor.Data.Type !== RoomType.SECRET,
|
|
572
571
|
);
|
|
573
572
|
}
|
|
574
573
|
|
|
575
574
|
if (!includeSuperSecretRoom) {
|
|
576
575
|
matchingRooms = matchingRooms.filter(
|
|
577
576
|
(roomDescriptor) =>
|
|
578
|
-
roomDescriptor.Data !== undefined
|
|
579
|
-
roomDescriptor.Data.Type !== RoomType.SUPER_SECRET,
|
|
577
|
+
roomDescriptor.Data !== undefined
|
|
578
|
+
&& roomDescriptor.Data.Type !== RoomType.SUPER_SECRET,
|
|
580
579
|
);
|
|
581
580
|
}
|
|
582
581
|
|
|
583
582
|
if (!includeUltraSecretRoom) {
|
|
584
583
|
matchingRooms = matchingRooms.filter(
|
|
585
584
|
(roomDescriptor) =>
|
|
586
|
-
roomDescriptor.Data !== undefined
|
|
587
|
-
roomDescriptor.Data.Type !== RoomType.ULTRA_SECRET,
|
|
585
|
+
roomDescriptor.Data !== undefined
|
|
586
|
+
&& roomDescriptor.Data.Type !== RoomType.ULTRA_SECRET,
|
|
588
587
|
);
|
|
589
588
|
}
|
|
590
589
|
|
|
@@ -599,8 +598,9 @@ export function isAllRoomsClear(
|
|
|
599
598
|
*/
|
|
600
599
|
export function isAngelShop(roomData: RoomConfig): boolean {
|
|
601
600
|
return (
|
|
602
|
-
roomData.Type === RoomType.ANGEL
|
|
603
|
-
|
|
601
|
+
roomData.Type === RoomType.ANGEL
|
|
602
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
603
|
+
&& roomData.Subtype === AngelRoomSubType.SHOP
|
|
604
604
|
);
|
|
605
605
|
}
|
|
606
606
|
|
|
@@ -614,8 +614,9 @@ export function isAngelShop(roomData: RoomConfig): boolean {
|
|
|
614
614
|
*/
|
|
615
615
|
export function isBeastRoom(roomData: RoomConfig): boolean {
|
|
616
616
|
return (
|
|
617
|
-
roomData.Type === RoomType.DUNGEON
|
|
618
|
-
|
|
617
|
+
roomData.Type === RoomType.DUNGEON
|
|
618
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
619
|
+
&& roomData.Subtype === DungeonSubType.BEAST_ROOM
|
|
619
620
|
);
|
|
620
621
|
}
|
|
621
622
|
|
|
@@ -633,9 +634,10 @@ export function isBigRoom(roomData: RoomConfig): boolean {
|
|
|
633
634
|
*/
|
|
634
635
|
export function isBossRoomOf(roomData: RoomConfig, bossID: BossID): boolean {
|
|
635
636
|
return (
|
|
636
|
-
roomData.Type === RoomType.BOSS
|
|
637
|
-
roomData.StageID === StageID.SPECIAL_ROOMS
|
|
638
|
-
|
|
637
|
+
roomData.Type === RoomType.BOSS
|
|
638
|
+
&& roomData.StageID === StageID.SPECIAL_ROOMS
|
|
639
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
640
|
+
&& roomData.Subtype === bossID
|
|
639
641
|
);
|
|
640
642
|
}
|
|
641
643
|
|
|
@@ -646,8 +648,9 @@ export function isBossRoomOf(roomData: RoomConfig, bossID: BossID): boolean {
|
|
|
646
648
|
*/
|
|
647
649
|
export function isCrawlSpace(roomData: RoomConfig): boolean {
|
|
648
650
|
return (
|
|
649
|
-
roomData.Type === RoomType.DUNGEON
|
|
650
|
-
|
|
651
|
+
roomData.Type === RoomType.DUNGEON
|
|
652
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
653
|
+
&& roomData.Subtype === DungeonSubType.NORMAL
|
|
651
654
|
);
|
|
652
655
|
}
|
|
653
656
|
|
|
@@ -668,9 +671,11 @@ export function isCrawlSpaceWithBlackMarketEntrance(
|
|
|
668
671
|
*/
|
|
669
672
|
export function isDeathCertificateArea(roomData: RoomConfig): boolean {
|
|
670
673
|
return (
|
|
671
|
-
roomData.StageID === StageID.HOME
|
|
672
|
-
|
|
673
|
-
|
|
674
|
+
roomData.StageID === StageID.HOME
|
|
675
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
676
|
+
&& (roomData.Subtype === HomeRoomSubType.DEATH_CERTIFICATE_ENTRANCE
|
|
677
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
678
|
+
|| roomData.Subtype === HomeRoomSubType.DEATH_CERTIFICATE_ITEMS)
|
|
674
679
|
);
|
|
675
680
|
}
|
|
676
681
|
|
|
@@ -701,10 +706,11 @@ export function isDevilsCrownTreasureRoom(
|
|
|
701
706
|
*/
|
|
702
707
|
export function isDogmaRoom(roomData: RoomConfig): boolean {
|
|
703
708
|
return (
|
|
704
|
-
roomData.StageID === StageID.HOME
|
|
705
|
-
roomData.Type === RoomType.DEFAULT
|
|
706
|
-
roomData.Variant === 1000
|
|
707
|
-
|
|
709
|
+
roomData.StageID === StageID.HOME
|
|
710
|
+
&& roomData.Type === RoomType.DEFAULT
|
|
711
|
+
&& roomData.Variant === 1000
|
|
712
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
713
|
+
&& roomData.Subtype === HomeRoomSubType.LIVING_ROOM
|
|
708
714
|
);
|
|
709
715
|
}
|
|
710
716
|
|
|
@@ -729,6 +735,7 @@ export function isDoubleTrouble(roomData: RoomConfig): boolean {
|
|
|
729
735
|
* Helper function to determine if the index of the provided room is equal to `GridRoom.GENESIS`.
|
|
730
736
|
*/
|
|
731
737
|
export function isGenesisRoom(roomGridIndex: int): boolean {
|
|
738
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
732
739
|
return roomGridIndex === GridRoom.GENESIS;
|
|
733
740
|
}
|
|
734
741
|
|
|
@@ -740,9 +747,11 @@ export function isGenesisRoom(roomGridIndex: int): boolean {
|
|
|
740
747
|
*/
|
|
741
748
|
export function isHomeCloset(roomData: RoomConfig): boolean {
|
|
742
749
|
return (
|
|
743
|
-
roomData.StageID === StageID.HOME
|
|
744
|
-
|
|
745
|
-
|
|
750
|
+
roomData.StageID === StageID.HOME
|
|
751
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
752
|
+
&& (roomData.Subtype === HomeRoomSubType.CLOSET_LEFT
|
|
753
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
754
|
+
|| roomData.Subtype === HomeRoomSubType.CLOSET_RIGHT)
|
|
746
755
|
);
|
|
747
756
|
}
|
|
748
757
|
|
|
@@ -755,6 +764,7 @@ export function isLRoom(roomData: RoomConfig): boolean {
|
|
|
755
764
|
* Helper function to determine if the index of the provided room is equal to `GridRoom.MEGA_SATAN`.
|
|
756
765
|
*/
|
|
757
766
|
export function isMegaSatanRoom(roomGridIndex: int): boolean {
|
|
767
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
758
768
|
return roomGridIndex === GridRoom.MEGA_SATAN;
|
|
759
769
|
}
|
|
760
770
|
|
|
@@ -764,10 +774,9 @@ export function isMegaSatanRoom(roomGridIndex: int): boolean {
|
|
|
764
774
|
*/
|
|
765
775
|
export function isMineShaft(roomData: RoomConfig): boolean {
|
|
766
776
|
return (
|
|
767
|
-
(roomData.StageID === StageID.MINES ||
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
MINE_SHAFT_ROOM_SUB_TYPE_SET.has(roomData.Subtype)
|
|
777
|
+
(roomData.StageID === StageID.MINES || roomData.StageID === StageID.ASHPIT)
|
|
778
|
+
// eslint-disable-next-line complete/strict-enums
|
|
779
|
+
&& MINE_SHAFT_ROOM_SUB_TYPE_SET.has(roomData.Subtype)
|
|
771
780
|
);
|
|
772
781
|
}
|
|
773
782
|
|
|
@@ -780,9 +789,10 @@ export function isMinibossRoomOf(
|
|
|
780
789
|
minibossID: MinibossID,
|
|
781
790
|
): boolean {
|
|
782
791
|
return (
|
|
783
|
-
roomData.Type === RoomType.MINI_BOSS
|
|
784
|
-
roomData.StageID === StageID.SPECIAL_ROOMS
|
|
785
|
-
|
|
792
|
+
roomData.Type === RoomType.MINI_BOSS
|
|
793
|
+
&& roomData.StageID === StageID.SPECIAL_ROOMS
|
|
794
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
795
|
+
&& roomData.Subtype === minibossID
|
|
786
796
|
);
|
|
787
797
|
}
|
|
788
798
|
|
|
@@ -792,10 +802,11 @@ export function isMinibossRoomOf(
|
|
|
792
802
|
*/
|
|
793
803
|
export function isMirrorRoom(roomData: RoomConfig): boolean {
|
|
794
804
|
return (
|
|
795
|
-
roomData.Type === RoomType.DEFAULT
|
|
796
|
-
(roomData.StageID === StageID.DOWNPOUR
|
|
797
|
-
roomData.StageID === StageID.DROSS)
|
|
798
|
-
|
|
805
|
+
roomData.Type === RoomType.DEFAULT
|
|
806
|
+
&& (roomData.StageID === StageID.DOWNPOUR
|
|
807
|
+
|| roomData.StageID === StageID.DROSS)
|
|
808
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
809
|
+
&& roomData.Subtype === DownpourRoomSubType.MIRROR
|
|
799
810
|
);
|
|
800
811
|
}
|
|
801
812
|
|
|
@@ -828,6 +839,7 @@ export function isRoomType(
|
|
|
828
839
|
* floor.
|
|
829
840
|
*/
|
|
830
841
|
export function isSecretExit(roomGridIndex: int): boolean {
|
|
842
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
831
843
|
return roomGridIndex === GridRoom.SECRET_EXIT;
|
|
832
844
|
}
|
|
833
845
|
|
|
@@ -848,6 +860,7 @@ export function isSecretRoomType(roomType: RoomType): boolean {
|
|
|
848
860
|
* the only way to detect them is by using the grid index.
|
|
849
861
|
*/
|
|
850
862
|
export function isSecretShop(roomGridIndex: int): boolean {
|
|
863
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
851
864
|
return roomGridIndex === GridRoom.SECRET_SHOP;
|
|
852
865
|
}
|
|
853
866
|
|
package/src/functions/set.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { isPrimitive } from "./types";
|
|
|
10
10
|
* This function is variadic, meaning that you can specify N sets to add to the first set.
|
|
11
11
|
*/
|
|
12
12
|
export function addSetsToSet<T>(
|
|
13
|
-
// eslint-disable-next-line
|
|
13
|
+
// eslint-disable-next-line complete/prefer-readonly-parameter-types
|
|
14
14
|
mainSet: Set<T>,
|
|
15
15
|
...setsToAdd: ReadonlyArray<ReadonlySet<T>>
|
|
16
16
|
): void {
|
|
@@ -26,7 +26,7 @@ export function addSetsToSet<T>(
|
|
|
26
26
|
*
|
|
27
27
|
* This function is variadic, meaning that you can specify N sets.
|
|
28
28
|
*/
|
|
29
|
-
// eslint-disable-next-line
|
|
29
|
+
// eslint-disable-next-line complete/no-mutable-return
|
|
30
30
|
export function combineSets<T>(...sets: ReadonlyArray<ReadonlySet<T>>): Set<T> {
|
|
31
31
|
const newSet = new Set<T>();
|
|
32
32
|
for (const set of sets) {
|
|
@@ -39,7 +39,7 @@ export function combineSets<T>(...sets: ReadonlyArray<ReadonlySet<T>>): Set<T> {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/** Helper function to copy a set. (You can also use a Set constructor to accomplish this task.) */
|
|
42
|
-
// eslint-disable-next-line
|
|
42
|
+
// eslint-disable-next-line complete/no-mutable-return
|
|
43
43
|
export function copySet<T>(oldSet: ReadonlySet<T>): Set<T> {
|
|
44
44
|
const newSet = new Set<T>();
|
|
45
45
|
for (const value of oldSet) {
|
|
@@ -56,7 +56,7 @@ export function copySet<T>(oldSet: ReadonlySet<T>): Set<T> {
|
|
|
56
56
|
* This function is variadic, meaning that you can specify N sets to remove from the first set.
|
|
57
57
|
*/
|
|
58
58
|
export function deleteSetsFromSet<T>(
|
|
59
|
-
// eslint-disable-next-line
|
|
59
|
+
// eslint-disable-next-line complete/prefer-readonly-parameter-types
|
|
60
60
|
mainSet: Set<T>,
|
|
61
61
|
...setsToRemove: ReadonlyArray<ReadonlySet<T>>
|
|
62
62
|
): void {
|
|
@@ -123,7 +123,7 @@ export function getSetCombinations<T extends number | string>(
|
|
|
123
123
|
* Normally, set values are returned in insertion order, so use this function when the ordering of
|
|
124
124
|
* the contents is important.
|
|
125
125
|
*/
|
|
126
|
-
// eslint-disable-next-line
|
|
126
|
+
// eslint-disable-next-line complete/no-mutable-return
|
|
127
127
|
export function getSortedSetValues<T extends number | string>(
|
|
128
128
|
set: ReadonlySet<T>,
|
|
129
129
|
): T[] {
|
|
@@ -167,7 +167,7 @@ export function objectKeysToReadonlySet<K extends string | number | symbol, V>(
|
|
|
167
167
|
*
|
|
168
168
|
* Also see the `objectKeysToReadonlySet` function.
|
|
169
169
|
*/
|
|
170
|
-
// eslint-disable-next-line
|
|
170
|
+
// eslint-disable-next-line complete/no-mutable-return
|
|
171
171
|
export function objectKeysToSet<K extends string | number | symbol, V>(
|
|
172
172
|
object: Record<K, V>,
|
|
173
173
|
): Set<K> {
|
|
@@ -203,7 +203,7 @@ export function objectValuesToReadonlySet<
|
|
|
203
203
|
*
|
|
204
204
|
* Also see the `objectValuesToReadonlySet` function.
|
|
205
205
|
*/
|
|
206
|
-
// eslint-disable-next-line
|
|
206
|
+
// eslint-disable-next-line complete/no-mutable-return
|
|
207
207
|
export function objectValuesToSet<K extends string | number | symbol, V>(
|
|
208
208
|
object: Record<K, V>,
|
|
209
209
|
): Set<V> {
|
|
@@ -222,7 +222,7 @@ export function objectValuesToSet<K extends string | number | symbol, V>(
|
|
|
222
222
|
*
|
|
223
223
|
* This function is variadic, meaning that you can pass as many things as you want to add.
|
|
224
224
|
*/
|
|
225
|
-
// eslint-disable-next-line
|
|
225
|
+
// eslint-disable-next-line complete/prefer-readonly-parameter-types
|
|
226
226
|
export function setAdd<T>(set: Set<T>, ...elements: readonly T[]): void {
|
|
227
227
|
for (const element of elements) {
|
|
228
228
|
set.add(element);
|
package/src/functions/sort.ts
CHANGED
|
@@ -149,9 +149,9 @@ export function sortTwoDimensionalArray<T>(
|
|
|
149
149
|
*
|
|
150
150
|
* Under the hood, this uses the merge sort algorithm.
|
|
151
151
|
*/
|
|
152
|
-
// eslint-disable-next-line
|
|
152
|
+
// eslint-disable-next-line complete/no-mutable-return
|
|
153
153
|
export function stableSort<T>(
|
|
154
|
-
// eslint-disable-next-line
|
|
154
|
+
// eslint-disable-next-line complete/prefer-readonly-parameter-types
|
|
155
155
|
array: T[],
|
|
156
156
|
sortFunc: (a: T, b: T) => -1 | 0 | 1 = sortNormal,
|
|
157
157
|
): T[] {
|
|
@@ -174,8 +174,8 @@ export function stableSort<T>(
|
|
|
174
174
|
let leftIndex = 0;
|
|
175
175
|
let rightIndex = 0;
|
|
176
176
|
while (
|
|
177
|
-
leftIndex < sortedLeftArray.length
|
|
178
|
-
rightIndex < sortedRightArray.length
|
|
177
|
+
leftIndex < sortedLeftArray.length
|
|
178
|
+
&& rightIndex < sortedRightArray.length
|
|
179
179
|
) {
|
|
180
180
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
181
181
|
const left = sortedLeftArray[leftIndex]!;
|
package/src/functions/sound.ts
CHANGED
|
@@ -24,13 +24,8 @@ export function getMusicForStage(
|
|
|
24
24
|
): Music {
|
|
25
25
|
const level = game.GetLevel();
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (stageType === undefined) {
|
|
32
|
-
stageType = level.GetStageType();
|
|
33
|
-
}
|
|
27
|
+
stage ??= level.GetStage();
|
|
28
|
+
stageType ??= level.GetStageType();
|
|
34
29
|
|
|
35
30
|
const stageTypeToMusic = STAGE_TO_MUSIC[stage];
|
|
36
31
|
return stageTypeToMusic[stageType];
|
|
@@ -44,9 +44,7 @@ export function spawnCollectible(
|
|
|
44
44
|
forceFreeItem = false,
|
|
45
45
|
spawner?: Entity,
|
|
46
46
|
): EntityPickupCollectible {
|
|
47
|
-
|
|
48
|
-
seedOrRNG = getRandomSeed();
|
|
49
|
-
}
|
|
47
|
+
seedOrRNG ??= getRandomSeed();
|
|
50
48
|
|
|
51
49
|
const seed = isRNG(seedOrRNG) ? seedOrRNG.Next() : seedOrRNG;
|
|
52
50
|
const collectible = spawnPickupWithSeed(
|
|
@@ -67,9 +65,9 @@ export function spawnCollectible(
|
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
if (
|
|
70
|
-
anyPlayerIs(PlayerType.KEEPER_B)
|
|
71
|
-
!isQuestCollectible(collectibleType)
|
|
72
|
-
!forceFreeItem
|
|
68
|
+
anyPlayerIs(PlayerType.KEEPER_B)
|
|
69
|
+
&& !isQuestCollectible(collectibleType)
|
|
70
|
+
&& !forceFreeItem
|
|
73
71
|
) {
|
|
74
72
|
// When playing Tainted Keeper, collectibles are supposed to have a price, and manually spawned
|
|
75
73
|
// items will not have a price, so we have to set it manually.
|
package/src/functions/stage.ts
CHANGED
|
@@ -133,13 +133,8 @@ export function getLevelName(
|
|
|
133
133
|
): string {
|
|
134
134
|
const level = game.GetLevel();
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (stageType === undefined) {
|
|
141
|
-
stageType = level.GetStageType();
|
|
142
|
-
}
|
|
136
|
+
stage ??= level.GetStage();
|
|
137
|
+
stageType ??= level.GetStageType();
|
|
143
138
|
|
|
144
139
|
const stageID = getStageID(stage, stageType);
|
|
145
140
|
const stageIDName = getStageIDName(stageID);
|
|
@@ -195,13 +190,8 @@ export function getStage(): LevelStage {
|
|
|
195
190
|
export function getStageID(stage?: LevelStage, stageType?: StageType): StageID {
|
|
196
191
|
const level = game.GetLevel();
|
|
197
192
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
if (stageType === undefined) {
|
|
203
|
-
stageType = level.GetStageType();
|
|
204
|
-
}
|
|
193
|
+
stage ??= level.GetStage();
|
|
194
|
+
stageType ??= level.GetStageType();
|
|
205
195
|
|
|
206
196
|
if (game.IsGreedMode()) {
|
|
207
197
|
const stageTypeToStageID = STAGE_TO_STAGE_ID_GREED_MODE.get(stage);
|
|
@@ -255,10 +245,10 @@ export function getStageTypeSuffix(stageType: StageType): string {
|
|
|
255
245
|
*/
|
|
256
246
|
export function isFinalFloor(stage: LevelStage, stageType: StageType): boolean {
|
|
257
247
|
return (
|
|
258
|
-
stage === LevelStage.DARK_ROOM_CHEST
|
|
259
|
-
stage === LevelStage.VOID
|
|
260
|
-
stage === LevelStage.HOME
|
|
261
|
-
(stage === LevelStage.WOMB_2 && isRepentanceStage(stageType)) // Corpse 2
|
|
248
|
+
stage === LevelStage.DARK_ROOM_CHEST
|
|
249
|
+
|| stage === LevelStage.VOID
|
|
250
|
+
|| stage === LevelStage.HOME
|
|
251
|
+
|| (stage === LevelStage.WOMB_2 && isRepentanceStage(stageType)) // Corpse 2
|
|
262
252
|
);
|
|
263
253
|
}
|
|
264
254
|
|
|
@@ -284,8 +274,8 @@ export function isStageWithNaturalDevilRoom(
|
|
|
284
274
|
effectiveStage: LevelStage,
|
|
285
275
|
): boolean {
|
|
286
276
|
return (
|
|
287
|
-
inRange(effectiveStage, LevelStage.BASEMENT_2, LevelStage.WOMB_2)
|
|
288
|
-
effectiveStage !== LevelStage.BLUE_WOMB
|
|
277
|
+
inRange(effectiveStage, LevelStage.BASEMENT_2, LevelStage.WOMB_2)
|
|
278
|
+
&& effectiveStage !== LevelStage.BLUE_WOMB
|
|
289
279
|
);
|
|
290
280
|
}
|
|
291
281
|
|
|
@@ -323,8 +313,8 @@ export function isStageWithSecretExitToMausoleum(
|
|
|
323
313
|
const repentanceStage = isRepentanceStage(stageType);
|
|
324
314
|
|
|
325
315
|
return (
|
|
326
|
-
(stage === LevelStage.DEPTHS_1 && !repentanceStage)
|
|
327
|
-
(stage === LevelStage.CAVES_2 && repentanceStage)
|
|
316
|
+
(stage === LevelStage.DEPTHS_1 && !repentanceStage)
|
|
317
|
+
|| (stage === LevelStage.CAVES_2 && repentanceStage)
|
|
328
318
|
);
|
|
329
319
|
}
|
|
330
320
|
|
|
@@ -339,8 +329,8 @@ export function isStageWithSecretExitToMines(
|
|
|
339
329
|
const repentanceStage = isRepentanceStage(stageType);
|
|
340
330
|
|
|
341
331
|
return (
|
|
342
|
-
(stage === LevelStage.CAVES_1 && !repentanceStage)
|
|
343
|
-
(stage === LevelStage.BASEMENT_2 && repentanceStage)
|
|
332
|
+
(stage === LevelStage.CAVES_1 && !repentanceStage)
|
|
333
|
+
|| (stage === LevelStage.BASEMENT_2 && repentanceStage)
|
|
344
334
|
);
|
|
345
335
|
}
|
|
346
336
|
|
|
@@ -355,8 +345,8 @@ export function isStageWithShovelTrapdoors(
|
|
|
355
345
|
const repentanceStage = isRepentanceStage(stageType);
|
|
356
346
|
|
|
357
347
|
return (
|
|
358
|
-
stage < LevelStage.WOMB_2
|
|
359
|
-
(stage === LevelStage.WOMB_2 && !repentanceStage)
|
|
348
|
+
stage < LevelStage.WOMB_2
|
|
349
|
+
|| (stage === LevelStage.WOMB_2 && !repentanceStage)
|
|
360
350
|
);
|
|
361
351
|
}
|
|
362
352
|
|
|
@@ -384,8 +374,8 @@ export function onCathedral(): boolean {
|
|
|
384
374
|
const stageType = level.GetStageType();
|
|
385
375
|
|
|
386
376
|
return (
|
|
387
|
-
stage === LevelStage.SHEOL_CATHEDRAL
|
|
388
|
-
stageType === StageType.WRATH_OF_THE_LAMB
|
|
377
|
+
stage === LevelStage.SHEOL_CATHEDRAL
|
|
378
|
+
&& stageType === StageType.WRATH_OF_THE_LAMB
|
|
389
379
|
);
|
|
390
380
|
}
|
|
391
381
|
|
|
@@ -395,8 +385,8 @@ export function onChest(): boolean {
|
|
|
395
385
|
const stageType = level.GetStageType();
|
|
396
386
|
|
|
397
387
|
return (
|
|
398
|
-
stage === LevelStage.DARK_ROOM_CHEST
|
|
399
|
-
stageType === StageType.WRATH_OF_THE_LAMB
|
|
388
|
+
stage === LevelStage.DARK_ROOM_CHEST
|
|
389
|
+
&& stageType === StageType.WRATH_OF_THE_LAMB
|
|
400
390
|
);
|
|
401
391
|
}
|
|
402
392
|
|
package/src/functions/string.ts
CHANGED
|
@@ -153,9 +153,9 @@ export function parseSemanticVersion(versionString: string):
|
|
|
153
153
|
string.match(versionString, "(%d+).(%d+).(%d+)");
|
|
154
154
|
|
|
155
155
|
if (
|
|
156
|
-
majorVersionString === undefined
|
|
157
|
-
minorVersionString === undefined
|
|
158
|
-
patchVersionString === undefined
|
|
156
|
+
majorVersionString === undefined
|
|
157
|
+
|| minorVersionString === undefined
|
|
158
|
+
|| patchVersionString === undefined
|
|
159
159
|
) {
|
|
160
160
|
return undefined;
|
|
161
161
|
}
|
|
@@ -165,9 +165,9 @@ export function parseSemanticVersion(versionString: string):
|
|
|
165
165
|
const patchVersion = parseIntSafe(patchVersionString);
|
|
166
166
|
|
|
167
167
|
if (
|
|
168
|
-
majorVersion === undefined
|
|
169
|
-
minorVersion === undefined
|
|
170
|
-
patchVersion === undefined
|
|
168
|
+
majorVersion === undefined
|
|
169
|
+
|| minorVersion === undefined
|
|
170
|
+
|| patchVersion === undefined
|
|
171
171
|
) {
|
|
172
172
|
return undefined;
|
|
173
173
|
}
|
package/src/functions/tears.ts
CHANGED
|
@@ -103,8 +103,8 @@ export function isTearFromFamiliar(
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
return (
|
|
106
|
-
(familiarVariant === undefined || familiarVariant === familiar.Variant)
|
|
107
|
-
(subType === undefined || subType === familiar.SubType)
|
|
106
|
+
(familiarVariant === undefined || familiarVariant === familiar.Variant)
|
|
107
|
+
&& (subType === undefined || subType === familiar.SubType)
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -124,14 +124,14 @@ export function temporarilyRemoveTrinket(
|
|
|
124
124
|
|
|
125
125
|
let numSmeltedTrinkets = numTrinkets;
|
|
126
126
|
const trinketWasInSlot1 =
|
|
127
|
-
trinketType1 === trinketType
|
|
128
|
-
trinketType1 === getGoldenTrinketType(trinketType);
|
|
127
|
+
trinketType1 === trinketType
|
|
128
|
+
|| trinketType1 === getGoldenTrinketType(trinketType);
|
|
129
129
|
if (trinketWasInSlot1) {
|
|
130
130
|
numSmeltedTrinkets--;
|
|
131
131
|
}
|
|
132
132
|
const trinketWasInSlot2 =
|
|
133
|
-
trinketType2 === trinketType
|
|
134
|
-
trinketType2 === getGoldenTrinketType(trinketType);
|
|
133
|
+
trinketType2 === trinketType
|
|
134
|
+
|| trinketType2 === getGoldenTrinketType(trinketType);
|
|
135
135
|
if (trinketWasInSlot2) {
|
|
136
136
|
numSmeltedTrinkets--;
|
|
137
137
|
}
|
|
@@ -69,9 +69,7 @@ export function getMysteriousPaperEffectForFrame(
|
|
|
69
69
|
player: EntityPlayer,
|
|
70
70
|
frameCount?: int,
|
|
71
71
|
): MysteriousPaperEffect | undefined {
|
|
72
|
-
|
|
73
|
-
frameCount = player.FrameCount;
|
|
74
|
-
}
|
|
72
|
+
frameCount ??= player.FrameCount;
|
|
75
73
|
|
|
76
74
|
if (!player.HasTrinket(TrinketType.MYSTERIOUS_PAPER)) {
|
|
77
75
|
return undefined;
|
|
@@ -45,10 +45,10 @@ export function getTSTLClassName(object: unknown): string | undefined {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Helper function to determine if a given object is a
|
|
48
|
+
* Helper function to determine if a given object is a `DefaultMap` from `isaacscript-common`.
|
|
49
49
|
*
|
|
50
50
|
* It is not reliable to use the `instanceof` operator to determine this because each Lua module has
|
|
51
|
-
* their own copies of the entire lualib and thus their own instantiated version of a `
|
|
51
|
+
* their own copies of the entire lualib and thus their own instantiated version of a `DefaultMap`.
|
|
52
52
|
*/
|
|
53
53
|
export function isDefaultMap(
|
|
54
54
|
object: unknown,
|