Skip to content

Repentance+ Changes #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ export enum BackdropType {
MINES_SHAFT = 58,
ASHPIT_SHAFT = 59,
DARK_CLOSET = 60,
DEATHMATCH = 61,
LIL_PORTAL = 62,
}
24 changes: 15 additions & 9 deletions packages/isaac-typescript-definitions/src/enums/ButtonAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
}
Original file line number Diff line number Diff line change
@@ -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,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export enum JacobEsauControls {
CLASSIC = 0,
BETTER = 1,
}
2 changes: 2 additions & 0 deletions packages/isaac-typescript-definitions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
56 changes: 46 additions & 10 deletions packages/isaac-typescript-definitions/src/types/classes/Entity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -27,21 +33,26 @@ 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.
*
* @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;

/**
Expand All @@ -56,17 +67,23 @@ 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.
*
* @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;
Expand All @@ -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.
Expand All @@ -91,17 +113,28 @@ 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.
*
* @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.
Expand All @@ -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;
Expand Down Expand Up @@ -209,6 +244,7 @@ declare global {
IsVulnerableEnemy: () => boolean;

Kill: () => void;
KillWithSource: (source: EntityRef) => void;
MultiplyFriction: (value: float) => void;
PostRender: () => void;
Remove: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -86,13 +87,15 @@ 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,
charge?: int,
firstTimePickingUp?: boolean,
activeSlot?: ActiveSlot.PRIMARY | ActiveSlot.SECONDARY,
varData?: int,
itemPoolType?: ItemPoolType,
) => void;

AddControlsCooldown: (cooldown: int) => void;
Expand Down
13 changes: 11 additions & 2 deletions packages/isaac-typescript-definitions/src/types/classes/Font.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
15 changes: 11 additions & 4 deletions packages/isaac-typescript-definitions/src/types/classes/Game.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand All @@ -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;
Expand Down
18 changes: 16 additions & 2 deletions packages/isaac-typescript-definitions/src/types/classes/HUD.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
*
Expand Down
Loading
Loading