diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts index 8fadaded3..d47b771ce 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts @@ -8,7 +8,7 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.POST_USE_PILL`. This callback provides a `PillColor` * parameter. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillEffect` provided. * @@ -27,7 +27,14 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.ENTITY_TAKE_DMG`. This callback now allows an interface to * be returned to further modify how the entity takes damage. * - * When registering this callback with the `Mod.AddCallback` method: + * Return false to cancel the damage from being applied. Alternatively, return an object with any + * of the following optional fields to modify how the damage is applied: + * - `DamageAmount`: The amount of damage to apply. + * - `DamageFlags`: The damage flags to apply. + * - `DamageCountdown`: The damage countdown to apply. Only works if the `DamageFlag.COUNTDOWN` + * flag is present. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -54,7 +61,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_FAMILIAR_COLLISION`. This callback now allows an * interface to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -72,7 +85,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_NPC_COLLISION`. This callback now allows an interface to * be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -90,7 +109,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_PLAYER_COLLISION`. This callback now allows an interface * to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -105,7 +130,22 @@ export enum ModCallbackRepentogon { PRE_PLAYER_COLLISION = 33, /** - * A modified version of `ModCallback.POST_PICKUP_SELECTION`. + * A modified version of `ModCallback.POST_PICKUP_SELECTION`. This callback now provides the + * requested Variant and requested SubType. + * + * Internally, the game always attempts to randomize the spawned pickup's Variant and SubType, + * even when re-entering an already visited room, however there are checks in place to make sure + * that randomization only occurs if either of these values are initially set to 0. Therefore, you + * should always check to see if `requestedVariant` is equal to `PickupVariant.NULL` or + * `requestedSubType` is equal to `0`. + * + * When `requestedVariant` is equal to `PickupVariant.NULL`, the game will randomize both the + * Variant and SubType of the pickup. In this case, the value of `requestedSubType` is used as a + * variant blacklist. + * + * Return an array to modify the pickup selected. If the third element is set to true, the + * callback will replace the chosen Variant and SubType and continue running, allowing for other + * mods to modify the selection as well. * * You cannot filter this callback. * @@ -113,11 +153,11 @@ export enum ModCallbackRepentogon { * function postPickupSelection( * pickup: EntityPickup, * variant: PickupVariant, - * subType: int, + * subType: int | NullPickupSubType, * requestedVariant: PickupVariant, * requestedSubType: int, * rng: RNG, - * ): [pickupVariant: PickupVariant, subType: int, continueSelection: boolean] | undefined {} + * ): [pickupVariant: PickupVariant, subType: int, continueSelection?: boolean] | undefined {} * ``` */ POST_PICKUP_SELECTION = 37, @@ -126,7 +166,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_PICKUP_COLLISION`. This callback now allows an interface * to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -144,7 +190,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_TEAR_COLLISION`. This callback now allows an interface * to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TearVariant` provided. * @@ -162,7 +214,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_PROJECTILE_COLLISION`. This callback now allows an * interface to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ProjectileVariant` provided. * @@ -180,7 +238,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_KNIFE_COLLISION`. This callback now allows an interface * to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `KnifeVariant` provided. * @@ -198,7 +262,13 @@ export enum ModCallbackRepentogon { * A modified version of `ModCallback.PRE_BOMB_COLLISION`. This callback now allows an interface * to be returned to further modify the collision behavior. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BombVariant` provided. * @@ -213,10 +283,10 @@ export enum ModCallbackRepentogon { PRE_BOMB_COLLISION = 60, /** - * A modified version of `ModCallback.POST_ENTITY_KILL`. This callback now provides an EntityRef + * A modified version of `ModCallback.POST_ENTITY_KILL`. This callback now provides an `EntityRef` * of whoever killed the entity. * - * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * When registering this callback with the `Mod.AddCallbackRepentogonRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -227,7 +297,19 @@ export enum ModCallbackRepentogon { POST_ENTITY_KILL = 68, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a collectible is added to the player's inventory. + * + * Return `CollectibleType` to override the collectible added. Alternatively, return `false` to + * prevent the collectible from being added. Alternatively, return an array with the following + * elements to override the collectible added: + * - `collectibleType`: Overrides the collectible that will be added. + * - `charge`: Overrides the charge of the collectible that will be added. + * - `firstTime`: Overrides whether the collectible is being added for the first time. + * - `slot`: Overrides the active slot the collectible will be added to. + * - `varData`: Overrides the `VarData` of the collectible that will be added. + * - `player`: Overrides the player the collectible will be added to. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * @@ -241,14 +323,14 @@ export enum ModCallbackRepentogon { * player: EntityPlayer, * ): * | boolean - * | { - * Type?: CollectibleType; - * Charge?: int; - * FirstTime?: boolean; - * Slot?: ActiveSlot; - * VarData?: int; - * Player?: EntityPlayer; - * } + * | [ + * collectibleType?: CollectibleType; + * charge?: int; + * firstTime?: boolean; + * slot?: ActiveSlot; + * varData?: int; + * player?: EntityPlayer; + * ] * | CollectibleType * | undefined {} * ``` @@ -256,10 +338,12 @@ export enum ModCallbackRepentogon { PRE_ADD_COLLECTIBLE = 1004, /** + * Fires after a collectible has been added to the player's inventory. + * * Use this over Isaacscript-Common's `ModCallbackCustom.POST_PLAYER_COLLECTIBLE_ADDED` callback * as this is a lot more optimized. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * @@ -279,7 +363,7 @@ export enum ModCallbackRepentogon { /** * Fires after an entity takes damage. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -295,7 +379,13 @@ export enum ModCallbackRepentogon { POST_ENTITY_TAKE_DMG = 1006, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before `ModCallback.ENTITY_TAKE_DMG` regardless if the player is considered invincible or + * has items such as Holy Mantle. This callback can be used to give player invincibility that + * takes precedence over other damage negation effects, such as Holy Mantle. + * + * Return false to prevent the damage from being applied. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -312,7 +402,13 @@ export enum ModCallbackRepentogon { PRE_PLAYER_TAKE_DMG = 1008, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before hearts are added to the player. `optionalArg` is reserved for certain + * `Add(...)Hearts` functions, such as the `ignoreKeeper` argument for + * `EntityPlayer.AddMaxHearts`. + * + * Return an integer to override the amount of hearts added. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `AddHealthTypeFlag` provided. * @@ -328,7 +424,11 @@ export enum ModCallbackRepentogon { PRE_PLAYER_ADD_HEARTS = 1009, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after hearts are added to the player. `optionalArg` is reserved for certain + * `Add(...)Hearts` functions, such as the `ignoreKeeper` argument for + * `EntityPlayer.AddMaxHearts`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `AddHealthTypeFlag` provided. * @@ -344,7 +444,10 @@ export enum ModCallbackRepentogon { POST_PLAYER_ADD_HEARTS = 1010, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a rock is destroyed. `source` can be undefined if `GridEntity.Destroy` is called + * instead of `GridEntity.DestroyWithSource`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -352,14 +455,19 @@ export enum ModCallbackRepentogon { * function postGridRockDestroy( * rock: GridEntityRock, * gridEntityType: GridEntityType, - * immediate: boolean + * immediate: boolean, + * source: EntityRef | undefined * ): void {} * ``` */ POST_GRID_ROCK_DESTROY = 1011, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a `GridEntity` attempts to inflict damage on an entity. + * + * Return false to prevent the damage from being applied. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -367,17 +475,20 @@ export enum ModCallbackRepentogon { * function preGridHurtDamage( * gridEntity: GridEntity, * entity: Entity, - * damageAmount: number, + * playerDamageAmount: number, * damageFlags: BitFlags, - * unknownFloat: float, - * unknownBoolean: boolean + * damageAmount: float, + * ignoreGridCollisionClass: boolean * ): boolean | undefined {} * ``` */ PRE_GRID_HURT_DAMAGE = 1012, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a `GridEntity` has attempted to inflict damage on an entity. This does not + * guarantee that the entity actually took damage, such as if the player is currently invincible. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -385,10 +496,10 @@ export enum ModCallbackRepentogon { * function postGridHurtDamage( * gridEntity: GridEntity, * entity: Entity, - * damageAmount: number, + * playerDamageAmount: number, * damageFlags: BitFlags, - * unknownFloat: number, - * unknownBoolean: boolean + * damageAmount: number, + * ignoreGridCollisionClass: boolean * ): void {} * ``` */ @@ -400,7 +511,7 @@ export enum ModCallbackRepentogon { * Return false to prevent the trinket from being added. Alternatively, return `TrinketType` to * override the trinket added. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TrinketType` provided. * @@ -420,7 +531,7 @@ export enum ModCallbackRepentogon { * Return false to prevent the pickup from being added. Alternatively, return an array of * `BagOfCraftingPickup` to override the pickup(s) added. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -437,7 +548,7 @@ export enum ModCallbackRepentogon { /** * Fires after a pickup is added to the player's Bag of Crafting. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -495,25 +606,67 @@ export enum ModCallbackRepentogon { POST_HUD_RENDER = 1024, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when a split tear is fired. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `SplitTearType` or string provided. + * + * ```ts + * function postFireSplitTear( + * tear: EntityTear, + * source: Entity, + * splitType: SplitTearType | string + * ): void {} + * ``` + */ + POST_FIRE_SPLIT_TEAR = 1025, + + /** + * Fires before a sound effect is played. + * + * Return a `SoundEffect` to override the sound being played. Alternatively, return false to + * prevent the sound from being played. Alternatively, return an array with the following elements + * to modify the sound being played: + * - `sound`: Overrides the sound effect being played. + * - `volume`: Overrides the volume of the sound effect being played. + * - `frameDelay`: Overrides the frame delay of the sound effect being played. + * - `loop`: Overrides whether the sound effect should loop. + * - `pitch`: Overrides the pitch of the sound effect being played. + * - `pan`: Overrides the pan of the sound effect being played. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SoundEffect` provided. * * ```ts - * function preSFXPlay( + * function preSFXPlay( * sound: SoundEffect, * volume: number, * frameDelay: int, * loop: boolean, * pitch: number, - * pan: number - * ): SoundEffect | [SoundEffect, number, int, boolean, number, number] | boolean | undefined {} + * pan: number, + * ): + * | SoundEffect + * | [ + * sound?: SoundEffect, + * volume?: number, + * frameDelay?: int, + * loop?: boolean, + * pitch?: number, + * pan?: number, + * ] + * | boolean + * | undefined {} * ``` */ PRE_SFX_PLAY = 1030, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a sound effect is played. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SoundEffect` provided. * @@ -533,7 +686,7 @@ export enum ModCallbackRepentogon { /** * Fires after a projectile is destroyed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ProjectileVariant` provided. * @@ -546,7 +699,7 @@ export enum ModCallbackRepentogon { /** * Fires after a tear is destroyed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TearVariant` provided. * @@ -557,7 +710,16 @@ export enum ModCallbackRepentogon { POST_TEAR_DEATH = 1033, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before music is played. This callback is fired for both `MusicManager.Play` and + * `MusicManager.Crossfade`. To distinguish the source, use the `isFade` parameter. + * + * Return `Music` to override the music being played. Alternatively, return `false` to prevent the + * music from being played. Alternatively, return an array with the following elements to modify + * the music being played: + * - `music`: Overrides the music being played. + * - `volumeOrFadeRate`: Overrides the volume or fade rate of the music being played. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `Music` provided. * @@ -566,24 +728,36 @@ export enum ModCallbackRepentogon { * music: Music, * volumeOrFadeRate: float, * isFade: boolean - * ): Music | { ID?: Music, Volume?: float, FadeRate?: float } | boolean | undefined {} + * ): Music | [music?: Music, volumeOrFadeRate?: number] | boolean | undefined {} * ``` */ PRE_MUSIC_PLAY = 1034, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the combat layer of the playing music is toggled. This only fires for + * `MusicManager.EnableLayer` and not when the combat layer is automatically enabled in rooms with + * a lot of enemies. + * + * Return `true` to enable the combat layer. Alternatively, return `false` to disable the combat + * layer. Alternatively, return an integer to override the ID of the layer. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `Music` provided. + * matches the integer provided. * * ```ts - * function preMusicLayerToggle(music: Music, enabled: boolean): boolean | Music | undefined {} + * function preMusicLayerToggle(layerID: int, enabled: boolean): boolean | int | undefined {} * ``` */ PRE_MUSIC_LAYER_TOGGLE = 1035, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the player's head is rendered. + * + * Return false to prevent the head from being rendered. Alternatively, return a `Vector` to + * modify the render position of the head. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -597,7 +771,12 @@ export enum ModCallbackRepentogon { PRE_RENDER_PLAYER_HEAD = 1038, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the player's body is rendered. + * + * Return false to prevent the body from being rendered. Alternatively, return a `Vector` to + * modify the render position of the body. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -611,6 +790,10 @@ export enum ModCallbackRepentogon { PRE_RENDER_PLAYER_BODY = 1039, /** + * Fires before an entity is thrown by a player. + * + * Return a `Vector` to override the velocity of the thrown entity. + * * You cannot filter this callback. * * ```ts @@ -624,6 +807,8 @@ export enum ModCallbackRepentogon { PRE_ENTITY_THROW = 1040, /** + * Fires after an entity is thrown by a player. + * * You cannot filter this callback. * * ```ts @@ -637,7 +822,7 @@ export enum ModCallbackRepentogon { POST_ENTITY_THROW = 1041, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -648,7 +833,8 @@ export enum ModCallbackRepentogon { POST_PLAYER_INIT_LEVEL_STATS = 1042, /** - * You cannot filter this callback. + * Fires before the current room is unloaded from being exited. `newLevel` is set to `true` when + * entering a new level or exiting the run. * * ```ts * function preRoomExit(player: EntityPlayer, newLevel: boolean): void {} @@ -657,7 +843,9 @@ export enum ModCallbackRepentogon { PRE_ROOM_EXIT = 1043, /** - * Fires after all entities in the room have been rendered. + * Fires after all entities and grid entities in the room have been rendered, but before effects + * like overlays, shockwaves, and the mirror world shaders are applied. Rendering done in this + * callback is also preserved in room transition animations. * * You cannot filter this callback. * @@ -670,7 +858,7 @@ export enum ModCallbackRepentogon { /** * Fires before the completion mark is set. Return `false` to prevent it from being set. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -686,7 +874,7 @@ export enum ModCallbackRepentogon { /** * Fires after the completion mark is set. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -697,25 +885,56 @@ export enum ModCallbackRepentogon { POST_COMPLETION_MARK_SET = 1048, /** + * Fires before a completion event is recorded, such as when defeating an end boss or unlocking a + * tainted character. + * + * Return `CompletionType` to override the completion event. Alternatively, return `false` to + * prevent the completion event from being recorded. Cancelling it will also prevent all marks and + * completion event related stuff to trigger for all players. + * * You cannot filter this callback. * * ```ts - * function preCompletionEvent(completion: CompletionType): boolean | undefined {} + * function preCompletionEvent(completion: CompletionType): boolean | CompletionType | undefined {} * ``` */ PRE_COMPLETION_EVENT = 1049, /** + * Fires before the game checks for vanilla revive effects like 1UP before determining whether to + * show the game over screen. + * + * Return `false` or call `EntityPlayer.Revive` to cancel the death, reviving the player in-place + * with half a heart. + * + * Returning `false` or calling `EntityPlayer.Revive` may remove the current run's ability to + * save. This occurs because the game immediately deletes the run save during the death animation + * if there's no pending revives. In order to prevent this, only attempt to revive the player if + * they have an item or effect with REPENTOGON's "revive" custom tag, which allows the item/effect + * to count as an extra life on the HUD. + * * You cannot filter this callback. * * ```ts * function preTriggerPlayerDeath(player: EntityPlayer): boolean | undefined {} * ``` + * + * @see https://repentogon.com/xml/items.html */ PRE_TRIGGER_PLAYER_DEATH = 1050, /** - * You cannot filter this callback. + * Fires after the game checks for vanilla revive effects like 1UP before determining whether to + * show the game over screen. + * + * Return `false` or call `EntityPlayer.Revive` to cancel the death, reviving the player in-place + * with half a heart. + * + * Returning `false` or calling `EntityPlayer.Revive` may remove the current run's ability to + * save. This occurs because the game immediately deletes the run save during the death animation + * if there's no pending revives. In order to prevent this, only attempt to revive the player if + * they have an item or effect with REPENTOGON's "revive" custom tag, which allows the item/effect + * to count as an extra life on the HUD. * * ```ts * function triggerPlayerDeathPostCheckRevives(player: EntityPlayer): boolean | undefined {} @@ -724,6 +943,20 @@ export enum ModCallbackRepentogon { TRIGGER_PLAYER_DEATH_POST_CHECK_REVIVES = 1051, /** + * Fires before a completion event is recorded, such as when defeating an end boss or unlocking a + * tainted character. + * + * You cannot filter this callback. + * + * ```ts + * function postCompletionEvent(completion: CompletionType): void {} + * ``` + */ + POST_COMPLETION_EVENT = 1052, + + /** + * Fires before a level is initialized. + * * You cannot filter this callback. * * ```ts @@ -747,7 +980,9 @@ export enum ModCallbackRepentogon { PRE_CHANGE_ROOM = 1061, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a player purchased a pickup from a shop. This also fires for Devil Deals taken. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -758,18 +993,28 @@ export enum ModCallbackRepentogon { POST_PICKUP_SHOP_PURCHASE = 1062, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when `EntityFamiliar.GetFollowerPriority` is called. + * + * Return `FollowerPriority` or an integer to override the priority of the familiar. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * * ```ts - * function getFollowerPriority(familiar: EntityFamiliar): FollowerPriority | undefined {} + * function getFollowerPriority(familiar: EntityFamiliar): FollowerPriority | | int | undefined {} * ``` */ GET_FOLLOWER_PRIORITY = 1063, /** - * You cannot filter this callback. + * Fires before a card is used. + * + * Return `true` to prevent the card from being used. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `CardType` provided. * * ```ts * function preUseCard( @@ -782,7 +1027,13 @@ export enum ModCallbackRepentogon { PRE_USE_CARD = 1064, /** - * You cannot filter this callback. + * Fires before a pill is used. + * + * Return `true` to prevent the pill from being used. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PillEffect` provided. * * ```ts * function preUsePill( @@ -796,7 +1047,11 @@ export enum ModCallbackRepentogon { PRE_USE_PILL = 1065, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the price of a shop item is set. + * + * Return an integer or `PickupPrice` to override the price of the shop item. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -806,23 +1061,36 @@ export enum ModCallbackRepentogon { * pickupSubType: int, * shopItemID: int, * price: int - * ): int | undefined {} + * ): int | PickupPrice | undefined {} * ``` */ GET_SHOP_ITEM_PRICE = 1066, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when `EntityPlayer.GetHealthType` is called. + * + * This callback is usually not efficient. For setting the player's default health type, prefer to + * set their `healthtype` in `players.xml`. For items, use the `healthtype` custom cache in + * `items.xml`. + * + * Return `HealthType` to override the player's health type. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * * ```ts * function getPlayerHealthType(player: EntityPlayer): HealthType | undefined {} * ``` + * + * @see https://repentogon.com/xml/players.html + * @see https://repentogon.com/xml/items.html */ GET_PLAYER_HEALTH_TYPE = 1067, /** + * Fires before room clear effects are triggered. + * * You cannot filter this callback. * * ```ts @@ -832,6 +1100,29 @@ export enum ModCallbackRepentogon { PRE_ROOM_TRIGGER_CLEAR = 1068, /** + * Fires before room clear effects are triggered for a specific player. + * + * Return `false` to cancel the effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PlayerVariant` provided. + * + * ```ts + * function postPlayerTriggerRoomClear(player: EntityPlayer): boolean | undefined {} + * ``` + */ + PRE_PLAYER_TRIGGER_ROOM_CLEAR = 1069, + + /** + * Fires before a shop is restocked from effects such as the Restock collectible or restock + * machines. + * + * This callback is called for both `Room.ShopRestockFull` and `Room.ShopRestockPartial`. Use the + * `partial` parameter to distinguish between the two. + * + * Return `false` to cancel the restock. + * * You cannot filter this callback. * * ```ts @@ -841,6 +1132,12 @@ export enum ModCallbackRepentogon { PRE_RESTOCK_SHOP = 1070, /** + * Fires after a shop is restocked from effects such as the Restock collectible or restock + * machines. + * + * This callback is called for both `Room.ShopRestockFull` and `Room.ShopRestockPartial`. Use the + * `partial` parameter to distinguish between the two. + * * You cannot filter this callback. * * ```ts @@ -850,7 +1147,11 @@ export enum ModCallbackRepentogon { POST_RESTOCK_SHOP = 1071, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when `EntityPlayer.GetActiveMaxCharge` is called. + * + * Return an integer to override the maximum charge of the active item. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * @@ -858,14 +1159,22 @@ export enum ModCallbackRepentogon { * function getActiveMaxCharge( * collectible: CollectibleType, * player: EntityPlayer, - * varData: int + * varData: int, + * currentMaxCharges: int * ): int | undefined {} * ``` */ GET_ACTIVE_MAX_CHARGE = 1072, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when `EntityPlayer.GetActiveMinUsableCharge` is called. + * + * The minimum usable charge are the minimum charges required to use an active item. If the item + * has the minimum amount of charge, it'll also show the white outline. + * + * Return an integer to override the minimum usable charge of the active item. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * @@ -873,13 +1182,21 @@ export enum ModCallbackRepentogon { * function getActiveMinUsableCharge( * slot: ActiveSlot, * player: EntityPlayer, + * currentMinUsableCharge: int, * ): int | undefined {} * ``` */ GET_ACTIVE_MIN_USABLE_CHARGE = 1073, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when `EntityPlayer.GetHeartLimit` is called. + * + * Return an integer to override the heart limit of the player. + * + * While you can set the limit to any arbitrary amount, the game can only render up to 4 lines of + * hearts in the HUD. However, hearts not being rendered in the HUD will still function normally. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -894,18 +1211,25 @@ export enum ModCallbackRepentogon { GET_PLAYER_HEART_LIMIT = 1074, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when the Giantbook animation updates. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GiantbookType` provided. * * ```ts - * function postItemOverlayUpdate(): void {} + * function postItemOverlayUpdate(giantbookID: GiantbookType, skipAnimation: boolean): void {} * ``` */ POST_ITEM_OVERLAY_UPDATE = 1075, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the 1076 plays. + * + * Return `GiantbookType` to override the Giantbook being shown. Alternatively, return `true` to + * prevent the animation from playing. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GiantbookType` provided. * @@ -920,7 +1244,7 @@ export enum ModCallbackRepentogon { PRE_ITEM_OVERLAY_SHOW = 1076, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -931,12 +1255,16 @@ export enum ModCallbackRepentogon { POST_PLAYER_NEW_ROOM_TEMP_EFFECTS = 1077, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * * ```ts - * function postPlayerNewLevel(player: EntityPlayer): void {} + * function postPlayerNewLevel( + * player: EntityPlayer, + * fromPlayerUpdate: boolean, + * postLevelInitFinished: boolean + * ): void {} * ``` */ POST_PLAYER_NEW_LEVEL = 1078, @@ -944,7 +1272,7 @@ export enum ModCallbackRepentogon { /** * Fires after an active item is rendered on the player's HUD. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * @@ -962,7 +1290,16 @@ export enum ModCallbackRepentogon { POST_PLAYER_HUD_RENDER_ACTIVE_ITEM = 1079, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a familiar is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * familiar from being rendered. + * + * Preventing a familiar from being rendered doesn't prevent the familiar's shadow from being + * rendered. To prevent this, call `Entity.SetShadowSize(0)` in + * `ModCallback.POST_FAMILIAR_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -976,7 +1313,15 @@ export enum ModCallbackRepentogon { PRE_FAMILIAR_RENDER = 1080, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a NPC is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the NPC + * from being rendered. + * + * Preventing a NPC from being rendered doesn't prevent the NPC's shadow from being rendered. To + * prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_NPC_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -987,7 +1332,16 @@ export enum ModCallbackRepentogon { PRE_NPC_RENDER = 1081, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a player is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * player from being rendered. + * + * Preventing a player from being rendered doesn't prevent the player's shadow from being + * rendered. To prevent this, call `Entity.SetShadowSize(0)` in + * `ModCallbackCustom.POST_PLAYER_UPDATE_REORDERED`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -998,7 +1352,15 @@ export enum ModCallbackRepentogon { PRE_PLAYER_RENDER = 1082, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a pickup is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * pickup from being rendered. + * + * Preventing a pickup from being rendered doesn't prevent the pickup's shadow from being + * rendered. To prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_PICKUP_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -1009,7 +1371,15 @@ export enum ModCallbackRepentogon { PRE_PICKUP_RENDER = 1083, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a tear is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * tear from being rendered. + * + * Preventing a tear from being rendered doesn't prevent the tear's shadow from being rendered. To + * prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_TEAR_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TearVariant` provided. * @@ -1020,9 +1390,18 @@ export enum ModCallbackRepentogon { PRE_TEAR_RENDER = 1084, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a projectile is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * projectile from being rendered. + * + * Preventing a projectile from being rendered doesn't prevent the projectile's shadow from being + * rendered. To prevent this, call `Entity.SetShadowSize(0)` in + * `ModCallback.POST_PROJECTILE_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `KnifeVariant` provided. + * matches the `ProjectileVariant` provided. * * ```ts * function preProjectileRender( @@ -1034,7 +1413,15 @@ export enum ModCallbackRepentogon { PRE_PROJECTILE_RENDER = 1085, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a knife is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * knife from being rendered. + * + * Preventing a knife from being rendered doesn't prevent the knife's shadow from being rendered. + * To prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_KNIFE_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `KnifeVariant` provided. * @@ -1045,7 +1432,15 @@ export enum ModCallbackRepentogon { PRE_KNIFE_RENDER = 1086, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before an effect is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * effect from being rendered. + * + * Preventing a effect from being rendered doesn't prevent the effect's shadow from being + * rendered. To prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_EFFECT_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EffectVariant` provided. * @@ -1056,7 +1451,15 @@ export enum ModCallbackRepentogon { PRE_EFFECT_RENDER = 1087, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a bomb is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * bomb from being rendered. + * + * Preventing a bomb from being rendered doesn't prevent the bomb's shadow from being rendered. To + * prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_BOMB_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BombVariant` provided. * @@ -1067,7 +1470,15 @@ export enum ModCallbackRepentogon { PRE_BOMB_RENDER = 1088, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before an `EntitySlot` is rendered. + * + * Return a `Vector` to modify the render offset. Alternatively, return `false` to prevent the + * slot from being rendered. + * + * Preventing a slot from being rendered doesn't prevent the slot's shadow from being rendered. To + * prevent this, call `Entity.SetShadowSize(0)` in `ModCallback.POST_SLOT_UPDATE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1078,7 +1489,9 @@ export enum ModCallbackRepentogon { PRE_SLOT_RENDER = 1089, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after an `EntitySlot` is rendered. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1089,6 +1502,8 @@ export enum ModCallbackRepentogon { POST_SLOT_RENDER = 1090, /** + * Fires after the player's hearts are rendered on the HUD. + * * You cannot filter this callback. * * ```ts @@ -1096,7 +1511,7 @@ export enum ModCallbackRepentogon { * offset: Vector, * heartsSprite: Sprite, * position: Vector, - * unknown: float, + * spriteScale: float, * player: EntityPlayer * ): void {} * ``` @@ -1118,7 +1533,12 @@ export enum ModCallbackRepentogon { PRE_PLAYER_APPLY_INNATE_COLLECTIBLE_NUMBER = 1092, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a jingle plays. + * + * Return `Music` to override the jingle being played. Alternatively, return `false` to prevent + * the jingle from playing. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `Music` provided. * @@ -1129,18 +1549,26 @@ export enum ModCallbackRepentogon { PRE_MUSIC_PLAY_JINGLE = 1094, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a collectible has been removed from a player. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * * ```ts - * function postCollectibleRemoved(player: EntityPlayer, collectible: CollectibleType): void {} + * function postCollectibleRemoved( + * player: EntityPlayer, + * collectible: CollectibleType, + * removeFromPlayerForm: boolean, wisp: boolean + * ): void {} * ``` */ POST_COLLECTIBLE_REMOVED = 1095, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a trinket has been added to a player. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TrinketType` provided. * @@ -1155,7 +1583,9 @@ export enum ModCallbackRepentogon { POST_TRINKET_ADDED = 1096, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a trinket has been removed from a player. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TrinketType` provided. * @@ -1166,7 +1596,9 @@ export enum ModCallbackRepentogon { POST_TRINKET_REMOVED = 1097, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the a weapon's attack is triggered. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `WeaponType` provided. * @@ -1182,6 +1614,8 @@ export enum ModCallbackRepentogon { POST_TRIGGER_WEAPON_FIRED = 1098, /** + * Fires after the level's layout has been generated. + * * You cannot filter this callback. * * ```ts @@ -1191,7 +1625,21 @@ export enum ModCallbackRepentogon { POST_LEVEL_LAYOUT_GENERATED = 1099, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a grid entity is spawned outside of room initialization. + * + * The `desc` argument is undefined in most cases. The exceptions to this are poops spawned by the + * Mole enemy, grid entities spawned with `Room.TurnGold`, and grid entities spawned via the + * modding API. + * + * Return `false` to prevent the grid entity from spawning. Alternatively, return a + * `GridEntityDesc` to override the grid entity. Alternatively, return an array with the following + * elements to modify it: + * - `Type`: The `GridEntityType` to override. + * - `Variant`: The variant to override. + * - `Vardata`: The vardata to override. + * - `SpawnSeed`: The spawn seed to override. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -1206,14 +1654,16 @@ export enum ModCallbackRepentogon { * ): * | GridEntityDesc * | boolean - * | { Type?: GridEntityType; Variant?: int; Vardata?: int; SpawnSeed?: Seed } + * | [ type?: GridEntityType, variant?: int, vardata?: int, spawnSeed?: Seed ] * | undefined {} * ``` */ PRE_GRID_ENTITY_SPAWN = 1100, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a grid entity has spawned in the room. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -1235,28 +1685,38 @@ export enum ModCallbackRepentogon { POST_NIGHTMARE_SCENE_RENDER = 1102, /** + * Fires when the Nightmare Screen first appears on the screen. + * * You cannot filter this callback. * * ```ts - * function postNightmareSceneShow(unknown: boolean): void {} + * function postNightmareSceneShow(isDogmaNightmare: boolean): void {} * ``` */ POST_NIGHTMARE_SCENE_SHOW = 1103, /** + * Fires before the game selects which stage to load, usually when entering a trapdoor. + * + * Return an array with the following elements to override the selected stage: + * - `levelStage`: The `LevelStage` to override. + * - `stageType`: The `StageType` to override. + * * You cannot filter this callback. * * ```ts * function preLevelSelect( - * level: LevelStage, + * levelStage: LevelStage, * stageType: StageType - * ): [LevelStage?, StageType?] | undefined {} + * ): [levelStage?: LevelStage, stageType?: StageType] | undefined {} * ``` */ PRE_LEVEL_SELECT = 1104, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires each frame the weapon updates. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `WeaponType` provided. * @@ -1271,24 +1731,30 @@ export enum ModCallbackRepentogon { POST_WEAPON_FIRE = 1105, /** + * Fires before the walls of the backdrop are rendered. + * * You cannot filter this callback. * * ```ts - * function preBackdropRenderWalls(): void {} + * function preBackdropRenderWalls(wallColor: Color): void {} * ``` */ PRE_BACKDROP_RENDER_WALLS = 1106, /** + * Fires before the floor of the backdrop is rendered. + * * You cannot filter this callback. * * ```ts - * function preBackdropRenderFloor(): void {} + * function preBackdropRenderFloor(floorColor: Color): void {} * ``` */ PRE_BACKDROP_RENDER_FLOOR = 1107, /** + * Fires before the water is rendered. + * * You cannot filter this callback. * * ```ts @@ -1401,28 +1867,40 @@ export enum ModCallbackRepentogon { PRE_PLANETARIUM_CALCULATE_FINAL = 1115, /** - * When registering this callback with the `Mod.AddCallback` method: - * - You can provide an optional third argument that will make the callback only fire if it - * matches the string provided. + * Fires before a spritesheet is loaded. + * + * Return an array with the following elements to override the replacement: + * - `layerId`: The layer ID to override. + * - `fileName`: The `.png` file to override. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the string provided. * * ```ts - * function preReplaceSpritesheet(layerId: int, fileName: string): [int, string] | undefined {} + * function preReplaceSpritesheet(layerID: int, fileName: string): [layerId?: int, pngFileName?: string] | undefined {} * ``` */ PRE_REPLACE_SPRITESHEET = 1116, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a spritesheet has been loaded. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the string provided. * * ```ts - * function preReplaceSpritesheet(layerId: int, fileName: string): void {} + * function preReplaceSpritesheet(layerID: int, fileName: string): void {} * ``` */ POST_REPLACE_SPRITESHEET = 1117, /** + * Fires before the hearts UI is rendered on the player's HUD. + * + * Return `true` to prevent the hearts from rendering. + * * You cannot filter this callback. * * ```ts @@ -1430,7 +1908,7 @@ export enum ModCallbackRepentogon { * offset: Vector, * heartsSprite: Sprite, * position: Vector, - * unknown: float, + * spriteScale: float, * player: EntityPlayer * ): boolean | undefined {} * ``` @@ -1439,10 +1917,17 @@ export enum ModCallbackRepentogon { /** * Fires before an active item is rendered on the player's HUD. Return true to prevent the item - * from rendering. You can return an object with various fields to override how the item renders - * on the HUD. + * from rendering. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to prevent the active item from rendering. Alternatively, return an object with + * the following fields to modify how the item renders: + * - `HideItem`: Determines whether the item should be hidden from the active slot or not. + * - `HideOutline`: Determines whether the item outline should be hidden or not. + * - `HideChargeBar`: Determines whether the chargebar should be hidden or not. + * - `CropOffset`: Determines the rectangular area of the active item that will be rendered in the + * active slot. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CollectibleType` provided. * @@ -1453,16 +1938,29 @@ export enum ModCallbackRepentogon { * position: Vector, * alpha: float, * scale: number, - * chargeBarPosition: Vector - * ): {Position?: Vector, Scale?: number, CropOffset?: Vector} boolean | undefined {} + * chargeBarPosition: Vector, + * ): + * | { + * HideItem?: boolean; + * HideOutline?: boolean; + * HideChargeBar?: boolean; + * CropOffset?: Vector; + * } + * | boolean + * | undefined {} * ``` */ PRE_PLAYER_HUD_RENDER_ACTIVE_ITEM = 1119, /** - * This callback will only fire for commands using `AutocompleteType.CUSTOM`. + * Fires whenever a command with its autocomplete type set to `AutocompleteType.CUSTOM` is being + * autocompleted in the console. * - * When registering this callback with the `Mod.AddCallback` method: + * Return an array to determine what is listed in the autocomplete suggestions. Each element can + * be a string, which only shows the name of the suggestion, or an array of two strings, where the + * first element is the name of the suggestion and the second element is the description. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the string provided. * @@ -1470,13 +1968,15 @@ export enum ModCallbackRepentogon { * function consoleAutocomplete( * command: string, * params: string - * ): Array| undefined {} + * ): Array| undefined {} * ``` */ CONSOLE_AUTOCOMPLETE = 1120, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fries after an `EntitySlot` spawns. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1487,7 +1987,9 @@ export enum ModCallbackRepentogon { POST_SLOT_INIT = 1121, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after an `EntitySlot` updates. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1498,7 +2000,11 @@ export enum ModCallbackRepentogon { POST_SLOT_UPDATE = 1122, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before an `EntitySlot` spawns random pickups when blown up. + * + * Return `false` to prevent the drops from being created. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1509,7 +2015,9 @@ export enum ModCallbackRepentogon { PRE_SLOT_CREATE_EXPLOSION_DROPS = 1123, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after an `EntitySlot` spawns random pickups when blown up. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1520,7 +2028,12 @@ export enum ModCallbackRepentogon { POST_SLOT_CREATE_EXPLOSION_DROPS = 1124, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before an `EntitySlot` sets its prize collectible. This is used by Shell Game, Hell Game, + * and Crane Game. + * + * Return a `CollectibleType` to override the prize collectible. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1534,7 +2047,10 @@ export enum ModCallbackRepentogon { PRE_SLOT_SET_PRIZE_COLLECTIBLE = 1125, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after an `EntitySlot` sets its prize collectible. This is used by Shell Game, Hell Game, + * and Crane Game. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1545,7 +2061,7 @@ export enum ModCallbackRepentogon { POST_SLOT_SET_PRIZE_COLLECTIBLE = 1126, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -1555,6 +2071,29 @@ export enum ModCallbackRepentogon { */ PRE_PLAYER_LEVEL_INIT_STATS = 1127, + /** + * Fires after a player's `HealthType` changes, but before their existing health is corrected to + * fit the new health type. After the callback runs, if the player's new health type doesn't + * support Red Heart containers, they will automatically be converted to an appropriate type. + * + * You may modify the player's health differently within this callback, such as removing the heart + * containers entirely. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PlayerType` provided. + * + * ```ts + * function postPlayerHealthTypeChange( + * player: EntityPlayer, + * newHealthType: HealthType, + * previousHealthType: HealthType, + * defaultHealthType: HealthType + * ): void {} + * ``` + */ + POST_PLAYER_HEALTH_TYPE_CHANGE = 1128, + /** * You cannot filter this callback. * @@ -1622,7 +2161,9 @@ export enum ModCallbackRepentogon { PRE_DEVIL_CALCULATE_FINAL = 1133, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when a Giantbook begins to play its animation. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GiantbookType` provided. * @@ -1637,6 +2178,8 @@ export enum ModCallbackRepentogon { POST_ITEM_OVERLAY_SHOW = 1134, /** + * Fires before the game begins to render its contents. + * * You cannot filter this callback. * * ```ts @@ -1646,6 +2189,11 @@ export enum ModCallbackRepentogon { PRE_RENDER = 1135, /** + * Fires before a room is placed in the level layout. + * + * Return a `RoomConfigRoom` to override the room being placed. The new `RoomShape` must be the + * same, and the new available door slots must be compatible with the original room doors. + * * You cannot filter this callback. * * ```ts @@ -1659,15 +2207,110 @@ export enum ModCallbackRepentogon { PRE_LEVEL_PLACE_ROOM = 1137, /** + * Fires after room clear effects have been triggered for a specific player. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PlayerVariant` provided. + * + * ```ts + * function postPlayerTriggerRoomClear(player: EntityPlayer): void {} + * ``` + */ + POST_PLAYER_TRIGGER_ROOM_CLEAR = 1138, + + /** + * Fires each frame after the Giantbook renders on the screen. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `GiantbookType` provided. + * + * ```ts + * function postItemOverlayRender(giantbook: GiantbookType): void {} + * ``` + */ + POST_ITEM_OVERLAY_RENDER = 1139, + + /** + * Fires after an active item has been discharged. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `CollectibleType` provided. + * + * ```ts + * function postDischargeActiveItem( + * collectible: CollectibleType, + * collectibleRemoved: boolean, + * player: EntityPlayer, + * slot: ActiveSlot + * ): void {} + * ``` + */ + POST_DISCHARGE_ACTIVE_ITEM = 1140, + + /** + * Fires before a backdrop changes. + * + * Return a `BackdropType` to override the backdrop being set. + * * You cannot filter this callback. * * ```ts - * function preBackdropChange(backdrop: BackdropType): BackdropType {} + * function preBackdropChange(backdrop: BackdropType): BackdropType | undefined {} * ``` */ PRE_BACKDROP_CHANGE = 1141, /** + * Fires after a backdrop has changed. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `BackdropType` provided. + * + * ```ts + * function postBackdropChange(backdrop: BackdropType): void {} + * ``` + */ + POST_BACKDROP_CHANGE = 1142, + + /** + * Fires after room clear effects has been triggered. + * + * You cannot filter this callback. + * + * ```ts + * function postRoomTriggerClear(playSound: boolean): void {} + * ``` + */ + POST_ROOM_TRIGGER_CLEAR = 1143, + + /** + * Fires after a player drops a trinket onto the ground from their inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `TrinketType` provided. + * + * ```ts + * function postPlayerDropTrinket( + * trinketType: TrinketType, + * dropPos: Vector, + * player: EntityPlayer, + * isGoldenTrinket: boolean, + * replacedTrinket: boolean + * ): void {} + */ + POST_PLAYER_DROP_TRINKET = 1144, + + /** + * Fires before the lighting alpha is set. + * + * Return a number to modify the lighting alpha. It is recommended to return a value between 0 and + * 1. + * * You cannot filter this callback. * * ```ts @@ -1677,7 +2320,12 @@ export enum ModCallbackRepentogon { PRE_GET_LIGHTING_ALPHA = 1150, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a grid entity's lighting is rendered. + * + * Return a `Vector` to override the render offset. Alternatively, return `false` to prevent the + * lighting from rendering. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -1691,7 +2339,12 @@ export enum ModCallbackRepentogon { PRE_RENDER_GRID_LIGHTING = 1151, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before an entity's lighting is rendered. + * + * Return a `Vector` to override the render offset. Alternatively, return `false` to prevent the + * lighting from rendering. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -1705,7 +2358,11 @@ export enum ModCallbackRepentogon { PRE_RENDER_ENTITY_LIGHTING = 1152, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the player is updated. + * + * Return `true` to prevent the player from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -1716,7 +2373,11 @@ export enum ModCallbackRepentogon { PRE_PLAYER_UPDATE = 1160, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the tear is updated. + * + * Return `true` to prevent the tear from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TearVariant` provided. * @@ -1727,7 +2388,11 @@ export enum ModCallbackRepentogon { PRE_TEAR_UPDATE = 1161, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the familiar is updated. + * + * Return `true` to prevent the familiar from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -1738,7 +2403,11 @@ export enum ModCallbackRepentogon { PRE_FAMILIAR_UPDATE = 1162, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the bomb is updated. + * + * Return `true` to prevent the bomb from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BombVariant` provided. * @@ -1749,29 +2418,41 @@ export enum ModCallbackRepentogon { PRE_BOMB_UPDATE = 1163, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the pickup is updated. + * + * Return `true` to prevent the pickup from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `KnifeVariant` provided. + * matches the `PickupVariant` provided. * * ```ts - * function preKnifeUpdate(knife: EntityKnife): boolean | undefined {} + * function prePickupUpdate(pickup: EntityPickup): boolean | undefined {} * ``` */ - PRE_KNIFE_UPDATE = 1164, + PRE_PICKUP_UPDATE = 1164, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the knife is updated. + * + * Return `true` to prevent the knife from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `PickupVariant` provided. + * matches the `KnifeVariant` provided. * * ```ts - * function prePickupUpdate(pickup: EntityPickup): boolean | undefined {} + * function preKnifeUpdate(knife: EntityKnife): boolean | undefined {} * ``` */ - PRE_PICKUP_UPDATE = 1165, + PRE_KNIFE_UPDATE = 1165, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the projectile is updated. + * + * Return `true` to prevent the projectile from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ProjectileVariant` provided. * @@ -1782,7 +2463,11 @@ export enum ModCallbackRepentogon { PRE_PROJECTILE_UPDATE = 1166, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the laser is updated. + * + * Return `true` to prevent the laser from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `LaserVariant` provided. * @@ -1793,7 +2478,11 @@ export enum ModCallbackRepentogon { PRE_LASER_UPDATE = 1167, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the effect is updated. + * + * Return `true` to prevent the effect from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EffectVariant` provided. * @@ -1804,7 +2493,11 @@ export enum ModCallbackRepentogon { PRE_EFFECT_UPDATE = 1168, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the `EntitySlot` is updated. + * + * Return `true` to prevent the `EntitySlot` from updating, ignoring its internal AI. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -1815,12 +2508,19 @@ export enum ModCallbackRepentogon { PRE_SLOT_UPDATE = 1169, /** + * Fires before a player collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `PlayerVariant` provided. * * ```ts * function prePlayerGridCollision( @@ -1833,12 +2533,19 @@ export enum ModCallbackRepentogon { PRE_PLAYER_GRID_COLLISION = 1171, /** + * Fires after the player collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `PlayerVariant` provided. * * ```ts * function postPlayerGridCollision( @@ -1851,10 +2558,24 @@ export enum ModCallbackRepentogon { POST_PLAYER_GRID_COLLISION = 1172, /** + * Fires before the tear collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `TearVariant` provided. + * + * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as + * this callback offers significantly better performance than the former. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -1869,12 +2590,26 @@ export enum ModCallbackRepentogon { PRE_TEAR_GRID_COLLISION = 1173, /** + * Fires after the tear collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `TearVariant` provided. + * + * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as + * this callback offers significantly better performance than the former. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `TearVariant` provided. * * ```ts * function postTearGridCollision( @@ -1887,12 +2622,19 @@ export enum ModCallbackRepentogon { POST_TEAR_GRID_COLLISION = 1174, /** + * Fires before the familiar collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `FamiliarVariant` provided. * * ```ts * function preFamiliarGridCollision( @@ -1905,12 +2647,19 @@ export enum ModCallbackRepentogon { PRE_FAMILIAR_GRID_COLLISION = 1175, /** + * Fires after the familiar collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `FamiliarVariant` provided. * * ```ts * function postFamiliarGridCollision( @@ -1923,12 +2672,19 @@ export enum ModCallbackRepentogon { POST_FAMILIAR_GRID_COLLISION = 1176, /** + * Fires before the bomb collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `BombVariant` provided. * * ```ts * function preBombGridCollision( @@ -1941,12 +2697,19 @@ export enum ModCallbackRepentogon { PRE_BOMB_GRID_COLLISION = 1177, /** + * Fires before the bomb collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `BombVariant` provided. * * ```ts * function postBombGridCollision( @@ -1959,12 +2722,19 @@ export enum ModCallbackRepentogon { POST_BOMB_GRID_COLLISION = 1178, /** + * Fires before the pickup collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `PickupVariant` provided. * * ```ts * function prePickupGridCollision( @@ -1977,12 +2747,19 @@ export enum ModCallbackRepentogon { PRE_PICKUP_GRID_COLLISION = 1179, /** + * Fires after the pickup collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `PickupVariant` provided. * * ```ts * function postPickupGridCollision( @@ -1995,12 +2772,19 @@ export enum ModCallbackRepentogon { POST_PICKUP_GRID_COLLISION = 1180, /** + * Fires before the projectile collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `ProjectileVariant` provided. * * ```ts * function preProjectileGridCollision( @@ -2013,12 +2797,19 @@ export enum ModCallbackRepentogon { PRE_PROJECTILE_GRID_COLLISION = 1181, /** + * Fires after the projectile collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `ProjectileVariant` provided. * * ```ts * function postProjectileGridCollision( @@ -2031,12 +2822,19 @@ export enum ModCallbackRepentogon { POST_PROJECTILE_GRID_COLLISION = 1182, /** + * Fires before the NPC collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `EntityType` provided. * * ```ts * function preNPCGridCollision( @@ -2049,12 +2847,19 @@ export enum ModCallbackRepentogon { PRE_NPC_GRID_COLLISION = 1183, /** + * Fires after the NPC collides with a grid entity. + * + * `gridEntity` can be undefined as it's possible for a grid collision to happen if the tile's + * `GridPath` value is >= 1000. + * * Use this over Isaacscript Common's `ModCallbackCustom.POST_GRID_ENTITY_COLLISION` callback as * this callback offers significantly better performance than the former. * - * When registering this callback with the `Mod.AddCallback` method: + * Return `true` to ignore the collision. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it - * matches the `GridEntityType` provided. + * matches the `EntityType` provided. * * ```ts * function postNPCGridCollision( @@ -2086,7 +2891,7 @@ export enum ModCallbackRepentogon { * Fires before an NPC is split from the Meat Cleaver item effect. Return true to prevent the NPC * from splitting. NPCs will still take damage from the Meat Cleaver even if you return true. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -2097,7 +2902,18 @@ export enum ModCallbackRepentogon { PRE_NPC_SPLIT = 1191, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when a grid entity spawns during room initialization. This does not fire for grid + * entities spawned after room initialization or floor decorations. If you wish to modify those, + * use `ModCAllbackRepentogon.PRE_GRID_ENTITY_SPAWN` instead. + * + * Return `false` to prevent the grid entity from spawning. Alternatively, return an array with + * the following fields to modify the grid entity being spawned: + * - `gridType`: The type of grid entity to spawn. + * - `variant`: The variant of the grid entity to spawn. + * - `varData`: The `VarData` of the grid entity to spawn. + * - `spawnSpeed`: The grid entity's spawn seed. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -2107,13 +2923,21 @@ export enum ModCallbackRepentogon { * variant: int, * varData: int, * gridIndex: int, - * spawnSeed: Seed - * ): boolean | [ GridEntityType, int, int, Seed ] | undefined {} + * spawnSeed: Seed, + * ): + * | boolean + * | [gridType?: GridEntityType, variant?: int, varData?: int, spawnSeed?: Seed] + * | undefined {} * ``` */ PRE_ROOM_GRID_ENTITY_SPAWN = 1192, /** + * Fires before a new room is loaded. + * + * While a `room` object is provided, the callback fires before the new room is fully initialized. + * Therefore, many functions may not work as intended and are considered to be unstable. + * * You cannot filter this callback. * * ```ts @@ -2123,6 +2947,10 @@ export enum ModCallbackRepentogon { PRE_NEW_ROOM = 1200, /** + * Fires before the Mega Satan ending cutscene plays, forcibly ending the game. + * + * Return `true` to prevent the ending from occurring, guaranteeing a portal to the Void. + * * You cannot filter this callback. * * ```ts @@ -2132,7 +2960,8 @@ export enum ModCallbackRepentogon { PRE_MEGA_SATAN_ENDING = 1201, /** - * You cannot filter this callback. + * Fires after all mods have their Lua scripts loaded. This is ideal for implementing mod + * compatibility without abusing load order in `metadata.xml`. * * ```ts * function postModsLoaded(): void {} @@ -2141,6 +2970,15 @@ export enum ModCallbackRepentogon { POST_MODS_LOADED = 1210, /** + * Fires before a NPC morphs. + * + * Return `false` to prevent the NPC from morphing. Alternatively, return an array with the + * following elements to override the morph: + * - `entityType`: The new `EntityType` for the NPC. + * - `variant`: The new variant for the NPC. + * - `subType`: The new sub type for the NPC. + * - `championColor`: Optional. The new `ChampionColor` for the NPC. + * * You cannot filter this callback. * * ```ts @@ -2149,13 +2987,32 @@ export enum ModCallbackRepentogon { * entityType: EntityType, * variant: int, * subType: int, - * championColor: ChampionColor - * ): boolean | [ EntityType, int, int, ChampionColor? ] | undefined {} + * championColor: ChampionColor, + * ): + * | boolean + * | [ + * entityType?: EntityType, + * variant?: int, + * subType?: int, + * championColor?: ChampionColor, + * ] + * | undefined {} * ``` */ PRE_NPC_MORPH = 1212, /** + * Fires before a pickup morphs. + * + * Return `false` to prevent the pickup from morphing. Alternatively, return an array with the + * following elements to override the morph: + * - `entityType`: The new `EntityType` for the entity. + * - `variant`: The new variant for the pickup. + * - `subType`: The new sub type for the pickup. + * - `keepPrice`: Optional. Whether to keep the pickup's price. + * - `keepSeed`: Optional. Whether to keep the pickup's `InitSeed`. + * - `ignoreModifiers`: Optional. Whether to ignore the pickup's modifiers when morphing. + * * You cannot filter this callback. * * ```ts @@ -2166,13 +3023,25 @@ export enum ModCallbackRepentogon { * subType: int, * keepPrice: boolean, * keepSeed: boolean, - * ignoreModifiers: boolean - * ): boolean | [ EntityType, int, int, boolean?, boolean?, boolean? ] | undefined {} + * ignoreModifiers: boolean, + * ): + * | boolean + * | [ + * entityType: EntityType, + * variant: int, + * subType: int, + * keepPrice?: boolean, + * keepSeed?: boolean, + * ignoreModifiers?: boolean, + * ] + * | undefined {} * ``` */ PRE_PICKUP_MORPH = 1213, /** + * Fires after a NPC morphs. + * * You cannot filter this callback. * * ```ts @@ -2187,6 +3056,8 @@ export enum ModCallbackRepentogon { POST_NPC_MORPH = 1214, /** + * Fires after a pickup morphs. + * * You cannot filter this callback. * * ```ts @@ -2204,6 +3075,10 @@ export enum ModCallbackRepentogon { POST_PICKUP_MORPH = 1215, /** + * Fires before the completion marks render on the screen. + * + * Return `false` to prevent the completion marks from rendering. + * * You cannot filter this callback. * * ```ts @@ -2218,7 +3093,7 @@ export enum ModCallbackRepentogon { PRE_COMPLETION_MARKS_RENDER = 1216, /** - * You cannot filter this callback. + * Fires after the completion marks render on the screen. * * ```ts * function postCompletionMarksRender( @@ -2232,6 +3107,11 @@ export enum ModCallbackRepentogon { POST_COMPLETION_MARKS_RENDER = 1217, /** + * Fires before the pause screen renders on the screen. + * + * Return `false` to prevent the pause screen from rendering. Doing so will also prevent the + * screen from darkening. + * * You cannot filter this callback. * * ```ts @@ -2241,6 +3121,8 @@ export enum ModCallbackRepentogon { PRE_PAUSE_SCREEN_RENDER = 1218, /** + * Fires after the pause screen renders on the screen. + * * You cannot filter this callback. * * ```ts @@ -2253,7 +3135,7 @@ export enum ModCallbackRepentogon { * Fires when the player is about to place a bomb. Return false to prevent the bomb from being * placed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -2264,7 +3146,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_USE_BOMB = 1220, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the player places a bomb. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -2275,7 +3159,11 @@ export enum ModCallbackRepentogon { POST_PLAYER_USE_BOMB = 1221, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires whenever a NPC selects its target, such as when `EntityNPC.GetPlayerTarget` is called. + * + * Return an `Entity` to override the target selected. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -2288,7 +3176,7 @@ export enum ModCallbackRepentogon { /** * Fires when a Dark Red Champion NPC regenerates from a pile of goo. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -2302,7 +3190,7 @@ export enum ModCallbackRepentogon { * Fires when a custom cache flag is being evaluated. Return a number to set the value of the * custom cache flag. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the string provided. * @@ -2320,7 +3208,7 @@ export enum ModCallbackRepentogon { * Fires when a familiar's multiplier is being evaluated. Return a number to override the * familiar's multiplier. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -2341,7 +3229,7 @@ export enum ModCallbackRepentogon { * Unless you want to perform complicated conditions/calculations, it's strongly recommended that * you use REPENTOGON's XML item stats features over this callback. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EvaluateStatStage` provided. * @@ -2354,7 +3242,9 @@ export enum ModCallbackRepentogon { EVALUATE_STAT = 1226, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a player collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. * @@ -2369,7 +3259,9 @@ export enum ModCallbackRepentogon { POST_PLAYER_COLLISION = 1231, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a tear collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TearVariant` provided. * @@ -2380,7 +3272,9 @@ export enum ModCallbackRepentogon { POST_TEAR_COLLISION = 1233, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a familiar collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -2395,7 +3289,9 @@ export enum ModCallbackRepentogon { POST_FAMILIAR_COLLISION = 1235, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a bomb collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BombVariant` provided. * @@ -2406,7 +3302,9 @@ export enum ModCallbackRepentogon { POST_BOMB_COLLISION = 1237, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a pickup collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -2417,7 +3315,15 @@ export enum ModCallbackRepentogon { POST_PICKUP_COLLISION = 1239, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before an `EntitySlot` collides with an entity. + * + * Return `true` to ignore the collision and prevent collision effects from being ran. Return + * `false` to allow the collision but prevent collision effects from being ran. Alternatively, + * return an object with any of the following optional fields to modify the collision behavior: + * - `Collide`: Whether the familiar should collide with the collider. + * - `SkipCollisionEffects`: Whether to skip running collision effects. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -2432,7 +3338,9 @@ export enum ModCallbackRepentogon { PRE_SLOT_COLLISION = 1240, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after an `EntitySlot` collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `SlotVariant` provided. * @@ -2447,7 +3355,9 @@ export enum ModCallbackRepentogon { POST_SLOT_COLLISION = 1241, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a knife collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `KnifeVariant` provided. * @@ -2458,7 +3368,9 @@ export enum ModCallbackRepentogon { POST_KNIFE_COLLISION = 1243, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a projectile collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ProjectileVariant` provided. * @@ -2473,7 +3385,9 @@ export enum ModCallbackRepentogon { POST_PROJECTILE_COLLISION = 1245, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a NPC collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -2484,10 +3398,14 @@ export enum ModCallbackRepentogon { POST_NPC_COLLISION = 1247, /** + * Fires before a laser collides with an entity. + * + * Return `true` to ignore the collision. + * * Fires when an `EntityLaser` is about to collide with an entity. Return true to prevent the * collision from happening. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `LaserVariant` provided. * @@ -2498,7 +3416,9 @@ export enum ModCallbackRepentogon { PRE_LASER_COLLISION = 1248, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a laser collides with an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `LaserVariant` provided. * @@ -2509,7 +3429,12 @@ export enum ModCallbackRepentogon { POST_LASER_COLLISION = 1249, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after `EntityPickup.GetCoinValue` is called to determine the value of a coin pickup. + * + * Return an integer to override the coin's value, modifying the amount of coins it gives on + * pickup. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CoinSubType` provided. * @@ -2520,18 +3445,26 @@ export enum ModCallbackRepentogon { GET_COIN_VALUE = 1250, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * * ```ts - * function prePlayerGetMultiShotParams(player: EntityPlayer): MultiShotParams | undefined {} + * function prePlayerGetMultiShotParams( + * player: EntityPlayer, + * multiShotParams: MultiShotParams, + * weaponType: WeaponType + * ): MultiShotParams | undefined {} * ``` + * + * @deprecated Use `ModCallbackRepentogon.EVALUATE_MULTI_SHOT_PARAMS` instead. */ PRE_PLAYER_GET_MULTI_SHOT_PARAMS = 1251, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when a familiar fires a tear. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -2542,6 +3475,8 @@ export enum ModCallbackRepentogon { POST_FAMILIAR_FIRE_PROJECTILE = 1252, /** + * Fires when a player fires a Dr. Fetus bomb. + * * You cannot filter this callback. * * ```ts @@ -2551,6 +3486,9 @@ export enum ModCallbackRepentogon { POST_FIRE_BOMB = 1253, /** + * Fires when the player fires the Bone Club. This is only called when the club is initially + * spawned, not when it's swung or thrown. + * * You cannot filter this callback. * * ```ts @@ -2560,6 +3498,8 @@ export enum ModCallbackRepentogon { POST_FIRE_BONE_CLUB = 1254, /** + * Fires when a player fires a Brimstone laser. + * * You cannot filter this callback. * * ```ts @@ -2569,6 +3509,8 @@ export enum ModCallbackRepentogon { POST_FIRE_BRIMSTONE = 1255, /** + * Fires when a player fires a Brimstone ball. + * * You cannot filter this callback. * * ```ts @@ -2578,6 +3520,8 @@ export enum ModCallbackRepentogon { POST_FIRE_BRIMSTONE_BALL = 1256, /** + * Fires when the player fires a knife from Mom's Knife. + * * You cannot filter this callback. * * ```ts @@ -2587,6 +3531,8 @@ export enum ModCallbackRepentogon { POST_FIRE_KNIFE = 1257, /** + * Fires when the player swings the Spirit Sword. + * * You cannot filter this callback. * * ```ts @@ -2596,6 +3542,8 @@ export enum ModCallbackRepentogon { POST_FIRE_SWORD = 1258, /** + * Fires when the player fires a Tech laser. + * * You cannot filter this callback. * * ```ts @@ -2605,6 +3553,8 @@ export enum ModCallbackRepentogon { POST_FIRE_TECH_LASER = 1259, /** + * Fires when the player fires a Tech X laser. + * * You cannot filter this callback. * * ```ts @@ -2614,7 +3564,9 @@ export enum ModCallbackRepentogon { POST_FIRE_TECH_X_LASER = 1260, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when the familiar fires a Brimstone laser. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -2625,7 +3577,9 @@ export enum ModCallbackRepentogon { POST_FAMILIAR_FIRE_BRIMSTONE = 1261, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires when the familiar fires a Tech laser. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. * @@ -2636,6 +3590,10 @@ export enum ModCallbackRepentogon { POST_FAMILIAR_FIRE_TECH_LASER = 1262, /** + * Fires when `Room.IsPersistentRoomEntity` is called. + * + * Return `true` to allow the entity to respawn. + * * You cannot filter this callback. * * ```ts @@ -2652,7 +3610,7 @@ export enum ModCallbackRepentogon { * rendering. You can return an object with various fields to override how the trinket renders on * the HUD. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TrinketSlot` provided. * @@ -2671,7 +3629,7 @@ export enum ModCallbackRepentogon { * Fires before a pickup is consumed from effects such as Void and Black Rune. Return false to * prevent the pickup from being consumed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -2685,7 +3643,7 @@ export enum ModCallbackRepentogon { * Fires before a pickup is consumed from The Abyss. Return false to prevent the pickup from being * consumed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -2699,7 +3657,7 @@ export enum ModCallbackRepentogon { * Fires before a pickup is consumed from Compost. Return false to prevent the pickup from being * consumed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. * @@ -2710,27 +3668,34 @@ export enum ModCallbackRepentogon { PRE_PICKUP_COMPOSTED = 1267, /** + * Fires after a `TemporaryEffect` of an `ItemConfigItem` is removed from a player. + * * You cannot filter this callback. * * ```ts * function postPlayerTriggerEffectRemoved( * player: EntityPlayer, * itemConfigItem: ItemConfigItem + * count: int * ): void {} * ``` */ POST_PLAYER_TRIGGER_EFFECT_REMOVED = 1268, /** + * Fires after a `TemporaryEffect` of an `ItemConfigItem` is removed from the room. + * * You cannot filter this callback. * * ```ts - * function postRoomTriggerEffectRemoved(player: EntityPlayer: void {} + * function postRoomTriggerEffectRemoved(itemConfig: ItemConfigItem): void {} * ``` */ POST_ROOM_TRIGGER_EFFECT_REMOVED = 1269, /** + * Fires after the boss intro is initialized. + * * You cannot filter this callback. * * ```ts @@ -2740,7 +3705,11 @@ export enum ModCallbackRepentogon { POST_BOSS_INTRO_SHOW = 1270, /** - * You cannot filter this callback. + * Fires each frame the room transition animation updates. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `RoomTransitionAnim` provided. * * ```ts * function postRoomTransitionUpdate(): void {} @@ -2749,7 +3718,11 @@ export enum ModCallbackRepentogon { POST_ROOM_TRANSITION_UPDATE = 1271, /** - * You cannot filter this callback. + * Fires each frame the room transition animation renders. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `RoomTransitionAnim` provided. * * ```ts * function postRoomTransitionRender(): void {} @@ -2758,7 +3731,140 @@ export enum ModCallbackRepentogon { POST_ROOM_TRANSITION_RENDER = 1272, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a `TemporaryEffect` is added to a player. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `ItemConfigItem` provided. + * + * ```ts + * function postPlayerAddEffect( + * player: EntityPlayer, + * itemConfigItem: ItemConfigItem, + * addCostume: boolean, + * count: int + * ): void {} + * ``` + */ + POST_PLAYER_ADD_EFFECT = 1273, + + /** + * Fires after a `TemporaryEffect` is added to the room. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `ItemConfigItem` provided. + * + * ```ts + * function postRoomAddEffect(itemConfig: ItemConfigItem): void {} + * ``` + */ + POST_ROOM_ADD_EFFECT = 1274, + + /** + * Fires after `Game.BombDamage` is called. This is used by the game to damage entities within a + * radius for explosions and similar effects. + * + * The optional third argument is used for the source entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EntityType` provided. + * + * ```ts + * function postBombDamage( + * position: Vector, + * damage: number, + * radius: number, + * lineCheck: boolean, + * source: Entity | undefined, + * tearFlags: BitFlags, + * damageFlags: BitFlags, + * damageSource: boolean + * ): void {} + * ``` + */ + POST_BOMB_DAMAGE = 1275, + + /** + * Fires after `Game.BombTearflagEffects` is called. This is used by the game when `TearFlag` + * based effects are triggered from an explosion. + * + * The optional third argument is used for the source entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EntityType` provided. + * + * ```ts + * function postBombTearflagEffects( + * position: Vector, + * radius: number, + * tearFlags: BitFlags, + * source: Entity | undefined, + * radiusMulti: number + * ): void {} + * ``` + */ + POST_BOMB_TEAR_FLAG_EFFECTS = 1276, + + /** + * Fires before the effects of Tear Flags are applied to an enemy upon being hit or damaged. + * + * Return `false` to prevent the effects from being applied. Alternatively, return an object with + * the following fields to override how the effects are applied: + * - `Position`: The relevant position for the effects. Only used for specific `TearFlag` effects. + * - `TearFlags`: The Tear Flags to apply. + * - `Damage`: The damage of the Tear Flag effects. + * + * The optional `EntityType` third argument is used for the source entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EntityType` provided. + * + * ```ts + * function preApplyTearFlagEffects( + * npc: EntityNPC, + * position: Vector, + * tearFlags: BitFlags, + * source: Entity | undefined, + * damage: number, + * ): + * | boolean + * | undefined + * | { Position?: Vector; TearFlags?: BitFlags; Damage?: number } {} + * ``` + */ + PRE_APPLY_TEAR_FLAG_EFFECTS = 1277, + + /** + * Fires after the effects of Tear Flags are applied to an enemy upon being hit or damaged. + * + * The optional `EntityType` third argument is used for the source entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EntityType` provided. + * + * ```ts + * function postApplyTearFlagEffects( + * npc: EntityNPC, + * position: Vector, + * tearFlags: BitFlags, + * source: Entity | undefined, + * damage: number, + * ): void {} + * ``` + */ + POST_APPLY_TEAR_FLAG_EFFECTS = 1278, + + /** + * Fires before a boss is selected for the floor. + * + * Return a `BossID` to override the selected boss. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BossID` provided. * @@ -2774,6 +3880,11 @@ export enum ModCallbackRepentogon { PRE_BOSS_SELECT = 1280, /** + * Fires before a costume is added to the player. + * + * Return `true` to prevent the costume from being added. Alternatively, return an + * `ItemConfigItem` to replace the costume. + * * You cannot filter this callback. * * ```ts @@ -2787,6 +3898,10 @@ export enum ModCallbackRepentogon { PRE_PLAYER_ADD_COSTUME = 1281, /** + * Fires before the game tries to remove a costume from the player. + * + * Return `true` to prevent the costume from being removed. + * * You cannot filter this callback. * * ```ts @@ -2799,6 +3914,8 @@ export enum ModCallbackRepentogon { PRE_PLAYER_REMOVE_COSTUME = 1282, /** + * Fires after a costume is added to the player. + * * You cannot filter this callback. * * ```ts @@ -2812,6 +3929,8 @@ export enum ModCallbackRepentogon { POST_PLAYER_ADD_COSTUME = 1283, /** + * Fires after a costume is removed from the player. + * * You cannot filter this callback. * * ```ts @@ -2864,7 +3983,7 @@ export enum ModCallbackRepentogon { * Fires before the player sleeps on a bed after colliding with it. Return true to prevent the * player from sleeping on the bed. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BedSubType` provided. * @@ -2875,6 +3994,45 @@ export enum ModCallbackRepentogon { PRE_BED_SLEEP = 1288, /** + * Fires before the `MultiShotParams` for a player are updated. + * + * Return `MultiShotParams` to modify the parameters of the player's shooting behavior. The + * modified `MultiShotParams` is passed along the remaining callbacks. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PlayerType` provided. + * + * ```ts + * function evaluateMultiShotParams( + * player: EntityPlayer, + * multiShotParams: MultiShotParams, + * weaponType: WeaponType + * ): MultiShotParams | undefined {} + * ``` + */ + EVALUATE_MULTI_SHOT_PARAMS = 1289, + + /** + * Fires when the game tries to get a random available room index on the floor. + * + * Return an integer to override the target room index. + * + * You cannot filter this callback. + * + * ```ts + * function preGetRandomRoomIndex( + * roomIndex: int, + * iAmErrorRoom: boolean, + * seed: Seed + * ): int | undefined {} + * ``` + */ + PRE_GET_RANDOM_ROOM_INDEX = 1290, + + /** + * Fires after the Glowing Hourglass state is saved. + * * You cannot filter this callback. * * ```ts @@ -2884,13 +4042,86 @@ export enum ModCallbackRepentogon { POST_GLOWING_HOURGLASS_SAVE = 1300, /** + * Fires after the Glowing Hourglass state is loaded. + * * You cannot filter this callback. * * ```ts * function postGlowingHourglassSave(slot: int): void {} * ``` */ - POST_GLOWING_HOURGLASS_LOAD = 1301, + POST_GLOWING_HOURGLASS_LOAD = 1301, + + /** + * Fires before the Glowing Hourglass state is saved. + * + * You cannot filter this callback. + * + * ```ts + * function preGlowingHourglassSave(slot: int): void {} + * ``` + */ + PRE_GLOWING_HOURGLASS_SAVE = 1302, + + /** + * Fires before the Glowing Hourglass state is loaded. + * + * You cannot filter this callback. + * + * ```ts + * function preGlowingHourglassLoad(slot: int): void {} + * ``` + */ + PRE_GLOWING_HOURGLASS_LOAD = 1303, + + /** + * Fires after the room saves all entities and grid entities. + * + * You cannot filter this callback. + * + * ```ts + * function postRoomSaveState(room: Room, roomDescriptor: RoomDescriptor): void {} + * ``` + */ + POST_ROOM_SAVE_STATE = 1304, + + /** + * Fires before the room respawns all saved entities. + * + * You cannot filter this callback. + * + * ```ts + * function preRoomRestoreState(room: Room, roomDescriptor: RoomDescriptor): void {} + * ``` + */ + PRE_ROOM_RESTORE_STATE = 1305, + + /** + * Fires after two rooms have been swapped due to the Curse of the Maze. + * + * You cannot filter this callback. + * + * ```ts + * function postSwapRooms(roomDesc1: RoomDescriptor, roomDesc2: RoomDescriptor): void {} + * ``` + */ + POST_SWAP_ROOMS = 1306, + + /** + * Fires when a room previously encountered on a floor has been saved. The saved room is restored + * later to be used for the Ascent route. + * + * You cannot filter this callback. + * + * ```ts + * function postBackwardsRoomSave( + * stage: LevelStage, + * roomDesc: RoomDescriptor, + * id: string + * ): void {} + * ``` + */ + POST_BACKWARDS_ROOM_SAVE = 1307, /** * Fires when a room previously encountered on a floor is loaded back into the game during the @@ -2909,7 +4140,10 @@ export enum ModCallbackRepentogon { POST_BACKWARDS_ROOM_RESTORE = 1308, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the character menu is rendered on the screen while a custom character is selected. + * This callback does not trigger for vanilla characters. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -2924,7 +4158,9 @@ export enum ModCallbackRepentogon { PRE_RENDER_CUSTOM_CHARACTER_MENU = 1333, /** - * You cannot filter this callback. + * Fires before the `LootList` of a pickup is selected. + * + * Return a `LootList` to override the loot list used for the pickup. * * ```ts * function prePickupGetLootList( @@ -2939,6 +4175,8 @@ export enum ModCallbackRepentogon { * Fires before the ghost pickup effect from Guppy's Eye updates. Return false to prevent the * ghost pickups from displaying. * + * Return `false` to prevent the ghost pickups from being displayed. + * * You cannot filter this callback. * * ```ts @@ -2948,7 +4186,12 @@ export enum ModCallbackRepentogon { PRE_PICKUP_UPDATE_GHOST_PICKUPS = 1335, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a card is added to the player's inventory. + * + * Return `false` to prevent the card from being added. Alternatively, return a `CardType` to + * override the card being added. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CardType` provided. * @@ -2963,7 +4206,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_ADD_CARD = 1350, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a card is added to the player's inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CardType` provided. * @@ -2978,7 +4223,12 @@ export enum ModCallbackRepentogon { POST_PLAYER_ADD_CARD = 1351, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a pill is added to the player's inventory. + * + * Return `false` to prevent the pill from being added. Alternatively, return a `PillColor` to + * override the pill being added. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillColor` provided. * @@ -2993,7 +4243,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_ADD_PILL = 1352, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a pill is added to the player's inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillColor` provided. * @@ -3008,7 +4260,9 @@ export enum ModCallbackRepentogon { POST_PLAYER_ADD_PILL = 1353, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a card is removed from the player's inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CardType` provided. * @@ -3023,7 +4277,9 @@ export enum ModCallbackRepentogon { POST_PLAYER_REMOVE_CARD = 1354, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a pill is removed from the player's inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillColor` provided. * @@ -3038,7 +4294,11 @@ export enum ModCallbackRepentogon { POST_PLAYER_REMOVE_PILL = 1355, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the player picks up a card off the ground. + * + * Return `false` to prevent the card from being picked up. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CardType` provided. * @@ -3052,7 +4312,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_COLLECT_CARD = 1356, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the player picks up a card off the ground. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CardType` provided. * @@ -3063,7 +4325,11 @@ export enum ModCallbackRepentogon { POST_PLAYER_COLLECT_CARD = 1357, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before the player picks up a pill off the ground. + * + * Return `false` to prevent the pill from being picked up. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillColor` provided. * @@ -3077,7 +4343,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_COLLECT_PILL = 1358, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the player picks up a pill off the ground. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillColor` provided. * @@ -3088,7 +4356,9 @@ export enum ModCallbackRepentogon { POST_PLAYER_COLLECT_PILL = 1359, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the player drops a card from their inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `CardType` provided. * @@ -3103,7 +4373,9 @@ export enum ModCallbackRepentogon { POST_PLAYER_DROP_CARD = 1360, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the player drops a pill from their inventory. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PillColor` provided. * @@ -3118,7 +4390,7 @@ export enum ModCallbackRepentogon { POST_PLAYER_DROP_PILL = 1361, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3131,7 +4403,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_DECORATION_UPDATE = 1400, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3142,7 +4414,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_DECORATION_UPDATE = 1401, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3153,7 +4425,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_DOOR_UPDATE = 1402, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3167,7 +4439,7 @@ export enum ModCallbackRepentogon { * Fire grid entities are largely unused and in most cases you'll want to target the `EntityNPC` * fireplaces with `ModCallback.PRE_NPC_UPDATE`. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3181,7 +4453,7 @@ export enum ModCallbackRepentogon { * Fire grid entities are largely unused and in most cases you'll want to target the `EntityNPC` * fireplaces with `ModCallback.POST_NPC_UPDATE`. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3192,7 +4464,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_FIRE_UPDATE = 1405, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3203,7 +4475,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_GRAVITY_UPDATE = 1406, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3214,7 +4486,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_GRAVITY_UPDATE = 1407, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3225,7 +4497,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_LOCK_UPDATE = 1408, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3236,7 +4508,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_LOCK_UPDATE = 1409, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3247,7 +4519,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_PIT_UPDATE = 1410, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3261,7 +4533,7 @@ export enum ModCallbackRepentogon { * This does not include the `EntityNPC` poops used by Tainted Blue Baby. Use * `ModCallback.PRE_NPC_UPDATE` if you wish to target them. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3275,7 +4547,7 @@ export enum ModCallbackRepentogon { * This does not include the `EntityNPC` poops used by Tainted Blue Baby. Use * `ModCallback.POST_NPC_UPDATE` if you wish to target them. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3286,7 +4558,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_POOP_UPDATE = 1413, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3299,7 +4571,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_PRESSURE_PLATE_UPDATE = 1414, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3310,7 +4582,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_PRESSURE_PLATE_UPDATE = 1415, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3321,7 +4593,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_ROCK_UPDATE = 1416, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3332,7 +4604,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_ROCK_UPDATE = 1417, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3343,7 +4615,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_SPIKES_UPDATE = 1418, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3354,7 +4626,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_SPIKES_UPDATE = 1419, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3365,7 +4637,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_STAIRCASE_UPDATE = 1420, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3376,7 +4648,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_STAIRCASE_UPDATE = 1421, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3387,7 +4659,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_STATUE_UPDATE = 1422, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3398,7 +4670,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_STATUE_UPDATE = 1423, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3411,7 +4683,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_TELEPORTER_UPDATE = 1424, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3422,7 +4694,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_TELEPORTER_UPDATE = 1425, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3433,7 +4705,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_TRAPDOOR_UPDATE = 1426, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3444,7 +4716,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_TRAPDOOR_UPDATE = 1427, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3455,7 +4727,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_WEB_UPDATE = 1428, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3466,7 +4738,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_WEB_UPDATE = 1429, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3477,7 +4749,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_TNT_UPDATE = 1430, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3488,7 +4760,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_TNT_UPDATE = 1431, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3502,7 +4774,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_SPIKES_RENDER = 1432, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3513,7 +4785,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_SPIKES_RENDER = 1433, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3527,7 +4799,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_WEB_RENDER = 1434, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3538,7 +4810,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_WEB_RENDER = 1435, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3552,7 +4824,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_TNT_RENDER = 1436, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3563,7 +4835,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_TNT_RENDER = 1437, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3577,7 +4849,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_TRAPDOOR_RENDER = 1438, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3588,7 +4860,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_TRAPDOOR_RENDER = 1439, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3602,7 +4874,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_STAIRCASE_RENDER = 1440, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3613,7 +4885,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_STAIRCASE_RENDER = 1441, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3627,7 +4899,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_DECORATION_RENDER = 1444, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3641,7 +4913,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_DECORATION_RENDER = 1445, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3655,7 +4927,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_DOOR_RENDER = 1446, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3669,7 +4941,7 @@ export enum ModCallbackRepentogon { * Fire grid entities are largely unused and in most cases you'll want to target the `EntityNPC` * fireplaces with `ModCallback.PRE_NPC_RENDER`. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3686,7 +4958,7 @@ export enum ModCallbackRepentogon { * Fire grid entities are largely unused and in most cases you'll want to target the `EntityNPC` * fireplaces with `ModCallback.POST_NPC_RENDER`. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3697,7 +4969,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_FIRE_RENDER = 1449, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3711,7 +4983,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_LOCK_RENDER = 1450, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3722,7 +4994,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_LOCK_RENDER = 1451, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3736,7 +5008,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_TELEPORTER_RENDER = 1452, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3750,7 +5022,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_TELEPORTER_RENDER = 1453, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3764,7 +5036,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_PIT_RENDER = 1454, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3778,7 +5050,7 @@ export enum ModCallbackRepentogon { * This does not include the `EntityNPC` poops used by Tainted Blue Baby. Use * `ModCallback.PRE_NPC_RENDER` if you wish to target them. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3795,7 +5067,7 @@ export enum ModCallbackRepentogon { * This does not include the `EntityNPC` poops used by Tainted Blue Baby. Use * `ModCallback.POST_NPC_RENDER` if you wish to target them. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3806,7 +5078,7 @@ export enum ModCallbackRepentogon { POOP_GRID_ENTITY_POOP_RENDER = 1457, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityRock` provided. * @@ -3820,7 +5092,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_ROCK_RENDER = 1458, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3831,7 +5103,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_ROCK_RENDER = 1459, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3845,7 +5117,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_PRESSURE_PLATE_RENDER = 1460, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3859,7 +5131,7 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_PRESSURE_PLATE_RENDER = 1461, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3873,7 +5145,7 @@ export enum ModCallbackRepentogon { PRE_GRID_ENTITY_WALL_RENDER = 1462, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `GridEntityType` provided. * @@ -3884,7 +5156,13 @@ export enum ModCallbackRepentogon { POST_GRID_ENTITY_WALL_RENDER = 1463, /** - * When registering this callback with the `Mod.AddCallback` method: + * Behaves like `ModCallback.INPUT_ACTION` except it only works on the main menu. + * + * Return a boolean to force whether to force an input if `hook` is `InputHook.IS_ACTION_PRESSED` + * or `InputHook.IS_ACTION_TRIGGERED`, or return a float to override the value if `hook` is + * `InputHook.GET_ACTION_VALUE`. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `InputHook` provided. * @@ -3899,15 +5177,60 @@ export enum ModCallbackRepentogon { MENU_INPUT_ACTION = 1464, /** + * Fires before a status effect is applied to an entity. + * + * Return `false` to prevent the status effect from being applied. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `StatusEffect` provided. + * + * ```ts + * function preStatusEffectApply( + * statusEffect: StatusEffect, + * entity: Entity, + * source: EntityRef, + * duration: int + * ): boolean | undefined {} + * ``` + */ + PRE_STATUS_EFFECT_APPLY = 1465, + + /** + * Fires after a status effect is applied to an entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `StatusEffect` provided. + * + * ```ts + * function preStatusEffectApply( + * statusEffect: StatusEffect, + * entity: Entity, + * source: EntityRef, + * duration: int + * ): void {} + * ``` + */ + POST_STATUS_EFFECT_APPLY = 1466, + + /** + * Fires when a save slot is loaded by the game. + * * This callback cannot be filtered. * * ```ts * function postSaveSlotLoad(saveSlot: int, isSlotSelected: boolean, rawSlot: int): void {} + * ``` */ POST_SAVE_SLOT_LOAD = 1470, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a challenge is marked as completed. + * + * Return `false` to prevent the challenge from being marked as completed. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `Challenge` provided. * @@ -3918,7 +5241,9 @@ export enum ModCallbackRepentogon { PRE_CHALLENGE_DONE = 1471, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after a challenge is marked as completed. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `Challenge` provided. * @@ -3928,11 +5253,27 @@ export enum ModCallbackRepentogon { */ POST_CHALLENGE_DONE = 1472, + /** + * Fires before `EntityFamiliar.CanCharm` is called. This is used ot determine whether the Siren + * can charm a familiar. + * + * Return `false` to prevent the familiar from being charmed. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `FamiliarVariant` provided. + * + * ```ts + * function preFamiliarCanCharm(familiar: EntityFamiliar): boolean | undefined {} + * ``` + */ + PRE_FAMILIAR_CAN_CHARM = 1473, + /** * Fires before the player gives birth to a familiar due to Cambion Conception. Return false to * prevent the player from spawning the familiar. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ConceptionFamiliarFlag` provided. * @@ -3949,7 +5290,7 @@ export enum ModCallbackRepentogon { * Fires before the player gives birth to a familiar due to Immaculate Conception. Return false to * prevent the player from spawning the familiar. * - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ConceptionFamiliarFlag` provided. * @@ -3963,7 +5304,64 @@ export enum ModCallbackRepentogon { PRE_PLAYER_GIVE_BIRTH_IMMACULATE = 1475, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after an achievement is unlocked. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `Achievement` provided. + * + * ```ts + * function postAchievementUnlock(achievement: Achievement): void {} + * ``` + */ + POST_ACHIEVEMENT_UNLOCK = 1476, + + /** + * Fires before the minimap is updated. + * + * You cannot filter this callback. + * + * ```ts + * function preMinimapUpdate(): void {} + * ``` + */ + PRE_MINIMAP_UPDATE = 1477, + + /** + * Fires after the minimap is updated. + * + * You cannot filter this callback. + * + * ```ts + * function postMinimapUpdate(): void {} + * ``` + */ + POST_MINIMAP_UPDATE = 1478, + + /** + * Fires before the minimap is rendered. + * + * You cannot filter this callback. + * + * ```ts + * function preMinimapRender(): void {} + * ``` + */ + PRE_MINIMAP_RENDER = 1479, + + /** + * Fires after the minimap is rendered. + * + * You cannot filter this callback. + * + * ```ts + * function postMinimapRender(): void {} + * ``` + */ + POST_MINIMAP_RENDER = 1480, + + /** + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -3974,7 +5372,7 @@ export enum ModCallbackRepentogon { PRE_PLAYER_REVIVE = 1481, /** - * When registering this callback with the `Mod.AddCallback` method: + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * @@ -3985,6 +5383,10 @@ export enum ModCallbackRepentogon { POST_PLAYER_REVIVE = 1482, /** + * Fires before a fortune is displayed on the screen. + * + * Return `false` to prevent the fortune from displaying. + * * You cannot filter this callback. * * ```ts @@ -4010,7 +5412,28 @@ export enum ModCallbackRepentogon { PRE_ITEM_TEXT_DISPLAY = 1484, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires before a status effect target of an entity is set. + * + * Return an `Entity` to change targets. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EntityType` provided. + * + * ```ts + * function getStatusEffectTarget(entity: Entity): Entity | undefined {} + * ``` + */ + GET_STATUS_EFFECT_TARGET = 1485, + + /** + * Fires before the entity's color is set with `Entity.SetColor`. This callback does not fire if + * the `Entity.Color` field is directly modified. + * + * Return `false` to prevent the color from being set. Alternatively, return a `Color` to override + * the color set. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -4028,7 +5451,10 @@ export enum ModCallbackRepentogon { PRE_ENTITY_SET_COLOR = 1486, /** - * When registering this callback with the `Mod.AddCallback` method: + * Fires after the entity's color is set with `Entity.SetColor`. This callback does not fire if + * the `Entity.Color` field is directly modified. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. * @@ -4044,4 +5470,83 @@ export enum ModCallbackRepentogon { * ``` */ POST_ENTITY_SET_COLOR = 1487, + + /** + * Fires when a challenge/boss rush room wave starts. + * + * You cannot filter this callback. + * + * ```ts + * function postStartAmbushWave(bossAmbush: boolean): void {} + * ``` + */ + POST_START_AMBUSH_WAVE = 1488, + + /** + * Fires when a Greed Mode wave starts. + * + * You cannot filter this callback. + * + * ```ts + * function postStartGreedWave(): void {} + * ``` + */ + POST_START_GREED_WAVE = 1489, + + /** + * Fires before the player's `TearParams` object is calculated. + * + * Return a `TearParams` object to override the player's `TearParams` object. The modified + * `TearParams` is passed along the remaining callbacks. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PlayerType` provided. + * + * ```ts + * function evaluateTearHitParams( + * player: EntityPlayer, + * tearParams: TearParams + * weaponType: WeaponType, + * damageScale: float, + * tearDisplacement: int, + * source: Entity + * ): TearParams | undefined {} + * ``` + */ + EVALUATE_TEAR_HIT_PARAMS = 1490, + + /** + * Fires before a chest is opened. + * + * Return `false` to prevent the chest from being opened. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PickupVariant` provided. + * + * ```ts + * function preOpenChest( + * chest: EntityPickup + * player: EntityPlayer | undefined + * ): boolean | undefined {} + * ``` + */ + PRE_OPEN_CHEST = 1491, + + /** + * Fires after a chest is opened. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PickupVariant` provided. + * + * ```ts + * function postOpenChest( + * chest: EntityPickup + * player: EntityPlayer | undefined + * ): void {} + * ``` + */ + POST_OPEN_CHEST = 1492, } diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/NullPickupSubType.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/NullPickupSubType.ts new file mode 100644 index 000000000..08ed3ae20 --- /dev/null +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/NullPickupSubType.ts @@ -0,0 +1,12 @@ +/** + * This enum is for REPENTOGON, an exe-hack which expands the modding API. + * + * @see https://repentogon.com/ + */ +export enum NullPickupSubType { + ANY = 0, + NO_COLLECTIBLE_CHEST = 1, + NO_COLLECTIBLE = 2, + NO_COLLECTIBLE_CHEST_COIN = 3, + NO_COLLECTIBLE_TRINKET_CHEST = 4, +} diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/StatusEffect.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/StatusEffect.ts new file mode 100644 index 000000000..a9a93a778 --- /dev/null +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/StatusEffect.ts @@ -0,0 +1,23 @@ +/** + * This enum is for REPENTOGON, an exe-hack which expands the modding API. + * + * @see https://repentogon.com/ + */ +export enum StatusEffect { + BAITED = 0, + BLEEDING = 1, + BRIMSTONE_MARK = 2, + BURN = 3, + CHARMED = 4, + CONFUSION = 5, + FEAR = 6, + FREEZE = 7, + ICE = 8, + KNOCKBACK = 9, + MAGNETIZED = 10, + MIDAS_FREEZE = 11, + POISON = 12, + SHRINK = 13, + SLOWING = 14, + WEAKNESS = 15, +} diff --git a/packages/isaac-typescript-definitions-repentogon/src/index.ts b/packages/isaac-typescript-definitions-repentogon/src/index.ts index 7e54421ef..5fd5d0ac9 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/index.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/index.ts @@ -46,6 +46,7 @@ export * from "./enums/imgui/ImGuiNotificationType"; export * from "./enums/MainMenuType"; export * from "./enums/MinimapState"; export * from "./enums/ModCallbackRepentogon"; +export * from "./enums/NullPickupSubType"; export * from "./enums/PauseMenuState"; export * from "./enums/PillCardSlot"; export * from "./enums/PlayerFoot"; @@ -56,6 +57,7 @@ export * from "./enums/PurityState"; export * from "./enums/SlotState"; export * from "./enums/SpecialQuest"; export * from "./enums/SplitTearType"; +export * from "./enums/StatusEffect"; export * from "./enums/StbRailVariant"; export * from "./enums/SuplexState"; export * from "./enums/TaintedMarksGroup"; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityKnife.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityKnife.d.ts index 425ffb8fe..89222dc41 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityKnife.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityKnife.d.ts @@ -13,7 +13,8 @@ declare interface EntityKnife extends Entity { * @param damageMultiplier Optional. Default is 0.5. * @param sizeMultiplier Optional. Default is 0.6. * @param variant Optional. Default is `TearVariant.BLUE`. - * @param splitTearType Optional. Default is `SplitTearType.GENERIC`. + * @param splitTearType Optional. Default is `SplitTearType.GENERIC`. Custom split tear effects + * can be implemented by passing in a string instead. */ FireSplitTear: ( position: Vector, @@ -21,7 +22,7 @@ declare interface EntityKnife extends Entity { damageMultiplier?: number, sizeMultiplier?: number, variant?: TearVariant, - splitTearType?: SplitTearType, + splitTearType?: SplitTearType | string, ) => EntityTear; GetHitboxParentKnife: () => EntityKnife | undefined; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityLaser.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityLaser.d.ts index 3f235330c..8d57c6109 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityLaser.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityLaser.d.ts @@ -13,7 +13,8 @@ declare interface EntityLaser extends Entity { * @param damageMultiplier Optional. Default is 0.5. * @param sizeMultiplier Optional. Default is 0.6. * @param variant Optional. Default is `TearVariant.BLUE`. - * @param splitTearType Optional. Default is `SplitTearType.GENERIC`. + * @param splitTearType Optional. Default is `SplitTearType.GENERIC`. Custom split tear effects + * can be implemented by passing in a string instead. */ FireSplitTear: ( position: Vector, @@ -21,7 +22,7 @@ declare interface EntityLaser extends Entity { damageMultiplier?: number, sizeMultiplier?: number, variant?: TearVariant, - splitTearType?: SplitTearType, + splitTearType?: SplitTearType | string, ) => EntityTear; /** Returns the laser's damage multiplier. */ diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts index f278707d9..24aeccb10 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts @@ -22,7 +22,8 @@ declare global { * @param damageMultiplier Optional. Default is 0.5. * @param sizeMultiplier Optional. Default is 0.6. * @param variant Optional. Default is `TearVariant.BLUE`. - * @param splitTearType Optional. Default is `SplitTearType.GENERIC`. + * @param splitTearType Optional. Default is `SplitTearType.GENERIC`. Custom split tear effects + * can be implemented by passing in a string instead. */ FireSplitTear: ( position: Vector, @@ -30,7 +31,7 @@ declare global { damageMultiplier?: number, sizeMultiplier?: number, variant?: TearVariant, - splitTearType?: SplitTearType, + splitTearType?: SplitTearType | string, ) => EntityTear; /** diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts index 71bcbc0d6..84298ed4a 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts @@ -21,31 +21,38 @@ import type { LaserVariant, LevelStage, Music, + PickupPrice, PickupVariant, PillColor, PillEffect, PlayerType, PlayerVariant, ProjectileVariant, + RoomTransitionAnim, SlotVariant, SoundEffect, StageType, + TearFlag, TearVariant, TrinketSlot, TrinketType, UseFlag, WeaponType, } from "isaac-typescript-definitions"; +import type { Achievement } from "../../enums/Achievement"; import type { BagOfCraftingPickup } from "../../enums/BagOfCraftingPickup"; import type { CompletionMarkType } from "../../enums/CompletionMarkType"; import type { EvaluateStatStage } from "../../enums/EvaluateStatStage"; +import type { AddHealthTypeFlag } from "../../enums/flags/AddHealthTypeFlag"; +import type { ConceptionFamiliarFlag } from "../../enums/flags/ConceptionFamiliarFlag"; import type { FollowerPriority } from "../../enums/FollowerPriority"; import type { GiantbookType } from "../../enums/GiantbookType"; import type { HealthType } from "../../enums/HealthType"; import type { ModCallbackRepentogon } from "../../enums/ModCallbackRepentogon"; +import type { NullPickupSubType } from "../../enums/NullPickupSubType"; import type { PillCardSlot } from "../../enums/PillCardSlot"; -import type { AddHealthTypeFlag } from "../../enums/flags/AddHealthTypeFlag"; -import type { ConceptionFamiliarFlag } from "../../enums/flags/ConceptionFamiliarFlag"; +import type { SplitTearType } from "../../enums/SplitTearType"; +import type { StatusEffect } from "../../enums/StatusEffect"; declare global { /** @@ -128,15 +135,15 @@ declare global { callback: ( pickup: EntityPickup, variant: PickupVariant, - subType: int, + subType: int | NullPickupSubType, requestedVariant: PickupVariant, requestedSubType: int, rng: RNG, ) => | [ pickupVariant: PickupVariant, - subType: int, - continueSelection: boolean, + subType: int | NullPickupSubType, + continueSelection?: boolean, ] | undefined, ]; @@ -223,14 +230,14 @@ declare global { player: EntityPlayer, ) => | boolean - | { - Type?: CollectibleType; - Charge?: int; - FirstTime?: boolean; - Slot?: ActiveSlot; - VarData?: int; - Player?: EntityPlayer; - } + | [ + collectibleType?: CollectibleType, + charge?: int, + firstTime?: boolean, + slot?: ActiveSlot, + varData?: int, + player?: EntityPlayer, + ] | CollectibleType | undefined, collectibleType?: CollectibleType, @@ -301,6 +308,7 @@ declare global { rock: GridEntityRock, gridEntityType: GridEntityType, immediate: boolean, + source: EntityRef | undefined, ) => void, gridEntityType?: GridEntityType, ]; @@ -310,10 +318,10 @@ declare global { callback: ( gridEntity: GridEntity, entity: Entity, - damageAmount: number, + playerDamageAmount: number, damageFlags: BitFlags, - unknownFloat: float, - unknownBoolean: boolean, + damageAmount: float, + ignoreGridCollisionClass: boolean, ) => boolean | undefined, gridEntityType?: GridEntityType, ]; @@ -323,10 +331,10 @@ declare global { callback: ( gridEntity: GridEntity, entity: Entity, - damageAmount: number, + playerDamageAmount: number, damageFlags: BitFlags, - unknownFloat: number, - unknownBoolean: boolean, + damageAmount: float, + ignoreGridCollisionClass: boolean, ) => void, gridEntityType?: GridEntityType, ]; @@ -372,6 +380,16 @@ declare global { // 1024 [ModCallbackRepentogon.POST_HUD_RENDER]: [callback: () => void]; + // 1025 + [ModCallbackRepentogon.POST_FIRE_SPLIT_TEAR]: [ + callback: ( + tear: EntityTear, + source: EntityTear | EntityLaser | EntityKnife, + splitType: SplitTearType | string, + ) => void, + splitTearType?: SplitTearType | string, + ]; + // 1030 [ModCallbackRepentogon.PRE_SFX_PLAY]: [ callback: ( @@ -383,7 +401,14 @@ declare global { pan: number, ) => | SoundEffect - | [SoundEffect, number, int, boolean, number, number] + | [ + sound?: SoundEffect, + volume?: number, + frameDelay?: int, + loop?: boolean, + pitch?: number, + pan?: number, + ] | boolean | undefined, soundEffect?: SoundEffect, @@ -422,7 +447,7 @@ declare global { isFade: boolean, ) => | Music - | { ID?: Music; Volume?: float; FadeRate?: float } + | [music?: Music, volumeOrFadeRate?: number] | boolean | undefined, music?: Music, @@ -430,8 +455,8 @@ declare global { // 1035 [ModCallbackRepentogon.PRE_MUSIC_LAYER_TOGGLE]: [ - callback: (music: Music, enabled: boolean) => boolean | Music | undefined, - music?: Music, + callback: (layerID: int, enabled: boolean) => boolean | int | undefined, + layerID?: int, ]; // 1038 @@ -504,7 +529,9 @@ declare global { // 1049 [ModCallbackRepentogon.PRE_COMPLETION_EVENT]: [ - callback: (completion: CompletionMarkType) => boolean | undefined, + callback: ( + completion: CompletionMarkType, + ) => boolean | CompletionMarkType | undefined, ]; // 1050 @@ -517,6 +544,11 @@ declare global { callback: (player: EntityPlayer) => boolean | undefined, ]; + // 1052 + [ModCallbackRepentogon.POST_COMPLETION_EVENT]: [ + callback: (completion: CompletionMarkType) => void, + ]; + // 1060 [ModCallbackRepentogon.PRE_LEVEL_INIT]: [callback: () => void]; @@ -540,7 +572,9 @@ declare global { // 1063 [ModCallbackRepentogon.GET_FOLLOWER_PRIORITY]: [ - callback: (familiar: EntityFamiliar) => FollowerPriority | undefined, + callback: ( + familiar: EntityFamiliar, + ) => FollowerPriority | int | undefined, familiarVariant?: FamiliarVariant, ]; @@ -551,6 +585,7 @@ declare global { player: EntityPlayer, useFlags: BitFlags, ) => boolean | undefined, + cardType?: CardType, ]; // 1065 @@ -561,6 +596,7 @@ declare global { player: EntityPlayer, useFlags: BitFlags, ) => boolean | undefined, + pillEffect?: PillEffect, ]; // 1066 @@ -570,7 +606,7 @@ declare global { pickupSubType: int, shopItemID: int, price: int, - ) => int | undefined, + ) => int | PickupPrice | undefined, pickupVariant?: PickupVariant, ]; @@ -585,6 +621,12 @@ declare global { callback: (playSound: boolean) => void, ]; + // 1069 + [ModCallbackRepentogon.PRE_PLAYER_TRIGGER_ROOM_CLEAR]: [ + callback: (player: EntityPlayer) => boolean | undefined, + playerVariant?: PlayerVariant, + ]; + // 1070 [ModCallbackRepentogon.PRE_RESTOCK_SHOP]: [ callback: (partial: boolean) => boolean | undefined, @@ -601,13 +643,18 @@ declare global { collectible: CollectibleType, player: EntityPlayer, varData: int, + currentMaxCharges: int, ) => int | undefined, collectibleType?: CollectibleType, ]; // 1073 [ModCallbackRepentogon.GET_ACTIVE_MIN_USABLE_CHARGE]: [ - callback: (slot: ActiveSlot, player: EntityPlayer) => int | undefined, + callback: ( + slot: ActiveSlot, + player: EntityPlayer, + currentMinUsableCharge: int, + ) => int | undefined, collectibleType?: CollectibleType, ]; @@ -622,7 +669,9 @@ declare global { ]; // 1075 - [ModCallbackRepentogon.POST_ITEM_OVERLAY_UPDATE]: [callback: () => void]; + [ModCallbackRepentogon.POST_ITEM_OVERLAY_UPDATE]: [ + callback: (giantbookID: GiantbookType, skipAnimation: boolean) => void, + ]; // 1076 [ModCallbackRepentogon.PRE_ITEM_OVERLAY_SHOW]: [ @@ -642,7 +691,11 @@ declare global { // 1078 [ModCallbackRepentogon.POST_PLAYER_NEW_LEVEL]: [ - callback: (player: EntityPlayer) => void, + callback: ( + player: EntityPlayer, + fromPlayerUpdate: boolean, + postLevelInitFinished: boolean, + ) => void, playerType?: PlayerType, ]; @@ -761,7 +814,7 @@ declare global { offset: Vector, heartsSprite: Sprite, position: Vector, - unknown: float, + spriteScale: float, player: EntityPlayer, ) => void, ]; @@ -784,7 +837,12 @@ declare global { // 1095 [ModCallbackRepentogon.POST_COLLECTIBLE_REMOVED]: [ - callback: (player: EntityPlayer, collectible: CollectibleType) => void, + callback: ( + player: EntityPlayer, + collectible: CollectibleType, + removeFromPlayerForm: boolean, + wisp: boolean, + ) => void, collectibleType?: CollectibleType, ]; @@ -832,12 +890,12 @@ declare global { ) => | GridEntityDesc | boolean - | { - Type?: GridEntityType; - Variant?: int; - Vardata?: int; - SpawnSeed?: Seed; - } + | [ + type?: GridEntityType, + variant?: int, + vardata?: int, + spawnSeed?: Seed, + ] | undefined, gridEntityType?: GridEntityType, ]; @@ -853,15 +911,15 @@ declare global { // 1103 [ModCallbackRepentogon.POST_NIGHTMARE_SCENE_SHOW]: [ - callback: (unknown: boolean) => void, + callback: (isDogmaNightmare: boolean) => void, ]; // 1104 [ModCallbackRepentogon.PRE_LEVEL_SELECT]: [ callback: ( - level: LevelStage, + levelStage: LevelStage, stageType: StageType, - ) => [LevelStage?, StageType?] | undefined, + ) => [levelStage?: LevelStage, stageType?: StageType] | undefined, ]; // 1105 @@ -876,10 +934,14 @@ declare global { ]; // 1106 - [ModCallbackRepentogon.PRE_BACKDROP_RENDER_WALLS]: [callback: () => void]; + [ModCallbackRepentogon.PRE_BACKDROP_RENDER_WALLS]: [ + callback: (wallColor: Color) => void, + ]; // 1107 - [ModCallbackRepentogon.PRE_BACKDROP_RENDER_FLOOR]: [callback: () => void]; + [ModCallbackRepentogon.PRE_BACKDROP_RENDER_FLOOR]: [ + callback: (floorColor: Color) => void, + ]; // 1108 [ModCallbackRepentogon.PRE_BACKDROP_RENDER_WATER]: [callback: () => void]; @@ -921,13 +983,16 @@ declare global { // 1116 [ModCallbackRepentogon.PRE_REPLACE_SPRITESHEET]: [ - callback: (layerId: int, fileName: string) => [int, string] | undefined, + callback: ( + layerID: int, + fileName: string, + ) => [layerID?: int, pngFileName?: string] | undefined, fileName?: string, ]; // 1117 [ModCallbackRepentogon.POST_REPLACE_SPRITESHEET]: [ - callback: (layerId: int, fileName: string) => void, + callback: (layerID: int, fileName: string) => void, fileName?: string, ]; @@ -937,7 +1002,7 @@ declare global { offset: Vector, heartsSprite: Sprite, position: Vector, - unknown: float, + spriteScale: float, player: EntityPlayer, ) => boolean | undefined, ]; @@ -952,7 +1017,12 @@ declare global { scale: number, chargeBarPosition: Vector, ) => - | { Position?: Vector; Scale?: number; CropOffset?: Vector } + | { + HideItem?: boolean; + HideOutline?: boolean; + HideChargeBar?: boolean; + CropOffset?: Vector; + } | boolean | undefined, collectible?: CollectibleType, @@ -963,7 +1033,7 @@ declare global { callback: ( command: string, params: string, - ) => Array | undefined, + ) => Array | undefined, command?: string, ]; @@ -1012,6 +1082,17 @@ declare global { playerType?: PlayerType, ]; + // 1128 + [ModCallbackRepentogon.POST_PLAYER_HEALTH_TYPE_CHANGE]: [ + callback: ( + player: EntityPlayer, + newHealthType: HealthType, + previousHealthType: HealthType, + defaultHealthType: HealthType, + ) => void, + playerType?: PlayerType, + ]; + // 1129 [ModCallbackRepentogon.POST_FORCE_ADD_PILL_EFFECT]: [ callback: (pillEffect: PillEffect, pillColor: PillColor) => void, @@ -1050,6 +1131,9 @@ declare global { // 1135 [ModCallbackRepentogon.PRE_RENDER]: [callback: () => void]; + // ModCallbackRepentogon.PRE_OPEN_GL_RENDER is currently omitted for the time being until custom + // shader support is fully fleshed out as it's currently in its infancy. + // 1137 [ModCallbackRepentogon.PRE_LEVEL_PLACE_ROOM]: [ callback: ( @@ -1059,9 +1143,55 @@ declare global { ) => RoomConfig | undefined, ]; + // 1138 + [ModCallbackRepentogon.POST_PLAYER_TRIGGER_ROOM_CLEAR]: [ + callback: (player: EntityPlayer) => void, + playerVariant?: PlayerVariant, + ]; + + // 1139 + [ModCallbackRepentogon.POST_ITEM_OVERLAY_RENDER]: [ + callback: (giantbookType: GiantbookType) => void, + giantbookType?: GiantbookType, + ]; + + // 1140 + [ModCallbackRepentogon.POST_DISCHARGE_ACTIVE_ITEM]: [ + callback: ( + collectible: EntityPlayer, + collectibleRemoved: boolean, + player: EntityPlayer, + slot: ActiveSlot, + ) => void, + collectibleType?: CollectibleType, + ]; + // 1141 [ModCallbackRepentogon.PRE_BACKDROP_CHANGE]: [ - callback: (backdrop: BackdropType) => BackdropType, + callback: (backdrop: BackdropType) => BackdropType | undefined, + ]; + + // 1142 + [ModCallbackRepentogon.POST_BACKDROP_CHANGE]: [ + callback: (backdrop: BackdropType) => void, + backdropType?: BackdropType, + ]; + + // 1143 + [ModCallbackRepentogon.POST_ROOM_TRIGGER_CLEAR]: [ + callback: (playSound: boolean) => void, + ]; + + // 1144 + [ModCallbackRepentogon.POST_PLAYER_DROP_TRINKET]: [ + callback: ( + trinketType: TrinketType, + dropPos: Vector, + player: EntityPlayer, + isGoldenTrinket: boolean, + replacedTrinket: boolean, + ) => void, + trinketType?: TrinketType, ]; // 1150 @@ -1112,17 +1242,17 @@ declare global { ]; // 1164 - [ModCallbackRepentogon.PRE_KNIFE_UPDATE]: [ - callback: (knife: EntityKnife) => boolean | undefined, - knifeVariant?: KnifeVariant, - ]; - - // 1165 [ModCallbackRepentogon.PRE_PICKUP_UPDATE]: [ callback: (pickup: EntityPickup) => boolean | undefined, pickupVariant?: PickupVariant, ]; + // 1165 + [ModCallbackRepentogon.PRE_KNIFE_UPDATE]: [ + callback: (knife: EntityKnife) => boolean | undefined, + knifeVariant?: KnifeVariant, + ]; + // 1166 [ModCallbackRepentogon.PRE_PROJECTILE_UPDATE]: [ callback: (projectile: EntityProjectile) => boolean | undefined, @@ -1154,7 +1284,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + playerVariant?: PlayerVariant, ]; // 1172 @@ -1164,7 +1294,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + playerVariant?: PlayerVariant, ]; // 1173 @@ -1174,7 +1304,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + tearVariant?: TearVariant, ]; // 1174 @@ -1184,7 +1314,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + tearVariant?: TearVariant, ]; // 1175 @@ -1194,7 +1324,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + familiarVariant?: FamiliarVariant, ]; // 1176 @@ -1204,7 +1334,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + familiarVariant?: FamiliarVariant, ]; // 1177 @@ -1214,7 +1344,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + bombVariant?: BombVariant, ]; // 1178 @@ -1224,7 +1354,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + bombVariant?: BombVariant, ]; // 1179 @@ -1234,7 +1364,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + pickupVariant?: PickupVariant, ]; // 1180 @@ -1244,7 +1374,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + pickupVariant?: PickupVariant, ]; // 1181 @@ -1254,7 +1384,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + projectileVariant?: ProjectileVariant, ]; // 1182 @@ -1264,7 +1394,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + projectileVariant?: ProjectileVariant, ]; // 1183 @@ -1274,7 +1404,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => boolean | undefined, - gridEntityType?: GridEntityType, + entityType?: EntityType, ]; // 1184 @@ -1284,7 +1414,7 @@ declare global { gridIndex: int, gridEntity: GridEntity | undefined, ) => void, - gridEntityType?: GridEntityType, + entityType?: EntityType, ]; // 1190 @@ -1309,7 +1439,15 @@ declare global { varData: int, gridIndex: int, spawnSeed: Seed, - ) => boolean | [GridEntityType, int, int, Seed] | undefined, + ) => + | boolean + | [ + gridType?: GridEntityType, + variant?: int, + varData?: int, + spawnSeed?: Seed, + ] + | undefined, gridEntityType?: GridEntityType, ]; @@ -1334,7 +1472,15 @@ declare global { variant: int, subType: int, championColor: ChampionColor, - ) => boolean | [EntityType, int, int, ChampionColor?] | undefined, + ) => + | boolean + | [ + entityType: EntityType, + variant: int, + subType: int, + championColor?: ChampionColor, + ] + | undefined, ]; // 1213 @@ -1349,7 +1495,14 @@ declare global { ignoreModifiers: boolean, ) => | boolean - | [EntityType, int, int, boolean?, boolean?, boolean?] + | [ + entityType: EntityType, + variant: int, + subType: int, + keepPrice?: boolean, + keepSeed?: boolean, + ignoreModifiers?: boolean, + ] | undefined, ]; @@ -1554,8 +1707,13 @@ declare global { ]; // 1251 + // eslint-disable-next-line @typescript-eslint/no-deprecated [ModCallbackRepentogon.PRE_PLAYER_GET_MULTI_SHOT_PARAMS]: [ - callback: (player: EntityPlayer) => MultiShotParams | undefined, + callback: ( + player: EntityPlayer, + multiShotParams: MultiShotParams, + weaponType: WeaponType, + ) => MultiShotParams | undefined, playerType?: PlayerType, ]; @@ -1659,7 +1817,11 @@ declare global { // 1268 [ModCallbackRepentogon.POST_PLAYER_TRIGGER_EFFECT_REMOVED]: [ - callback: (player: EntityPlayer, itemConfigItem: ItemConfigItem) => void, + callback: ( + player: EntityPlayer, + itemConfigItem: ItemConfigItem, + count: int, + ) => void, ]; // 1269 @@ -1673,10 +1835,87 @@ declare global { ]; // 1271 - [ModCallbackRepentogon.POST_ROOM_TRANSITION_UPDATE]: [callback: () => void]; + [ModCallbackRepentogon.POST_ROOM_TRANSITION_UPDATE]: [ + callback: () => void, + transitionAnim?: RoomTransitionAnim, + ]; // 1272 - [ModCallbackRepentogon.POST_ROOM_TRANSITION_RENDER]: [callback: () => void]; + [ModCallbackRepentogon.POST_ROOM_TRANSITION_RENDER]: [ + callback: () => void, + transitionAnim?: RoomTransitionAnim, + ]; + + // 1273 + [ModCallbackRepentogon.POST_PLAYER_ADD_EFFECT]: [ + callback: ( + player: EntityPlayer, + itemConfigItem: ItemConfigItem, + addCostume: boolean, + count: int, + ) => void, + itemConfigItem?: ItemConfigItem, + ]; + + // 1274 + [ModCallbackRepentogon.POST_ROOM_ADD_EFFECT]: [ + callback: (itemConfigItem: ItemConfigItem) => void, + itemConfigItem?: ItemConfigItem, + ]; + + // 1275 + [ModCallbackRepentogon.POST_BOMB_DAMAGE]: [ + callback: ( + position: Vector, + damage: number, + radius: number, + lineCheck: boolean, + source: Entity | undefined, + tearFlags: BitFlags, + damageFlags: BitFlags, + damageSource: boolean, + ) => void, + entityType?: EntityType, + ]; + + // 1276 + [ModCallbackRepentogon.POST_BOMB_TEAR_FLAG_EFFECTS]: [ + callback: ( + position: Vector, + radius: number, + tearFlags: BitFlags, + source: Entity | undefined, + radiusMulti: number, + ) => void, + entityType?: EntityType, + ]; + + // 1277 + [ModCallbackRepentogon.PRE_APPLY_TEAR_FLAG_EFFECTS]: [ + callback: ( + npc: EntityNPC, + position: Vector, + tearFlags: BitFlags, + source: Entity | undefined, + damage: number, + ) => + | boolean + | { Position?: Vector; TearFlags?: BitFlags; Damage?: number } + | undefined, + entityType?: EntityType, + ]; + + // 1278 + [ModCallbackRepentogon.POST_APPLY_TEAR_FLAG_EFFECTS]: [ + callback: ( + npc: EntityNPC, + position: Vector, + tearFlags: BitFlags, + source: Entity | undefined, + damage: number, + ) => void, + entityType?: EntityType, + ]; // 1280 [ModCallbackRepentogon.PRE_BOSS_SELECT]: [ @@ -1744,6 +1983,25 @@ declare global { bedSubType?: BedSubType, ]; + // 1289 + [ModCallbackRepentogon.EVALUATE_MULTI_SHOT_PARAMS]: [ + callback: ( + player: EntityPlayer, + multiShotParams: MultiShotParams, + weaponType: WeaponType, + ) => MultiShotParams | undefined, + playerType?: PlayerType, + ]; + + // 1290 + [ModCallbackRepentogon.PRE_GET_RANDOM_ROOM_INDEX]: [ + callback: ( + roomIndex: int, + iAmErrorRoom: boolean, + seed: Seed, + ) => int | undefined, + ]; + // 1300 [ModCallbackRepentogon.POST_GLOWING_HOURGLASS_SAVE]: [ callback: (slot: int) => void, @@ -1754,6 +2012,40 @@ declare global { callback: (slot: int) => void, ]; + // 1302 + [ModCallbackRepentogon.PRE_GLOWING_HOURGLASS_SAVE]: [ + callback: (slot: int) => void, + ]; + + // 1303 + [ModCallbackRepentogon.PRE_GLOWING_HOURGLASS_LOAD]: [ + callback: (slot: int) => void, + ]; + + // 1304 + [ModCallbackRepentogon.POST_ROOM_SAVE_STATE]: [ + callback: (room: Room, roomDescriptor: RoomDescriptor) => void, + ]; + + // 1305 + [ModCallbackRepentogon.PRE_ROOM_RESTORE_STATE]: [ + callback: (room: Room, roomDescriptor: RoomDescriptor) => void, + ]; + + // 1306 + [ModCallbackRepentogon.POST_SWAP_ROOMS]: [ + callback: (roomDesc1: RoomDescriptor, roomDesc2: RoomDescriptor) => void, + ]; + + // 1307 + [ModCallbackRepentogon.POST_BACKWARDS_ROOM_SAVE]: [ + callback: ( + stage: LevelStage, + roomDesc: RoomDescriptor, + id: string, + ) => void, + ]; + // 1308 [ModCallbackRepentogon.POST_BACKWARDS_ROOM_RESTORE]: [ callback: ( @@ -2326,6 +2618,28 @@ declare global { inputHook?: InputHook, ]; + // 1465 + [ModCallbackRepentogon.PRE_STATUS_EFFECT_APPLY]: [ + callback: ( + statusEffect: StatusEffect, + entity: Entity, + source: EntityRef, + duration: int, + ) => boolean | undefined, + statusEffectType?: StatusEffect, + ]; + + // 1466 + [ModCallbackRepentogon.POST_STATUS_EFFECT_APPLY]: [ + callback: ( + statusEffect: StatusEffect, + entity: Entity, + source: EntityRef, + duration: int, + ) => void, + statusEffectType?: StatusEffect, + ]; + // 1470 [ModCallbackRepentogon.POST_SAVE_SLOT_LOAD]: [ callback: (saveSlot: int, isSlotSelected: boolean, rawSlot: int) => void, @@ -2346,6 +2660,12 @@ declare global { challenge?: Challenge, ]; + // 1473 + [ModCallbackRepentogon.PRE_FAMILIAR_CAN_CHARM]: [ + callback: (familiar: EntityFamiliar) => boolean | undefined, + familiarVariant?: FamiliarVariant, + ]; + // 1474 [ModCallbackRepentogon.PRE_PLAYER_GIVE_BIRTH_CAMBION]: [ callback: ( @@ -2364,6 +2684,24 @@ declare global { conceptionFamiliarFlag?: ConceptionFamiliarFlag, ]; + // 1476 + [ModCallbackRepentogon.POST_ACHIEVEMENT_UNLOCK]: [ + callback: (achievement: Achievement) => void, + achievementType?: Achievement, + ]; + + // 1477 + [ModCallbackRepentogon.PRE_MINIMAP_UPDATE]: [callback: () => void]; + + // 1478 + [ModCallbackRepentogon.POST_MINIMAP_UPDATE]: [callback: () => void]; + + // 1479 + [ModCallbackRepentogon.PRE_MINIMAP_RENDER]: [callback: () => void]; + + // 1480 + [ModCallbackRepentogon.POST_MINIMAP_RENDER]: [callback: () => void]; + // 1481 [ModCallbackRepentogon.PRE_PLAYER_REVIVE]: [ callback: (player: EntityPlayer) => boolean | undefined, @@ -2391,6 +2729,12 @@ declare global { ) => boolean | undefined, ]; + // 1485 + [ModCallbackRepentogon.GET_STATUS_EFFECT_TARGET]: [ + callback: (entity: Entity) => Entity | undefined, + entityType?: EntityType, + ]; + // 1486 [ModCallbackRepentogon.PRE_ENTITY_SET_COLOR]: [ callback: ( @@ -2404,7 +2748,7 @@ declare global { entityType?: EntityType, ]; - // 1486 + // 1487 [ModCallbackRepentogon.POST_ENTITY_SET_COLOR]: [ callback: ( entity: Entity, @@ -2416,5 +2760,41 @@ declare global { ) => void, entityType?: EntityType, ]; + + // 1488 + [ModCallbackRepentogon.POST_START_AMBUSH_WAVE]: [ + callback: (bossAmbush: boolean) => void, + ]; + + // 1489 + [ModCallbackRepentogon.POST_START_GREED_WAVE]: [callback: () => void]; + + // 1490 + [ModCallbackRepentogon.EVALUATE_TEAR_HIT_PARAMS]: [ + callback: ( + player: EntityPlayer, + tearParams: TearParams, + weaponType: WeaponType, + damageScale: float, + tearDisplacement: int, + source: Entity, + ) => TearParams | undefined, + entityType?: EntityType, + ]; + + // 1491 + [ModCallbackRepentogon.PRE_OPEN_CHEST]: [ + callback: ( + chest: EntityPickup, + player: EntityPlayer | undefined, + ) => boolean | undefined, + pickupVariant?: PickupVariant, + ]; + + // 1492 + [ModCallbackRepentogon.POST_OPEN_CHEST]: [ + callback: (chest: EntityPickup, player: EntityPlayer | undefined) => void, + pickupVariant?: PickupVariant, + ]; } }