isaacscript-common 84.0.1 → 84.1.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/dist/arrays/cachedEnumValues.js +33 -0
- package/dist/callbackClasses.js +289 -0
- package/dist/callbacks.js +181 -0
- package/dist/classes/DefaultMap.js +171 -0
- package/dist/classes/ModFeature.js +244 -0
- package/dist/classes/ModUpgraded.js +324 -0
- package/dist/classes/callbacks/EntityTakeDmgFilter.js +19 -0
- package/dist/classes/callbacks/EntityTakeDmgPlayer.js +29 -0
- package/dist/classes/callbacks/InputActionFilter.js +24 -0
- package/dist/classes/callbacks/InputActionPlayer.js +37 -0
- package/dist/classes/callbacks/PostAmbushFinished.js +40 -0
- package/dist/classes/callbacks/PostAmbushStarted.js +40 -0
- package/dist/classes/callbacks/PostBombExploded.js +24 -0
- package/dist/classes/callbacks/PostBombInitFilter.js +21 -0
- package/dist/classes/callbacks/PostBombInitLate.js +31 -0
- package/dist/classes/callbacks/PostBombRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostBombUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostBoneSwing.js +53 -0
- package/dist/classes/callbacks/PostCollectibleEmpty.js +50 -0
- package/dist/classes/callbacks/PostCursedTeleport.js +119 -0
- package/dist/classes/callbacks/PostCustomRevive.js +17 -0
- package/dist/classes/callbacks/PostDiceRoomActivated.js +50 -0
- package/dist/classes/callbacks/PostDoorRender.js +24 -0
- package/dist/classes/callbacks/PostDoorUpdate.js +24 -0
- package/dist/classes/callbacks/PostEffectInitFilter.js +21 -0
- package/dist/classes/callbacks/PostEffectInitLate.js +31 -0
- package/dist/classes/callbacks/PostEffectRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostEffectStateChanged.js +34 -0
- package/dist/classes/callbacks/PostEffectUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostEntityKillFilter.js +21 -0
- package/dist/classes/callbacks/PostEsauJr.js +12 -0
- package/dist/classes/callbacks/PostFamiliarInitFilter.js +21 -0
- package/dist/classes/callbacks/PostFamiliarInitLate.js +31 -0
- package/dist/classes/callbacks/PostFamiliarRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostFamiliarStateChanged.js +34 -0
- package/dist/classes/callbacks/PostFamiliarUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostFirstEsauJr.js +12 -0
- package/dist/classes/callbacks/PostFirstFlip.js +12 -0
- package/dist/classes/callbacks/PostFlip.js +12 -0
- package/dist/classes/callbacks/PostGameEndFilter.js +21 -0
- package/dist/classes/callbacks/PostGameStartedReordered.js +14 -0
- package/dist/classes/callbacks/PostGameStartedReorderedLast.js +14 -0
- package/dist/classes/callbacks/PostGreedModeWave.js +35 -0
- package/dist/classes/callbacks/PostGridEntityBroken.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCollision.js +28 -0
- package/dist/classes/callbacks/PostGridEntityCustomBroken.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomCollision.js +24 -0
- package/dist/classes/callbacks/PostGridEntityCustomInit.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomRemove.js +18 -0
- package/dist/classes/callbacks/PostGridEntityCustomRender.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomStateChanged.js +14 -0
- package/dist/classes/callbacks/PostGridEntityCustomUpdate.js +14 -0
- package/dist/classes/callbacks/PostGridEntityInit.js +14 -0
- package/dist/classes/callbacks/PostGridEntityRemove.js +19 -0
- package/dist/classes/callbacks/PostGridEntityRender.js +14 -0
- package/dist/classes/callbacks/PostGridEntityStateChanged.js +14 -0
- package/dist/classes/callbacks/PostGridEntityUpdate.js +14 -0
- package/dist/classes/callbacks/PostHolyMantleRemoved.js +43 -0
- package/dist/classes/callbacks/PostItemDischarge.js +122 -0
- package/dist/classes/callbacks/PostItemPickup.js +14 -0
- package/dist/classes/callbacks/PostKeyboardChanged.js +46 -0
- package/dist/classes/callbacks/PostKnifeInitFilter.js +21 -0
- package/dist/classes/callbacks/PostKnifeInitLate.js +31 -0
- package/dist/classes/callbacks/PostKnifeRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostKnifeUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostLaserInitFilter.js +21 -0
- package/dist/classes/callbacks/PostLaserInitLate.js +31 -0
- package/dist/classes/callbacks/PostLaserRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostLaserUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCDeathFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCInitFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCInitLate.js +31 -0
- package/dist/classes/callbacks/PostNPCRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostNPCStateChanged.js +34 -0
- package/dist/classes/callbacks/PostNPCUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostNewLevelReordered.js +14 -0
- package/dist/classes/callbacks/PostNewRoomEarly.js +74 -0
- package/dist/classes/callbacks/PostNewRoomReordered.js +14 -0
- package/dist/classes/callbacks/PostPEffectUpdateReordered.js +14 -0
- package/dist/classes/callbacks/PostPickupChanged.js +14 -0
- package/dist/classes/callbacks/PostPickupCollect.js +38 -0
- package/dist/classes/callbacks/PostPickupInitFilter.js +21 -0
- package/dist/classes/callbacks/PostPickupInitFirst.js +33 -0
- package/dist/classes/callbacks/PostPickupInitLate.js +31 -0
- package/dist/classes/callbacks/PostPickupRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostPickupSelectionFilter.js +29 -0
- package/dist/classes/callbacks/PostPickupStateChanged.js +34 -0
- package/dist/classes/callbacks/PostPickupUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostPitRender.js +24 -0
- package/dist/classes/callbacks/PostPitUpdate.js +24 -0
- package/dist/classes/callbacks/PostPlayerChangeHealth.js +47 -0
- package/dist/classes/callbacks/PostPlayerChangeStat.js +79 -0
- package/dist/classes/callbacks/PostPlayerChangeType.js +36 -0
- package/dist/classes/callbacks/PostPlayerCollectibleAdded.js +14 -0
- package/dist/classes/callbacks/PostPlayerCollectibleRemoved.js +14 -0
- package/dist/classes/callbacks/PostPlayerFatalDamage.js +83 -0
- package/dist/classes/callbacks/PostPlayerInitFirst.js +41 -0
- package/dist/classes/callbacks/PostPlayerInitLate.js +33 -0
- package/dist/classes/callbacks/PostPlayerRenderReordered.js +14 -0
- package/dist/classes/callbacks/PostPlayerUpdateReordered.js +14 -0
- package/dist/classes/callbacks/PostPoopRender.js +24 -0
- package/dist/classes/callbacks/PostPoopUpdate.js +24 -0
- package/dist/classes/callbacks/PostPressurePlateRender.js +24 -0
- package/dist/classes/callbacks/PostPressurePlateUpdate.js +24 -0
- package/dist/classes/callbacks/PostProjectileInitFilter.js +21 -0
- package/dist/classes/callbacks/PostProjectileInitLate.js +31 -0
- package/dist/classes/callbacks/PostProjectileKill.js +52 -0
- package/dist/classes/callbacks/PostProjectileRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostProjectileUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostPurchase.js +90 -0
- package/dist/classes/callbacks/PostRockRender.js +24 -0
- package/dist/classes/callbacks/PostRockUpdate.js +24 -0
- package/dist/classes/callbacks/PostRoomClearChanged.js +46 -0
- package/dist/classes/callbacks/PostSacrifice.js +36 -0
- package/dist/classes/callbacks/PostSlotAnimationChanged.js +14 -0
- package/dist/classes/callbacks/PostSlotCollision.js +25 -0
- package/dist/classes/callbacks/PostSlotDestroyed.js +14 -0
- package/dist/classes/callbacks/PostSlotInit.js +14 -0
- package/dist/classes/callbacks/PostSlotRender.js +14 -0
- package/dist/classes/callbacks/PostSlotUpdate.js +14 -0
- package/dist/classes/callbacks/PostSpikesRender.js +24 -0
- package/dist/classes/callbacks/PostSpikesUpdate.js +24 -0
- package/dist/classes/callbacks/PostTNTRender.js +24 -0
- package/dist/classes/callbacks/PostTNTUpdate.js +24 -0
- package/dist/classes/callbacks/PostTearInitFilter.js +21 -0
- package/dist/classes/callbacks/PostTearInitLate.js +31 -0
- package/dist/classes/callbacks/PostTearInitVeryLate.js +35 -0
- package/dist/classes/callbacks/PostTearKill.js +52 -0
- package/dist/classes/callbacks/PostTearRenderFilter.js +21 -0
- package/dist/classes/callbacks/PostTearUpdateFilter.js +21 -0
- package/dist/classes/callbacks/PostTransformation.js +47 -0
- package/dist/classes/callbacks/PostTrinketBreak.js +70 -0
- package/dist/classes/callbacks/PostUsePillFilter.js +76 -0
- package/dist/classes/callbacks/PreBerserkDeath.js +41 -0
- package/dist/classes/callbacks/PreBombCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreCustomRevive.js +14 -0
- package/dist/classes/callbacks/PreEntitySpawnFilter.js +24 -0
- package/dist/classes/callbacks/PreFamiliarCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreGetPedestal.js +46 -0
- package/dist/classes/callbacks/PreItemPickup.js +14 -0
- package/dist/classes/callbacks/PreKnifeCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreNPCCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreNPCUpdateFilter.js +19 -0
- package/dist/classes/callbacks/PreNewLevel.js +51 -0
- package/dist/classes/callbacks/PreProjectileCollisionFilter.js +19 -0
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.js +26 -0
- package/dist/classes/callbacks/PreTearCollisionFilter.js +19 -0
- package/dist/classes/features/callbackLogic/CustomGridEntities.js +359 -0
- package/dist/classes/features/callbackLogic/CustomRevive.js +170 -0
- package/dist/classes/features/callbackLogic/EsauJrDetection.js +70 -0
- package/dist/classes/features/callbackLogic/FlipDetection.js +61 -0
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +220 -0
- package/dist/classes/features/callbackLogic/GridEntityCollisionDetection.js +62 -0
- package/dist/classes/features/callbackLogic/GridEntityRenderDetection.js +35 -0
- package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.js +147 -0
- package/dist/classes/features/callbackLogic/ItemPickupDetection.js +68 -0
- package/dist/classes/features/callbackLogic/PickupChangeDetection.js +43 -0
- package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +193 -0
- package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.js +109 -0
- package/dist/classes/features/callbackLogic/SlotDestroyedDetection.js +95 -0
- package/dist/classes/features/callbackLogic/SlotRenderDetection.js +48 -0
- package/dist/classes/features/callbackLogic/SlotUpdateDetection.js +52 -0
- package/dist/classes/features/other/CharacterHealthConversion.js +112 -0
- package/dist/classes/features/other/CharacterStats.js +68 -0
- package/dist/classes/features/other/CollectibleItemPoolType.js +75 -0
- package/dist/classes/features/other/CustomHotkeys.js +144 -0
- package/dist/classes/features/other/CustomItemPools.js +128 -0
- package/dist/classes/features/other/CustomPickups.js +118 -0
- package/dist/classes/features/other/CustomStages.js +471 -0
- package/dist/classes/features/other/CustomTrapdoors.js +596 -0
- package/dist/classes/features/other/DebugDisplay.js +699 -0
- package/dist/classes/features/other/DeployJSONRoom.js +301 -0
- package/dist/classes/features/other/DisableAllSound.js +90 -0
- package/dist/classes/features/other/DisableInputs.js +249 -0
- package/dist/classes/features/other/EdenStartingStatsHealth.js +197 -0
- package/dist/classes/features/other/ExtraConsoleCommands.js +292 -0
- package/dist/classes/features/other/FadeInRemover.js +67 -0
- package/dist/classes/features/other/FastReset.js +88 -0
- package/dist/classes/features/other/FlyingDetection.js +64 -0
- package/dist/classes/features/other/ForgottenSwitch.js +43 -0
- package/dist/classes/features/other/ItemPoolDetection.js +187 -0
- package/dist/classes/features/other/ModdedElementDetection.js +399 -0
- package/dist/classes/features/other/ModdedElementSets.js +1251 -0
- package/dist/classes/features/other/NoSirenSteal.js +88 -0
- package/dist/classes/features/other/Pause.js +197 -0
- package/dist/classes/features/other/PersistentEntities.js +168 -0
- package/dist/classes/features/other/PickupIndexCreation.js +229 -0
- package/dist/classes/features/other/PlayerCollectibleTracking.js +102 -0
- package/dist/classes/features/other/PonyDetection.js +86 -0
- package/dist/classes/features/other/PressInput.js +71 -0
- package/dist/classes/features/other/PreventChildEntities.js +60 -0
- package/dist/classes/features/other/PreventGridEntityRespawn.js +159 -0
- package/dist/classes/features/other/RerunDetection.js +69 -0
- package/dist/classes/features/other/RoomClearFrame.js +94 -0
- package/dist/classes/features/other/RoomHistory.js +196 -0
- package/dist/classes/features/other/RunInNFrames.js +323 -0
- package/dist/classes/features/other/RunNextRoom.js +53 -0
- package/dist/classes/features/other/RunNextRun.js +60 -0
- package/dist/classes/features/other/SaveDataManager.js +383 -0
- package/dist/classes/features/other/SpawnRockAltRewards.js +469 -0
- package/dist/classes/features/other/StageHistory.js +244 -0
- package/dist/classes/features/other/StartAmbush.js +62 -0
- package/dist/classes/features/other/TaintedLazarusPlayers.js +115 -0
- package/dist/classes/features/other/UnlockAchievementsDetection.js +60 -0
- package/dist/classes/features/other/customStages/backdrop.js +195 -0
- package/dist/classes/features/other/customStages/constants.js +19 -0
- package/dist/classes/features/other/customStages/gridEntities.js +177 -0
- package/dist/classes/features/other/customStages/shadows.js +67 -0
- package/dist/classes/features/other/customStages/streakText.js +222 -0
- package/dist/classes/features/other/customStages/utils.js +65 -0
- package/dist/classes/features/other/customStages/v.js +27 -0
- package/dist/classes/features/other/customStages/versusScreen.js +227 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayBomb.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayDoor.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayEffect.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayFamiliar.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayKnife.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayLaser.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayNPC.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPickup.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPit.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPlayer.js +25 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPoop.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayPressurePlate.js +25 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayProjectile.js +23 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayRock.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplaySlot.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplaySpikes.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayTNT.js +22 -0
- package/dist/classes/features/other/debugDisplay/DebugDisplayTear.js +23 -0
- package/dist/classes/features/other/debugDisplay/utils.js +13 -0
- package/dist/classes/features/other/extraConsoleCommands/commands.js +1598 -0
- package/dist/classes/features/other/extraConsoleCommands/subroutines.js +135 -0
- package/dist/classes/features/other/extraConsoleCommands/v.js +30 -0
- package/dist/classes/features/other/saveDataManager/constants.js +4 -0
- package/dist/classes/features/other/saveDataManager/glowingHourGlass.js +106 -0
- package/dist/classes/features/other/saveDataManager/loadFromDisk.js +69 -0
- package/dist/classes/features/other/saveDataManager/restoreDefaults.js +69 -0
- package/dist/classes/features/other/saveDataManager/saveToDisk.js +46 -0
- package/dist/classes/private/CustomCallback.js +59 -0
- package/dist/classes/private/Feature.js +39 -0
- package/dist/core/cachedClasses.js +61 -0
- package/dist/core/constants.js +289 -0
- package/dist/core/constantsFirstLast.js +98 -0
- package/dist/core/constantsVanilla.js +131 -0
- package/dist/core/upgradeMod.js +71 -0
- package/dist/customStageMetadata.json +1 -0
- package/dist/data/itempools.json +16625 -0
- package/dist/decorators.js +21 -0
- package/dist/enums/AmbushType.js +9 -0
- package/dist/enums/CornerType.js +11 -0
- package/dist/enums/HealthType.js +20 -0
- package/dist/enums/ISCFeature.js +65 -0
- package/dist/enums/LadderSubTypeCustom.js +20 -0
- package/dist/enums/ModCallbackCustom.js +2477 -0
- package/dist/enums/MysteriousPaperEffect.js +16 -0
- package/dist/enums/PlayerStat.js +37 -0
- package/dist/enums/PocketItemType.js +13 -0
- package/dist/enums/RockAltType.js +23 -0
- package/dist/enums/SaveDataKey.js +14 -0
- package/dist/enums/SerializationType.js +10 -0
- package/dist/enums/SlotDestructionType.js +22 -0
- package/dist/enums/private/GridEntityTypeCustom.js +10 -0
- package/dist/enums/private/SerializationBrand.js +42 -0
- package/dist/enums/private/StageTravelState.js +13 -0
- package/dist/enums/private/TrapdoorAnimation.js +9 -0
- package/dist/enums/private/UIStreakAnimation.js +10 -0
- package/dist/features.js +150 -0
- package/dist/functions/ambush.js +26 -0
- package/dist/functions/array.js +586 -0
- package/dist/functions/arrayLua.js +81 -0
- package/dist/functions/benchmark.js +36 -0
- package/dist/functions/bitSet128.js +64 -0
- package/dist/functions/bitwise.js +82 -0
- package/dist/functions/bombs.js +14 -0
- package/dist/functions/bosses.js +238 -0
- package/dist/functions/cards.js +164 -0
- package/dist/functions/challenges.js +117 -0
- package/dist/functions/characters.js +182 -0
- package/dist/functions/charge.js +251 -0
- package/dist/functions/chargeBar.js +54 -0
- package/dist/functions/collectibleTag.js +24 -0
- package/dist/functions/collectibles.js +581 -0
- package/dist/functions/color.js +88 -0
- package/dist/functions/console.js +18 -0
- package/dist/functions/curses.js +37 -0
- package/dist/functions/debugFunctions.js +108 -0
- package/dist/functions/decorators.js +113 -0
- package/dist/functions/deepCopy.js +406 -0
- package/dist/functions/deepCopyTests.js +361 -0
- package/dist/functions/dimensions.js +30 -0
- package/dist/functions/direction.js +78 -0
- package/dist/functions/doors.js +524 -0
- package/dist/functions/easing.js +327 -0
- package/dist/functions/effects.js +14 -0
- package/dist/functions/emptyRoom.js +79 -0
- package/dist/functions/entities.js +529 -0
- package/dist/functions/entitiesSpecific.js +582 -0
- package/dist/functions/entityTypes.js +9 -0
- package/dist/functions/enums.js +244 -0
- package/dist/functions/external.js +59 -0
- package/dist/functions/familiars.js +136 -0
- package/dist/functions/flag.js +146 -0
- package/dist/functions/frames.js +166 -0
- package/dist/functions/globals.js +291 -0
- package/dist/functions/gridEntities.js +990 -0
- package/dist/functions/gridEntitiesSpecific.js +456 -0
- package/dist/functions/gridIndex.js +35 -0
- package/dist/functions/hash.js +75 -0
- package/dist/functions/hex.js +57 -0
- package/dist/functions/input.js +185 -0
- package/dist/functions/isaacAPIClass.js +157 -0
- package/dist/functions/itemPool.js +118 -0
- package/dist/functions/jsonHelpers.js +73 -0
- package/dist/functions/jsonRoom.js +184 -0
- package/dist/functions/kColor.js +89 -0
- package/dist/functions/language.js +16 -0
- package/dist/functions/level.js +66 -0
- package/dist/functions/levelGrid.js +497 -0
- package/dist/functions/log.js +86 -0
- package/dist/functions/logEntities.js +308 -0
- package/dist/functions/logMisc.js +510 -0
- package/dist/functions/map.js +121 -0
- package/dist/functions/math.js +149 -0
- package/dist/functions/merge.js +159 -0
- package/dist/functions/mergeTests.js +313 -0
- package/dist/functions/minimap.js +204 -0
- package/dist/functions/modFeatures.js +39 -0
- package/dist/functions/newArray.js +30 -0
- package/dist/functions/nextStage.js +169 -0
- package/dist/functions/npcDataStructures.js +146 -0
- package/dist/functions/npcs.js +132 -0
- package/dist/functions/pickupVariants.js +63 -0
- package/dist/functions/pickups.js +168 -0
- package/dist/functions/pickupsSpecific.js +376 -0
- package/dist/functions/pills.js +200 -0
- package/dist/functions/playerCenter.js +53 -0
- package/dist/functions/playerCollectibles.js +300 -0
- package/dist/functions/playerDataStructures.js +145 -0
- package/dist/functions/playerEffects.js +63 -0
- package/dist/functions/playerHealth.js +604 -0
- package/dist/functions/playerIndex.js +186 -0
- package/dist/functions/playerTrinkets.js +149 -0
- package/dist/functions/players.js +471 -0
- package/dist/functions/pocketItems.js +165 -0
- package/dist/functions/positionVelocity.js +158 -0
- package/dist/functions/pressurePlate.js +26 -0
- package/dist/functions/projectiles.js +57 -0
- package/dist/functions/random.js +90 -0
- package/dist/functions/readOnly.js +33 -0
- package/dist/functions/render.js +36 -0
- package/dist/functions/revive.js +151 -0
- package/dist/functions/rng.js +140 -0
- package/dist/functions/rockAlt.js +50 -0
- package/dist/functions/roomData.js +155 -0
- package/dist/functions/roomGrid.js +97 -0
- package/dist/functions/roomShape.js +143 -0
- package/dist/functions/roomShapeWalls.js +187 -0
- package/dist/functions/roomTransition.js +43 -0
- package/dist/functions/rooms.js +782 -0
- package/dist/functions/run.js +121 -0
- package/dist/functions/seeds.js +22 -0
- package/dist/functions/serialization.js +98 -0
- package/dist/functions/set.js +215 -0
- package/dist/functions/slots.js +41 -0
- package/dist/functions/sort.js +158 -0
- package/dist/functions/sound.js +45 -0
- package/dist/functions/spawnCollectible.js +112 -0
- package/dist/functions/sprites.js +130 -0
- package/dist/functions/stage.js +540 -0
- package/dist/functions/stats.js +104 -0
- package/dist/functions/storyBosses.js +63 -0
- package/dist/functions/string.js +194 -0
- package/dist/functions/table.js +162 -0
- package/dist/functions/tears.js +128 -0
- package/dist/functions/transformations.js +89 -0
- package/dist/functions/trinketGive.js +145 -0
- package/dist/functions/trinkets.js +213 -0
- package/dist/functions/tstlClass.js +97 -0
- package/dist/functions/types.js +225 -0
- package/dist/functions/ui.js +148 -0
- package/dist/functions/utils.d.ts +2 -0
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.js +195 -0
- package/dist/functions/utils.lua +4 -1
- package/dist/functions/vector.js +150 -0
- package/dist/functions/versusScreen.js +58 -0
- package/dist/functions/weighted.js +57 -0
- package/dist/index.js +219 -0
- package/dist/index.rollup.d.ts +2 -0
- package/dist/indexLua.js +220 -0
- package/dist/interfaces/ChargeBarSprites.js +2 -0
- package/dist/interfaces/Corner.js +2 -0
- package/dist/interfaces/CustomStageTSConfig.js +2 -0
- package/dist/interfaces/GridEntityCustomData.js +2 -0
- package/dist/interfaces/JSONRoomsFile.js +2 -0
- package/dist/interfaces/PlayerHealth.js +2 -0
- package/dist/interfaces/PlayerStats.js +4 -0
- package/dist/interfaces/PocketItemDescription.js +2 -0
- package/dist/interfaces/RoomDescription.js +2 -0
- package/dist/interfaces/SaveData.js +98 -0
- package/dist/interfaces/StageHistoryEntry.js +2 -0
- package/dist/interfaces/TSTLClassMetatable.js +2 -0
- package/dist/interfaces/TrinketSituation.js +2 -0
- package/dist/interfaces/private/AddCallbackParametersCustom.js +4 -0
- package/dist/interfaces/private/CustomStage.js +2 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.js +2 -0
- package/dist/interfaces/private/ModUpgradedInterface.js +2 -0
- package/dist/isaacscript-common.lua +5 -2
- package/dist/maps/PHDPillConversionsMap.js +23 -0
- package/dist/maps/cardNameToTypeMap.js +211 -0
- package/dist/maps/characterNameToTypeMap.js +91 -0
- package/dist/maps/collectibleNameToTypeMap.js +19 -0
- package/dist/maps/defaultPlayerStatMap.js +17 -0
- package/dist/maps/entityTypeVariantToBossIDMap.js +11 -0
- package/dist/maps/falsePHDPillConversionsMap.js +37 -0
- package/dist/maps/gridEntityTypeToBrokenStateMap.js +32 -0
- package/dist/maps/gridEntityXMLMap.js +133 -0
- package/dist/maps/itemPoolTypeToItemPoolName.js +38 -0
- package/dist/maps/keyboardToStringMap.js +71 -0
- package/dist/maps/pillNameToEffectMap.js +91 -0
- package/dist/maps/roomNameToTypeMap.js +43 -0
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.js +17 -0
- package/dist/maps/transformationNameToPlayerFormMap.js +35 -0
- package/dist/maps/trinketNameToTypeMap.js +19 -0
- package/dist/objects/LRoomShapeToRectangles.js +43 -0
- package/dist/objects/backdropTypeToRockAltType.js +68 -0
- package/dist/objects/batteryNames.js +13 -0
- package/dist/objects/bombNames.js +17 -0
- package/dist/objects/bossIDToEntityTypeVariant.js +228 -0
- package/dist/objects/bossNamePNGFileNames.js +120 -0
- package/dist/objects/bossNames.js +119 -0
- package/dist/objects/bossPortraitPNGFileNames.js +123 -0
- package/dist/objects/cardDescriptions.js +106 -0
- package/dist/objects/cardNames.js +106 -0
- package/dist/objects/challengeBosses.js +60 -0
- package/dist/objects/challengeCharacters.js +58 -0
- package/dist/objects/challengeCollectibleTypes.js +255 -0
- package/dist/objects/challengeNames.js +54 -0
- package/dist/objects/challengeTrinketType.js +58 -0
- package/dist/objects/characterDamageMultipliers.js +49 -0
- package/dist/objects/characterNames.js +48 -0
- package/dist/objects/characterSpritePNGFileNames.js +50 -0
- package/dist/objects/characterStartingCollectibleTypes.js +105 -0
- package/dist/objects/characterStartingTrinketTypes.js +90 -0
- package/dist/objects/chestNames.js +20 -0
- package/dist/objects/coinNames.js +16 -0
- package/dist/objects/coinSubTypeToValue.js +15 -0
- package/dist/objects/collectibleDescriptions.js +742 -0
- package/dist/objects/collectibleNames.js +745 -0
- package/dist/objects/colors.js +26 -0
- package/dist/objects/directionNames.js +11 -0
- package/dist/objects/directionToDegrees.js +11 -0
- package/dist/objects/directionToMoveAction.js +11 -0
- package/dist/objects/directionToShootAction.js +11 -0
- package/dist/objects/directionToVector.js +13 -0
- package/dist/objects/doorSlotFlagToDoorSlot.js +15 -0
- package/dist/objects/doorSlotToDirection.js +15 -0
- package/dist/objects/doorSlotToDoorSlotFlag.js +15 -0
- package/dist/objects/gridEntityTypeToANM2Name.js +37 -0
- package/dist/objects/heartNames.js +21 -0
- package/dist/objects/isaacAPIClassTypeToBrand.js +12 -0
- package/dist/objects/isaacAPIClassTypeToFunctions.js +46 -0
- package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +57 -0
- package/dist/objects/kColors.js +27 -0
- package/dist/objects/keyNames.js +13 -0
- package/dist/objects/languageNames.js +13 -0
- package/dist/objects/oppositeDoorSlots.js +15 -0
- package/dist/objects/pillEffectClasses.js +57 -0
- package/dist/objects/pillEffectNames.js +57 -0
- package/dist/objects/pillEffectTypeToPillEffects.js +23 -0
- package/dist/objects/pillEffectTypes.js +57 -0
- package/dist/objects/playerNamePNGFileNames.js +57 -0
- package/dist/objects/playerPortraitPNGFileNames.js +54 -0
- package/dist/objects/roomShapeBounds.js +48 -0
- package/dist/objects/roomShapeCorners.js +330 -0
- package/dist/objects/roomShapeLayoutSizes.js +41 -0
- package/dist/objects/roomShapeToBottomRightPosition.js +25 -0
- package/dist/objects/roomShapeToDoorSlotCoordinates.js +111 -0
- package/dist/objects/roomShapeToDoorSlots.js +72 -0
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.js +118 -0
- package/dist/objects/roomShapeToGridWidth.js +20 -0
- package/dist/objects/roomShapeToTopLeftPosition.js +26 -0
- package/dist/objects/roomShapeVolumes.js +32 -0
- package/dist/objects/roomTypeNames.js +35 -0
- package/dist/objects/roomTypeSpecialGotoPrefixes.js +35 -0
- package/dist/objects/sackNames.js +11 -0
- package/dist/objects/slotNames.js +26 -0
- package/dist/objects/stageIDNames.js +43 -0
- package/dist/objects/stageToMusic.js +91 -0
- package/dist/objects/stageToStageID.js +117 -0
- package/dist/objects/stageTypeSuffixes.js +14 -0
- package/dist/objects/transformationNames.js +20 -0
- package/dist/objects/trinketDescriptions.js +199 -0
- package/dist/objects/trinketNames.js +202 -0
- package/dist/objects/versusScreenBackgroundColors.js +46 -0
- package/dist/objects/versusScreenDirtSpotColors.js +46 -0
- package/dist/patchErrorFunctions.js +65 -0
- package/dist/serialization.js +21 -0
- package/dist/sets/LRoomShapesSet.js +11 -0
- package/dist/sets/bigRoomShapesSet.js +14 -0
- package/dist/sets/bossSets.js +465 -0
- package/dist/sets/charactersThatStartWithAnActiveItemSet.js +18 -0
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.js +9 -0
- package/dist/sets/charactersWithFreeDevilDealsSet.js +6 -0
- package/dist/sets/charactersWithNoRedHeartsSet.js +19 -0
- package/dist/sets/charactersWithNoSoulHeartsSet.js +16 -0
- package/dist/sets/consoleCommandsSet.js +64 -0
- package/dist/sets/entitiesWithArmorSet.js +59 -0
- package/dist/sets/familiarsThatShootPlayerTearsSet.js +15 -0
- package/dist/sets/itemConfigCardTypesForCards.js +14 -0
- package/dist/sets/lostStyleCharactersSet.js +16 -0
- package/dist/sets/mineShaftRoomSubTypesSet.js +12 -0
- package/dist/sets/narrowRoomShapesSet.js +11 -0
- package/dist/sets/poopGridEntityXMLTypesSet.js +16 -0
- package/dist/sets/redHeartSubTypesSet.js +10 -0
- package/dist/sets/repentanceBossIDsSet.js +30 -0
- package/dist/sets/sinEntityTypesSet.js +14 -0
- package/dist/sets/singleUseActiveCollectibleTypesSet.js +15 -0
- package/dist/shaderCrashFix.js +24 -0
- package/dist/shouldFire.js +226 -0
- package/dist/types/AddSubtract.js +2 -0
- package/dist/types/AllButFirst.js +2 -0
- package/dist/types/AllButLast.js +2 -0
- package/dist/types/AnyClass.js +2 -0
- package/dist/types/AnyEntity.js +2 -0
- package/dist/types/AnyFunction.js +2 -0
- package/dist/types/AnyGridEntity.js +2 -0
- package/dist/types/CompositionTypeSatisfiesEnum.js +11 -0
- package/dist/types/ConversionHeartSubType.js +2 -0
- package/dist/types/Decrement.js +2 -0
- package/dist/types/ERange.js +2 -0
- package/dist/types/EntityID.js +2 -0
- package/dist/types/FunctionTuple.js +2 -0
- package/dist/types/GridEntityID.js +2 -0
- package/dist/types/HasFunction.js +2 -0
- package/dist/types/IRange.js +2 -0
- package/dist/types/Immutable.js +2 -0
- package/dist/types/Increment.js +2 -0
- package/dist/types/LowercaseKeys.js +2 -0
- package/dist/types/NaturalNumbersLessThan.js +2 -0
- package/dist/types/NaturalNumbersLessThanOrEqualTo.js +2 -0
- package/dist/types/PickingUpItem.js +44 -0
- package/dist/types/PickupIndex.js +2 -0
- package/dist/types/PlayerIndex.js +2 -0
- package/dist/types/PossibleStatType.js +2 -0
- package/dist/types/PublicInterface.js +2 -0
- package/dist/types/ReadonlyMap.js +6 -0
- package/dist/types/ReadonlyRecord.js +2 -0
- package/dist/types/ReadonlySet.js +6 -0
- package/dist/types/StartsWithLowercase.js +2 -0
- package/dist/types/StartsWithUppercase.js +2 -0
- package/dist/types/TSTLClass.js +2 -0
- package/dist/types/Tuple.js +2 -0
- package/dist/types/TupleKeys.js +2 -0
- package/dist/types/TupleToIntersection.js +2 -0
- package/dist/types/TupleToUnion.js +2 -0
- package/dist/types/TupleWithLengthBetween.js +22 -0
- package/dist/types/TupleWithMaxLength.js +27 -0
- package/dist/types/UnionToIntersection.js +2 -0
- package/dist/types/UppercaseKeys.js +2 -0
- package/dist/types/WeightedArray.js +2 -0
- package/dist/types/WidenLiteral.js +2 -0
- package/dist/types/Writable.js +2 -0
- package/dist/types/private/CallbackTuple.js +2 -0
- package/dist/types/private/ModUpgradedWithFeatures.js +2 -0
- package/package.json +1 -1
- package/src/functions/utils.ts +4 -1
- package/src/lib/jsonLua.js +701 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TELEPORTER_ACTIVATION_DISTANCE = exports.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = exports.STARTING_ROOM_GRID_INDEX = exports.RESOLUTION_1600_900 = exports.RESOLUTION_FULL_SCREEN = exports.MINUTE_IN_MILLISECONDS = exports.SECOND_IN_MILLISECONDS = exports.MAX_QUALITY = exports.QUALITIES = exports.ONE_BY_ONE_ROOM_GRID_SIZE = exports.NUM_PILL_COLORS_IN_POOL = exports.DIMENSIONS = exports.NUM_DIMENSIONS = exports.MAX_TAINTED_SAMSON_BERSERK_CHARGE = exports.NEW_RUN_PLAYER_STARTING_POSITION = exports.NEW_FLOOR_STARTING_POSITION_GREED_MODE = exports.NEW_FLOOR_STARTING_POSITION_NORMAL_MODE = exports.MAX_SPEED_STAT = exports.MIN_PLAYER_SPEED_STAT = exports.MIN_PLAYER_SHOT_SPEED_STAT = exports.MAX_PLAYER_TRINKET_SLOTS = exports.MAX_PLAYER_SPEED_IN_UNITS = exports.MAX_PLAYER_HEART_CONTAINERS = exports.MAX_NUM_INPUTS = exports.MAX_NUM_FAMILIARS = exports.MAX_LEVEL_GRID_INDEX = exports.MAPPING_COLLECTIBLES = exports.LEVEL_GRID_ROW_WIDTH = exports.LEVEL_GRID_COLUMN_HEIGHT = exports.GRID_INDEX_CENTER_OF_1X1_ROOM = exports.RENDER_FRAMES_PER_MINUTE = exports.RENDER_FRAMES_PER_SECOND = exports.MAIN_CHARACTERS = exports.GAME_FRAMES_PER_MINUTE = exports.GAME_FRAMES_PER_SECOND = exports.FLYING_CHARACTERS = exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = exports.EMPTY_PNG_PATH = exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = exports.DOOR_HITBOX_RADIUS = exports.DOGMA_ROOM_GRID_INDEX = exports.DISTANCE_OF_GRID_TILE = exports.DEFAULT_ITEM_POOL_TYPE = exports.COLLECTIBLE_INITIAL_WAIT = exports.CHEST_PICKUP_VARIANTS_SET = exports.CHEST_PICKUP_VARIANTS = exports.BOMB_EXPLODE_FRAME = exports.BLIND_ITEM_PNG_PATH = exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = exports.ALL_DISPLAY_FLAGS = void 0;
|
|
4
|
+
exports.KColorDefault = exports.ColorDefault = exports.VectorZero = exports.VectorOne = exports.UI_HEART_WIDTH = exports.TIME_GAME_OPENED = void 0;
|
|
5
|
+
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
6
|
+
const enums_1 = require("../functions/enums");
|
|
7
|
+
const flag_1 = require("../functions/flag");
|
|
8
|
+
const readOnly_1 = require("../functions/readOnly");
|
|
9
|
+
const types_1 = require("../functions/types");
|
|
10
|
+
const utils_1 = require("../functions/utils");
|
|
11
|
+
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
12
|
+
const constantsFirstLast_1 = require("./constantsFirstLast");
|
|
13
|
+
/**
|
|
14
|
+
* The combination of the following flags:
|
|
15
|
+
* - `DisplayFlag.VISIBLE` (1 << 0)
|
|
16
|
+
* - `DisplayFlag.SHADOW` (1 << 1)
|
|
17
|
+
* - `DisplayFlag.SHOW_ICON` (1 << 2)
|
|
18
|
+
*/
|
|
19
|
+
exports.ALL_DISPLAY_FLAGS = (0, flag_1.addFlag)(isaac_typescript_definitions_1.DisplayFlag.VISIBLE, isaac_typescript_definitions_1.DisplayFlag.SHADOW, isaac_typescript_definitions_1.DisplayFlag.SHOW_ICON);
|
|
20
|
+
/**
|
|
21
|
+
* The distance of the laser when Azazel does not have any range up items yet. For more info, see
|
|
22
|
+
* the documentation for the `getAzazelBrimstoneDistance` function.
|
|
23
|
+
*/
|
|
24
|
+
exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
25
|
+
/**
|
|
26
|
+
* The path to the png file for collectible items during Curse of the Blind, making them appear with
|
|
27
|
+
* a red question mark.
|
|
28
|
+
*/
|
|
29
|
+
exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
30
|
+
/** Bombs explode when their frame count is equal to this value. */
|
|
31
|
+
exports.BOMB_EXPLODE_FRAME = 45;
|
|
32
|
+
exports.CHEST_PICKUP_VARIANTS = [
|
|
33
|
+
isaac_typescript_definitions_1.PickupVariant.CHEST,
|
|
34
|
+
isaac_typescript_definitions_1.PickupVariant.BOMB_CHEST,
|
|
35
|
+
isaac_typescript_definitions_1.PickupVariant.SPIKED_CHEST,
|
|
36
|
+
isaac_typescript_definitions_1.PickupVariant.ETERNAL_CHEST,
|
|
37
|
+
isaac_typescript_definitions_1.PickupVariant.MIMIC_CHEST,
|
|
38
|
+
isaac_typescript_definitions_1.PickupVariant.OLD_CHEST,
|
|
39
|
+
isaac_typescript_definitions_1.PickupVariant.WOODEN_CHEST,
|
|
40
|
+
isaac_typescript_definitions_1.PickupVariant.MEGA_CHEST,
|
|
41
|
+
isaac_typescript_definitions_1.PickupVariant.HAUNTED_CHEST,
|
|
42
|
+
isaac_typescript_definitions_1.PickupVariant.LOCKED_CHEST,
|
|
43
|
+
isaac_typescript_definitions_1.PickupVariant.RED_CHEST,
|
|
44
|
+
isaac_typescript_definitions_1.PickupVariant.MOMS_CHEST, // 390
|
|
45
|
+
];
|
|
46
|
+
exports.CHEST_PICKUP_VARIANTS_SET = new ReadonlySet_1.ReadonlySet(exports.CHEST_PICKUP_VARIANTS);
|
|
47
|
+
/** This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned. */
|
|
48
|
+
exports.COLLECTIBLE_INITIAL_WAIT = 20;
|
|
49
|
+
exports.DEFAULT_ITEM_POOL_TYPE = isaac_typescript_definitions_1.ItemPoolType.TREASURE;
|
|
50
|
+
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
51
|
+
exports.DISTANCE_OF_GRID_TILE = 40;
|
|
52
|
+
exports.DOGMA_ROOM_GRID_INDEX = 109;
|
|
53
|
+
exports.DOOR_HITBOX_RADIUS = 11;
|
|
54
|
+
/**
|
|
55
|
+
* When Eggies take fatal damage, they go into NPCState.STATE_SUICIDE and spawn 14 Swarm Spiders
|
|
56
|
+
* while their StateFrame ticks upwards. The 14th spider appears when the StateFrame is at this
|
|
57
|
+
* value.
|
|
58
|
+
*/
|
|
59
|
+
exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
|
|
60
|
+
/**
|
|
61
|
+
* A non-existent or completely transparent PNG file for use in clearing sprites. For more
|
|
62
|
+
* information, see the documentation for the `clearSprite` helper function.
|
|
63
|
+
*/
|
|
64
|
+
exports.EMPTY_PNG_PATH = "gfx/none.png";
|
|
65
|
+
/**
|
|
66
|
+
* The random items that appear when the player has TMTRAINER are generated on the fly as they are
|
|
67
|
+
* encountered by the player. The first TMTRAINER item takes the final possible 32 bit number. The
|
|
68
|
+
* second TMTRAINER item subtracts one from that, and so on.
|
|
69
|
+
*
|
|
70
|
+
* This is equal to 4294967295.
|
|
71
|
+
*/
|
|
72
|
+
exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (0, types_1.asCollectibleType)((1 << 32) - 1);
|
|
73
|
+
/**
|
|
74
|
+
* An array containing every flying character. This includes non-main characters such as The Soul.
|
|
75
|
+
*/
|
|
76
|
+
exports.FLYING_CHARACTERS = [
|
|
77
|
+
isaac_typescript_definitions_1.PlayerType.AZAZEL,
|
|
78
|
+
isaac_typescript_definitions_1.PlayerType.LOST,
|
|
79
|
+
isaac_typescript_definitions_1.PlayerType.SOUL,
|
|
80
|
+
isaac_typescript_definitions_1.PlayerType.LOST_B,
|
|
81
|
+
isaac_typescript_definitions_1.PlayerType.JACOB_2_B,
|
|
82
|
+
isaac_typescript_definitions_1.PlayerType.SOUL_B, // 40
|
|
83
|
+
];
|
|
84
|
+
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
|
|
85
|
+
exports.GAME_FRAMES_PER_SECOND = 30;
|
|
86
|
+
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
|
|
87
|
+
exports.GAME_FRAMES_PER_MINUTE = exports.GAME_FRAMES_PER_SECOND * 60;
|
|
88
|
+
/**
|
|
89
|
+
* An array containing every character that is selectable from the main menu (and has achievements
|
|
90
|
+
* related to completing the various bosses and so on).
|
|
91
|
+
*/
|
|
92
|
+
exports.MAIN_CHARACTERS = [
|
|
93
|
+
isaac_typescript_definitions_1.PlayerType.ISAAC,
|
|
94
|
+
isaac_typescript_definitions_1.PlayerType.MAGDALENE,
|
|
95
|
+
isaac_typescript_definitions_1.PlayerType.CAIN,
|
|
96
|
+
isaac_typescript_definitions_1.PlayerType.JUDAS,
|
|
97
|
+
isaac_typescript_definitions_1.PlayerType.BLUE_BABY,
|
|
98
|
+
isaac_typescript_definitions_1.PlayerType.EVE,
|
|
99
|
+
isaac_typescript_definitions_1.PlayerType.SAMSON,
|
|
100
|
+
isaac_typescript_definitions_1.PlayerType.AZAZEL,
|
|
101
|
+
isaac_typescript_definitions_1.PlayerType.LAZARUS,
|
|
102
|
+
isaac_typescript_definitions_1.PlayerType.EDEN,
|
|
103
|
+
isaac_typescript_definitions_1.PlayerType.LOST,
|
|
104
|
+
isaac_typescript_definitions_1.PlayerType.LILITH,
|
|
105
|
+
isaac_typescript_definitions_1.PlayerType.KEEPER,
|
|
106
|
+
isaac_typescript_definitions_1.PlayerType.APOLLYON,
|
|
107
|
+
isaac_typescript_definitions_1.PlayerType.FORGOTTEN,
|
|
108
|
+
isaac_typescript_definitions_1.PlayerType.BETHANY,
|
|
109
|
+
isaac_typescript_definitions_1.PlayerType.JACOB,
|
|
110
|
+
isaac_typescript_definitions_1.PlayerType.ISAAC_B,
|
|
111
|
+
isaac_typescript_definitions_1.PlayerType.MAGDALENE_B,
|
|
112
|
+
isaac_typescript_definitions_1.PlayerType.CAIN_B,
|
|
113
|
+
isaac_typescript_definitions_1.PlayerType.JUDAS_B,
|
|
114
|
+
isaac_typescript_definitions_1.PlayerType.BLUE_BABY_B,
|
|
115
|
+
isaac_typescript_definitions_1.PlayerType.EVE_B,
|
|
116
|
+
isaac_typescript_definitions_1.PlayerType.SAMSON_B,
|
|
117
|
+
isaac_typescript_definitions_1.PlayerType.AZAZEL_B,
|
|
118
|
+
isaac_typescript_definitions_1.PlayerType.LAZARUS_B,
|
|
119
|
+
isaac_typescript_definitions_1.PlayerType.EDEN_B,
|
|
120
|
+
isaac_typescript_definitions_1.PlayerType.LOST_B,
|
|
121
|
+
isaac_typescript_definitions_1.PlayerType.LILITH_B,
|
|
122
|
+
isaac_typescript_definitions_1.PlayerType.KEEPER_B,
|
|
123
|
+
isaac_typescript_definitions_1.PlayerType.APOLLYON_B,
|
|
124
|
+
isaac_typescript_definitions_1.PlayerType.FORGOTTEN_B,
|
|
125
|
+
isaac_typescript_definitions_1.PlayerType.BETHANY_B,
|
|
126
|
+
isaac_typescript_definitions_1.PlayerType.JACOB_B, // 37
|
|
127
|
+
];
|
|
128
|
+
/** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
|
|
129
|
+
exports.RENDER_FRAMES_PER_SECOND = 60;
|
|
130
|
+
/** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
|
|
131
|
+
exports.RENDER_FRAMES_PER_MINUTE = exports.RENDER_FRAMES_PER_SECOND * 60;
|
|
132
|
+
exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
133
|
+
/**
|
|
134
|
+
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first column is
|
|
135
|
+
* represented by grid indexes 0, 13, 26, and so on.
|
|
136
|
+
*/
|
|
137
|
+
exports.LEVEL_GRID_COLUMN_HEIGHT = 13;
|
|
138
|
+
/**
|
|
139
|
+
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
140
|
+
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
141
|
+
* on.
|
|
142
|
+
*/
|
|
143
|
+
exports.LEVEL_GRID_ROW_WIDTH = 13;
|
|
144
|
+
/**
|
|
145
|
+
* All of the collectibles that grant vision on the map.
|
|
146
|
+
*
|
|
147
|
+
* Note that:
|
|
148
|
+
* - Spelunker Hat is included. Historically, Spelunker Hat was not considered to be mapping, but it
|
|
149
|
+
* was buffed in Repentance to show rooms two or more away.
|
|
150
|
+
* - Book of Secrets is included, which is an "active mapping" instead of passive.
|
|
151
|
+
* - Luna is included, even though it is not a very powerful mapping item.
|
|
152
|
+
* - Cracked Orb is included, even though it requires the player to be damaged in order for it to be
|
|
153
|
+
* activated.
|
|
154
|
+
*/
|
|
155
|
+
exports.MAPPING_COLLECTIBLES = [
|
|
156
|
+
isaac_typescript_definitions_1.CollectibleType.COMPASS,
|
|
157
|
+
isaac_typescript_definitions_1.CollectibleType.TREASURE_MAP,
|
|
158
|
+
isaac_typescript_definitions_1.CollectibleType.SPELUNKER_HAT,
|
|
159
|
+
isaac_typescript_definitions_1.CollectibleType.CRYSTAL_BALL,
|
|
160
|
+
isaac_typescript_definitions_1.CollectibleType.BLUE_MAP,
|
|
161
|
+
isaac_typescript_definitions_1.CollectibleType.BOOK_OF_SECRETS,
|
|
162
|
+
isaac_typescript_definitions_1.CollectibleType.MIND,
|
|
163
|
+
isaac_typescript_definitions_1.CollectibleType.SOL,
|
|
164
|
+
isaac_typescript_definitions_1.CollectibleType.LUNA,
|
|
165
|
+
isaac_typescript_definitions_1.CollectibleType.CRACKED_ORB, // 675
|
|
166
|
+
];
|
|
167
|
+
/**
|
|
168
|
+
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
169
|
+
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
170
|
+
* on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
|
|
171
|
+
*/
|
|
172
|
+
exports.MAX_LEVEL_GRID_INDEX = 168;
|
|
173
|
+
/**
|
|
174
|
+
* The game has a limit on the number of currently spawned familiars and will refuse to spawn any
|
|
175
|
+
* more if it reaches the limit. Blue flies and blue spiders have a lower priority and will be
|
|
176
|
+
* deleted to make room for other familiars.
|
|
177
|
+
*/
|
|
178
|
+
exports.MAX_NUM_FAMILIARS = 64;
|
|
179
|
+
/** The game can only handle up to four different players. */
|
|
180
|
+
exports.MAX_NUM_INPUTS = 4;
|
|
181
|
+
/** With Birthright, it is possible for Magdalene to have 18 heart containers. */
|
|
182
|
+
exports.MAX_PLAYER_HEART_CONTAINERS = 18;
|
|
183
|
+
/**
|
|
184
|
+
* As the player continues to move in a direction, they will accelerate. When going from one wall to
|
|
185
|
+
* another in a 2x2 room at 2.0 speed (the maximum that the speed stat can rise to), the amount of
|
|
186
|
+
* units moved per update frame will climb to around 9.797 as they hit the opposite wall. The
|
|
187
|
+
* constant specifies a value of 9.8 to be safe.
|
|
188
|
+
*/
|
|
189
|
+
exports.MAX_PLAYER_SPEED_IN_UNITS = 9.8;
|
|
190
|
+
exports.MAX_PLAYER_TRINKET_SLOTS = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.TrinketSlot);
|
|
191
|
+
/** If you set `EntityPlayer.ShotSpeed` lower than this value, it will have no effect. */
|
|
192
|
+
exports.MIN_PLAYER_SHOT_SPEED_STAT = 0.6;
|
|
193
|
+
/** If you set `EntityPlayer.Speed` lower than this value, it will have no effect. */
|
|
194
|
+
exports.MIN_PLAYER_SPEED_STAT = 0.1;
|
|
195
|
+
/**
|
|
196
|
+
* The maximum speed stat that a player can have. Any additional speed beyond this will not take
|
|
197
|
+
* effect.
|
|
198
|
+
*/
|
|
199
|
+
exports.MAX_SPEED_STAT = 2;
|
|
200
|
+
/** This is in the center of the room. */
|
|
201
|
+
exports.NEW_FLOOR_STARTING_POSITION_NORMAL_MODE = (0, readOnly_1.newReadonlyVector)(320, 280);
|
|
202
|
+
/** This is near the top door. */
|
|
203
|
+
exports.NEW_FLOOR_STARTING_POSITION_GREED_MODE = (0, readOnly_1.newReadonlyVector)(320, 280);
|
|
204
|
+
/**
|
|
205
|
+
* This is next to the bottom door. Presumably, the player does not start in the center of the room
|
|
206
|
+
* (like they do when getting to a new stage) so that the controls graphic is more visible.
|
|
207
|
+
*/
|
|
208
|
+
exports.NEW_RUN_PLAYER_STARTING_POSITION = (0, readOnly_1.newReadonlyVector)(320, 380);
|
|
209
|
+
/** Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`. */
|
|
210
|
+
exports.MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100_000;
|
|
211
|
+
/**
|
|
212
|
+
* The number of dimensions, not including `Dimension.CURRENT`. (This is derived from the
|
|
213
|
+
* `Dimension` enum.)
|
|
214
|
+
*/
|
|
215
|
+
exports.NUM_DIMENSIONS = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.Dimension) - 1;
|
|
216
|
+
/**
|
|
217
|
+
* An array containing every valid `Dimension`, not including `Dimension.CURRENT`. (This is derived
|
|
218
|
+
* from the `NUM_DIMENSIONS` constant.)
|
|
219
|
+
*/
|
|
220
|
+
exports.DIMENSIONS = (0, utils_1.eRange)(exports.NUM_DIMENSIONS);
|
|
221
|
+
/**
|
|
222
|
+
* The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
|
|
223
|
+
* horse pills.)
|
|
224
|
+
*/
|
|
225
|
+
// TypeDoc will not work properly with the preferred export form.
|
|
226
|
+
// eslint-disable-next-line unicorn/prefer-export-from
|
|
227
|
+
exports.NUM_PILL_COLORS_IN_POOL = constantsFirstLast_1.NUM_NORMAL_PILL_COLORS;
|
|
228
|
+
exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
229
|
+
/**
|
|
230
|
+
* An array representing every valid collectible type quality. Specifically, this is: `[0, 1, 2, 3,
|
|
231
|
+
* 4]`
|
|
232
|
+
*/
|
|
233
|
+
// eslint-disable-next-line isaacscript/require-capital-const-assertions
|
|
234
|
+
exports.QUALITIES = [0, 1, 2, 3, 4];
|
|
235
|
+
exports.MAX_QUALITY = 4;
|
|
236
|
+
exports.SECOND_IN_MILLISECONDS = 1000;
|
|
237
|
+
exports.MINUTE_IN_MILLISECONDS = 60 * exports.SECOND_IN_MILLISECONDS;
|
|
238
|
+
/** This is equivalent to the bottom-right screen position when the game is in full screen mode. */
|
|
239
|
+
exports.RESOLUTION_FULL_SCREEN = Vector(480, 270);
|
|
240
|
+
/**
|
|
241
|
+
* This is equivalent to the bottom-right screen position when the game is in windowed mode in a
|
|
242
|
+
* 1600x900 resolution.
|
|
243
|
+
*/
|
|
244
|
+
exports.RESOLUTION_1600_900 = Vector(533, 300);
|
|
245
|
+
/**
|
|
246
|
+
* The starting room of the floor is always at the same grid index, which is in the middle of the
|
|
247
|
+
* 13x13 grid.
|
|
248
|
+
*/
|
|
249
|
+
exports.STARTING_ROOM_GRID_INDEX = 84;
|
|
250
|
+
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
|
|
251
|
+
exports.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10_000;
|
|
252
|
+
/** For `GridEntityType.TELEPORTER` (23). */
|
|
253
|
+
exports.TELEPORTER_ACTIVATION_DISTANCE = exports.DISTANCE_OF_GRID_TILE / 2;
|
|
254
|
+
/** In milliseconds, as reported by the `Isaac.GetTime` method. */
|
|
255
|
+
exports.TIME_GAME_OPENED = Isaac.GetTime();
|
|
256
|
+
/**
|
|
257
|
+
* This is the number of draw coordinates that each heart spans on the UI in the upper left hand
|
|
258
|
+
* corner.
|
|
259
|
+
*/
|
|
260
|
+
exports.UI_HEART_WIDTH = 12;
|
|
261
|
+
/**
|
|
262
|
+
* Equal to `Vector(1, 1)`.
|
|
263
|
+
*
|
|
264
|
+
* This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
|
|
265
|
+
* is not safe to use.)
|
|
266
|
+
*/
|
|
267
|
+
exports.VectorOne = (0, readOnly_1.newReadonlyVector)(1, 1);
|
|
268
|
+
/**
|
|
269
|
+
* Equal to `Vector(0, 0)`.
|
|
270
|
+
*
|
|
271
|
+
* This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
|
|
272
|
+
* is not safe to use.)
|
|
273
|
+
*/
|
|
274
|
+
exports.VectorZero = (0, readOnly_1.newReadonlyVector)(0, 0);
|
|
275
|
+
/**
|
|
276
|
+
* Equal to `Color(1, 1, 1)`.
|
|
277
|
+
*
|
|
278
|
+
* This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
|
|
279
|
+
* so it is not safe to use.)
|
|
280
|
+
*
|
|
281
|
+
* If you need to mutate this, make a copy first with the `copyColor` helper function.
|
|
282
|
+
*/
|
|
283
|
+
exports.ColorDefault = (0, readOnly_1.newReadonlyColor)(1, 1, 1);
|
|
284
|
+
/**
|
|
285
|
+
* Equal to `KColor(1, 1, 1, 1)`.
|
|
286
|
+
*
|
|
287
|
+
* If you need to mutate this, make a copy first with the `copyKColor` helper function.
|
|
288
|
+
*/
|
|
289
|
+
exports.KColorDefault = (0, readOnly_1.newReadonlyKColor)(1, 1, 1, 1);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Constants relating to the first and last value for various vanilla objects.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.NUM_VANILLA_CHALLENGES = exports.LAST_VANILLA_CHARACTER = exports.FIRST_CHARACTER = exports.NUM_NORMAL_PILL_COLORS = exports.LAST_HORSE_PILL_COLOR = exports.FIRST_HORSE_PILL_COLOR = exports.LAST_NORMAL_PILL_COLOR = exports.FIRST_PILL_COLOR = exports.NUM_VANILLA_PILL_EFFECTS = exports.LAST_VANILLA_PILL_EFFECT = exports.FIRST_PILL_EFFECT = exports.NUM_VANILLA_CARD_TYPES = exports.LAST_VANILLA_CARD_TYPE = exports.FIRST_CARD_TYPE = exports.NUM_VANILLA_TRINKET_TYPES = exports.LAST_VANILLA_TRINKET_TYPE = exports.FIRST_TRINKET_TYPE = exports.NUM_VANILLA_COLLECTIBLE_TYPES = exports.LAST_VANILLA_COLLECTIBLE_TYPE = exports.FIRST_COLLECTIBLE_TYPE = void 0;
|
|
9
|
+
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
10
|
+
const enums_1 = require("../functions/enums");
|
|
11
|
+
// ------------
|
|
12
|
+
// Collectibles
|
|
13
|
+
// ------------
|
|
14
|
+
/** Equal to `CollectibleType.SAD_ONION` (1). */
|
|
15
|
+
exports.FIRST_COLLECTIBLE_TYPE = isaac_typescript_definitions_1.CollectibleType.SAD_ONION;
|
|
16
|
+
/**
|
|
17
|
+
* Calculated from the `CollectibleType` enum.
|
|
18
|
+
*
|
|
19
|
+
* Note that this cannot be calculated from the length of the enum, because collectible types are
|
|
20
|
+
* not contiguous.
|
|
21
|
+
*/
|
|
22
|
+
exports.LAST_VANILLA_COLLECTIBLE_TYPE = (0, enums_1.getHighestEnumValue)(isaac_typescript_definitions_1.CollectibleType);
|
|
23
|
+
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
24
|
+
exports.NUM_VANILLA_COLLECTIBLE_TYPES = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.CollectibleType) - 1;
|
|
25
|
+
// --------
|
|
26
|
+
// Trinkets
|
|
27
|
+
// --------
|
|
28
|
+
/** Equal to `TrinketType.SWALLOWED_PENNY` (1). */
|
|
29
|
+
exports.FIRST_TRINKET_TYPE = isaac_typescript_definitions_1.TrinketType.SWALLOWED_PENNY;
|
|
30
|
+
/**
|
|
31
|
+
* Calculated from the `TrinketType` enum.
|
|
32
|
+
*
|
|
33
|
+
* Note that this cannot be calculated from the length of the enum, because trinket types are not
|
|
34
|
+
* contiguous.
|
|
35
|
+
*/
|
|
36
|
+
exports.LAST_VANILLA_TRINKET_TYPE = (0, enums_1.getHighestEnumValue)(isaac_typescript_definitions_1.TrinketType);
|
|
37
|
+
/** Calculated from the `TrinketType` enum. (`TrinketType.NULL` is not included.) */
|
|
38
|
+
exports.NUM_VANILLA_TRINKET_TYPES = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.TrinketType) - 1;
|
|
39
|
+
// -----
|
|
40
|
+
// Cards
|
|
41
|
+
// -----
|
|
42
|
+
/** Equal to `Card.FOOL` (1). */
|
|
43
|
+
exports.FIRST_CARD_TYPE = isaac_typescript_definitions_1.CardType.FOOL;
|
|
44
|
+
/** Calculated from the `CardType` enum. */
|
|
45
|
+
exports.LAST_VANILLA_CARD_TYPE = (0, enums_1.getHighestEnumValue)(isaac_typescript_definitions_1.CardType);
|
|
46
|
+
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
47
|
+
exports.NUM_VANILLA_CARD_TYPES = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.CardType) - 1;
|
|
48
|
+
// ------------
|
|
49
|
+
// Pill Effects
|
|
50
|
+
// ------------
|
|
51
|
+
/** Equal to `PillEffect.BAD_GAS` (0). */
|
|
52
|
+
exports.FIRST_PILL_EFFECT = isaac_typescript_definitions_1.PillEffect.BAD_GAS;
|
|
53
|
+
/** Calculated from the `PillEffect` enum. */
|
|
54
|
+
exports.LAST_VANILLA_PILL_EFFECT = (0, enums_1.getHighestEnumValue)(isaac_typescript_definitions_1.PillEffect);
|
|
55
|
+
/**
|
|
56
|
+
* Calculated from the `PillEffect` enum. (There is no `PillEffect.NULL` in the custom enum, so we
|
|
57
|
+
* do not have to subtract one here.)
|
|
58
|
+
*/
|
|
59
|
+
exports.NUM_VANILLA_PILL_EFFECTS = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.PillEffect);
|
|
60
|
+
// -----------
|
|
61
|
+
// Pill Colors
|
|
62
|
+
// -----------
|
|
63
|
+
/** Equal to `PillColor.BLUE_BLUE` (1). */
|
|
64
|
+
exports.FIRST_PILL_COLOR = isaac_typescript_definitions_1.PillColor.BLUE_BLUE;
|
|
65
|
+
/**
|
|
66
|
+
* Equal to `PillColor.WHITE_YELLOW` (13).
|
|
67
|
+
*
|
|
68
|
+
* Note that `PillColor.GOLD` is technically higher, but that is not considered for the purposes of
|
|
69
|
+
* this constant.
|
|
70
|
+
*/
|
|
71
|
+
exports.LAST_NORMAL_PILL_COLOR = isaac_typescript_definitions_1.PillColor.WHITE_YELLOW;
|
|
72
|
+
/** Equal to `PillColor.HORSE_BLUE_BLUE` (2049). */
|
|
73
|
+
exports.FIRST_HORSE_PILL_COLOR = isaac_typescript_definitions_1.PillColor.HORSE_BLUE_BLUE;
|
|
74
|
+
/**
|
|
75
|
+
* Equal to `PillColor.HORSE_WHITE_YELLOW` (2061).
|
|
76
|
+
*
|
|
77
|
+
* Note that `PillColor.HORSE_GOLD` is technically higher, but that is not considered for the
|
|
78
|
+
* purposes of this constant.
|
|
79
|
+
*/
|
|
80
|
+
exports.LAST_HORSE_PILL_COLOR = isaac_typescript_definitions_1.PillColor.HORSE_WHITE_YELLOW;
|
|
81
|
+
/**
|
|
82
|
+
* Calculated from the difference between the first pill color and the last pill color. This does
|
|
83
|
+
* not include Gold Pills. In Repentance, this should be equal to 13.
|
|
84
|
+
*/
|
|
85
|
+
exports.NUM_NORMAL_PILL_COLORS = exports.LAST_NORMAL_PILL_COLOR - exports.FIRST_PILL_COLOR + 1;
|
|
86
|
+
// -------
|
|
87
|
+
// Players
|
|
88
|
+
// -------
|
|
89
|
+
/** Equal to `PlayerType.ISAAC` (0). */
|
|
90
|
+
exports.FIRST_CHARACTER = isaac_typescript_definitions_1.PlayerType.ISAAC;
|
|
91
|
+
// It is not possible to determine "LAST_PLAYER_TYPE", since there is no associated config.
|
|
92
|
+
/** Calculated from the `PlayerType` enum. */
|
|
93
|
+
exports.LAST_VANILLA_CHARACTER = (0, enums_1.getHighestEnumValue)(isaac_typescript_definitions_1.PlayerType);
|
|
94
|
+
// ----------
|
|
95
|
+
// Challenges
|
|
96
|
+
// ----------
|
|
97
|
+
/** Calculated from the `Challenge` enum. `Challenge.NULL` is not included. */
|
|
98
|
+
exports.NUM_VANILLA_CHALLENGES = (0, enums_1.getEnumLength)(isaac_typescript_definitions_1.Challenge) - 1;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Constants relating to collections for various vanilla objects.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VANILLA_PILL_EFFECTS_SET = exports.VANILLA_PILL_EFFECTS = exports.VANILLA_PILL_EFFECT_RANGE = exports.VANILLA_CARD_TYPES_SET = exports.VANILLA_CARD_TYPES = exports.VANILLA_CARD_TYPE_RANGE = exports.VANILLA_TRINKET_TYPES_SET = exports.VANILLA_TRINKET_TYPES = exports.VANILLA_TRINKET_TYPE_RANGE = exports.VANILLA_COLLECTIBLE_TYPES_SET = exports.VANILLA_COLLECTIBLE_TYPES = exports.VANILLA_COLLECTIBLE_TYPE_RANGE = void 0;
|
|
9
|
+
const types_1 = require("../functions/types");
|
|
10
|
+
const utils_1 = require("../functions/utils");
|
|
11
|
+
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
12
|
+
const cachedClasses_1 = require("./cachedClasses");
|
|
13
|
+
const constantsFirstLast_1 = require("./constantsFirstLast");
|
|
14
|
+
// ------------
|
|
15
|
+
// Collectibles
|
|
16
|
+
// ------------
|
|
17
|
+
/**
|
|
18
|
+
* An array that represents the range from the first vanilla collectible type to the last vanilla
|
|
19
|
+
* collectible type. This will include integers that do not represent any valid collectible types.
|
|
20
|
+
*
|
|
21
|
+
* This function is only useful when building collectible type objects. For most purposes, you
|
|
22
|
+
* should use the `VANILLA_COLLECTIBLE_TYPES` or `VANILLA_COLLECTIBLE_TYPES_SET` constants instead.
|
|
23
|
+
*/
|
|
24
|
+
exports.VANILLA_COLLECTIBLE_TYPE_RANGE = (0, utils_1.iRange)(constantsFirstLast_1.FIRST_COLLECTIBLE_TYPE, constantsFirstLast_1.LAST_VANILLA_COLLECTIBLE_TYPE);
|
|
25
|
+
/**
|
|
26
|
+
* An array that contains every valid vanilla collectible type, as verified by the
|
|
27
|
+
* `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
|
|
28
|
+
* must be verified. (There are several gaps, e.g. 666.)
|
|
29
|
+
*
|
|
30
|
+
* If you need to do O(1) lookups, use the `VANILLA_COLLECTIBLE_TYPES_SET` constant instead.
|
|
31
|
+
*/
|
|
32
|
+
// eslint-disable-next-line isaacscript/strict-enums
|
|
33
|
+
exports.VANILLA_COLLECTIBLE_TYPES = exports.VANILLA_COLLECTIBLE_TYPE_RANGE.filter((potentialCollectibleType) => {
|
|
34
|
+
const collectibleType = (0, types_1.asCollectibleType)(potentialCollectibleType);
|
|
35
|
+
const itemConfigItem = cachedClasses_1.itemConfig.GetCollectible(collectibleType);
|
|
36
|
+
return itemConfigItem !== undefined;
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* A set that contains every valid vanilla collectible type, as verified by the
|
|
40
|
+
* `ItemConfig.GetCollectible` method. Vanilla collectible types are not contiguous, so every valid
|
|
41
|
+
* must be verified. (There are several gaps, e.g. 666.)
|
|
42
|
+
*/
|
|
43
|
+
exports.VANILLA_COLLECTIBLE_TYPES_SET = new ReadonlySet_1.ReadonlySet(exports.VANILLA_COLLECTIBLE_TYPES);
|
|
44
|
+
// --------
|
|
45
|
+
// Trinkets
|
|
46
|
+
// --------
|
|
47
|
+
/**
|
|
48
|
+
* An array that represents the range from the first vanilla trinket type to the last vanilla
|
|
49
|
+
* trinket type. This will include integers that do not represent any valid trinket types.
|
|
50
|
+
*
|
|
51
|
+
* This function is only useful when building trinket type objects. For most purposes, you should
|
|
52
|
+
* use the `VANILLA_TRINKET_TYPES` or `VANILLA_TRINKET_TYPES_SET` constants instead.
|
|
53
|
+
*/
|
|
54
|
+
exports.VANILLA_TRINKET_TYPE_RANGE = (0, utils_1.iRange)(constantsFirstLast_1.FIRST_TRINKET_TYPE, constantsFirstLast_1.LAST_VANILLA_TRINKET_TYPE);
|
|
55
|
+
/**
|
|
56
|
+
* An array that contains every valid vanilla trinket type, as verified by the
|
|
57
|
+
* `ItemConfig.GetTrinket` method. Vanilla trinket types are not contiguous, so every valid must be
|
|
58
|
+
* verified. (The only gap is 47 for `POLAROID_OBSOLETE`.)
|
|
59
|
+
*
|
|
60
|
+
* If you need to do O(1) lookups, use the `VANILLA_TRINKET_TYPES_SET` constant instead.
|
|
61
|
+
*/
|
|
62
|
+
// eslint-disable-next-line isaacscript/strict-enums
|
|
63
|
+
exports.VANILLA_TRINKET_TYPES = exports.VANILLA_TRINKET_TYPE_RANGE.filter((potentialTrinketType) => {
|
|
64
|
+
const trinketType = (0, types_1.asTrinketType)(potentialTrinketType);
|
|
65
|
+
const itemConfigTrinket = cachedClasses_1.itemConfig.GetTrinket(trinketType);
|
|
66
|
+
return itemConfigTrinket !== undefined;
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* A set that contains every valid vanilla trinket type, as verified by the `ItemConfig.GetTrinket`
|
|
70
|
+
* method. Vanilla trinket types are not contiguous, so every valid must be verified. (The only gap
|
|
71
|
+
* is 47 for `POLAROID_OBSOLETE`.)
|
|
72
|
+
*/
|
|
73
|
+
exports.VANILLA_TRINKET_TYPES_SET = new ReadonlySet_1.ReadonlySet(exports.VANILLA_TRINKET_TYPES);
|
|
74
|
+
// ----------
|
|
75
|
+
// Card Types
|
|
76
|
+
// ----------
|
|
77
|
+
/**
|
|
78
|
+
* An array that represents the range from the first vanilla card type to the last vanilla card
|
|
79
|
+
* type.
|
|
80
|
+
*
|
|
81
|
+
* This function is only useful when building card type objects. For most purposes, you should use
|
|
82
|
+
* the `VANILLA_CARD_TYPES` or `VANILLA_CARD_TYPES_SET` constants instead.
|
|
83
|
+
*/
|
|
84
|
+
exports.VANILLA_CARD_TYPE_RANGE = (0, utils_1.iRange)(constantsFirstLast_1.FIRST_CARD_TYPE, constantsFirstLast_1.LAST_VANILLA_CARD_TYPE);
|
|
85
|
+
/**
|
|
86
|
+
* An array that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
|
|
87
|
+
* method. Vanilla card types are contiguous, but we validate every entry to double check.
|
|
88
|
+
*
|
|
89
|
+
* If you need to do O(1) lookups, use the `VANILLA_CARD_TYPES_SET` constant instead.
|
|
90
|
+
*/
|
|
91
|
+
// eslint-disable-next-line isaacscript/strict-enums
|
|
92
|
+
exports.VANILLA_CARD_TYPES = exports.VANILLA_CARD_TYPE_RANGE.filter((potentialCardType) => {
|
|
93
|
+
const cardType = (0, types_1.asCardType)(potentialCardType);
|
|
94
|
+
const itemConfigCard = cachedClasses_1.itemConfig.GetCard(cardType);
|
|
95
|
+
return itemConfigCard !== undefined;
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* A set that contains every valid vanilla card type, as verified by the `ItemConfig.GetCard`
|
|
99
|
+
* method. Vanilla card types are contiguous, but we validate every entry to double check.
|
|
100
|
+
*/
|
|
101
|
+
exports.VANILLA_CARD_TYPES_SET = new ReadonlySet_1.ReadonlySet(exports.VANILLA_CARD_TYPES);
|
|
102
|
+
// ------------
|
|
103
|
+
// Pill Effects
|
|
104
|
+
// ------------
|
|
105
|
+
/**
|
|
106
|
+
* An array that represents the range from the first vanilla pill effect to the last vanilla pill
|
|
107
|
+
* effect.
|
|
108
|
+
*
|
|
109
|
+
* This function is only useful when building pill effect objects. For most purposes, you should use
|
|
110
|
+
* the `VANILLA_PILL_EFFECTS` or `VANILLA_PILL_EFFECTS_SET` constants instead.
|
|
111
|
+
*/
|
|
112
|
+
exports.VANILLA_PILL_EFFECT_RANGE = (0, utils_1.iRange)(constantsFirstLast_1.FIRST_PILL_EFFECT, constantsFirstLast_1.LAST_VANILLA_PILL_EFFECT);
|
|
113
|
+
/**
|
|
114
|
+
* An array that contains every valid vanilla pill effect, as verified by the
|
|
115
|
+
* `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
|
|
116
|
+
* entry to double check.
|
|
117
|
+
*
|
|
118
|
+
* If you need to do O(1) lookups, use the `VANILLA_PILL_EFFECT_SET` constant instead.
|
|
119
|
+
*/
|
|
120
|
+
// eslint-disable-next-line isaacscript/strict-enums
|
|
121
|
+
exports.VANILLA_PILL_EFFECTS = exports.VANILLA_PILL_EFFECT_RANGE.filter((potentialPillEffect) => {
|
|
122
|
+
const pillEffect = (0, types_1.asPillEffect)(potentialPillEffect);
|
|
123
|
+
const itemConfigPillEffect = cachedClasses_1.itemConfig.GetPillEffect(pillEffect);
|
|
124
|
+
return itemConfigPillEffect !== undefined;
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* A set that contains every valid vanilla pill effect, as verified by the
|
|
128
|
+
* `ItemConfig.GetPillEffect` method. Vanilla pill effects are contiguous, but we validate every
|
|
129
|
+
* entry to double check.
|
|
130
|
+
*/
|
|
131
|
+
exports.VANILLA_PILL_EFFECTS_SET = new ReadonlySet_1.ReadonlySet(exports.VANILLA_PILL_EFFECTS);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upgradeMod = void 0;
|
|
4
|
+
const ModUpgraded_1 = require("../classes/ModUpgraded");
|
|
5
|
+
const patchErrorFunctions_1 = require("../patchErrorFunctions");
|
|
6
|
+
const shaderCrashFix_1 = require("../shaderCrashFix");
|
|
7
|
+
/**
|
|
8
|
+
* Use this function to enable the custom callbacks and other optional features provided by
|
|
9
|
+
* `isaacscript-common`.
|
|
10
|
+
*
|
|
11
|
+
* For example:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const modVanilla = RegisterMod("My Mod", 1);
|
|
15
|
+
* const mod = upgradeMod(modVanilla);
|
|
16
|
+
*
|
|
17
|
+
* // Subscribe to vanilla callbacks.
|
|
18
|
+
* mod.AddCallback(ModCallback.POST_UPDATE, postUpdate);
|
|
19
|
+
*
|
|
20
|
+
* // Subscribe to custom callbacks.
|
|
21
|
+
* mod.AddCallbackCustom(ModCallbackCustom.POST_ITEM_PICKUP, postItemPickup);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param modVanilla The mod object returned by the `RegisterMod` function.
|
|
25
|
+
* @param features Optional. An array containing the optional standard library features that you
|
|
26
|
+
* want to enable, if any. Default is an empty array.
|
|
27
|
+
* @param debug Optional. Whether to log additional output when a callback is fired. Default is
|
|
28
|
+
* false.
|
|
29
|
+
* @param timeThreshold Optional. If provided, will only log callbacks that take longer than the
|
|
30
|
+
* specified number of seconds (if the "--luadebug" launch flag is turned on)
|
|
31
|
+
* or milliseconds (if the "--luadebug" launch flag is turned off).
|
|
32
|
+
* @returns The upgraded mod object.
|
|
33
|
+
*/
|
|
34
|
+
function upgradeMod(modVanilla, features = [], debug = false, timeThreshold) {
|
|
35
|
+
// First, validate that all of the features exist (for Lua users who don't have type-safety).
|
|
36
|
+
for (const feature of features) {
|
|
37
|
+
const featureType = type(feature);
|
|
38
|
+
if (featureType !== "number") {
|
|
39
|
+
error(`Failed to upgrade the mod due to one of the specified features being of type "${featureType}". (All of the features should be numbers represented by the "ISCFeature" enum.)`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Second, validate that all of the features are unique.
|
|
43
|
+
const featureSet = new Set(features);
|
|
44
|
+
if (featureSet.size !== features.length) {
|
|
45
|
+
error('Failed to upgrade the mod since there are two or more of the same features specified in the "features" array. When you pass the array of features to the "upgradeMod" function, all of the elements should be unique.');
|
|
46
|
+
}
|
|
47
|
+
(0, patchErrorFunctions_1.patchErrorFunction)();
|
|
48
|
+
const mod = new ModUpgraded_1.ModUpgraded(modVanilla, debug, timeThreshold);
|
|
49
|
+
(0, shaderCrashFix_1.applyShaderCrashFix)(mod);
|
|
50
|
+
initOptionalFeatures(mod, features);
|
|
51
|
+
return mod;
|
|
52
|
+
}
|
|
53
|
+
exports.upgradeMod = upgradeMod;
|
|
54
|
+
/** Initialize every optional feature that the end-user specified, if any. */
|
|
55
|
+
function initOptionalFeatures(mod, features) {
|
|
56
|
+
for (const feature of features) {
|
|
57
|
+
// We intentionally access the private method here, so we use the string index escape hatch:
|
|
58
|
+
// https://github.com/microsoft/TypeScript/issues/19335
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
60
|
+
const exportedMethodTuples = mod["initOptionalFeature"](feature);
|
|
61
|
+
// If the optional feature provides helper functions, attach them to the base mod object. (This
|
|
62
|
+
// provides a convenient API for end-users.)
|
|
63
|
+
const modRecord = mod;
|
|
64
|
+
for (const [funcName, func] of exportedMethodTuples) {
|
|
65
|
+
if (modRecord[funcName] !== undefined) {
|
|
66
|
+
error(`Failed to upgrade the mod since two or more features share the name function name of "${funcName}". This should never happen, so report this error to the library authors.`);
|
|
67
|
+
}
|
|
68
|
+
modRecord[funcName] = func;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|