isaacscript-common 84.0.1 → 84.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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
|
@@ -0,0 +1,2477 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModCallbackCustom = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* - The Isaac API offers a lot of callbacks, but a lot of times there isn't one for the specific
|
|
6
|
+
* thing that you are looking to do. So, `isaacscript-common` adds a bunch of new callbacks that
|
|
7
|
+
* you can use.
|
|
8
|
+
* - The extra callbacks are efficient such that no code is executed until there is one or more
|
|
9
|
+
* subscriptions.
|
|
10
|
+
* - You must upgrade your mod with the `upgradeMod` helper function before using a custom callback.
|
|
11
|
+
*/
|
|
12
|
+
var ModCallbackCustom;
|
|
13
|
+
(function (ModCallbackCustom) {
|
|
14
|
+
/**
|
|
15
|
+
* The exact same thing as the vanilla `ENTITY_TAKE_DMG` callback, except this callback allows you
|
|
16
|
+
* to specify extra arguments for additional filtration.
|
|
17
|
+
*
|
|
18
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
19
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
20
|
+
* matches the `EntityType` provided.
|
|
21
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
22
|
+
* matches the variant provided.
|
|
23
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
24
|
+
* matches the sub-type provided.
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* function entityTakeDmgFilter(
|
|
28
|
+
* entity: Entity,
|
|
29
|
+
* amount: float,
|
|
30
|
+
* damageFlags: BitFlags<DamageFlag>,
|
|
31
|
+
* source: EntityRef,
|
|
32
|
+
* countdownFrames: int,
|
|
33
|
+
* ): boolean | undefined {}
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
ModCallbackCustom[ModCallbackCustom["ENTITY_TAKE_DMG_FILTER"] = 0] = "ENTITY_TAKE_DMG_FILTER";
|
|
37
|
+
/**
|
|
38
|
+
* The exact same thing as the vanilla `ENTITY_TAKE_DMG` callback, except this callback
|
|
39
|
+
* automatically filters for `EntityType.ENTITY_PLAYER` and casts the `Entity` object to a
|
|
40
|
+
* `EntityPlayer`.
|
|
41
|
+
*
|
|
42
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
43
|
+
* matches the `PlayerVariant` provided.
|
|
44
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
45
|
+
* matches the `PlayerType` provided.
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* function entityTakeDmgPlayer(
|
|
49
|
+
* player: EntityPlayer,
|
|
50
|
+
* amount: float,
|
|
51
|
+
* damageFlags: BitFlags<DamageFlag>,
|
|
52
|
+
* source: EntityRef,
|
|
53
|
+
* countdownFrames: int,
|
|
54
|
+
* ): boolean | undefined {}
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
ModCallbackCustom[ModCallbackCustom["ENTITY_TAKE_DMG_PLAYER"] = 1] = "ENTITY_TAKE_DMG_PLAYER";
|
|
58
|
+
/**
|
|
59
|
+
* The exact same thing as the vanilla `INPUT_ACTION` callback, except this callback allows you to
|
|
60
|
+
* specify extra arguments for additional filtration.
|
|
61
|
+
*
|
|
62
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
63
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
64
|
+
* matches the `InputHook` provided.
|
|
65
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
66
|
+
* matches the `ButtonAction` provided.
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* function inputActionFilter(
|
|
70
|
+
* entity: Entity | undefined,
|
|
71
|
+
* inputHook: InputHook,
|
|
72
|
+
* buttonAction: ButtonAction,
|
|
73
|
+
* ): boolean | undefined {}
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
ModCallbackCustom[ModCallbackCustom["INPUT_ACTION_FILTER"] = 2] = "INPUT_ACTION_FILTER";
|
|
77
|
+
/**
|
|
78
|
+
* The exact same thing as the vanilla `INPUT_ACTION` callback, except this callback automatically
|
|
79
|
+
* filters for `EntityType.ENTITY_PLAYER` and casts the `Entity` object to a `EntityPlayer`. It
|
|
80
|
+
* also allows you to specify extra arguments for additional filtration.
|
|
81
|
+
*
|
|
82
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
83
|
+
* matches the `PlayerVariant` provided.
|
|
84
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
85
|
+
* matches the `PlayerType` provided.
|
|
86
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
87
|
+
* matches the `InputHook` provided.
|
|
88
|
+
* - You can provide an optional sixth argument that will make the callback only fire if it
|
|
89
|
+
* matches the `ButtonAction` provided.
|
|
90
|
+
*
|
|
91
|
+
* ```ts
|
|
92
|
+
* function inputActionPlayer(
|
|
93
|
+
* player: EntityPlayer,
|
|
94
|
+
* inputHook: InputHook,
|
|
95
|
+
* buttonAction: ButtonAction,
|
|
96
|
+
* ): boolean | undefined {}
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
ModCallbackCustom[ModCallbackCustom["INPUT_ACTION_PLAYER"] = 3] = "INPUT_ACTION_PLAYER";
|
|
100
|
+
/**
|
|
101
|
+
* Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is started.
|
|
102
|
+
* Specifically, this happens on the first frame that `Room.IsAmbushDone` is true.
|
|
103
|
+
*
|
|
104
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
105
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
106
|
+
* matches the `AmbushType` provided.
|
|
107
|
+
*
|
|
108
|
+
* ```ts
|
|
109
|
+
* function postAmbushFinished(ambushType: AmbushType): void {}
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
ModCallbackCustom[ModCallbackCustom["POST_AMBUSH_FINISHED"] = 4] = "POST_AMBUSH_FINISHED";
|
|
113
|
+
/**
|
|
114
|
+
* Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is completed.
|
|
115
|
+
* Specifically, this happens on the first frame that `Room.IsAmbushActive` is true.
|
|
116
|
+
*
|
|
117
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
118
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
119
|
+
* matches the `AmbushType` provided.
|
|
120
|
+
*
|
|
121
|
+
* ```ts
|
|
122
|
+
* function postAmbushStarted(ambushType: AmbushType): void {}
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
ModCallbackCustom[ModCallbackCustom["POST_AMBUSH_STARTED"] = 5] = "POST_AMBUSH_STARTED";
|
|
126
|
+
/**
|
|
127
|
+
* Fires on the `POST_BOMB_UPDATE` callback that it explodes.
|
|
128
|
+
*
|
|
129
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
130
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
131
|
+
* matches the `BombVariant` provided.
|
|
132
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
133
|
+
* matches the sub-type provided.
|
|
134
|
+
*
|
|
135
|
+
* ```ts
|
|
136
|
+
* function postBombDetonated(bomb: EntityBomb): void {}
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
ModCallbackCustom[ModCallbackCustom["POST_BOMB_EXPLODED"] = 6] = "POST_BOMB_EXPLODED";
|
|
140
|
+
/**
|
|
141
|
+
* The exact same thing as the vanilla `POST_BOMB_INIT` callback, except this callback allows you
|
|
142
|
+
* to specify extra arguments for additional filtration.
|
|
143
|
+
*
|
|
144
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
145
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
146
|
+
* matches the `BombVariant` provided.
|
|
147
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
148
|
+
* matches the sub-type provided.
|
|
149
|
+
*
|
|
150
|
+
* ```ts
|
|
151
|
+
* function postBombInitFilter(bomb: EntityBomb): void {}
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
ModCallbackCustom[ModCallbackCustom["POST_BOMB_INIT_FILTER"] = 7] = "POST_BOMB_INIT_FILTER";
|
|
155
|
+
/**
|
|
156
|
+
* Fires on the first `POST_BOMB_UPDATE` frame for each bomb.
|
|
157
|
+
*
|
|
158
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
159
|
+
* normal `POST_BOMB_INIT` callback.
|
|
160
|
+
*
|
|
161
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
162
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
163
|
+
* matches the `BombVariant` provided.
|
|
164
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
165
|
+
* matches the sub-type provided.
|
|
166
|
+
*
|
|
167
|
+
* ```ts
|
|
168
|
+
* function postBombInitLate(bomb: EntityBomb): void {}
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
ModCallbackCustom[ModCallbackCustom["POST_BOMB_INIT_LATE"] = 8] = "POST_BOMB_INIT_LATE";
|
|
172
|
+
/**
|
|
173
|
+
* The exact same thing as the vanilla `POST_BOMB_RENDER` callback, except this callback allows
|
|
174
|
+
* you to specify extra arguments for additional filtration.
|
|
175
|
+
*
|
|
176
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
177
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
178
|
+
* matches the `BombVariant` provided.
|
|
179
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
180
|
+
* matches the sub-type provided.
|
|
181
|
+
*
|
|
182
|
+
* ```ts
|
|
183
|
+
* function postBombRenderFilter(bomb: EntityBomb, renderOffset: Vector): void {}
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
ModCallbackCustom[ModCallbackCustom["POST_BOMB_RENDER_FILTER"] = 9] = "POST_BOMB_RENDER_FILTER";
|
|
187
|
+
/**
|
|
188
|
+
* The exact same thing as the vanilla `POST_BOMB_UPDATE` callback, except this callback allows
|
|
189
|
+
* you to specify extra arguments for additional filtration.
|
|
190
|
+
*
|
|
191
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
192
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
193
|
+
* matches the `BombVariant` provided.
|
|
194
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
195
|
+
* matches the sub-type provided.
|
|
196
|
+
*
|
|
197
|
+
* ```ts
|
|
198
|
+
* function postBombUpdateFilter(bomb: EntityBomb): void {}
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
ModCallbackCustom[ModCallbackCustom["POST_BOMB_UPDATE_FILTER"] = 10] = "POST_BOMB_UPDATE_FILTER";
|
|
202
|
+
/**
|
|
203
|
+
* Fires from the `POST_RENDER` callback when one of Forgotten's bone clubs is swung or thrown.
|
|
204
|
+
*
|
|
205
|
+
* ```ts
|
|
206
|
+
* function postBoneSwing(boneClub: EntityKnife): void {}
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
ModCallbackCustom[ModCallbackCustom["POST_BONE_SWING"] = 11] = "POST_BONE_SWING";
|
|
210
|
+
/**
|
|
211
|
+
* Fires from the `POST_PICKUP_UPDATE` callback when a collectible goes from a non-zero sub-type
|
|
212
|
+
* to `CollectibleType.NULL` (i.e. an "empty" pedestal).
|
|
213
|
+
*
|
|
214
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
215
|
+
* - You can provide an optional third argument that will make the callback only fire if the
|
|
216
|
+
* pedestal changed from the `CollectibleType` provided.
|
|
217
|
+
*
|
|
218
|
+
* ```ts
|
|
219
|
+
* function postCollectibleEmpty(
|
|
220
|
+
* collectible: EntityPickupCollectible,
|
|
221
|
+
* oldCollectibleType: CollectibleType,
|
|
222
|
+
* ): void {}
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
ModCallbackCustom[ModCallbackCustom["POST_COLLECTIBLE_EMPTY"] = 12] = "POST_COLLECTIBLE_EMPTY";
|
|
226
|
+
/**
|
|
227
|
+
* Fires from the `POST_PLAYER_RENDER` callback on the first frame that the "TeleportUp" animation
|
|
228
|
+
* begins playing after a player triggers a Cursed Eye teleport or a Cursed Skull teleport. (Both
|
|
229
|
+
* of these have the same effect in causing Isaac to be teleported to a random room.)
|
|
230
|
+
*
|
|
231
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
232
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
233
|
+
* matches the `PlayerVariant` provided.
|
|
234
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
235
|
+
* matches the `PlayerType` provided.
|
|
236
|
+
*
|
|
237
|
+
* ```ts
|
|
238
|
+
* function postCursedTeleport(player: EntityPlayer): void {}
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
ModCallbackCustom[ModCallbackCustom["POST_CURSED_TELEPORT"] = 13] = "POST_CURSED_TELEPORT";
|
|
242
|
+
/**
|
|
243
|
+
* Fires from the `POST_PLAYER_UPDATE` callback after the player has finished the death animation,
|
|
244
|
+
* has teleported to the previous room, and is ready to play the animation for the modded revival
|
|
245
|
+
* item. The `revivalType` will match the value returned from the `PRE_CUSTOM_REVIVE` callback.
|
|
246
|
+
*
|
|
247
|
+
* In this callback, you must play an animation with something along the lines of
|
|
248
|
+
* `player.AnimateCollectible(CollectibleTypeCustom.COLLECTIBLE_MY_REVIVAL_ITEM);`, otherwise the
|
|
249
|
+
* animation for a 1-Up will play.
|
|
250
|
+
*
|
|
251
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
252
|
+
* - You can provide an optional third argument that will make the callback only fire if the
|
|
253
|
+
* revival type matches the one provided.
|
|
254
|
+
*
|
|
255
|
+
* ```ts
|
|
256
|
+
* function postCustomRevive(player: EntityPlayer, revivalType: int): void {}
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
ModCallbackCustom[ModCallbackCustom["POST_CUSTOM_REVIVE"] = 14] = "POST_CUSTOM_REVIVE";
|
|
260
|
+
/**
|
|
261
|
+
* Fires from the `EFFECT_POST_UPDATE` callback after a player has entered the range of a Dice
|
|
262
|
+
* Room floor.
|
|
263
|
+
*
|
|
264
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
265
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
266
|
+
* matches the `DiceFloorSubType` provided.
|
|
267
|
+
*
|
|
268
|
+
* ```ts
|
|
269
|
+
* function postDiceRoomActivated(
|
|
270
|
+
* player: EntityPlayer,
|
|
271
|
+
* diceFloorSubType: DiceFloorSubType,
|
|
272
|
+
* ): void {}
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
ModCallbackCustom[ModCallbackCustom["POST_DICE_ROOM_ACTIVATED"] = 15] = "POST_DICE_ROOM_ACTIVATED";
|
|
276
|
+
/**
|
|
277
|
+
* Fires from the `POST_RENDER` callback on every frame that a door exists.
|
|
278
|
+
*
|
|
279
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
280
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
281
|
+
* matches the variant provided.
|
|
282
|
+
*
|
|
283
|
+
* ```ts
|
|
284
|
+
* function postDoorRender(door: GridEntityDoor): void {}
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
ModCallbackCustom[ModCallbackCustom["POST_DOOR_RENDER"] = 16] = "POST_DOOR_RENDER";
|
|
288
|
+
/**
|
|
289
|
+
* Fires from the `POST_UPDATE` callback on every frame that a door exists.
|
|
290
|
+
*
|
|
291
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
292
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
293
|
+
* matches the variant provided.
|
|
294
|
+
*
|
|
295
|
+
* ```ts
|
|
296
|
+
* function postDoorUpdate(door: GridEntityDoor): void {}
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
ModCallbackCustom[ModCallbackCustom["POST_DOOR_UPDATE"] = 17] = "POST_DOOR_UPDATE";
|
|
300
|
+
/**
|
|
301
|
+
* The exact same thing as the vanilla `POST_EFFECT_INIT` callback, except this callback allows
|
|
302
|
+
* you to specify extra arguments for additional filtration.
|
|
303
|
+
*
|
|
304
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
305
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
306
|
+
* matches the `EffectVariant` provided.
|
|
307
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
308
|
+
* matches the sub-type provided.
|
|
309
|
+
*
|
|
310
|
+
* ```ts
|
|
311
|
+
* function postEffectInitFilter(effect: EntityEffect): void {}
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
ModCallbackCustom[ModCallbackCustom["POST_EFFECT_INIT_FILTER"] = 18] = "POST_EFFECT_INIT_FILTER";
|
|
315
|
+
/**
|
|
316
|
+
* Fires on the first `POST_EFFECT_UPDATE` frame for each effect.
|
|
317
|
+
*
|
|
318
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
319
|
+
* normal `POST_EFFECT_INIT` callback.
|
|
320
|
+
*
|
|
321
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
322
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
323
|
+
* matches the `EffectVariant` provided.
|
|
324
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
325
|
+
* matches the sub-type provided.
|
|
326
|
+
*
|
|
327
|
+
* ```ts
|
|
328
|
+
* function postEffectInitLate(effect: EntityEffect): void {}
|
|
329
|
+
* ```
|
|
330
|
+
*/
|
|
331
|
+
ModCallbackCustom[ModCallbackCustom["POST_EFFECT_INIT_LATE"] = 19] = "POST_EFFECT_INIT_LATE";
|
|
332
|
+
/**
|
|
333
|
+
* The exact same thing as the vanilla `POST_EFFECT_RENDER` callback, except this callback allows
|
|
334
|
+
* you to specify extra arguments for additional filtration.
|
|
335
|
+
*
|
|
336
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
337
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
338
|
+
* matches the `EffectVariant` provided.
|
|
339
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
340
|
+
* matches the sub-type provided.
|
|
341
|
+
*
|
|
342
|
+
* ```ts
|
|
343
|
+
* function postEffectRenderFilter(effect: EntityEffect, renderOffset: Vector): void {}
|
|
344
|
+
* ```
|
|
345
|
+
*/
|
|
346
|
+
ModCallbackCustom[ModCallbackCustom["POST_EFFECT_RENDER_FILTER"] = 20] = "POST_EFFECT_RENDER_FILTER";
|
|
347
|
+
/**
|
|
348
|
+
* Fires from the `POST_EFFECT_UPDATE` callback when an effect's state has changed from what it
|
|
349
|
+
* was on the previous frame. (In this context, "state" refers to the `EntityEffect.State` field.)
|
|
350
|
+
*
|
|
351
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
352
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
353
|
+
* matches the `EffectVariant` provided.
|
|
354
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
355
|
+
* matches the sub-type provided.
|
|
356
|
+
*
|
|
357
|
+
* ```ts
|
|
358
|
+
* function postEffectStateChanged(
|
|
359
|
+
* effect: EntityEffect,
|
|
360
|
+
* previousState: int,
|
|
361
|
+
* currentState: int,
|
|
362
|
+
* ): void {}
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
ModCallbackCustom[ModCallbackCustom["POST_EFFECT_STATE_CHANGED"] = 21] = "POST_EFFECT_STATE_CHANGED";
|
|
366
|
+
/**
|
|
367
|
+
* The exact same thing as the vanilla `POST_EFFECT_UPDATE` callback, except this callback allows
|
|
368
|
+
* you to specify extra arguments for additional filtration.
|
|
369
|
+
*
|
|
370
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
371
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
372
|
+
* matches the `EffectVariant` provided.
|
|
373
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
374
|
+
* matches the sub-type provided.
|
|
375
|
+
*
|
|
376
|
+
* ```ts
|
|
377
|
+
* function postEffectUpdateFilter(effect: EntityEffect): void {}
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
ModCallbackCustom[ModCallbackCustom["POST_EFFECT_UPDATE_FILTER"] = 22] = "POST_EFFECT_UPDATE_FILTER";
|
|
381
|
+
/**
|
|
382
|
+
* The exact same thing as the vanilla `POST_ENTITY_KILL` callback, except this callback allows
|
|
383
|
+
* you to specify extra arguments for additional filtration.
|
|
384
|
+
*
|
|
385
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
386
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
387
|
+
* matches the `EntityType` provided.
|
|
388
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
389
|
+
* matches the variant provided.
|
|
390
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
391
|
+
* matches the sub-type provided.
|
|
392
|
+
*
|
|
393
|
+
* ```ts
|
|
394
|
+
* function postEntityKillFilter(entity: Entity): void {}
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
ModCallbackCustom[ModCallbackCustom["POST_ENTITY_KILL_FILTER"] = 23] = "POST_ENTITY_KILL_FILTER";
|
|
398
|
+
/**
|
|
399
|
+
* Fires one `POST_UPDATE` frame after the player has used the Esau Jr. item. (The player is not
|
|
400
|
+
* updated to the new character until a game frame has passed.)
|
|
401
|
+
*
|
|
402
|
+
* ```ts
|
|
403
|
+
* function postEsauJr(player: EntityPlayer): void {}
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
ModCallbackCustom[ModCallbackCustom["POST_ESAU_JR"] = 24] = "POST_ESAU_JR";
|
|
407
|
+
/**
|
|
408
|
+
* The exact same thing as the vanilla `POST_FAMILIAR_INIT` callback, except this callback allows
|
|
409
|
+
* you to specify extra arguments for additional filtration.
|
|
410
|
+
*
|
|
411
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
412
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
413
|
+
* matches the `FamiliarVariant` provided.
|
|
414
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
415
|
+
* matches the sub-type provided.
|
|
416
|
+
*
|
|
417
|
+
* ```ts
|
|
418
|
+
* function postFamiliarInitFilter(familiar: EntityFamiliar): void {}
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
ModCallbackCustom[ModCallbackCustom["POST_FAMILIAR_INIT_FILTER"] = 25] = "POST_FAMILIAR_INIT_FILTER";
|
|
422
|
+
/**
|
|
423
|
+
* Fires on the first `FAMILIAR_UPDATE` frame for each familiar.
|
|
424
|
+
*
|
|
425
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
426
|
+
* normal `POST_TEAR_INIT` callback.
|
|
427
|
+
*
|
|
428
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
429
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
430
|
+
* matches the `FamiliarVariant` provided.
|
|
431
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
432
|
+
* matches the sub-type provided.
|
|
433
|
+
*
|
|
434
|
+
* ```ts
|
|
435
|
+
* function postFamiliarInitLate(familiar: EntityFamiliar): void {}
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
438
|
+
ModCallbackCustom[ModCallbackCustom["POST_FAMILIAR_INIT_LATE"] = 26] = "POST_FAMILIAR_INIT_LATE";
|
|
439
|
+
/**
|
|
440
|
+
* The exact same thing as the vanilla `POST_FAMILIAR_RENDER` callback, except this callback
|
|
441
|
+
* allows you to specify extra arguments for additional filtration.
|
|
442
|
+
*
|
|
443
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
444
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
445
|
+
* matches the `FamiliarVariant` provided.
|
|
446
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
447
|
+
* matches the sub-type provided.
|
|
448
|
+
*
|
|
449
|
+
* ```ts
|
|
450
|
+
* function postFamiliarRenderFilter(familiar: EntityFamiliar, renderOffset: Vector): void {}
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
ModCallbackCustom[ModCallbackCustom["POST_FAMILIAR_RENDER_FILTER"] = 27] = "POST_FAMILIAR_RENDER_FILTER";
|
|
454
|
+
/**
|
|
455
|
+
* Fires from the `POST_FAMILIAR_UPDATE` callback when a familiar's state has changed from what it
|
|
456
|
+
* was on the previous frame. (In this context, "state" refers to the `EntityFamiliar.State`
|
|
457
|
+
* field.)
|
|
458
|
+
*
|
|
459
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
460
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
461
|
+
* matches the `FamiliarVariant` provided.
|
|
462
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
463
|
+
* matches the sub-type provided.
|
|
464
|
+
*
|
|
465
|
+
* ```ts
|
|
466
|
+
* function postFamiliarStateChanged(
|
|
467
|
+
* familiar: EntityFamiliar,
|
|
468
|
+
* previousState: int,
|
|
469
|
+
* currentState: int,
|
|
470
|
+
* ): void {}
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
ModCallbackCustom[ModCallbackCustom["POST_FAMILIAR_STATE_CHANGED"] = 28] = "POST_FAMILIAR_STATE_CHANGED";
|
|
474
|
+
/**
|
|
475
|
+
* The exact same thing as the vanilla `POST_FAMILIAR_UPDATE` callback, except this callback
|
|
476
|
+
* allows you to specify extra arguments for additional filtration.
|
|
477
|
+
*
|
|
478
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
479
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
480
|
+
* matches the `FamiliarVariant` provided.
|
|
481
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
482
|
+
* matches the sub-type provided.
|
|
483
|
+
*
|
|
484
|
+
* ```ts
|
|
485
|
+
* function postFamiliarUpdateFilter(familiar: EntityFamiliar): void {}
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
ModCallbackCustom[ModCallbackCustom["POST_FAMILIAR_UPDATE_FILTER"] = 29] = "POST_FAMILIAR_UPDATE_FILTER";
|
|
489
|
+
/**
|
|
490
|
+
* Fires one `POST_UPDATE` frame after the player has first used the Esau Jr. item. (The player is
|
|
491
|
+
* not updated to the new character until a game frame has passed.)
|
|
492
|
+
*
|
|
493
|
+
* This callback is useful because there is no way to get access to the Esau Jr. character entity
|
|
494
|
+
* before the player has actually used the Esau Jr. item.
|
|
495
|
+
*
|
|
496
|
+
* ```ts
|
|
497
|
+
* function postFirstEsauJr(player: EntityPlayer): void {}
|
|
498
|
+
* ```
|
|
499
|
+
*/
|
|
500
|
+
ModCallbackCustom[ModCallbackCustom["POST_FIRST_ESAU_JR"] = 30] = "POST_FIRST_ESAU_JR";
|
|
501
|
+
/**
|
|
502
|
+
* Fires after the player has used the Flip item for the first time. Unlike the vanilla `USE_ITEM`
|
|
503
|
+
* callback, this callback will return the player object for the new Lazarus (not the one who used
|
|
504
|
+
* the Flip item).
|
|
505
|
+
*
|
|
506
|
+
* This callback is useful because there is no way to get access to the "flipped" character entity
|
|
507
|
+
* before the player has actually used the Flip item.
|
|
508
|
+
*
|
|
509
|
+
* ```ts
|
|
510
|
+
* function postFirstFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
|
|
511
|
+
* ```
|
|
512
|
+
*/
|
|
513
|
+
ModCallbackCustom[ModCallbackCustom["POST_FIRST_FLIP"] = 31] = "POST_FIRST_FLIP";
|
|
514
|
+
/**
|
|
515
|
+
* Fires after the player has used the Flip item. Unlike the vanilla `USE_ITEM` callback, this
|
|
516
|
+
* callback will return the player object for the new Lazarus (not the one who used the Flip
|
|
517
|
+
* item).
|
|
518
|
+
*
|
|
519
|
+
* This callback is useful because there is no way to get access to the "flipped" character entity
|
|
520
|
+
* before the player has actually used the Flip item.
|
|
521
|
+
*
|
|
522
|
+
* ```ts
|
|
523
|
+
* function postFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
|
|
524
|
+
* ```
|
|
525
|
+
*/
|
|
526
|
+
ModCallbackCustom[ModCallbackCustom["POST_FLIP"] = 32] = "POST_FLIP";
|
|
527
|
+
/**
|
|
528
|
+
* The exact same thing as the vanilla `POST_GAME_END` callback, except this callback allows you
|
|
529
|
+
* to specify extra arguments for additional filtration.
|
|
530
|
+
*
|
|
531
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
532
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
533
|
+
* matches the `isGameOver` value provided.
|
|
534
|
+
*
|
|
535
|
+
* ```ts
|
|
536
|
+
* function postGameEndFilter(isGameOver: boolean): void {}
|
|
537
|
+
* ```
|
|
538
|
+
*/
|
|
539
|
+
ModCallbackCustom[ModCallbackCustom["POST_GAME_END_FILTER"] = 33] = "POST_GAME_END_FILTER";
|
|
540
|
+
/**
|
|
541
|
+
* Similar to the vanilla callback of the same name, but fires in the correct order with respect
|
|
542
|
+
* to the `POST_NEW_LEVEL` and the `POST_NEW_ROOM` callbacks:
|
|
543
|
+
*
|
|
544
|
+
* `POST_GAME_STARTED_REORDERED` --> `POST_NEW_LEVEL_REORDERED` --> `POST_NEW_ROOM_REORDERED`
|
|
545
|
+
*
|
|
546
|
+
* - You must provide a third argument:
|
|
547
|
+
* - Pass true if you want the callback to only fire if the run is continued.
|
|
548
|
+
* - Pass false if you want the callback to only fire when the run is not continued.
|
|
549
|
+
* - Pass undefined if you want the callback to fire in both situations.
|
|
550
|
+
*
|
|
551
|
+
* (The third argument for this callback is mandatory in order to prevent users from shooting
|
|
552
|
+
* themselves in the foot with respect to logic unexpectedly being executed on continued runs.)
|
|
553
|
+
*
|
|
554
|
+
* ```ts
|
|
555
|
+
* function postGameStartedReordered(isContinued: boolean): void {}
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
ModCallbackCustom[ModCallbackCustom["POST_GAME_STARTED_REORDERED"] = 34] = "POST_GAME_STARTED_REORDERED";
|
|
559
|
+
/**
|
|
560
|
+
* Similar to the `POST_GAME_STARTED_REORDERED` callback, but fires after all of the subscribed
|
|
561
|
+
* callbacks have finished firing. Thus, you can use this callback to do perform things after a
|
|
562
|
+
* new run has started (or continued), but you can be sure that all new-run-related initialization
|
|
563
|
+
* has been completed.
|
|
564
|
+
*
|
|
565
|
+
* - You must provide a third argument:
|
|
566
|
+
* - Pass true if you want the callback to only fire if the run is continued.
|
|
567
|
+
* - Pass false if you want the callback to only fire when the run is not continued.
|
|
568
|
+
* - Pass undefined if you want the callback to fire in both situations.
|
|
569
|
+
*
|
|
570
|
+
* (The third argument for this callback is mandatory in order to prevent users from shooting
|
|
571
|
+
* themselves in the foot with respect to logic unexpectedly being executed on continued runs.)
|
|
572
|
+
*
|
|
573
|
+
* ```ts
|
|
574
|
+
* function postGameStartedReorderedLast(isContinued: boolean): void {}
|
|
575
|
+
* ```
|
|
576
|
+
*/
|
|
577
|
+
ModCallbackCustom[ModCallbackCustom["POST_GAME_STARTED_REORDERED_LAST"] = 35] = "POST_GAME_STARTED_REORDERED_LAST";
|
|
578
|
+
/**
|
|
579
|
+
* Fires from the `POST_UPDATE` callback when the Greed Mode wave increases.
|
|
580
|
+
*
|
|
581
|
+
* ```ts
|
|
582
|
+
* function postGreedModeWave(oldWave: int, newWave: int): void {}
|
|
583
|
+
* ```
|
|
584
|
+
*/
|
|
585
|
+
ModCallbackCustom[ModCallbackCustom["POST_GREED_MODE_WAVE"] = 36] = "POST_GREED_MODE_WAVE";
|
|
586
|
+
/**
|
|
587
|
+
* Fires from the `POST_UPDATE` callback when a grid entity changes to a state that corresponds to
|
|
588
|
+
* the broken state for the respective grid entity type. (For example, this will fire for a
|
|
589
|
+
* `GridEntityType.ROCK` (2) when its state changes to `RockState.BROKEN` (2).)
|
|
590
|
+
*
|
|
591
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
592
|
+
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
593
|
+
*
|
|
594
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
595
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
596
|
+
* matches the `GridEntityType` provided.
|
|
597
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
598
|
+
* matches the variant provided.
|
|
599
|
+
*
|
|
600
|
+
* ```ts
|
|
601
|
+
* function postGridEntityBroken(gridEntity: GridEntity): void {}
|
|
602
|
+
* ```
|
|
603
|
+
*/
|
|
604
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_BROKEN"] = 37] = "POST_GRID_ENTITY_BROKEN";
|
|
605
|
+
/**
|
|
606
|
+
* Fires from the `POST_UPDATE` callback when a new entity collides with a grid entity. (After
|
|
607
|
+
* this, the callback will not continue to fire. It will only fire again once the entity moves out
|
|
608
|
+
* of range and then moves back into range.)
|
|
609
|
+
*
|
|
610
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
611
|
+
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
612
|
+
*
|
|
613
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
614
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
615
|
+
* matches the `GridEntityType` provided.
|
|
616
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
617
|
+
* matches the variant provided (for the grid entity).
|
|
618
|
+
* - You can provide an optional fifth argument that will make the callback only fire if the
|
|
619
|
+
* colliding entity matches the `EntityType` provided.
|
|
620
|
+
* - You can provide an optional sixth argument that will make the callback only fire if the
|
|
621
|
+
* colliding entity matches the variant provided.
|
|
622
|
+
* - You can provide an optional seventh argument that will make the callback only fire if the
|
|
623
|
+
* colliding entity matches the sub-type provided.
|
|
624
|
+
*
|
|
625
|
+
* ```ts
|
|
626
|
+
* function postGridEntityCollision(
|
|
627
|
+
* gridEntity: GridEntity,
|
|
628
|
+
* entity: Entity,
|
|
629
|
+
* ): void {}
|
|
630
|
+
* ```
|
|
631
|
+
*/
|
|
632
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_COLLISION"] = 38] = "POST_GRID_ENTITY_COLLISION";
|
|
633
|
+
/**
|
|
634
|
+
* The same as the `POST_GRID_ENTITY_BROKEN` callback, but only fires for grid entities created
|
|
635
|
+
* with the `spawnCustomGridEntity` helper function.
|
|
636
|
+
*
|
|
637
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
638
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
639
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
640
|
+
* there is no need for an optional argument to filter by variant.)
|
|
641
|
+
*
|
|
642
|
+
* ```ts
|
|
643
|
+
* function postGridEntityCustomBroken(
|
|
644
|
+
* gridEntity: GridEntity,
|
|
645
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
646
|
+
* ): void {}
|
|
647
|
+
* ```
|
|
648
|
+
*/
|
|
649
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_BROKEN"] = 39] = "POST_GRID_ENTITY_CUSTOM_BROKEN";
|
|
650
|
+
/**
|
|
651
|
+
* The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
|
|
652
|
+
* with the `spawnCustomGridEntity` helper function.
|
|
653
|
+
*
|
|
654
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
655
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
656
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
657
|
+
* there is no need for an optional argument to filter by variant.)
|
|
658
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
659
|
+
* colliding entity matches the `EntityType` provided.
|
|
660
|
+
* - You can provide an optional fifth argument that will make the callback only fire if the
|
|
661
|
+
* colliding entity matches the variant provided.
|
|
662
|
+
* - You can provide an optional sixth argument that will make the callback only fire if the
|
|
663
|
+
* colliding entity matches the sub-type provided.
|
|
664
|
+
*
|
|
665
|
+
* ```ts
|
|
666
|
+
* function postGridEntityCustomCollision(
|
|
667
|
+
* gridEntity: GridEntity,
|
|
668
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
669
|
+
* entity: Entity,
|
|
670
|
+
* ): void {}
|
|
671
|
+
* ```
|
|
672
|
+
*/
|
|
673
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_COLLISION"] = 40] = "POST_GRID_ENTITY_CUSTOM_COLLISION";
|
|
674
|
+
/**
|
|
675
|
+
* The same as the `POST_GRID_ENTITY_INIT` callback, but only fires for grid entities created with
|
|
676
|
+
* the `spawnCustomGridEntity` helper function.
|
|
677
|
+
*
|
|
678
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
679
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
680
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
681
|
+
* there is no need for an optional argument to filter by variant.)
|
|
682
|
+
*
|
|
683
|
+
* ```ts
|
|
684
|
+
* function postGridEntityCustomInit(
|
|
685
|
+
* gridEntity: GridEntity,
|
|
686
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
687
|
+
* ): void {}
|
|
688
|
+
* ```
|
|
689
|
+
*/
|
|
690
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_INIT"] = 41] = "POST_GRID_ENTITY_CUSTOM_INIT";
|
|
691
|
+
/**
|
|
692
|
+
* The same as the `POST_GRID_ENTITY_REMOVE` callback, but only fires for grid entities created
|
|
693
|
+
* with the `spawnCustomGridEntity` helper function.
|
|
694
|
+
*
|
|
695
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
696
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
697
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
698
|
+
* there is no need for an optional argument to filter by variant.)
|
|
699
|
+
*
|
|
700
|
+
* ```ts
|
|
701
|
+
* function postGridEntityCustomRemove(
|
|
702
|
+
* gridIndex: int,
|
|
703
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
704
|
+
* ): void {}
|
|
705
|
+
* ```
|
|
706
|
+
*/
|
|
707
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_REMOVE"] = 42] = "POST_GRID_ENTITY_CUSTOM_REMOVE";
|
|
708
|
+
/**
|
|
709
|
+
* The same as the `POST_GRID_ENTITY_RENDER` callback, but only fires for grid entities created
|
|
710
|
+
* with the `spawnCustomGridEntity` helper function.
|
|
711
|
+
*
|
|
712
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
713
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
714
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
715
|
+
* there is no need for an optional argument to filter by variant.)
|
|
716
|
+
*
|
|
717
|
+
* ```ts
|
|
718
|
+
* function postGridEntityCustomRender(
|
|
719
|
+
* gridEntity: GridEntity,
|
|
720
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
721
|
+
* ): void {}
|
|
722
|
+
* ```
|
|
723
|
+
*/
|
|
724
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_RENDER"] = 43] = "POST_GRID_ENTITY_CUSTOM_RENDER";
|
|
725
|
+
/**
|
|
726
|
+
* The same as the `POST_GRID_ENTITY_STATE_CHANGED` callback, but only fires for grid entities
|
|
727
|
+
* created with the `spawnCustomGridEntity` helper function.
|
|
728
|
+
*
|
|
729
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
730
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
731
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
732
|
+
* there is no need for an optional argument to filter by variant.)
|
|
733
|
+
*
|
|
734
|
+
* ```ts
|
|
735
|
+
* function postGridEntityCustomStateChanged(
|
|
736
|
+
* gridEntity: GridEntity,
|
|
737
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
738
|
+
* oldState: int,
|
|
739
|
+
* newState: int,
|
|
740
|
+
* ): void {}
|
|
741
|
+
* ```
|
|
742
|
+
*/
|
|
743
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_STATE_CHANGED"] = 44] = "POST_GRID_ENTITY_CUSTOM_STATE_CHANGED";
|
|
744
|
+
/**
|
|
745
|
+
* The same as the `POST_GRID_ENTITY_UPDATE` callback, but only fires for grid entities created
|
|
746
|
+
* with the `spawnCustomGridEntity` helper function.
|
|
747
|
+
*
|
|
748
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
749
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
750
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
751
|
+
* there is no need for an optional argument to filter by variant.)
|
|
752
|
+
*
|
|
753
|
+
* ```ts
|
|
754
|
+
* function postGridEntityCustomUpdate(
|
|
755
|
+
* gridEntity: GridEntity,
|
|
756
|
+
* gridEntityTypeCustom: GridEntityType,
|
|
757
|
+
* ): void {}
|
|
758
|
+
* ```
|
|
759
|
+
*/
|
|
760
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_CUSTOM_UPDATE"] = 45] = "POST_GRID_ENTITY_CUSTOM_UPDATE";
|
|
761
|
+
/**
|
|
762
|
+
* Fires when a new grid entity is initialized. Specifically, this is either:
|
|
763
|
+
*
|
|
764
|
+
* - in the `POST_NEW_ROOM_REORDERED` callback (firing every time a room is entered, even if the
|
|
765
|
+
* entity was previously there on a previous room entry)
|
|
766
|
+
* - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when the
|
|
767
|
+
* trapdoor appears after defeating It Lives)
|
|
768
|
+
*
|
|
769
|
+
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
770
|
+
* callback instead.
|
|
771
|
+
*
|
|
772
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
773
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
774
|
+
* matches the `GridEntityType` provided.
|
|
775
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
776
|
+
* matches the variant provided.
|
|
777
|
+
*
|
|
778
|
+
* ```ts
|
|
779
|
+
* function postGridEntityInit(gridEntity: GridEntity): void {}
|
|
780
|
+
* ```
|
|
781
|
+
*/
|
|
782
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_INIT"] = 46] = "POST_GRID_ENTITY_INIT";
|
|
783
|
+
/**
|
|
784
|
+
* Fires from the `POST_UPDATE` callback when a new grid entity is removed. Specifically, this on
|
|
785
|
+
* the frame after it no longer exists (where it did exist a frame ago).
|
|
786
|
+
*
|
|
787
|
+
* (Leaving a room with a grid entity does not count as "removing" it.)
|
|
788
|
+
*
|
|
789
|
+
* This will fire when a Polty/Kineti picks up a grid entity.
|
|
790
|
+
*
|
|
791
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
792
|
+
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
793
|
+
*
|
|
794
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
795
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
796
|
+
* matches the `GridEntityType` provided.
|
|
797
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
798
|
+
* matches the variant provided.
|
|
799
|
+
*
|
|
800
|
+
* ```ts
|
|
801
|
+
* function postGridEntityRemove(
|
|
802
|
+
* gridIndex: int,
|
|
803
|
+
* gridEntityType: GridEntityType,
|
|
804
|
+
* ): void {}
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_REMOVE"] = 47] = "POST_GRID_ENTITY_REMOVE";
|
|
808
|
+
/**
|
|
809
|
+
* Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
|
|
810
|
+
*
|
|
811
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
812
|
+
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
813
|
+
*
|
|
814
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
815
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
816
|
+
* matches the `GridEntityType` provided.
|
|
817
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
818
|
+
* matches the variant provided.
|
|
819
|
+
*
|
|
820
|
+
* ```ts
|
|
821
|
+
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
822
|
+
* ```
|
|
823
|
+
*/
|
|
824
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_RENDER"] = 48] = "POST_GRID_ENTITY_RENDER";
|
|
825
|
+
/**
|
|
826
|
+
* Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
|
|
827
|
+
* "state" refers to the `GridEntity.State` field.)
|
|
828
|
+
*
|
|
829
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
830
|
+
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
831
|
+
*
|
|
832
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
833
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
834
|
+
* matches the `GridEntityType` provided.
|
|
835
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
836
|
+
* matches the variant provided.
|
|
837
|
+
*
|
|
838
|
+
* ```ts
|
|
839
|
+
* function postGridEntityStateChanged(
|
|
840
|
+
* gridEntity: GridEntity,
|
|
841
|
+
* oldState: int,
|
|
842
|
+
* newState: int,
|
|
843
|
+
* ): void {}
|
|
844
|
+
* ```
|
|
845
|
+
*/
|
|
846
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_STATE_CHANGED"] = 49] = "POST_GRID_ENTITY_STATE_CHANGED";
|
|
847
|
+
/**
|
|
848
|
+
* Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
|
|
849
|
+
*
|
|
850
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
851
|
+
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
852
|
+
*
|
|
853
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
854
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
855
|
+
* matches the `GridEntityType` provided.
|
|
856
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
857
|
+
* matches the variant provided.
|
|
858
|
+
*
|
|
859
|
+
* ```ts
|
|
860
|
+
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
ModCallbackCustom[ModCallbackCustom["POST_GRID_ENTITY_UPDATE"] = 50] = "POST_GRID_ENTITY_UPDATE";
|
|
864
|
+
/**
|
|
865
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when the player loses a Holy Mantle
|
|
866
|
+
* temporary collectible effect.
|
|
867
|
+
*
|
|
868
|
+
* This callback is useful because you might want to have code that happens when the player is hit
|
|
869
|
+
* from an enemy. Normally, you would accomplish this via the `ENTITY_TAKE_DMG` callback, but that
|
|
870
|
+
* callback never fires if the player has a Holy Mantle shield.
|
|
871
|
+
*
|
|
872
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
873
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
874
|
+
* matches the `PlayerVariant` provided.
|
|
875
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
876
|
+
* matches the `PlayerType` provided.
|
|
877
|
+
*
|
|
878
|
+
* ```ts
|
|
879
|
+
* function postPlayerInitReordered(
|
|
880
|
+
* player: EntityPlayer,
|
|
881
|
+
* oldNumHolyMantles: int,
|
|
882
|
+
* newNumHolyMantles: int,
|
|
883
|
+
* ): void {}
|
|
884
|
+
* ```
|
|
885
|
+
*/
|
|
886
|
+
ModCallbackCustom[ModCallbackCustom["POST_HOLY_MANTLE_REMOVED"] = 51] = "POST_HOLY_MANTLE_REMOVED";
|
|
887
|
+
/**
|
|
888
|
+
* Fires from `POST_PEFFECT_UPDATE_REORDERED` callback when the player loses charge on their
|
|
889
|
+
* active collectible item, implying that the item was just used.
|
|
890
|
+
*
|
|
891
|
+
* This callback is useful because the `USE_ITEM` callback does not fire when The Candle, Red
|
|
892
|
+
* Candle, and Bob's Rotten Brain are discharged.
|
|
893
|
+
*
|
|
894
|
+
* Note that this callback will not fire if the active item is both discharged and swapped for
|
|
895
|
+
* another item / discharged on the same frame, like in the case of Alabaster Box.
|
|
896
|
+
*
|
|
897
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
898
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
899
|
+
* matches the `CollectibleType` provided.
|
|
900
|
+
*
|
|
901
|
+
* ```ts
|
|
902
|
+
* function postItemDischarge(
|
|
903
|
+
* player: EntityPlayer,
|
|
904
|
+
* collectibleType: CollectibleType,
|
|
905
|
+
* activeSlot: ActiveSlot,
|
|
906
|
+
* ): void {}
|
|
907
|
+
* ```
|
|
908
|
+
*/
|
|
909
|
+
ModCallbackCustom[ModCallbackCustom["POST_ITEM_DISCHARGE"] = 52] = "POST_ITEM_DISCHARGE";
|
|
910
|
+
/**
|
|
911
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item is no longer queued (i.e.
|
|
912
|
+
* when the animation of the player holding the item above their head is finished and the item is
|
|
913
|
+
* actually added to the player's inventory).
|
|
914
|
+
*
|
|
915
|
+
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
916
|
+
*
|
|
917
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
918
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
919
|
+
* matches the `ItemType` provided.
|
|
920
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
921
|
+
* sub-type matches the `CollectibleType` or the `TrinketType` provided.
|
|
922
|
+
*
|
|
923
|
+
* ```ts
|
|
924
|
+
* function postItemPickup(
|
|
925
|
+
* player: EntityPlayer,
|
|
926
|
+
* pickingUpItem: PickingUpItem,
|
|
927
|
+
* ): void {}
|
|
928
|
+
* ```
|
|
929
|
+
*/
|
|
930
|
+
ModCallbackCustom[ModCallbackCustom["POST_ITEM_PICKUP"] = 53] = "POST_ITEM_PICKUP";
|
|
931
|
+
/**
|
|
932
|
+
* Fires on the first `POST_RENDER` frame after a key on the keyboard has been pressed or
|
|
933
|
+
* released. (In other words, the callback only fires when the "pressed" status is different than
|
|
934
|
+
* what it was on the previous frame.)
|
|
935
|
+
*
|
|
936
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
937
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
938
|
+
* matches the `Keyboard` provided.
|
|
939
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
940
|
+
* matches the pressed state provided. (`true` for pressed, `false` for released.)
|
|
941
|
+
*
|
|
942
|
+
* ```ts
|
|
943
|
+
* function postKeyboardChanged(keyboard: Keyboard, pressed: boolean): void {}
|
|
944
|
+
* ```
|
|
945
|
+
*/
|
|
946
|
+
ModCallbackCustom[ModCallbackCustom["POST_KEYBOARD_CHANGED"] = 54] = "POST_KEYBOARD_CHANGED";
|
|
947
|
+
/**
|
|
948
|
+
* The exact same thing as the vanilla `POST_KNIFE_INIT` callback, except this callback allows you
|
|
949
|
+
* to specify extra arguments for additional filtration.
|
|
950
|
+
*
|
|
951
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
952
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
953
|
+
* matches the `KnifeVariant` provided.
|
|
954
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
955
|
+
* matches the sub-type provided.
|
|
956
|
+
*
|
|
957
|
+
* ```ts
|
|
958
|
+
* function postKnifeInitFilter(knife: EntityKnife): void {}
|
|
959
|
+
* ```
|
|
960
|
+
*/
|
|
961
|
+
ModCallbackCustom[ModCallbackCustom["POST_KNIFE_INIT_FILTER"] = 55] = "POST_KNIFE_INIT_FILTER";
|
|
962
|
+
/**
|
|
963
|
+
* Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
|
|
964
|
+
*
|
|
965
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
966
|
+
* normal `POST_KNIFE_INIT` callback.
|
|
967
|
+
*
|
|
968
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
969
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
970
|
+
* matches the `KnifeVariant` provided.
|
|
971
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
972
|
+
* matches the sub-type provided.
|
|
973
|
+
*
|
|
974
|
+
* ```ts
|
|
975
|
+
* function postKnifeInitLate(knife: EntityKnife): void {}
|
|
976
|
+
* ```
|
|
977
|
+
*/
|
|
978
|
+
ModCallbackCustom[ModCallbackCustom["POST_KNIFE_INIT_LATE"] = 56] = "POST_KNIFE_INIT_LATE";
|
|
979
|
+
/**
|
|
980
|
+
* The exact same thing as the vanilla `POST_KNIFE_RENDER` callback, except this callback allows
|
|
981
|
+
* you to specify extra arguments for additional filtration.
|
|
982
|
+
*
|
|
983
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
984
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
985
|
+
* matches the `KnifeVariant` provided.
|
|
986
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
987
|
+
* matches the sub-type provided.
|
|
988
|
+
*
|
|
989
|
+
* ```ts
|
|
990
|
+
* function postKnifeRenderFilter(knife: EntityKnife, renderOffset: Vector): void {}
|
|
991
|
+
* ```
|
|
992
|
+
*/
|
|
993
|
+
ModCallbackCustom[ModCallbackCustom["POST_KNIFE_RENDER_FILTER"] = 57] = "POST_KNIFE_RENDER_FILTER";
|
|
994
|
+
/**
|
|
995
|
+
* The exact same thing as the vanilla `POST_KNIFE_UPDATE` callback, except this callback allows
|
|
996
|
+
* you to specify extra arguments for additional filtration.
|
|
997
|
+
*
|
|
998
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
999
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1000
|
+
* matches the `KnifeVariant` provided.
|
|
1001
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1002
|
+
* matches the sub-type provided.
|
|
1003
|
+
*
|
|
1004
|
+
* ```ts
|
|
1005
|
+
* function postKnifeUpdateFilter(knife: EntityKnife): void {}
|
|
1006
|
+
* ```
|
|
1007
|
+
*/
|
|
1008
|
+
ModCallbackCustom[ModCallbackCustom["POST_KNIFE_UPDATE_FILTER"] = 58] = "POST_KNIFE_UPDATE_FILTER";
|
|
1009
|
+
/**
|
|
1010
|
+
* The exact same thing as the vanilla `POST_LASER_INIT` callback, except this callback allows you
|
|
1011
|
+
* to specify extra arguments for additional filtration.
|
|
1012
|
+
*
|
|
1013
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1014
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1015
|
+
* matches the `LaserVariant` provided.
|
|
1016
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1017
|
+
* matches the sub-type provided.
|
|
1018
|
+
*
|
|
1019
|
+
* ```ts
|
|
1020
|
+
* function postLaserInitFilter(laser: EntityLaser): void {}
|
|
1021
|
+
* ```
|
|
1022
|
+
*/
|
|
1023
|
+
ModCallbackCustom[ModCallbackCustom["POST_LASER_INIT_FILTER"] = 59] = "POST_LASER_INIT_FILTER";
|
|
1024
|
+
/**
|
|
1025
|
+
* Fires on the first `POST_LASER_UPDATE` frame for each laser.
|
|
1026
|
+
*
|
|
1027
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1028
|
+
* normal `POST_LASER_INIT` callback.
|
|
1029
|
+
*
|
|
1030
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1031
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1032
|
+
* matches the `LaserVariant` provided.
|
|
1033
|
+
* - You can provide an optional forth argument that will make the callback only fire if it
|
|
1034
|
+
* matches the sub-type provided.
|
|
1035
|
+
*
|
|
1036
|
+
* ```ts
|
|
1037
|
+
* function postLaserInitLate(laser: EntityLaser): void {}
|
|
1038
|
+
* ```
|
|
1039
|
+
*/
|
|
1040
|
+
ModCallbackCustom[ModCallbackCustom["POST_LASER_INIT_LATE"] = 60] = "POST_LASER_INIT_LATE";
|
|
1041
|
+
/**
|
|
1042
|
+
* The exact same thing as the vanilla `POST_LASER_RENDER` callback, except this callback allows
|
|
1043
|
+
* you to specify extra arguments for additional filtration.
|
|
1044
|
+
*
|
|
1045
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1046
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1047
|
+
* matches the `LaserVariant` provided.
|
|
1048
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1049
|
+
* matches the sub-type provided.
|
|
1050
|
+
*
|
|
1051
|
+
* ```ts
|
|
1052
|
+
* function postLaserRenderFilter(laser: EntityLaser, renderOffset: Vector): void {}
|
|
1053
|
+
* ```
|
|
1054
|
+
*/
|
|
1055
|
+
ModCallbackCustom[ModCallbackCustom["POST_LASER_RENDER_FILTER"] = 61] = "POST_LASER_RENDER_FILTER";
|
|
1056
|
+
/**
|
|
1057
|
+
* The exact same thing as the vanilla `POST_LASER_UPDATE` callback, except this callback allows
|
|
1058
|
+
* you to specify extra arguments for additional filtration.
|
|
1059
|
+
*
|
|
1060
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1061
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1062
|
+
* matches the `LaserVariant` provided.
|
|
1063
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1064
|
+
* matches the sub-type provided.
|
|
1065
|
+
*
|
|
1066
|
+
* ```ts
|
|
1067
|
+
* function postLaserUpdateFilter(laser: EntityLaser): void {}
|
|
1068
|
+
* ```
|
|
1069
|
+
*/
|
|
1070
|
+
ModCallbackCustom[ModCallbackCustom["POST_LASER_UPDATE_FILTER"] = 62] = "POST_LASER_UPDATE_FILTER";
|
|
1071
|
+
/**
|
|
1072
|
+
* The same as the vanilla callback of the same name, but fires in the correct order with respect
|
|
1073
|
+
* to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
|
|
1074
|
+
*
|
|
1075
|
+
* `POST_GAME_STARTED_REORDERED` --> `POST_NEW_LEVEL_REORDERED` --> `POST_NEW_ROOM_REORDERED`
|
|
1076
|
+
*
|
|
1077
|
+
* Additionally, this callback will pass the `LevelStage` as the first callback argument and the
|
|
1078
|
+
* `StageType` as the second callback argument.
|
|
1079
|
+
*
|
|
1080
|
+
* Note that similar to the vanilla `POST_NEW_LEVEL` callback, this callback will not fire when a
|
|
1081
|
+
* player resumes a saved run. (In that case, only the `POST_GAME_STARTED_REORDERED` and the
|
|
1082
|
+
* `POST_NEW_ROOM_REORDERED` callbacks will fire, in that order).
|
|
1083
|
+
*
|
|
1084
|
+
* If some specific cases, mods can change the current level during run initialization (on the 0th
|
|
1085
|
+
* frame). However, due to how the callback reordering works, the custom
|
|
1086
|
+
* `POST_NEW_LEVEL_REORDERED` callback will never fire on the 0th frame. To get around this, call
|
|
1087
|
+
* the `forceNewLevelCallback()` function before changing levels to temporarily force the callback
|
|
1088
|
+
* to fire.
|
|
1089
|
+
*
|
|
1090
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1091
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1092
|
+
* matches the `LevelStage` provided.
|
|
1093
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1094
|
+
* matches the `StageType` provided.
|
|
1095
|
+
*
|
|
1096
|
+
* ```ts
|
|
1097
|
+
* function postNewLevelReordered(stage: LevelStage, stageType: StageType): void {}
|
|
1098
|
+
* ```
|
|
1099
|
+
*/
|
|
1100
|
+
ModCallbackCustom[ModCallbackCustom["POST_NEW_LEVEL_REORDERED"] = 63] = "POST_NEW_LEVEL_REORDERED";
|
|
1101
|
+
/**
|
|
1102
|
+
* Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
|
|
1103
|
+
* detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
|
|
1104
|
+
* in the room have been initialized and updated once, which means that it is possible for
|
|
1105
|
+
* entity-related code to run before room-related-initialization has been performed.
|
|
1106
|
+
*
|
|
1107
|
+
* Additionally, this callback will pass the `RoomType` as the first callback argument.
|
|
1108
|
+
*
|
|
1109
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1110
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1111
|
+
* matches the `RoomType` provided.
|
|
1112
|
+
*
|
|
1113
|
+
* ```ts
|
|
1114
|
+
* function postNewRoomEarly(roomType: RoomType): void {}
|
|
1115
|
+
* ```
|
|
1116
|
+
*/
|
|
1117
|
+
ModCallbackCustom[ModCallbackCustom["POST_NEW_ROOM_EARLY"] = 64] = "POST_NEW_ROOM_EARLY";
|
|
1118
|
+
/**
|
|
1119
|
+
* The same as the vanilla callback of the same name, but fires in the correct order with respect
|
|
1120
|
+
* to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
|
|
1121
|
+
*
|
|
1122
|
+
* `POST_GAME_STARTED_REORDERED` --> `POST_NEW_LEVEL_REORDERED` --> `POST_NEW_ROOM_REORDERED`
|
|
1123
|
+
*
|
|
1124
|
+
* Additionally, this callback will pass the `RoomType` as the first callback argument.
|
|
1125
|
+
*
|
|
1126
|
+
* If some specific cases, mods can change the current room during run initialization (on the 0th
|
|
1127
|
+
* frame). However, due to how the callback reordering works, the custom `POST_NEW_ROOM_REORDERED`
|
|
1128
|
+
* callback will never fire on the 0th frame. To get around this, call the
|
|
1129
|
+
* `forceNewRoomCallback()` function before changing levels to temporarily force the callback to
|
|
1130
|
+
* fire.
|
|
1131
|
+
*
|
|
1132
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1133
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1134
|
+
* matches the `RoomType` provided.
|
|
1135
|
+
*
|
|
1136
|
+
* ```ts
|
|
1137
|
+
* function postNewRoomReordered(roomType: RoomType): void {}
|
|
1138
|
+
* ```
|
|
1139
|
+
*/
|
|
1140
|
+
ModCallbackCustom[ModCallbackCustom["POST_NEW_ROOM_REORDERED"] = 65] = "POST_NEW_ROOM_REORDERED";
|
|
1141
|
+
/**
|
|
1142
|
+
* The exact same thing as the vanilla `POST_NPC_DEATH` callback, except this callback allows you
|
|
1143
|
+
* to specify extra arguments for additional filtration.
|
|
1144
|
+
*
|
|
1145
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1146
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1147
|
+
* matches the `EntityType` provided.
|
|
1148
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1149
|
+
* matches the variant provided.
|
|
1150
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
1151
|
+
* matches the sub-type provided.
|
|
1152
|
+
*
|
|
1153
|
+
* ```ts
|
|
1154
|
+
* function postNPCDeathFilter(npc: EntityNPC): void {}
|
|
1155
|
+
* ```
|
|
1156
|
+
*/
|
|
1157
|
+
ModCallbackCustom[ModCallbackCustom["POST_NPC_DEATH_FILTER"] = 66] = "POST_NPC_DEATH_FILTER";
|
|
1158
|
+
/**
|
|
1159
|
+
* The exact same thing as the vanilla `POST_NPC_INIT` callback, except this callback allows you
|
|
1160
|
+
* to specify extra arguments for additional filtration.
|
|
1161
|
+
*
|
|
1162
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1163
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1164
|
+
* matches the `EntityType` provided.
|
|
1165
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1166
|
+
* matches the variant provided.
|
|
1167
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
1168
|
+
* matches the sub-type provided.
|
|
1169
|
+
*
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* function postNPCInitFilter(npc: EntityNPC): void {}
|
|
1172
|
+
* ```
|
|
1173
|
+
*/
|
|
1174
|
+
ModCallbackCustom[ModCallbackCustom["POST_NPC_INIT_FILTER"] = 67] = "POST_NPC_INIT_FILTER";
|
|
1175
|
+
/**
|
|
1176
|
+
* Fires on the first `NPC_UPDATE` frame for each NPC.
|
|
1177
|
+
*
|
|
1178
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1179
|
+
* normal `POST_NPC_INIT` callback.
|
|
1180
|
+
*
|
|
1181
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1182
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1183
|
+
* matches the `EntityType` provided.
|
|
1184
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1185
|
+
* matches the variant provided.
|
|
1186
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
1187
|
+
* matches the sub-type provided.
|
|
1188
|
+
*
|
|
1189
|
+
* ```ts
|
|
1190
|
+
* function postNPCInitLate(npc: EntityNPC): void {}
|
|
1191
|
+
* ```
|
|
1192
|
+
*/
|
|
1193
|
+
ModCallbackCustom[ModCallbackCustom["POST_NPC_INIT_LATE"] = 68] = "POST_NPC_INIT_LATE";
|
|
1194
|
+
/**
|
|
1195
|
+
* The exact same thing as the vanilla `POST_NPC_RENDER` callback, except this callback allows you
|
|
1196
|
+
* to specify extra arguments for additional filtration.
|
|
1197
|
+
*
|
|
1198
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1199
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1200
|
+
* matches the `EntityType` provided.
|
|
1201
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1202
|
+
* matches the variant provided.
|
|
1203
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
1204
|
+
* matches the sub-type provided.
|
|
1205
|
+
*
|
|
1206
|
+
* ```ts
|
|
1207
|
+
* function postNPCRenderFilter(npc: EntityNPC, renderOffset: Vector): void {}
|
|
1208
|
+
* ```
|
|
1209
|
+
*/
|
|
1210
|
+
ModCallbackCustom[ModCallbackCustom["POST_NPC_RENDER_FILTER"] = 69] = "POST_NPC_RENDER_FILTER";
|
|
1211
|
+
/**
|
|
1212
|
+
* Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
|
|
1213
|
+
* the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
|
|
1214
|
+
*
|
|
1215
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1216
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1217
|
+
* matches the `EntityType` provided.
|
|
1218
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1219
|
+
* matches the variant provided.
|
|
1220
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
1221
|
+
* matches the sub-type provided.
|
|
1222
|
+
*
|
|
1223
|
+
* ```ts
|
|
1224
|
+
* function postNPCStateChanged(
|
|
1225
|
+
* npc: EntityNPC,
|
|
1226
|
+
* previousState: int,
|
|
1227
|
+
* currentState: int,
|
|
1228
|
+
* ): void {}
|
|
1229
|
+
* ```
|
|
1230
|
+
*/
|
|
1231
|
+
ModCallbackCustom[ModCallbackCustom["POST_NPC_STATE_CHANGED"] = 70] = "POST_NPC_STATE_CHANGED";
|
|
1232
|
+
/**
|
|
1233
|
+
* The exact same thing as the vanilla `POST_NPC_UPDATE` callback, except this callback allows you
|
|
1234
|
+
* to specify extra arguments for additional filtration.
|
|
1235
|
+
*
|
|
1236
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1237
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1238
|
+
* matches the `EntityType` provided.
|
|
1239
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1240
|
+
* matches the variant provided.
|
|
1241
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
1242
|
+
* matches the sub-type provided.
|
|
1243
|
+
*
|
|
1244
|
+
* ```ts
|
|
1245
|
+
* function postNPCUpdateFilter(npc: EntityNPC): void {}
|
|
1246
|
+
* ```
|
|
1247
|
+
*/
|
|
1248
|
+
ModCallbackCustom[ModCallbackCustom["POST_NPC_UPDATE_FILTER"] = 71] = "POST_NPC_UPDATE_FILTER";
|
|
1249
|
+
/**
|
|
1250
|
+
* Similar to the vanilla callback of the same name, but fires after the
|
|
1251
|
+
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
1252
|
+
* frame of the run).
|
|
1253
|
+
*
|
|
1254
|
+
* This callback is useful for two reasons:
|
|
1255
|
+
*
|
|
1256
|
+
* 1. Normally, `POST_PEFFECT_UPDATE` fires before `POST_GAME_STARTED`. Since mod variables are
|
|
1257
|
+
* often initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause
|
|
1258
|
+
* problems.
|
|
1259
|
+
* 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
|
|
1260
|
+
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
1261
|
+
* any rooms.
|
|
1262
|
+
*
|
|
1263
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1264
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1265
|
+
* matches the `PlayerVariant` provided.
|
|
1266
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1267
|
+
* matches the `PlayerType` provided.
|
|
1268
|
+
*
|
|
1269
|
+
* ```ts
|
|
1270
|
+
* function postPEffectUpdateReordered(player: EntityPlayer): void {}
|
|
1271
|
+
* ```
|
|
1272
|
+
*/
|
|
1273
|
+
ModCallbackCustom[ModCallbackCustom["POST_PEFFECT_UPDATE_REORDERED"] = 72] = "POST_PEFFECT_UPDATE_REORDERED";
|
|
1274
|
+
/**
|
|
1275
|
+
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup has a different variant or sub-type
|
|
1276
|
+
* than what it was on the previous frame.
|
|
1277
|
+
*
|
|
1278
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1279
|
+
* - You can provide an optional third argument that will make the callback only fire if the new
|
|
1280
|
+
* pickup matches the `PickupVariant` provided.
|
|
1281
|
+
* - You can provide an optional third argument that will make the callback only fire if the new
|
|
1282
|
+
* pickup matches the sub-type provided.
|
|
1283
|
+
*
|
|
1284
|
+
* ```ts
|
|
1285
|
+
* function postPickupChanged(
|
|
1286
|
+
* pickup: EntityPickup,
|
|
1287
|
+
* oldVariant: PickupVariant,
|
|
1288
|
+
* oldSubType: int,
|
|
1289
|
+
* newVariant: PickupVariant,
|
|
1290
|
+
* newSubType: int,
|
|
1291
|
+
* ): void {}
|
|
1292
|
+
* ```
|
|
1293
|
+
*/
|
|
1294
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_CHANGED"] = 73] = "POST_PICKUP_CHANGED";
|
|
1295
|
+
/**
|
|
1296
|
+
* Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
|
|
1297
|
+
*
|
|
1298
|
+
* Use this callback to know when a pickup is added to the player's inventory or health.
|
|
1299
|
+
*
|
|
1300
|
+
* Note that this will not fire when the player takes a collectible; use either the
|
|
1301
|
+
* `POST_PLAYER_COLLECTIBLE_ADDED` or the `PRE_ITEM_PICKUP` callback for that.
|
|
1302
|
+
*
|
|
1303
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1304
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1305
|
+
* matches the `PickupVariant` provided.
|
|
1306
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1307
|
+
* matches the sub-type provided.
|
|
1308
|
+
*
|
|
1309
|
+
* ```ts
|
|
1310
|
+
* function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
|
|
1311
|
+
* ```
|
|
1312
|
+
*/
|
|
1313
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_COLLECT"] = 74] = "POST_PICKUP_COLLECT";
|
|
1314
|
+
/**
|
|
1315
|
+
* The exact same thing as the vanilla `POST_PICKUP_INIT` callback, except this callback allows
|
|
1316
|
+
* you to specify extra arguments for additional filtration.
|
|
1317
|
+
*
|
|
1318
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1319
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1320
|
+
* matches the `PickupVariant` provided.
|
|
1321
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1322
|
+
* matches the sub-type provided.
|
|
1323
|
+
*
|
|
1324
|
+
* ```ts
|
|
1325
|
+
* function postPickupInitFilter(pickup: EntityPickup): void {}
|
|
1326
|
+
* ```
|
|
1327
|
+
*/
|
|
1328
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_INIT_FILTER"] = 75] = "POST_PICKUP_INIT_FILTER";
|
|
1329
|
+
/**
|
|
1330
|
+
* Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
|
|
1331
|
+
* respective pickup on the run.
|
|
1332
|
+
*
|
|
1333
|
+
* This callback is useful because pickups will despawn upon leaving the room and respawn upon
|
|
1334
|
+
* re-entering the room.
|
|
1335
|
+
*
|
|
1336
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1337
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1338
|
+
* matches the `PickupVariant` provided.
|
|
1339
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1340
|
+
* matches the sub-type provided.
|
|
1341
|
+
*
|
|
1342
|
+
* ```ts
|
|
1343
|
+
* function postPickupInitFirst(pickup: EntityPickup): void {}
|
|
1344
|
+
* ```
|
|
1345
|
+
*/
|
|
1346
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_INIT_FIRST"] = 76] = "POST_PICKUP_INIT_FIRST";
|
|
1347
|
+
/**
|
|
1348
|
+
* Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
|
|
1349
|
+
*
|
|
1350
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1351
|
+
* normal `POST_PICKUP_INIT` callback.
|
|
1352
|
+
*
|
|
1353
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1354
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1355
|
+
* matches the `PickupVariant` provided.
|
|
1356
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1357
|
+
* matches the sub-type provided.
|
|
1358
|
+
*
|
|
1359
|
+
* ```ts
|
|
1360
|
+
* function postPickupInitLate(pickup: EntityPickup): void {}
|
|
1361
|
+
* ```
|
|
1362
|
+
*/
|
|
1363
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_INIT_LATE"] = 77] = "POST_PICKUP_INIT_LATE";
|
|
1364
|
+
/**
|
|
1365
|
+
* The exact same thing as the vanilla `POST_PICKUP_RENDER` callback, except this callback allows
|
|
1366
|
+
* you to specify extra arguments for additional filtration.
|
|
1367
|
+
*
|
|
1368
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1369
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1370
|
+
* matches the `PickupVariant` provided.
|
|
1371
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1372
|
+
* matches the sub-type provided.
|
|
1373
|
+
*
|
|
1374
|
+
* ```ts
|
|
1375
|
+
* function postPickupRenderFilter(pickup: EntityPickup, renderOffset: Vector): void {}
|
|
1376
|
+
* ```
|
|
1377
|
+
*/
|
|
1378
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_RENDER_FILTER"] = 78] = "POST_PICKUP_RENDER_FILTER";
|
|
1379
|
+
/**
|
|
1380
|
+
* The exact same thing as the vanilla `POST_PICKUP_SELECTION` callback, except this callback
|
|
1381
|
+
* allows you to specify extra arguments for additional filtration.
|
|
1382
|
+
*
|
|
1383
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1384
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1385
|
+
* matches the `PickupVariant` provided.
|
|
1386
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1387
|
+
* matches the sub-type provided.
|
|
1388
|
+
*
|
|
1389
|
+
* ```ts
|
|
1390
|
+
* function postPickupSelectionFilter(
|
|
1391
|
+
* pickup: EntityPickup,
|
|
1392
|
+
* variant: PickupVariant,
|
|
1393
|
+
* subType: int,
|
|
1394
|
+
* ): [pickupVariant: PickupVariant, subType: int] | undefined {}
|
|
1395
|
+
* ```
|
|
1396
|
+
*/
|
|
1397
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_SELECTION_FILTER"] = 79] = "POST_PICKUP_SELECTION_FILTER";
|
|
1398
|
+
/**
|
|
1399
|
+
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
|
|
1400
|
+
* on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
|
|
1401
|
+
*
|
|
1402
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1403
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1404
|
+
* matches the `PickupVariant` provided.
|
|
1405
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1406
|
+
* matches the sub-type provided.
|
|
1407
|
+
*
|
|
1408
|
+
* ```ts
|
|
1409
|
+
* function postPickupStateChanged(
|
|
1410
|
+
* pickup: EntityPickup,
|
|
1411
|
+
* previousState: int,
|
|
1412
|
+
* currentState: int,
|
|
1413
|
+
* ): void {}
|
|
1414
|
+
* ```
|
|
1415
|
+
*/
|
|
1416
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_STATE_CHANGED"] = 80] = "POST_PICKUP_STATE_CHANGED";
|
|
1417
|
+
/**
|
|
1418
|
+
* The exact same thing as the vanilla `POST_PICKUP_UPDATE` callback, except this callback allows
|
|
1419
|
+
* you to specify extra arguments for additional filtration.
|
|
1420
|
+
*
|
|
1421
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1422
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1423
|
+
* matches the `PickupVariant` provided.
|
|
1424
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1425
|
+
* matches the sub-type provided.
|
|
1426
|
+
*
|
|
1427
|
+
* ```ts
|
|
1428
|
+
* function postPickupUpdateFilter(pickup: EntityPickup): void {}
|
|
1429
|
+
* ```
|
|
1430
|
+
*/
|
|
1431
|
+
ModCallbackCustom[ModCallbackCustom["POST_PICKUP_UPDATE_FILTER"] = 81] = "POST_PICKUP_UPDATE_FILTER";
|
|
1432
|
+
/**
|
|
1433
|
+
* Fires from the `POST_RENDER` callback on every frame that a pit exists.
|
|
1434
|
+
*
|
|
1435
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1436
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1437
|
+
* matches the variant provided.
|
|
1438
|
+
*
|
|
1439
|
+
* ```ts
|
|
1440
|
+
* function postPitRender(pit: GridEntityPit): void {}
|
|
1441
|
+
* ```
|
|
1442
|
+
*/
|
|
1443
|
+
ModCallbackCustom[ModCallbackCustom["POST_PIT_RENDER"] = 82] = "POST_PIT_RENDER";
|
|
1444
|
+
/**
|
|
1445
|
+
* Fires from the `POST_UPDATE` callback on every frame that a pit exists.
|
|
1446
|
+
*
|
|
1447
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1448
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1449
|
+
* matches the variant provided.
|
|
1450
|
+
*
|
|
1451
|
+
* ```ts
|
|
1452
|
+
* function postPitUpdate(pit: GridEntityPit): void {}
|
|
1453
|
+
* ```
|
|
1454
|
+
*/
|
|
1455
|
+
ModCallbackCustom[ModCallbackCustom["POST_PIT_UPDATE"] = 83] = "POST_PIT_UPDATE";
|
|
1456
|
+
/**
|
|
1457
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's health (i.e. hearts) is
|
|
1458
|
+
* different than what it was on the previous frame. For more information, see the `PlayerHealth`
|
|
1459
|
+
* enum.
|
|
1460
|
+
*
|
|
1461
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1462
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1463
|
+
* matches the `PlayerVariant` provided.
|
|
1464
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1465
|
+
* matches the `PlayerType` provided.
|
|
1466
|
+
*
|
|
1467
|
+
* ```ts
|
|
1468
|
+
* function postPlayerChangeHealth(
|
|
1469
|
+
* player: EntityPlayer,
|
|
1470
|
+
* healthType: HealthType,
|
|
1471
|
+
* difference: int,
|
|
1472
|
+
* oldValue: int,
|
|
1473
|
+
* newValue: int,
|
|
1474
|
+
* ): void {}
|
|
1475
|
+
* ```
|
|
1476
|
+
*/
|
|
1477
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_CHANGE_HEALTH"] = 84] = "POST_PLAYER_CHANGE_HEALTH";
|
|
1478
|
+
/**
|
|
1479
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when one of the player's stats change
|
|
1480
|
+
* from what they were on the previous frame.
|
|
1481
|
+
*
|
|
1482
|
+
* The type of `oldValue` and `newValue` will depend on what kind of stat it is. For example,
|
|
1483
|
+
* `StatType.FLYING` will be a boolean. (You can use the "Types" helper functions to narrow the
|
|
1484
|
+
* type.)
|
|
1485
|
+
*
|
|
1486
|
+
* For `StatType.TEAR_FLAG`, `StatType.TEAR_COLOR`, `StatType.FLYING`, and `StatType.SIZE`, the
|
|
1487
|
+
* `difference` argument will always be a value of 0, since the type of these stats are not
|
|
1488
|
+
* numbers. (For these cases, you should examine the `oldValue` and `newValue` arguments
|
|
1489
|
+
* accordingly.)
|
|
1490
|
+
*
|
|
1491
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1492
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1493
|
+
* matches the `PlayerVariant` provided.
|
|
1494
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1495
|
+
* matches the `PlayerType` provided.
|
|
1496
|
+
*
|
|
1497
|
+
* ```ts
|
|
1498
|
+
* function postPlayerChangeStat<T extends StatType>(
|
|
1499
|
+
* player: EntityPlayer,
|
|
1500
|
+
* statType: T,
|
|
1501
|
+
* difference: int,
|
|
1502
|
+
* oldValue: StatTypeType[T],
|
|
1503
|
+
* newValue: StatTypeType[T],
|
|
1504
|
+
* ) => void {}
|
|
1505
|
+
* ```
|
|
1506
|
+
*/
|
|
1507
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_CHANGE_STAT"] = 85] = "POST_PLAYER_CHANGE_STAT";
|
|
1508
|
+
/**
|
|
1509
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player entity changes its player
|
|
1510
|
+
* type
|
|
1511
|
+
* (i.e. character) from what it was on the previous frame. For example, it will fire after using
|
|
1512
|
+
* Clicker, after dying with the Judas' Shadow collectible, etc.
|
|
1513
|
+
*
|
|
1514
|
+
* Notably, it does not fire after the player uses the Flip item or the Esau Jr. item, because
|
|
1515
|
+
* those items cause separate player entities to be created. Use the `POST_FLIP` and
|
|
1516
|
+
* `POST_ESAU_JR` callbacks to handle those situations.
|
|
1517
|
+
*
|
|
1518
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1519
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1520
|
+
* matches the `PlayerVariant` provided.
|
|
1521
|
+
*
|
|
1522
|
+
* ```ts
|
|
1523
|
+
* function postPlayerChangeType(
|
|
1524
|
+
* player: EntityPlayer,
|
|
1525
|
+
* oldCharacter: PlayerType,
|
|
1526
|
+
* newCharacter: PlayerType,
|
|
1527
|
+
* ): void {}
|
|
1528
|
+
* ```
|
|
1529
|
+
*/
|
|
1530
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_CHANGE_TYPE"] = 86] = "POST_PLAYER_CHANGE_TYPE";
|
|
1531
|
+
/**
|
|
1532
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
|
|
1533
|
+
* higher than what it was on the previous frame, or when the active items change, or when the
|
|
1534
|
+
* build is rerolled.
|
|
1535
|
+
*
|
|
1536
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1537
|
+
* - You can provide an optional third argument that will make the callback only fire if the
|
|
1538
|
+
* collectible matches the `CollectibleType` provided.
|
|
1539
|
+
*
|
|
1540
|
+
* ```ts
|
|
1541
|
+
* function postPlayerCollectibleAdded(
|
|
1542
|
+
* player: EntityPlayer,
|
|
1543
|
+
* collectibleType: CollectibleType,
|
|
1544
|
+
* ): void {}
|
|
1545
|
+
* ```
|
|
1546
|
+
*/
|
|
1547
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_COLLECTIBLE_ADDED"] = 87] = "POST_PLAYER_COLLECTIBLE_ADDED";
|
|
1548
|
+
/**
|
|
1549
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
|
|
1550
|
+
* lower than what it was on the previous frame, or when the active items change, or when the
|
|
1551
|
+
* build is rerolled.
|
|
1552
|
+
*
|
|
1553
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1554
|
+
* - You can provide an optional third argument that will make the callback only fire if the
|
|
1555
|
+
* collectible matches the `CollectibleType` provided.
|
|
1556
|
+
*
|
|
1557
|
+
* ```ts
|
|
1558
|
+
* function postPlayerCollectibleRemoved(
|
|
1559
|
+
* player: EntityPlayer,
|
|
1560
|
+
* collectibleType: CollectibleType,
|
|
1561
|
+
* ): void {}
|
|
1562
|
+
* ```
|
|
1563
|
+
*/
|
|
1564
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_COLLECTIBLE_REMOVED"] = 88] = "POST_PLAYER_COLLECTIBLE_REMOVED";
|
|
1565
|
+
/**
|
|
1566
|
+
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
|
|
1567
|
+
* prevent the fatal damage.
|
|
1568
|
+
*
|
|
1569
|
+
* Note that this function does properly take into account Guppy's Collar, Broken Ankh, Spirit
|
|
1570
|
+
* Shackles, and Mysterious Paper. It also takes into account using The Bible on Satan.
|
|
1571
|
+
*
|
|
1572
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1573
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1574
|
+
* matches the `PlayerVariant` provided.
|
|
1575
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1576
|
+
* matches the `PlayerType` provided.
|
|
1577
|
+
*
|
|
1578
|
+
* ```ts
|
|
1579
|
+
* function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
|
|
1580
|
+
* ```
|
|
1581
|
+
*/
|
|
1582
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_FATAL_DAMAGE"] = 89] = "POST_PLAYER_FATAL_DAMAGE";
|
|
1583
|
+
/**
|
|
1584
|
+
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
|
|
1585
|
+
* `POST_PLAYER_INIT_LATE` callback, with two changes:
|
|
1586
|
+
*
|
|
1587
|
+
* - This will not fire for "child" players (e.g. non-real players like the Strawman Keeper).
|
|
1588
|
+
* - This will fire when the player enters a Genesis room and all of their items are taken away.
|
|
1589
|
+
*
|
|
1590
|
+
* You should use this callback for any player-related initialization logic, like giving the
|
|
1591
|
+
* character their starting items for the run. (You do not want to use the vanilla
|
|
1592
|
+
* `POST_PLAYER_INIT` callback for this because it fires when a run is continued.)
|
|
1593
|
+
*
|
|
1594
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1595
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1596
|
+
* matches the `PlayerVariant` provided.
|
|
1597
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1598
|
+
* matches the `PlayerType` provided.
|
|
1599
|
+
*
|
|
1600
|
+
* ```ts
|
|
1601
|
+
* function postPlayerInitFirst(player: EntityPlayer): void {}
|
|
1602
|
+
* ```
|
|
1603
|
+
*/
|
|
1604
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_INIT_FIRST"] = 90] = "POST_PLAYER_INIT_FIRST";
|
|
1605
|
+
/**
|
|
1606
|
+
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
|
|
1607
|
+
*
|
|
1608
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1609
|
+
* normal `POST_PLAYER_INIT` callback.
|
|
1610
|
+
*
|
|
1611
|
+
* For initializing a player with custom items and so forth, use the `POST_PLAYER_INIT_FIRST`
|
|
1612
|
+
* callback instead to handle the case of a Genesis room.
|
|
1613
|
+
*
|
|
1614
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1615
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1616
|
+
* matches the `PlayerVariant` provided.
|
|
1617
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1618
|
+
* matches the `PlayerType` provided.
|
|
1619
|
+
*
|
|
1620
|
+
* ```ts
|
|
1621
|
+
* function postPlayerInitLate(pickup: EntityPickup): void {}
|
|
1622
|
+
* ```
|
|
1623
|
+
*/
|
|
1624
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_INIT_LATE"] = 91] = "POST_PLAYER_INIT_LATE";
|
|
1625
|
+
/**
|
|
1626
|
+
* Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
|
|
1627
|
+
* callback fires (if the player is spawning on the 0th game frame of the run).
|
|
1628
|
+
*
|
|
1629
|
+
* This callback is useful for two reasons:
|
|
1630
|
+
*
|
|
1631
|
+
* 1. Normally, `POST_PLAYER_RENDER` fires before `POST_GAME_STARTED`. Since mod variables are
|
|
1632
|
+
* often initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause
|
|
1633
|
+
* problems.
|
|
1634
|
+
* 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
|
|
1635
|
+
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
1636
|
+
* any rooms.
|
|
1637
|
+
*
|
|
1638
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1639
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1640
|
+
* matches the `PlayerVariant` provided.
|
|
1641
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1642
|
+
* matches the `PlayerType` provided.
|
|
1643
|
+
*
|
|
1644
|
+
* ```ts
|
|
1645
|
+
* function postPlayerRenderReordered(player: EntityPlayer, renderOffset: Vector): void {}
|
|
1646
|
+
* ```
|
|
1647
|
+
*/
|
|
1648
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_RENDER_REORDERED"] = 92] = "POST_PLAYER_RENDER_REORDERED";
|
|
1649
|
+
/**
|
|
1650
|
+
* Similar to the vanilla callback of the same name, but fires after the
|
|
1651
|
+
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
1652
|
+
* frame of the run).
|
|
1653
|
+
*
|
|
1654
|
+
* This callback is useful for two reasons:
|
|
1655
|
+
*
|
|
1656
|
+
* 1. Normally, `POST_PLAYER_UPDATE` fires before `POST_GAME_STARTED`. Since mod variables are
|
|
1657
|
+
* often initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause
|
|
1658
|
+
* problems.
|
|
1659
|
+
* 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
|
|
1660
|
+
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
1661
|
+
* any rooms.
|
|
1662
|
+
*
|
|
1663
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1664
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1665
|
+
* matches the `PlayerVariant` provided.
|
|
1666
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1667
|
+
* matches the `PlayerType` provided.
|
|
1668
|
+
*
|
|
1669
|
+
* ```ts
|
|
1670
|
+
* function postPlayerUpdateReordered(player: EntityPlayer): void {}
|
|
1671
|
+
* ```
|
|
1672
|
+
*/
|
|
1673
|
+
ModCallbackCustom[ModCallbackCustom["POST_PLAYER_UPDATE_REORDERED"] = 93] = "POST_PLAYER_UPDATE_REORDERED";
|
|
1674
|
+
/**
|
|
1675
|
+
* Fires from the `POST_RENDER` callback on every frame that a poop exists.
|
|
1676
|
+
*
|
|
1677
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1678
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1679
|
+
* matches the variant provided.
|
|
1680
|
+
*
|
|
1681
|
+
* ```ts
|
|
1682
|
+
* function postPoopRender(poop: GridEntityPoop): void {}
|
|
1683
|
+
* ```
|
|
1684
|
+
*/
|
|
1685
|
+
ModCallbackCustom[ModCallbackCustom["POST_POOP_RENDER"] = 94] = "POST_POOP_RENDER";
|
|
1686
|
+
/**
|
|
1687
|
+
* Fires from the `POST_UPDATE` callback on every frame that a poop exists.
|
|
1688
|
+
*
|
|
1689
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1690
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1691
|
+
* matches the variant provided.
|
|
1692
|
+
*
|
|
1693
|
+
* ```ts
|
|
1694
|
+
* function postPoopUpdate(poop: GridEntityPoop): void {}
|
|
1695
|
+
* ```
|
|
1696
|
+
*/
|
|
1697
|
+
ModCallbackCustom[ModCallbackCustom["POST_POOP_UPDATE"] = 95] = "POST_POOP_UPDATE";
|
|
1698
|
+
/**
|
|
1699
|
+
* Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
|
|
1700
|
+
*
|
|
1701
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1702
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1703
|
+
* matches the variant provided.
|
|
1704
|
+
*
|
|
1705
|
+
* ```ts
|
|
1706
|
+
* function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
|
|
1707
|
+
* ```
|
|
1708
|
+
*/
|
|
1709
|
+
ModCallbackCustom[ModCallbackCustom["POST_PRESSURE_PLATE_RENDER"] = 96] = "POST_PRESSURE_PLATE_RENDER";
|
|
1710
|
+
/**
|
|
1711
|
+
* Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
|
|
1712
|
+
*
|
|
1713
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1714
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1715
|
+
* matches the variant provided.
|
|
1716
|
+
*
|
|
1717
|
+
* ```ts
|
|
1718
|
+
* function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
|
|
1719
|
+
* ```
|
|
1720
|
+
*/
|
|
1721
|
+
ModCallbackCustom[ModCallbackCustom["POST_PRESSURE_PLATE_UPDATE"] = 97] = "POST_PRESSURE_PLATE_UPDATE";
|
|
1722
|
+
/**
|
|
1723
|
+
* The exact same thing as the vanilla `POST_PROJECTILE_INIT` callback, except this callback
|
|
1724
|
+
* allows you to specify extra arguments for additional filtration.
|
|
1725
|
+
*
|
|
1726
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1727
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1728
|
+
* matches the `ProjectileVariant` provided.
|
|
1729
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1730
|
+
* matches the sub-type provided.
|
|
1731
|
+
*
|
|
1732
|
+
* ```ts
|
|
1733
|
+
* function postProjectileInitFilter(projectile: EntityProjectile): void {}
|
|
1734
|
+
* ```
|
|
1735
|
+
*/
|
|
1736
|
+
ModCallbackCustom[ModCallbackCustom["POST_PROJECTILE_INIT_FILTER"] = 98] = "POST_PROJECTILE_INIT_FILTER";
|
|
1737
|
+
/**
|
|
1738
|
+
* Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
|
|
1739
|
+
*
|
|
1740
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1741
|
+
* normal `POST_PROJECTILE_INIT` callback.
|
|
1742
|
+
*
|
|
1743
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1744
|
+
* - You can provide an optional third argument that will make the callback only fire if matches
|
|
1745
|
+
* the `ProjectileVariant` provided.
|
|
1746
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1747
|
+
* matches the sub-type provided.
|
|
1748
|
+
*
|
|
1749
|
+
* ```ts
|
|
1750
|
+
* function postProjectileInitLate(projectile: EntityProjectile): void {}
|
|
1751
|
+
* ```
|
|
1752
|
+
*/
|
|
1753
|
+
ModCallbackCustom[ModCallbackCustom["POST_PROJECTILE_INIT_LATE"] = 99] = "POST_PROJECTILE_INIT_LATE";
|
|
1754
|
+
/**
|
|
1755
|
+
* Fires when the provided projectile is removed after colliding with an entity or grid entity.
|
|
1756
|
+
*
|
|
1757
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1758
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1759
|
+
* matches the `ProjectileVariant` provided.
|
|
1760
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1761
|
+
* matches the sub-type provided.
|
|
1762
|
+
*
|
|
1763
|
+
* ```ts
|
|
1764
|
+
* function postProjectileKill(projectile: EntityProjectile): void {}
|
|
1765
|
+
* ```
|
|
1766
|
+
*/
|
|
1767
|
+
ModCallbackCustom[ModCallbackCustom["POST_PROJECTILE_KILL"] = 100] = "POST_PROJECTILE_KILL";
|
|
1768
|
+
/**
|
|
1769
|
+
* The exact same thing as the vanilla `POST_PROJECTILE_RENDER` callback, except this callback
|
|
1770
|
+
* allows you to specify extra arguments for additional filtration.
|
|
1771
|
+
*
|
|
1772
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1773
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1774
|
+
* matches the `ProjectileVariant` provided.
|
|
1775
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1776
|
+
* matches the sub-type provided.
|
|
1777
|
+
*
|
|
1778
|
+
* ```ts
|
|
1779
|
+
* function postProjectileRenderFilter(projectile: EntityProjectile, renderOffset: Vector): void {}
|
|
1780
|
+
* ```
|
|
1781
|
+
*/
|
|
1782
|
+
ModCallbackCustom[ModCallbackCustom["POST_PROJECTILE_RENDER_FILTER"] = 101] = "POST_PROJECTILE_RENDER_FILTER";
|
|
1783
|
+
/**
|
|
1784
|
+
* The exact same thing as the vanilla `POST_PROJECTILE_INIT` callback, except this callback
|
|
1785
|
+
* allows you to specify extra arguments for additional filtration.
|
|
1786
|
+
*
|
|
1787
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1788
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1789
|
+
* matches the `ProjectileVariant` provided.
|
|
1790
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1791
|
+
* matches the sub-type provided.
|
|
1792
|
+
*
|
|
1793
|
+
* ```ts
|
|
1794
|
+
* function postProjectileUpdateFilter(projectile: EntityProjectile): void {}
|
|
1795
|
+
* ```
|
|
1796
|
+
*/
|
|
1797
|
+
ModCallbackCustom[ModCallbackCustom["POST_PROJECTILE_UPDATE_FILTER"] = 102] = "POST_PROJECTILE_UPDATE_FILTER";
|
|
1798
|
+
/**
|
|
1799
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player first picks up a new
|
|
1800
|
+
* item. The pickup returned in the callback is assumed to be the first pickup that no longer
|
|
1801
|
+
* exists.
|
|
1802
|
+
*
|
|
1803
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1804
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1805
|
+
* matches the `PickupVariant` provided.
|
|
1806
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1807
|
+
* matches the sub-type provided.
|
|
1808
|
+
*
|
|
1809
|
+
* ```ts
|
|
1810
|
+
* function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
|
|
1811
|
+
* ```
|
|
1812
|
+
*/
|
|
1813
|
+
ModCallbackCustom[ModCallbackCustom["POST_PURCHASE"] = 103] = "POST_PURCHASE";
|
|
1814
|
+
/**
|
|
1815
|
+
* Fires from the `POST_RENDER` callback on every frame that a rock exists.
|
|
1816
|
+
*
|
|
1817
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1818
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1819
|
+
* matches the `GridEntityType` provided.
|
|
1820
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1821
|
+
* matches the variant provided.
|
|
1822
|
+
*
|
|
1823
|
+
* ```ts
|
|
1824
|
+
* function postRockRender(rock: GridEntityRock): void {}
|
|
1825
|
+
* ```
|
|
1826
|
+
*/
|
|
1827
|
+
ModCallbackCustom[ModCallbackCustom["POST_ROCK_RENDER"] = 104] = "POST_ROCK_RENDER";
|
|
1828
|
+
/**
|
|
1829
|
+
* Fires from the `POST_UPDATE` callback on every frame that a rock exists.
|
|
1830
|
+
*
|
|
1831
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1832
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1833
|
+
* matches the `GridEntityType` provided.
|
|
1834
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1835
|
+
* matches the variant provided.
|
|
1836
|
+
*
|
|
1837
|
+
* ```ts
|
|
1838
|
+
* function postRockUpdate(rock: GridEntityRock): void {}
|
|
1839
|
+
* ```
|
|
1840
|
+
*/
|
|
1841
|
+
ModCallbackCustom[ModCallbackCustom["POST_ROCK_UPDATE"] = 105] = "POST_ROCK_UPDATE";
|
|
1842
|
+
/**
|
|
1843
|
+
* Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
|
|
1844
|
+
* the `Room.IsClear` method).
|
|
1845
|
+
*
|
|
1846
|
+
* For example, this callback fires when you defeat all the enemies in a room (clear --> not
|
|
1847
|
+
* clear) or when you bomb an angel statue (not clear --> clear). This callback does not fire when
|
|
1848
|
+
* you travel between a cleared room and an uncleared room.
|
|
1849
|
+
*
|
|
1850
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1851
|
+
* - You can provide an optional third argument that will make the callback only fire if the room
|
|
1852
|
+
* clear state matches the boolean provided.
|
|
1853
|
+
*
|
|
1854
|
+
* ```ts
|
|
1855
|
+
* function postRoomClearChanged(roomClear: boolean): void {}
|
|
1856
|
+
* ```
|
|
1857
|
+
*/
|
|
1858
|
+
ModCallbackCustom[ModCallbackCustom["POST_ROOM_CLEAR_CHANGED"] = 106] = "POST_ROOM_CLEAR_CHANGED";
|
|
1859
|
+
/**
|
|
1860
|
+
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
|
|
1861
|
+
* Room.
|
|
1862
|
+
*
|
|
1863
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1864
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1865
|
+
* matches the `PlayerVariant` provided.
|
|
1866
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1867
|
+
* matches the `PlayerType` provided.
|
|
1868
|
+
*
|
|
1869
|
+
* ```ts
|
|
1870
|
+
* function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
|
|
1871
|
+
* ```
|
|
1872
|
+
*/
|
|
1873
|
+
ModCallbackCustom[ModCallbackCustom["POST_SACRIFICE"] = 107] = "POST_SACRIFICE";
|
|
1874
|
+
/**
|
|
1875
|
+
* Fires from the `POST_RENDER` callback when a slot entity's animation changes.
|
|
1876
|
+
*
|
|
1877
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1878
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1879
|
+
* matches the `SlotVariant` provided.
|
|
1880
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1881
|
+
* matches the sub-type provided.
|
|
1882
|
+
*
|
|
1883
|
+
* ```ts
|
|
1884
|
+
* function postSlotAnimationChanged(
|
|
1885
|
+
* slot: Entity,
|
|
1886
|
+
* previousAnimation: string,
|
|
1887
|
+
* currentAnimation: string,
|
|
1888
|
+
* ): void {}
|
|
1889
|
+
* ```
|
|
1890
|
+
*/
|
|
1891
|
+
ModCallbackCustom[ModCallbackCustom["POST_SLOT_ANIMATION_CHANGED"] = 108] = "POST_SLOT_ANIMATION_CHANGED";
|
|
1892
|
+
/**
|
|
1893
|
+
* Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
|
|
1894
|
+
* (It will not fire if any other type of entity collides with the slot entity.)
|
|
1895
|
+
*
|
|
1896
|
+
* When a player runs into a slot entity, this callback will continually fire, since the player is
|
|
1897
|
+
* colliding with it on every frame. Thus, you should only perform actions in this callback under
|
|
1898
|
+
* certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
|
|
1899
|
+
*
|
|
1900
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1901
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1902
|
+
* matches the `SlotVariant` provided.
|
|
1903
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1904
|
+
* matches the sub-type provided.
|
|
1905
|
+
* - (Only players will cause this callback to fire, so there is no need for an optional argument
|
|
1906
|
+
* to filter by `EntityType`.)
|
|
1907
|
+
*
|
|
1908
|
+
* ```ts
|
|
1909
|
+
* function postSlotCollision(
|
|
1910
|
+
* slot: EntitySlot,
|
|
1911
|
+
* entity: Entity,
|
|
1912
|
+
* ): void {}
|
|
1913
|
+
* ```
|
|
1914
|
+
*/
|
|
1915
|
+
ModCallbackCustom[ModCallbackCustom["POST_SLOT_COLLISION"] = 109] = "POST_SLOT_COLLISION";
|
|
1916
|
+
/**
|
|
1917
|
+
* Fires from the `POST_SLOT_UPDATE` or the `POST_ENTITY_REMOVE` callback when a slot machine is
|
|
1918
|
+
* destroyed or a beggar is removed.
|
|
1919
|
+
*
|
|
1920
|
+
* This callback will fire in four different kinds of situations:
|
|
1921
|
+
*
|
|
1922
|
+
* 1. When slot machine entities (e.g. `SlotVariant.SLOT_MACHINE` and
|
|
1923
|
+
* `SlotVariant.BLOOD_DONATION_MACHINE`) are destroyed with an explosion. When this happens,
|
|
1924
|
+
* they typically stay in the room and can be pushed around. This state is detected via a
|
|
1925
|
+
* change in the `GridCollisionClass`.
|
|
1926
|
+
* 2. When slot machine entities pay out with a collectible item. When this happens, they
|
|
1927
|
+
* immediately despawn without playing any special animation.
|
|
1928
|
+
* 3. When beggar entities (e.g. `SlotVariant.BEGGAR` and `SlotVariant.SHELL_GAME`) are destroyed
|
|
1929
|
+
* with an explosion. When this happens, they immediately despawn without playing any special
|
|
1930
|
+
* animation.
|
|
1931
|
+
* 4. When beggar entities pay out with a collectible item. When this happens, they despawn after
|
|
1932
|
+
* playing the "Teleport" animation. (This is not technically a "destruction" event, but the
|
|
1933
|
+
* callback will fire for this to remain consistent with the other types of slot entities.)
|
|
1934
|
+
*
|
|
1935
|
+
* Depending on the specific types of slot removal that you need to detect, you can filter using:
|
|
1936
|
+
*
|
|
1937
|
+
* 1. The `isSlotMachine` helper function to differentiate between slot machines and beggars.
|
|
1938
|
+
* 2. The passed callback argument of `SlotDestructionType` to differentiate between bombed slots
|
|
1939
|
+
* and slots that paid out with a collectible item.
|
|
1940
|
+
*
|
|
1941
|
+
* Note that when a Crane Game explodes after paying out three collectibles, the
|
|
1942
|
+
* `SlotDestructionType` will be equal to `SlotDestructionType.NORMAL` instead of
|
|
1943
|
+
* `SlotDestructionType.COLLECTIBLE_PAYOUT` like you might expect. (This is because it only
|
|
1944
|
+
* explodes after a short delay, and when doing so, it produces rewards in the same way that would
|
|
1945
|
+
* happen if you bombed it.)
|
|
1946
|
+
*
|
|
1947
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1948
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1949
|
+
* matches the `SlotVariant` provided.
|
|
1950
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1951
|
+
* matches the sub-type provided.
|
|
1952
|
+
*
|
|
1953
|
+
* ```ts
|
|
1954
|
+
* function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
|
|
1955
|
+
* ```
|
|
1956
|
+
*/
|
|
1957
|
+
ModCallbackCustom[ModCallbackCustom["POST_SLOT_DESTROYED"] = 110] = "POST_SLOT_DESTROYED";
|
|
1958
|
+
/**
|
|
1959
|
+
* Fires when a new slot entity is initialized. Specifically, this is either:
|
|
1960
|
+
*
|
|
1961
|
+
* - in the `POST_NEW_ROOM_REORDERED` callback (firing every time a room is entered, even if the
|
|
1962
|
+
* entity was previously there on a previous room entry)
|
|
1963
|
+
* - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when a
|
|
1964
|
+
* Wheel of Fortune card is used)
|
|
1965
|
+
*
|
|
1966
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1967
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1968
|
+
* matches the `SlotVariant` provided.
|
|
1969
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1970
|
+
* matches the sub-type provided.
|
|
1971
|
+
*
|
|
1972
|
+
* ```ts
|
|
1973
|
+
* function postSlotInit(slot: Entity): void {}
|
|
1974
|
+
* ```
|
|
1975
|
+
*/
|
|
1976
|
+
ModCallbackCustom[ModCallbackCustom["POST_SLOT_INIT"] = 111] = "POST_SLOT_INIT";
|
|
1977
|
+
/**
|
|
1978
|
+
* Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
|
|
1979
|
+
*
|
|
1980
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1981
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1982
|
+
* matches the `SlotVariant` provided.
|
|
1983
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1984
|
+
* matches the sub-type provided.
|
|
1985
|
+
*
|
|
1986
|
+
* ```ts
|
|
1987
|
+
* function postSlotRender(slot: Entity): void {}
|
|
1988
|
+
* ```
|
|
1989
|
+
*/
|
|
1990
|
+
ModCallbackCustom[ModCallbackCustom["POST_SLOT_RENDER"] = 112] = "POST_SLOT_RENDER";
|
|
1991
|
+
/**
|
|
1992
|
+
* Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
|
|
1993
|
+
*
|
|
1994
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1995
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1996
|
+
* matches the `SlotVariant` provided.
|
|
1997
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1998
|
+
* matches the sub-type provided.
|
|
1999
|
+
*
|
|
2000
|
+
* ```ts
|
|
2001
|
+
* function postSlotUpdate(slot: Entity): void {}
|
|
2002
|
+
* ```
|
|
2003
|
+
*/
|
|
2004
|
+
ModCallbackCustom[ModCallbackCustom["POST_SLOT_UPDATE"] = 113] = "POST_SLOT_UPDATE";
|
|
2005
|
+
/**
|
|
2006
|
+
* Fires from the `POST_RENDER` callback on every frame that spikes exist.
|
|
2007
|
+
*
|
|
2008
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2009
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2010
|
+
* matches the variant provided.
|
|
2011
|
+
*
|
|
2012
|
+
* ```ts
|
|
2013
|
+
* function postSpikesRender(spikes: GridEntitySpikes): void {}
|
|
2014
|
+
* ```
|
|
2015
|
+
*/
|
|
2016
|
+
ModCallbackCustom[ModCallbackCustom["POST_SPIKES_RENDER"] = 114] = "POST_SPIKES_RENDER";
|
|
2017
|
+
/**
|
|
2018
|
+
* Fires from the `POST_UPDATE` callback on every frame that spikes exist.
|
|
2019
|
+
*
|
|
2020
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2021
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2022
|
+
* matches the variant provided.
|
|
2023
|
+
*
|
|
2024
|
+
* ```ts
|
|
2025
|
+
* function postSpikesUpdate(spikes: GridEntitySpikes): void {}
|
|
2026
|
+
* ```
|
|
2027
|
+
*/
|
|
2028
|
+
ModCallbackCustom[ModCallbackCustom["POST_SPIKES_UPDATE"] = 115] = "POST_SPIKES_UPDATE";
|
|
2029
|
+
/**
|
|
2030
|
+
* The exact same thing as the vanilla `POST_TEAR_INIT` callback, except this callback allows you
|
|
2031
|
+
* to specify extra arguments for additional filtration.
|
|
2032
|
+
*
|
|
2033
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2034
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2035
|
+
* matches the `TearVariant` provided.
|
|
2036
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2037
|
+
* matches the sub-type provided.
|
|
2038
|
+
*
|
|
2039
|
+
* ```ts
|
|
2040
|
+
* function postTearInitFilter(tear: EntityTear): void {}
|
|
2041
|
+
* ```
|
|
2042
|
+
*/
|
|
2043
|
+
ModCallbackCustom[ModCallbackCustom["POST_TEAR_INIT_FILTER"] = 116] = "POST_TEAR_INIT_FILTER";
|
|
2044
|
+
/**
|
|
2045
|
+
* Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
2046
|
+
* `EntityTear.FrameCount` is equal to 0).
|
|
2047
|
+
*
|
|
2048
|
+
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
2049
|
+
* normal `POST_TEAR_INIT` callback.
|
|
2050
|
+
*
|
|
2051
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2052
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2053
|
+
* matches the `TearVariant` provided.
|
|
2054
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2055
|
+
* matches the sub-type provided.
|
|
2056
|
+
*
|
|
2057
|
+
* ```ts
|
|
2058
|
+
* function postTearInitLate(tear: EntityTear): void {}
|
|
2059
|
+
* ```
|
|
2060
|
+
*/
|
|
2061
|
+
ModCallbackCustom[ModCallbackCustom["POST_TEAR_INIT_LATE"] = 117] = "POST_TEAR_INIT_LATE";
|
|
2062
|
+
/**
|
|
2063
|
+
* Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
2064
|
+
* `EntityTear.FrameCount` is equal to 1).
|
|
2065
|
+
*
|
|
2066
|
+
* This callback is useful because Incubus tears are not distinguishable until the second frame.
|
|
2067
|
+
*
|
|
2068
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2069
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2070
|
+
* matches the `TearVariant` provided.
|
|
2071
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2072
|
+
* matches the sub-type provided.
|
|
2073
|
+
*
|
|
2074
|
+
* ```ts
|
|
2075
|
+
* function postTearInitVeryLate(tear: EntityTear): void {}
|
|
2076
|
+
* ```
|
|
2077
|
+
*/
|
|
2078
|
+
ModCallbackCustom[ModCallbackCustom["POST_TEAR_INIT_VERY_LATE"] = 118] = "POST_TEAR_INIT_VERY_LATE";
|
|
2079
|
+
/**
|
|
2080
|
+
* Fires when the provided tear is removed after colliding with an entity or grid entity.
|
|
2081
|
+
*
|
|
2082
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2083
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2084
|
+
* matches the `TearVariant` provided.
|
|
2085
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2086
|
+
* matches the sub-type provided.
|
|
2087
|
+
*
|
|
2088
|
+
* ```ts
|
|
2089
|
+
* function postTearKill(tear: EntityTear): void {}
|
|
2090
|
+
* ```
|
|
2091
|
+
*/
|
|
2092
|
+
ModCallbackCustom[ModCallbackCustom["POST_TEAR_KILL"] = 119] = "POST_TEAR_KILL";
|
|
2093
|
+
/**
|
|
2094
|
+
* The exact same thing as the vanilla `POST_TEAR_RENDER` callback, except this callback allows
|
|
2095
|
+
* you to specify extra arguments for additional filtration.
|
|
2096
|
+
*
|
|
2097
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2098
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2099
|
+
* matches the `TearVariant` provided.
|
|
2100
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2101
|
+
* matches the sub-type provided.
|
|
2102
|
+
*
|
|
2103
|
+
* ```ts
|
|
2104
|
+
* function postTearRenderFilter(tear: EntityTear, renderOffset: Vector): void {}
|
|
2105
|
+
* ```
|
|
2106
|
+
*/
|
|
2107
|
+
ModCallbackCustom[ModCallbackCustom["POST_TEAR_RENDER_FILTER"] = 120] = "POST_TEAR_RENDER_FILTER";
|
|
2108
|
+
/**
|
|
2109
|
+
* The exact same thing as the vanilla `POST_TEAR_INIT` callback, except this callback allows you
|
|
2110
|
+
* to specify extra arguments for additional filtration.
|
|
2111
|
+
*
|
|
2112
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2113
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2114
|
+
* matches the `TearVariant` provided.
|
|
2115
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2116
|
+
* matches the sub-type provided.
|
|
2117
|
+
*
|
|
2118
|
+
* ```ts
|
|
2119
|
+
* function postTearUpdateFilter(tear: EntityTear): void {}
|
|
2120
|
+
* ```
|
|
2121
|
+
*/
|
|
2122
|
+
ModCallbackCustom[ModCallbackCustom["POST_TEAR_UPDATE_FILTER"] = 121] = "POST_TEAR_UPDATE_FILTER";
|
|
2123
|
+
/**
|
|
2124
|
+
* Fires from the `POST_RENDER` callback on every frame that a TNT exists.
|
|
2125
|
+
*
|
|
2126
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2127
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2128
|
+
* matches the variant provided.
|
|
2129
|
+
*
|
|
2130
|
+
* ```ts
|
|
2131
|
+
* function postTNTRender(tnt: GridEntityTNT): void {}
|
|
2132
|
+
* ```
|
|
2133
|
+
*/
|
|
2134
|
+
ModCallbackCustom[ModCallbackCustom["POST_TNT_RENDER"] = 122] = "POST_TNT_RENDER";
|
|
2135
|
+
/**
|
|
2136
|
+
* Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
|
|
2137
|
+
*
|
|
2138
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2139
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2140
|
+
* matches the variant provided.
|
|
2141
|
+
*
|
|
2142
|
+
* ```ts
|
|
2143
|
+
* function postTNTUpdate(tnt: GridEntityTNT): void {}
|
|
2144
|
+
* ```
|
|
2145
|
+
*/
|
|
2146
|
+
ModCallbackCustom[ModCallbackCustom["POST_TNT_UPDATE"] = 123] = "POST_TNT_UPDATE";
|
|
2147
|
+
/**
|
|
2148
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player gains or loses a new
|
|
2149
|
+
* transformation.
|
|
2150
|
+
*
|
|
2151
|
+
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
2152
|
+
*
|
|
2153
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2154
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2155
|
+
* matches the `PlayerForm` provided.
|
|
2156
|
+
*
|
|
2157
|
+
* ```ts
|
|
2158
|
+
* function postTransformation(
|
|
2159
|
+
* player: EntityPlayer,
|
|
2160
|
+
* playerForm: PlayerForm,
|
|
2161
|
+
* hasForm: boolean,
|
|
2162
|
+
* ): void {}
|
|
2163
|
+
* ```
|
|
2164
|
+
*/
|
|
2165
|
+
ModCallbackCustom[ModCallbackCustom["POST_TRANSFORMATION"] = 124] = "POST_TRANSFORMATION";
|
|
2166
|
+
/**
|
|
2167
|
+
* Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
|
|
2168
|
+
*
|
|
2169
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2170
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2171
|
+
* matches the `TrinketType` provided.
|
|
2172
|
+
*
|
|
2173
|
+
* ```ts
|
|
2174
|
+
* function postTrinketBreak(
|
|
2175
|
+
* player: EntityPlayer,
|
|
2176
|
+
* trinketType: TrinketType,
|
|
2177
|
+
* ): void {}
|
|
2178
|
+
* ```
|
|
2179
|
+
*/
|
|
2180
|
+
ModCallbackCustom[ModCallbackCustom["POST_TRINKET_BREAK"] = 125] = "POST_TRINKET_BREAK";
|
|
2181
|
+
/**
|
|
2182
|
+
* The same thing as the vanilla `POST_USE_PILL` callback, except this callback passes the
|
|
2183
|
+
* `PillColor` of the used pill as the final argument. It allows you to filter by the `PillColor`.
|
|
2184
|
+
*
|
|
2185
|
+
* In order to accomplish this, this callback tracks the held pills of the player on every frame.
|
|
2186
|
+
* If a matching `PillColor` could not be found, this callback passes `PillColor.NULL` (0).
|
|
2187
|
+
*
|
|
2188
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2189
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2190
|
+
* matches the `PillEffect` provided.
|
|
2191
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2192
|
+
* matches the `PillColor` provided.
|
|
2193
|
+
*
|
|
2194
|
+
* ```ts
|
|
2195
|
+
* function postUsePillFilter(
|
|
2196
|
+
* pillEffect: PillEffect,
|
|
2197
|
+
* pillColor: PillColor,
|
|
2198
|
+
* player: EntityPlayer,
|
|
2199
|
+
* useFlags: BitFlags<UseFlag>,
|
|
2200
|
+
* ): void {}
|
|
2201
|
+
* ```
|
|
2202
|
+
*/
|
|
2203
|
+
ModCallbackCustom[ModCallbackCustom["POST_USE_PILL_FILTER"] = 126] = "POST_USE_PILL_FILTER";
|
|
2204
|
+
/**
|
|
2205
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback on the frame before a Berserk effect
|
|
2206
|
+
* ends when the player is predicted to die (e.g. they currently have no health left or they took
|
|
2207
|
+
* damage in a "Lost" form).
|
|
2208
|
+
*
|
|
2209
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2210
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2211
|
+
* matches the `PlayerVariant` provided.
|
|
2212
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2213
|
+
* matches the `PlayerType` provided.
|
|
2214
|
+
*
|
|
2215
|
+
* ```ts
|
|
2216
|
+
* function preBerserkDeath(player: EntityPlayer): void {}
|
|
2217
|
+
* ```
|
|
2218
|
+
*/
|
|
2219
|
+
ModCallbackCustom[ModCallbackCustom["PRE_BERSERK_DEATH"] = 127] = "PRE_BERSERK_DEATH";
|
|
2220
|
+
/**
|
|
2221
|
+
* The exact same thing as the vanilla `PRE_BOMB_COLLISION` callback, except this callback allows
|
|
2222
|
+
* you to specify extra arguments for additional filtration.
|
|
2223
|
+
*
|
|
2224
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2225
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2226
|
+
* matches the `BombVariant` provided.
|
|
2227
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2228
|
+
* matches the sub-type provided.
|
|
2229
|
+
*
|
|
2230
|
+
* ```ts
|
|
2231
|
+
* function preBombCollisionFilter(
|
|
2232
|
+
* bomb: EntityBomb,
|
|
2233
|
+
* collider: Entity,
|
|
2234
|
+
* low: boolean,
|
|
2235
|
+
* ): void {}
|
|
2236
|
+
* ```
|
|
2237
|
+
*/
|
|
2238
|
+
ModCallbackCustom[ModCallbackCustom["PRE_BOMB_COLLISION_FILTER"] = 128] = "PRE_BOMB_COLLISION_FILTER";
|
|
2239
|
+
/**
|
|
2240
|
+
* Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
|
|
2241
|
+
* to initiate a custom revival, return an integer that corresponds to the item or type of revival
|
|
2242
|
+
* that you are doing. Otherwise, return undefined to continue the fatal damage.
|
|
2243
|
+
*
|
|
2244
|
+
* This callback is useful because reviving the player after the game things that player should
|
|
2245
|
+
* have died will result in the save data for the run getting deleted.
|
|
2246
|
+
*
|
|
2247
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2248
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2249
|
+
* matches the `PlayerVariant` provided.
|
|
2250
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2251
|
+
* matches the `PlayerType` provided.
|
|
2252
|
+
*
|
|
2253
|
+
* ```ts
|
|
2254
|
+
* function preCustomRevive(player: EntityPlayer): int | undefined {}
|
|
2255
|
+
* ```
|
|
2256
|
+
*/
|
|
2257
|
+
ModCallbackCustom[ModCallbackCustom["PRE_CUSTOM_REVIVE"] = 129] = "PRE_CUSTOM_REVIVE";
|
|
2258
|
+
/**
|
|
2259
|
+
* The exact same thing as the vanilla `PRE_ENTITY_SPAWN` callback, except this callback allows
|
|
2260
|
+
* you to specify extra arguments for additional filtration.
|
|
2261
|
+
*
|
|
2262
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2263
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2264
|
+
* matches the `EntityType` provided.
|
|
2265
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2266
|
+
* matches the variant provided.
|
|
2267
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
2268
|
+
* matches the sub-type provided.
|
|
2269
|
+
*
|
|
2270
|
+
* ```ts
|
|
2271
|
+
* function preEntitySpawnFilter(
|
|
2272
|
+
* entityType: EntityType,
|
|
2273
|
+
* variant: int,
|
|
2274
|
+
* subType: int,
|
|
2275
|
+
* position: Vector,
|
|
2276
|
+
* velocity: Vector,
|
|
2277
|
+
* spawner: Entity | undefined,
|
|
2278
|
+
* initSeed: Seed,
|
|
2279
|
+
* ): [entityType: EntityType, variant: int, subType: int, initSeed: Seed] | undefined {}
|
|
2280
|
+
* ```
|
|
2281
|
+
*/
|
|
2282
|
+
ModCallbackCustom[ModCallbackCustom["PRE_ENTITY_SPAWN_FILTER"] = 130] = "PRE_ENTITY_SPAWN_FILTER";
|
|
2283
|
+
/**
|
|
2284
|
+
* The exact same thing as the vanilla `PRE_FAMILIAR_COLLISION` callback, except this callback
|
|
2285
|
+
* allows you to specify extra arguments for additional filtration.
|
|
2286
|
+
*
|
|
2287
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2288
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2289
|
+
* matches the `FamiliarVariant` provided.
|
|
2290
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2291
|
+
* matches the sub-type provided.
|
|
2292
|
+
*
|
|
2293
|
+
* ```ts
|
|
2294
|
+
* function preFamiliarCollisionFilter(
|
|
2295
|
+
* familiar: EntityFamiliar,
|
|
2296
|
+
* collider: Entity,
|
|
2297
|
+
* low: boolean,
|
|
2298
|
+
* ): void {}
|
|
2299
|
+
* ```
|
|
2300
|
+
*/
|
|
2301
|
+
ModCallbackCustom[ModCallbackCustom["PRE_FAMILIAR_COLLISION_FILTER"] = 131] = "PRE_FAMILIAR_COLLISION_FILTER";
|
|
2302
|
+
/**
|
|
2303
|
+
* Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
|
|
2304
|
+
* meets all of the conditions to pick it up.
|
|
2305
|
+
*
|
|
2306
|
+
* The return values of this callback are the same as the `PRE_PICKUP_COLLISION` callback. For
|
|
2307
|
+
* example, you can prevent a player from picking up the collectible by returning false. (However,
|
|
2308
|
+
* note that this callback will continue to fire for every frame that the player touches the
|
|
2309
|
+
* pedestal, so you would need to continue returning false.)
|
|
2310
|
+
*
|
|
2311
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2312
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2313
|
+
* matches the `PlayerVariant` provided.
|
|
2314
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2315
|
+
* matches the `PlayerType` provided.
|
|
2316
|
+
*
|
|
2317
|
+
* ```ts
|
|
2318
|
+
* function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
|
|
2319
|
+
* ```
|
|
2320
|
+
*/
|
|
2321
|
+
ModCallbackCustom[ModCallbackCustom["PRE_GET_PEDESTAL"] = 132] = "PRE_GET_PEDESTAL";
|
|
2322
|
+
/**
|
|
2323
|
+
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item becomes queued (i.e. when
|
|
2324
|
+
* the player begins to hold the item above their head).
|
|
2325
|
+
*
|
|
2326
|
+
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
2327
|
+
*
|
|
2328
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2329
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2330
|
+
* matches the `ItemType` provided.
|
|
2331
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
2332
|
+
* sub-type matches the `CollectibleType` or the `TrinketType` provided.
|
|
2333
|
+
*
|
|
2334
|
+
* ```ts
|
|
2335
|
+
* function preItemPickup(
|
|
2336
|
+
* player: EntityPlayer,
|
|
2337
|
+
* pickingUpItem: PickingUpItem,
|
|
2338
|
+
* ): void {}
|
|
2339
|
+
* ```
|
|
2340
|
+
*/
|
|
2341
|
+
ModCallbackCustom[ModCallbackCustom["PRE_ITEM_PICKUP"] = 133] = "PRE_ITEM_PICKUP";
|
|
2342
|
+
/**
|
|
2343
|
+
* The exact same thing as the vanilla `PRE_KNIFE_COLLISION` callback, except this callback allows
|
|
2344
|
+
* you to specify extra arguments for additional filtration.
|
|
2345
|
+
*
|
|
2346
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2347
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2348
|
+
* matches the `KnifeVariant` provided.
|
|
2349
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2350
|
+
* matches the sub-type provided.
|
|
2351
|
+
*
|
|
2352
|
+
* ```ts
|
|
2353
|
+
* function preKnifeCollisionFilter(
|
|
2354
|
+
* knife: EntityKnife,
|
|
2355
|
+
* collider: Entity,
|
|
2356
|
+
* low: boolean,
|
|
2357
|
+
* ): void {}
|
|
2358
|
+
* ```
|
|
2359
|
+
*/
|
|
2360
|
+
ModCallbackCustom[ModCallbackCustom["PRE_KNIFE_COLLISION_FILTER"] = 134] = "PRE_KNIFE_COLLISION_FILTER";
|
|
2361
|
+
/**
|
|
2362
|
+
* Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
|
|
2363
|
+
* player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
|
|
2364
|
+
* first floor of the run. Does not fire when the player reloads/reseeds the current floor (i.e.
|
|
2365
|
+
* Forget Me Now, 5-pip dice room).
|
|
2366
|
+
*
|
|
2367
|
+
* This callback passes the `EntityPlayer` object for the player who jumped into the trapdoor or
|
|
2368
|
+
* entered the heaven door, if needed.
|
|
2369
|
+
*
|
|
2370
|
+
* ```ts
|
|
2371
|
+
* function preNewLevel(player: EntityPlayer): void {}
|
|
2372
|
+
* ```
|
|
2373
|
+
*/
|
|
2374
|
+
ModCallbackCustom[ModCallbackCustom["PRE_NEW_LEVEL"] = 135] = "PRE_NEW_LEVEL";
|
|
2375
|
+
/**
|
|
2376
|
+
* The exact same thing as the vanilla `PRE_NPC_COLLISION` callback, except this callback allows
|
|
2377
|
+
* you to specify extra arguments for additional filtration.
|
|
2378
|
+
*
|
|
2379
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2380
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2381
|
+
* matches the `EntityType` provided.
|
|
2382
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2383
|
+
* matches the variant provided.
|
|
2384
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
2385
|
+
* matches the sub-type provided.
|
|
2386
|
+
*
|
|
2387
|
+
* ```ts
|
|
2388
|
+
* function preNPCCollisionFilter(
|
|
2389
|
+
* npc: EntityNPC,
|
|
2390
|
+
* collider: Entity,
|
|
2391
|
+
* low: boolean,
|
|
2392
|
+
* ): boolean | undefined {}
|
|
2393
|
+
* ```
|
|
2394
|
+
*/
|
|
2395
|
+
ModCallbackCustom[ModCallbackCustom["PRE_NPC_COLLISION_FILTER"] = 136] = "PRE_NPC_COLLISION_FILTER";
|
|
2396
|
+
/**
|
|
2397
|
+
* The exact same thing as the vanilla `PRE_NPC_UPDATE` callback, except this callback allows you
|
|
2398
|
+
* to specify extra arguments for additional filtration.
|
|
2399
|
+
*
|
|
2400
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2401
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2402
|
+
* matches the `EntityType` provided.
|
|
2403
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2404
|
+
* matches the variant provided.
|
|
2405
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
2406
|
+
* matches the sub-type provided.
|
|
2407
|
+
*
|
|
2408
|
+
* ```ts
|
|
2409
|
+
* function preNPCUpdateFilter(entity: Entity): boolean | undefined {}
|
|
2410
|
+
* ```
|
|
2411
|
+
*/
|
|
2412
|
+
ModCallbackCustom[ModCallbackCustom["PRE_NPC_UPDATE_FILTER"] = 137] = "PRE_NPC_UPDATE_FILTER";
|
|
2413
|
+
/**
|
|
2414
|
+
* The exact same thing as the vanilla `PRE_PROJECTILE_COLLISION` callback, except this callback
|
|
2415
|
+
* allows you to specify extra arguments for additional filtration.
|
|
2416
|
+
*
|
|
2417
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2418
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2419
|
+
* matches the `ProjectileVariant` provided.
|
|
2420
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2421
|
+
* matches the sub-type provided.
|
|
2422
|
+
*
|
|
2423
|
+
* ```ts
|
|
2424
|
+
* function preProjectileCollisionFilter(
|
|
2425
|
+
* tear: EntityTear,
|
|
2426
|
+
* collider: Entity,
|
|
2427
|
+
* low: boolean,
|
|
2428
|
+
* ): void {}
|
|
2429
|
+
* ```
|
|
2430
|
+
*/
|
|
2431
|
+
ModCallbackCustom[ModCallbackCustom["PRE_PROJECTILE_COLLISION_FILTER"] = 138] = "PRE_PROJECTILE_COLLISION_FILTER";
|
|
2432
|
+
/**
|
|
2433
|
+
* The exact same thing as the vanilla `PRE_ROOM_ENTITY_SPAWN` callback, except this callback
|
|
2434
|
+
* allows you to specify extra arguments for additional filtration.
|
|
2435
|
+
*
|
|
2436
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2437
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2438
|
+
* matches the `EntityType` or `GridEntityXMLType` provided.
|
|
2439
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2440
|
+
* matches the variant provided.
|
|
2441
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
2442
|
+
* matches the sub-type provided.
|
|
2443
|
+
*
|
|
2444
|
+
* You can use the `isGridEntityXMLType` helper function to convert the
|
|
2445
|
+
* `entityTypeOrGridEntityXMLType` argument to an `EntityType` or `GridEntityXMLType`, if needed.
|
|
2446
|
+
*
|
|
2447
|
+
* ```ts
|
|
2448
|
+
* function preRoomEntitySpawnFilter(
|
|
2449
|
+
* entityTypeOrGridEntityXMLType: EntityType | GridEntityXMLType,
|
|
2450
|
+
* variant: int,
|
|
2451
|
+
* subType: int,
|
|
2452
|
+
* gridIndex: int,
|
|
2453
|
+
* seed: Seed,
|
|
2454
|
+
* ): [type: EntityType | GridEntityXMLType, variant: int, subType: int] | undefined {}
|
|
2455
|
+
* ```
|
|
2456
|
+
*/
|
|
2457
|
+
ModCallbackCustom[ModCallbackCustom["PRE_ROOM_ENTITY_SPAWN_FILTER"] = 139] = "PRE_ROOM_ENTITY_SPAWN_FILTER";
|
|
2458
|
+
/**
|
|
2459
|
+
* The exact same thing as the vanilla `PRE_TEAR_COLLISION` callback, except this callback allows
|
|
2460
|
+
* you to specify extra arguments for additional filtration.
|
|
2461
|
+
*
|
|
2462
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
2463
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
2464
|
+
* matches the `TearVariant` provided.
|
|
2465
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
2466
|
+
* matches the sub-type provided.
|
|
2467
|
+
*
|
|
2468
|
+
* ```ts
|
|
2469
|
+
* function preTearCollisionFilter(
|
|
2470
|
+
* tear: EntityTear,
|
|
2471
|
+
* collider: Entity,
|
|
2472
|
+
* low: boolean,
|
|
2473
|
+
* ): void {}
|
|
2474
|
+
* ```
|
|
2475
|
+
*/
|
|
2476
|
+
ModCallbackCustom[ModCallbackCustom["PRE_TEAR_COLLISION_FILTER"] = 140] = "PRE_TEAR_COLLISION_FILTER";
|
|
2477
|
+
})(ModCallbackCustom || (exports.ModCallbackCustom = ModCallbackCustom = {}));
|