diff --git a/packages/isaac-typescript-definitions/src/enums/BackdropType.ts b/packages/isaac-typescript-definitions/src/enums/BackdropType.ts index 6f165a532..162b845bf 100644 --- a/packages/isaac-typescript-definitions/src/enums/BackdropType.ts +++ b/packages/isaac-typescript-definitions/src/enums/BackdropType.ts @@ -67,4 +67,6 @@ export enum BackdropType { MINES_SHAFT = 58, ASHPIT_SHAFT = 59, DARK_CLOSET = 60, + DEATHMATCH = 61, + LIL_PORTAL = 62, } diff --git a/packages/isaac-typescript-definitions/src/enums/ButtonAction.ts b/packages/isaac-typescript-definitions/src/enums/ButtonAction.ts index 6b8185ea9..372e8e465 100644 --- a/packages/isaac-typescript-definitions/src/enums/ButtonAction.ts +++ b/packages/isaac-typescript-definitions/src/enums/ButtonAction.ts @@ -52,14 +52,14 @@ export enum ButtonAction { /** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */ MENU_BACK = 15, - /** This only fires on `InputHook.IS_ACTION_PRESSED` (0). */ - RESTART = 16, - /** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */ - FULLSCREEN = 17, + FULLSCREEN = 16, /** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */ - MUTE = 18, + MUTE = 17, + + /** This only fires on `InputHook.IS_ACTION_PRESSED` (0). */ + RESTART = 18, /** Does not seem to trigger any input hooks while on keyboard. */ JOIN_MULTIPLAYER = 19, @@ -76,15 +76,21 @@ export enum ButtonAction { /** Does not seem to trigger any input hooks while on keyboard. */ MENU_DOWN = 23, + MENU_LB = 24, + MENU_RB = 25, + /** Does not seem to trigger any input hooks while on keyboard. */ - MENU_LT = 24, + MENU_LT = 26, /** Does not seem to trigger any input hooks while on keyboard. */ - MENU_RT = 25, + MENU_RT = 27, /** Does not seem to trigger any input hooks while on keyboard. */ - MENU_TAB = 26, + MENU_TAB = 28, + + MENU_EX = 29, + EMOTES = 30, /** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */ - CONSOLE = 28, + CONSOLE = 32, } diff --git a/packages/isaac-typescript-definitions/src/enums/DrawStringAlignment.ts b/packages/isaac-typescript-definitions/src/enums/DrawStringAlignment.ts new file mode 100644 index 000000000..64e4eaa0d --- /dev/null +++ b/packages/isaac-typescript-definitions/src/enums/DrawStringAlignment.ts @@ -0,0 +1,12 @@ +/** Added in Repentance+. */ +export enum DrawStringAlignment { + TOP_LEFT = 0, + TOP_CENTER = 1, + TOP_RIGHT = 2, + MIDDLE_LEFT = 3, + MIDDLE_CENTER = 4, + MIDDLE_RIGHT = 5, + BOTTOM_LEFT = 6, + BOTTOM_CENTER = 7, + BOTTOM_RIGHT = 8, +} diff --git a/packages/isaac-typescript-definitions/src/enums/JacobEsauControls.ts b/packages/isaac-typescript-definitions/src/enums/JacobEsauControls.ts new file mode 100644 index 000000000..a2f386b7a --- /dev/null +++ b/packages/isaac-typescript-definitions/src/enums/JacobEsauControls.ts @@ -0,0 +1,4 @@ +export enum JacobEsauControls { + CLASSIC = 0, + BETTER = 1, +} diff --git a/packages/isaac-typescript-definitions/src/index.ts b/packages/isaac-typescript-definitions/src/index.ts index 9b075971f..8134e48ff 100644 --- a/packages/isaac-typescript-definitions/src/index.ts +++ b/packages/isaac-typescript-definitions/src/index.ts @@ -27,6 +27,7 @@ export * from "./enums/Difficulty"; export * from "./enums/Dimension"; export * from "./enums/Direction"; export * from "./enums/DoorSlot"; +export * from "./enums/DrawStringAlignment"; export * from "./enums/EntityCollisionClass"; export * from "./enums/EntityGridCollisionClass"; export * from "./enums/EntityType"; @@ -59,6 +60,7 @@ export * from "./enums/ItemConfigPillEffectClass"; export * from "./enums/ItemConfigPillEffectType"; export * from "./enums/ItemPoolType"; export * from "./enums/ItemType"; +export * from "./enums/JacobEsauControls"; export * from "./enums/Keyboard"; export * from "./enums/LanguageAbbreviation"; export * from "./enums/LaserOffset"; diff --git a/packages/isaac-typescript-definitions/src/types/classes/Entity.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Entity.d.ts index aed35a9bf..70cdc4f61 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Entity.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Entity.d.ts @@ -17,8 +17,14 @@ declare global { * @param duration The number of frames that the effect should apply for. The minimum is 2 * frames. * @param damage The damage taken per tick. Each damage tick is 20 frames apart. + * @param ignoreBosses Optional. Defaults to false. */ - AddBurn: (source: EntityRef, duration: int, damage: float) => void; + AddBurn: ( + source: EntityRef, + duration: int, + damage: float, + ignoreBosses?: boolean, + ) => void; /** * Adds a charmed effect to the entity. @@ -27,8 +33,13 @@ declare global { * `EntityRef(undefined)`. * @param duration The number of frames that the effect should apply for. If set to -1, the * effect will be permanent and the entity will follow you to different rooms. + * @param ignoreBosses Optional. Defaults to false. */ - AddCharmed: (source: EntityRef, duration: int) => void; + AddCharmed: ( + source: EntityRef, + duration: int, + ignoreBosses?: boolean, + ) => void; /** * Adds a confusion effect to the entity. @@ -36,12 +47,12 @@ declare global { * @param source Required. If you do not want the effect to have a source, pass * `EntityRef(undefined)`. * @param duration The number of frames that the effect should apply for. The maximum is 150. - * @param ignoreBosses + * @param ignoreBosses Optional. Defaults to false. */ AddConfusion: ( source: EntityRef, duration: int, - ignoreBosses: boolean, + ignoreBosses?: boolean, ) => void; /** @@ -56,8 +67,9 @@ declare global { * @param source Required. If you do not want the effect to have a source, pass * `EntityRef(undefined)`. * @param duration The number of frames that the effect should apply for. The maximum is 150. + * @param ignoreBosses Optional. Defaults to false. */ - AddFear: (source: EntityRef, duration: int) => void; + AddFear: (source: EntityRef, duration: int, ignoreBosses?: boolean) => void; /** * Adds a freeze effect to the entity. @@ -65,8 +77,13 @@ declare global { * @param source Required. If you do not want the effect to have a source, pass * `EntityRef(undefined)`. * @param duration The number of frames that the effect should apply for. The maximum is 150. + * @param ignoreBosses Optional. Defaults to false. */ - AddFreeze: (source: EntityRef, duration: int) => void; + AddFreeze: ( + source: EntityRef, + duration: int, + ignoreBosses?: boolean, + ) => void; /** Heals the entity. */ AddHealth: (hitPoints: float) => void; @@ -80,8 +97,13 @@ declare global { * @param duration The number of frames that the effect should apply for. The maximum is 150. * (However, if a value higher than 150 is passed, the freeze will be reduced to * 150 frames, but the gold color will persist for the full duration.) + * @param ignoreBosses Optional. Defaults to false. */ - AddMidasFreeze: (source: EntityRef, duration: int) => void; + AddMidasFreeze: ( + source: EntityRef, + duration: int, + ignoreBosses?: boolean, + ) => void; /** * Adds a poison effect to the entity. @@ -91,8 +113,14 @@ declare global { * @param duration The number of frames that the effect should apply for. The minimum is 2 * frames. The maximum is 150. * @param damage The damage taken per tick. Each damage tick is 20 frames apart. + * @param ignoreBosses Optional. Defaults to false. */ - AddPoison: (source: EntityRef, duration: int, damage: float) => void; + AddPoison: ( + source: EntityRef, + duration: int, + damage: float, + ignoreBosses?: boolean, + ) => void; /** * Adds a shrink effect to the entity. @@ -100,8 +128,13 @@ declare global { * @param source Required. If you do not want the effect to have a source, pass * `EntityRef(undefined)`. * @param duration The number of frames that the effect should apply for. + * @param ignoreBosses Optional. Defaults to false. */ - AddShrink: (source: EntityRef, duration: int) => void; + AddShrink: ( + source: EntityRef, + duration: int, + ignoreBosses?: boolean, + ) => void; /** * Adds a slowing effect to the entity. @@ -111,13 +144,15 @@ declare global { * @param duration The number of frames that the effect should apply for. * @param slowValue This is the multiplier applied to the entity's movement speed. For example, * a value of 0.5 would slow down the entity by 50%. - * @param slowColor + * @param slowColor The color modification to make to the enemy. + * @param ignoreBosses Optional. Defaults to false. */ AddSlowing: ( source: EntityRef, duration: int, slowValue: float, slowColor: Color, + ignoreBosses?: boolean, ) => void; AddVelocity: (velocity: Vector) => void; @@ -209,6 +244,7 @@ declare global { IsVulnerableEnemy: () => boolean; Kill: () => void; + KillWithSource: (source: EntityRef) => void; MultiplyFriction: (value: float) => void; PostRender: () => void; Remove: () => void; diff --git a/packages/isaac-typescript-definitions/src/types/classes/EntityPlayer.d.ts b/packages/isaac-typescript-definitions/src/types/classes/EntityPlayer.d.ts index a39a29334..9b6befa97 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/EntityPlayer.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/EntityPlayer.d.ts @@ -20,6 +20,7 @@ import type { CacheFlag } from "../../enums/flags/CacheFlag"; import type { DamageFlag } from "../../enums/flags/DamageFlag"; import type { TearFlag } from "../../enums/flags/TearFlag"; import type { UseFlag } from "../../enums/flags/UseFlag"; +import type { ItemPoolType } from "../../enums/ItemPoolType"; import type { LaserOffset } from "../../enums/LaserOffset"; import type { NullItemID } from "../../enums/NullItemID"; import type { PillEffect } from "../../enums/PillEffect"; @@ -86,6 +87,7 @@ declare global { * `ActiveSlot.SLOT_PRIMARY`. * @param varData Sets the variable data for this collectible (this is used to store extra data * for some active items like the number of uses for Jar of Wisps). Default is 0. + * @param itemPoolType */ AddCollectible: ( collectibleType: CollectibleType, @@ -93,6 +95,7 @@ declare global { firstTimePickingUp?: boolean, activeSlot?: ActiveSlot.PRIMARY | ActiveSlot.SECONDARY, varData?: int, + itemPoolType?: ItemPoolType, ) => void; AddControlsCooldown: (cooldown: int) => void; diff --git a/packages/isaac-typescript-definitions/src/types/classes/Font.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Font.d.ts index 5c5067857..6a5272cc4 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Font.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Font.d.ts @@ -20,14 +20,23 @@ declare interface Font extends IsaacAPIClass { * @param boxWidth Default is 0. * @param center Default is false. */ - DrawString: ( + DrawString: (( str: string, positionX: float, positionY: float, renderColor: KColor, boxWidth?: int, center?: boolean, - ) => void; + ) => void) + & (( + str: string, + positionX: float, + positionY: float, + sizeX: float, + sizeY: float, + renderColor: KColor, + fontRenderSettings: FontRenderSettings, + ) => void); /** * Converts UTF8 to UTF16, then draws the scaled string on the screen. diff --git a/packages/isaac-typescript-definitions/src/types/classes/FontRenderSettings.d.ts b/packages/isaac-typescript-definitions/src/types/classes/FontRenderSettings.d.ts new file mode 100644 index 000000000..9235a0757 --- /dev/null +++ b/packages/isaac-typescript-definitions/src/types/classes/FontRenderSettings.d.ts @@ -0,0 +1,26 @@ +import type { DrawStringAlignment } from "../../enums/DrawStringAlignment"; + +declare global { + function FontRenderSettings(this: void): FontRenderSettings; + + /** Added in Repentance+. */ + interface FontRenderSettings extends IsaacAPIClass { + EnableAutoWrap: (enabled: boolean) => void; + EnableTruncation: (enabled: boolean) => void; + GetAlignment: () => DrawStringAlignment; + GetLineHeightModifier: () => float; + GetMaxCharacters: () => int; + GetMissingCharacterOverride: () => int; + IsAutoWrapEnabled: () => boolean; + IsTruncationEnabled: () => boolean; + SetAlignment: (drawStringAlignment: DrawStringAlignment) => void; + SetLineHeightModifier: (value: float) => void; + SetMaxCharacters: (maxChars: int) => void; + + /** + * Sets the character that will be used when a missing character in the font needs to be + * rendered. This overrides previous `Font:SetMissingCharacter` settings. + */ + SetMissingCharacterOverride: (character: int) => void; + } +} diff --git a/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts index f18c0f786..54c40abc0 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts @@ -132,17 +132,24 @@ declare global { /** * @param speed A value between 0 and 1. Using a value of 0 will soft-lock the game. Using a * value of 1 will instantaneously fade in. + * @param showIcon Optional. Defaults to true. + * @param kColor Optional. Defaults to `K_COLORS.Black`. */ - Fadein: (speed: float) => void; + Fadein: (speed: float, showIcon?: boolean, kColor?: KColor) => void; /** - * Using non-valid `FadeoutTarget` values will be interpreted the same as `FadeoutTarget.NONE`. + * Using a non-valid `FadeoutTarget` value will be interpreted the same as `FadeoutTarget.NONE`. * * @param speed A value between 0 and 1. Using a value of 0 will never trigger the fade out * target. Using a value of 1 will instantaneously trigger the fade out target. - * @param fadeoutTarget + * @param fadeoutTarget The place to go after the fade out is completed. + * @param kColor Optional. Defaults to `K_COLORS.Black`. */ - Fadeout: (speed: float, fadeoutTarget: FadeoutTarget) => void; + Fadeout: ( + speed: float, + fadeoutTarget: FadeoutTarget, + kColor?: KColor, + ) => void; /** * @param position diff --git a/packages/isaac-typescript-definitions/src/types/classes/GridEntity.d.ts b/packages/isaac-typescript-definitions/src/types/classes/GridEntity.d.ts index bde5f2f4a..a91afb659 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/GridEntity.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/GridEntity.d.ts @@ -4,6 +4,7 @@ import type { GridEntityType } from "../../enums/GridEntityType"; declare global { interface GridEntity extends IsaacAPIClass { Destroy: (immediate: boolean) => boolean; + DestroyWithSource: (immediate: boolean, source: EntityRef) => boolean; GetGridIndex: () => int; /** The RNG returned is a reference (i.e. not a copy). */ @@ -17,6 +18,7 @@ declare global { GetType: () => GridEntityType; GetVariant: () => int; Hurt: (damage: int) => boolean; + HurtWithSource: (damage: int, source: EntityRef) => boolean; Init: (seed: Seed) => void; PostInit: () => void; Render: (offset: Vector) => void; diff --git a/packages/isaac-typescript-definitions/src/types/classes/HUD.d.ts b/packages/isaac-typescript-definitions/src/types/classes/HUD.d.ts index 87e397022..496ce9809 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/HUD.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/HUD.d.ts @@ -45,9 +45,23 @@ declare global { /** * Shows the pickup text for the specified item as if it was picked up by the specified player. * The overloaded method supports showing custom pickup text. + * + * If the `stackUpText` parameter is missing or true, then it clears the message stack + * (Repentance functionality). If it is false, then the text will stack up (Repentance+ + * functionality). These values are counterintuitive, so it seems likely that the developers + * made a mistake. */ - ShowItemText: ((player: EntityPlayer, item: ItemConfigItem) => void) - & ((name: string, description?: string, paper?: boolean) => void); + ShowItemText: (( + player: EntityPlayer, + item: ItemConfigItem, + stackUpText: boolean, + ) => void) + & (( + mainString: string, + secondaryString?: string, + isCurseDisplay?: boolean, + stackUpText?: boolean, + ) => void); Update: () => void; } diff --git a/packages/isaac-typescript-definitions/src/types/classes/Options.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Options.d.ts index 56a7e75c9..94a91b778 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Options.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Options.d.ts @@ -2,6 +2,7 @@ import type { AnnouncerVoiceMode } from "../../enums/AnnouncerVoiceMode"; import type { CameraStyle } from "../../enums/CameraStyle"; import type { ConsoleFont } from "../../enums/ConsoleFont"; import type { ExtraHudStyle } from "../../enums/ExtraHudStyle"; +import type { JacobEsauControls } from "../../enums/JacobEsauControls"; import type { LanguageAbbreviation } from "../../enums/LanguageAbbreviation"; declare global { @@ -120,6 +121,13 @@ declare global { */ let BulletVisibility: boolean; + /** + * Toggles the way to activate Esau's items. + * + * This can be changed from the in-game options menu. + */ + let JacobEsauControls: JacobEsauControls; + /** * Whether the announcer voice should play when using items, pills, cards, and runes. * diff --git a/packages/isaac-typescript-definitions/src/types/classes/Room.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Room.d.ts index 97a5b8854..ce1ba5bfc 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Room.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Room.d.ts @@ -36,7 +36,17 @@ declare global { ) => LuaMultiReturn<[clear: boolean, collidePos: Vector]>; DamageGrid: (index: int, damage: int) => boolean; + DamageGridWithSource: ( + index: int, + damage: int, + source: EntityRef, + ) => boolean; DestroyGrid: (index: int, immediate: boolean) => boolean; + DestroyGridWithSource: ( + index: int, + immediate: boolean, + source: EntityRef, + ) => boolean; EmitBloodFromWalls: (duration: int, count: int) => void; /** @@ -204,7 +214,14 @@ declare global { IsPositionInRoom: (position: Vector, margin: float) => boolean; IsSacrificeDone: () => boolean; KeepDoorsClosed: () => void; - MamaMegaExplosion: (position: Vector) => void; + + /** + * @param position Optional. The position where the explosion should originate. Default is + * `Vector.Zero`. + * @param player Optional. The player that the explosion should come from. + */ + MamaMegaExplosion: (position?: Vector, player?: EntityPlayer) => void; + PlayMusic: () => void; RemoveDoor: (doorSlot: DoorSlot) => void; diff --git a/packages/isaac-typescript-definitions/src/types/index.d.ts b/packages/isaac-typescript-definitions/src/types/index.d.ts index 6107fbd02..9abf7cb90 100644 --- a/packages/isaac-typescript-definitions/src/types/index.d.ts +++ b/packages/isaac-typescript-definitions/src/types/index.d.ts @@ -45,6 +45,7 @@ /// /// /// +/// /// /// /// diff --git a/packages/isaacscript-spell/dictionaries/isaac/api.txt b/packages/isaacscript-spell/dictionaries/isaac/api.txt index 8e4c3c0be..2319fb0df 100644 --- a/packages/isaacscript-spell/dictionaries/isaac/api.txt +++ b/packages/isaacscript-spell/dictionaries/isaac/api.txt @@ -49,6 +49,7 @@ cutscenes CYCLOPIA DAGAZ DATAMINER +DEATHMATCH DECAP DERP DINGA