Skip to content

Commit 02bf35c

Browse files
committed
update
1 parent a9d4bff commit 02bf35c

File tree

10 files changed

+69
-4
lines changed

10 files changed

+69
-4
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/** Added in Repentance+. */
2+
export enum DrawStringAlignment {
3+
TOP_LEFT = 0,
4+
TOP_CENTER = 1,
5+
TOP_RIGHT = 2,
6+
MIDDLE_LEFT = 3,
7+
MIDDLE_CENTER = 4,
8+
MIDDLE_RIGHT = 5,
9+
BOTTOM_LEFT = 6,
10+
BOTTOM_CENTER = 7,
11+
BOTTOM_RIGHT = 8,
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export enum JacobEsauControls {
2+
CLASSIC = 0,
3+
BETTER = 1,
4+
}

packages/isaac-typescript-definitions/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export * from "./enums/Difficulty";
2727
export * from "./enums/Dimension";
2828
export * from "./enums/Direction";
2929
export * from "./enums/DoorSlot";
30+
export * from "./enums/DrawStringAlignment";
3031
export * from "./enums/EntityCollisionClass";
3132
export * from "./enums/EntityGridCollisionClass";
3233
export * from "./enums/EntityType";
@@ -59,6 +60,7 @@ export * from "./enums/ItemConfigPillEffectClass";
5960
export * from "./enums/ItemConfigPillEffectType";
6061
export * from "./enums/ItemPoolType";
6162
export * from "./enums/ItemType";
63+
export * from "./enums/JacobEsauControls";
6264
export * from "./enums/Keyboard";
6365
export * from "./enums/LanguageAbbreviation";
6466
export * from "./enums/LaserOffset";

packages/isaac-typescript-definitions/src/types/classes/Entity.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ declare global {
5252
AddConfusion: (
5353
source: EntityRef,
5454
duration: int,
55-
ignoreBosses: boolean,
55+
ignoreBosses?: boolean,
5656
) => void;
5757

5858
/**

packages/isaac-typescript-definitions/src/types/classes/EntityPlayer.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type { CacheFlag } from "../../enums/flags/CacheFlag";
2020
import type { DamageFlag } from "../../enums/flags/DamageFlag";
2121
import type { TearFlag } from "../../enums/flags/TearFlag";
2222
import type { UseFlag } from "../../enums/flags/UseFlag";
23+
import type { ItemPoolType } from "../../enums/ItemPoolType";
2324
import type { LaserOffset } from "../../enums/LaserOffset";
2425
import type { NullItemID } from "../../enums/NullItemID";
2526
import type { PillEffect } from "../../enums/PillEffect";
@@ -86,13 +87,15 @@ declare global {
8687
* `ActiveSlot.SLOT_PRIMARY`.
8788
* @param varData Sets the variable data for this collectible (this is used to store extra data
8889
* for some active items like the number of uses for Jar of Wisps). Default is 0.
90+
* @param itemPoolType
8991
*/
9092
AddCollectible: (
9193
collectibleType: CollectibleType,
9294
charge?: int,
9395
firstTimePickingUp?: boolean,
9496
activeSlot?: ActiveSlot.PRIMARY | ActiveSlot.SECONDARY,
9597
varData?: int,
98+
itemPoolType?: ItemPoolType,
9699
) => void;
97100

98101
AddControlsCooldown: (cooldown: int) => void;

packages/isaac-typescript-definitions/src/types/classes/Font.d.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,23 @@ declare interface Font extends IsaacAPIClass {
2020
* @param boxWidth Default is 0.
2121
* @param center Default is false.
2222
*/
23-
DrawString: (
23+
DrawString: ((
2424
str: string,
2525
positionX: float,
2626
positionY: float,
2727
renderColor: KColor,
2828
boxWidth?: int,
2929
center?: boolean,
30-
) => void;
30+
) => void) &
31+
((
32+
str: string,
33+
positionX: float,
34+
positionY: float,
35+
sizeX: float,
36+
sizeY: float,
37+
renderColor: KColor,
38+
fontRenderSettings: FontRenderSettings,
39+
) => void);
3140

3241
/**
3342
* Converts UTF8 to UTF16, then draws the scaled string on the screen.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { DrawStringAlignment } from "../../enums/DrawStringAlignment";
2+
3+
declare global {
4+
function FontRenderSettings(this: void): FontRenderSettings;
5+
6+
/** Added in Repentance+. */
7+
interface FontRenderSettings extends IsaacAPIClass {
8+
EnableAutoWrap: (enabled: boolean) => void;
9+
EnableTruncation: (enabled: boolean) => void;
10+
GetAlignment: () => DrawStringAlignment;
11+
GetLineHeightModifier: () => float;
12+
GetMaxCharacters: () => int;
13+
GetMissingCharacterOverride: () => int;
14+
IsAutoWrapEnabled: () => boolean;
15+
IsTruncationEnabled: () => boolean;
16+
SetAlignment: (drawStringAlignment: DrawStringAlignment) => void;
17+
SetLineHeightModifier: (value: float) => void;
18+
SetMaxCharacters: (maxChars: int) => void;
19+
20+
/**
21+
* Sets the character that will be used when a missing character in the font needs to be
22+
* rendered. This overrides previous `Font:SetMissingCharacter` settings.
23+
*/
24+
SetMissingCharacterOverride: (character: int) => void;
25+
}
26+
}

packages/isaac-typescript-definitions/src/types/classes/Options.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { AnnouncerVoiceMode } from "../../enums/AnnouncerVoiceMode";
22
import type { CameraStyle } from "../../enums/CameraStyle";
33
import type { ConsoleFont } from "../../enums/ConsoleFont";
44
import type { ExtraHudStyle } from "../../enums/ExtraHudStyle";
5+
import type { JacobEsauControls } from "../../enums/JacobEsauControls";
56
import type { LanguageAbbreviation } from "../../enums/LanguageAbbreviation";
67

78
declare global {
@@ -120,6 +121,13 @@ declare global {
120121
*/
121122
let BulletVisibility: boolean;
122123

124+
/**
125+
* Toggles the way to activate Esau's items.
126+
*
127+
* This can be changed from the in-game options menu.
128+
*/
129+
let JacobEsauControls: JacobEsauControls;
130+
123131
/**
124132
* Whether the announcer voice should play when using items, pills, cards, and runes.
125133
*

packages/isaac-typescript-definitions/src/types/classes/Room.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ declare global {
216216
KeepDoorsClosed: () => void;
217217

218218
/**
219-
* @param position Optional. The position where the explosion should originate. Defaults to
219+
* @param position Optional. The position where the explosion should originate. Default is
220220
* `Vector.Zero`.
221221
* @param player Optional. The player that the explosion should come from.
222222
*/

packages/isaac-typescript-definitions/src/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
/// <reference path="./classes/EntityTear.d.ts" />
4646
/// <reference path="./classes/EntriesList.d.ts" />
4747
/// <reference path="./classes/Font.d.ts" />
48+
/// <reference path="./classes/FontRenderSettings.d.ts" />
4849
/// <reference path="./classes/Game.d.ts" />
4950
/// <reference path="./classes/GridEntity.d.ts" />
5051
/// <reference path="./classes/GridEntityDesc.d.ts" />

0 commit comments

Comments
 (0)