Skip to content

Commit 1b1a0ed

Browse files
committed
chore: squashed 5 commits
1 parent fd3d8cb commit 1b1a0ed

File tree

17 files changed

+197
-30
lines changed

17 files changed

+197
-30
lines changed

packages/isaac-typescript-definitions/src/enums/BackdropType.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,6 @@ export enum BackdropType {
6767
MINES_SHAFT = 58,
6868
ASHPIT_SHAFT = 59,
6969
DARK_CLOSET = 60,
70+
DEATHMATCH = 61,
71+
LIL_PORTAL = 62,
7072
}

packages/isaac-typescript-definitions/src/enums/ButtonAction.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ export enum ButtonAction {
5252
/** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */
5353
MENU_BACK = 15,
5454

55-
/** This only fires on `InputHook.IS_ACTION_PRESSED` (0). */
56-
RESTART = 16,
57-
5855
/** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */
59-
FULLSCREEN = 17,
56+
FULLSCREEN = 16,
6057

6158
/** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */
62-
MUTE = 18,
59+
MUTE = 17,
60+
61+
/** This only fires on `InputHook.IS_ACTION_PRESSED` (0). */
62+
RESTART = 18,
6363

6464
/** Does not seem to trigger any input hooks while on keyboard. */
6565
JOIN_MULTIPLAYER = 19,
@@ -76,15 +76,21 @@ export enum ButtonAction {
7676
/** Does not seem to trigger any input hooks while on keyboard. */
7777
MENU_DOWN = 23,
7878

79+
MENU_LB = 24,
80+
MENU_RB = 25,
81+
7982
/** Does not seem to trigger any input hooks while on keyboard. */
80-
MENU_LT = 24,
83+
MENU_LT = 26,
8184

8285
/** Does not seem to trigger any input hooks while on keyboard. */
83-
MENU_RT = 25,
86+
MENU_RT = 27,
8487

8588
/** Does not seem to trigger any input hooks while on keyboard. */
86-
MENU_TAB = 26,
89+
MENU_TAB = 28,
90+
91+
MENU_EX = 29,
92+
EMOTES = 30,
8793

8894
/** This only fires on `InputHook.IS_ACTION_TRIGGERED` (1). */
89-
CONSOLE = 28,
95+
CONSOLE = 32,
9096
}
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: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ declare global {
1717
* @param duration The number of frames that the effect should apply for. The minimum is 2
1818
* frames.
1919
* @param damage The damage taken per tick. Each damage tick is 20 frames apart.
20+
* @param ignoreBosses Optional. Defaults to false.
2021
*/
21-
AddBurn: (source: EntityRef, duration: int, damage: float) => void;
22+
AddBurn: (
23+
source: EntityRef,
24+
duration: int,
25+
damage: float,
26+
ignoreBosses?: boolean,
27+
) => void;
2228

2329
/**
2430
* Adds a charmed effect to the entity.
@@ -27,21 +33,26 @@ declare global {
2733
* `EntityRef(undefined)`.
2834
* @param duration The number of frames that the effect should apply for. If set to -1, the
2935
* effect will be permanent and the entity will follow you to different rooms.
36+
* @param ignoreBosses Optional. Defaults to false.
3037
*/
31-
AddCharmed: (source: EntityRef, duration: int) => void;
38+
AddCharmed: (
39+
source: EntityRef,
40+
duration: int,
41+
ignoreBosses?: boolean,
42+
) => void;
3243

3344
/**
3445
* Adds a confusion effect to the entity.
3546
*
3647
* @param source Required. If you do not want the effect to have a source, pass
3748
* `EntityRef(undefined)`.
3849
* @param duration The number of frames that the effect should apply for. The maximum is 150.
39-
* @param ignoreBosses
50+
* @param ignoreBosses Optional. Defaults to false.
4051
*/
4152
AddConfusion: (
4253
source: EntityRef,
4354
duration: int,
44-
ignoreBosses: boolean,
55+
ignoreBosses?: boolean,
4556
) => void;
4657

4758
/**
@@ -56,17 +67,23 @@ declare global {
5667
* @param source Required. If you do not want the effect to have a source, pass
5768
* `EntityRef(undefined)`.
5869
* @param duration The number of frames that the effect should apply for. The maximum is 150.
70+
* @param ignoreBosses Optional. Defaults to false.
5971
*/
60-
AddFear: (source: EntityRef, duration: int) => void;
72+
AddFear: (source: EntityRef, duration: int, ignoreBosses?: boolean) => void;
6173

6274
/**
6375
* Adds a freeze effect to the entity.
6476
*
6577
* @param source Required. If you do not want the effect to have a source, pass
6678
* `EntityRef(undefined)`.
6779
* @param duration The number of frames that the effect should apply for. The maximum is 150.
80+
* @param ignoreBosses Optional. Defaults to false.
6881
*/
69-
AddFreeze: (source: EntityRef, duration: int) => void;
82+
AddFreeze: (
83+
source: EntityRef,
84+
duration: int,
85+
ignoreBosses?: boolean,
86+
) => void;
7087

7188
/** Heals the entity. */
7289
AddHealth: (hitPoints: float) => void;
@@ -80,8 +97,13 @@ declare global {
8097
* @param duration The number of frames that the effect should apply for. The maximum is 150.
8198
* (However, if a value higher than 150 is passed, the freeze will be reduced to
8299
* 150 frames, but the gold color will persist for the full duration.)
100+
* @param ignoreBosses Optional. Defaults to false.
83101
*/
84-
AddMidasFreeze: (source: EntityRef, duration: int) => void;
102+
AddMidasFreeze: (
103+
source: EntityRef,
104+
duration: int,
105+
ignoreBosses?: boolean,
106+
) => void;
85107

86108
/**
87109
* Adds a poison effect to the entity.
@@ -91,17 +113,28 @@ declare global {
91113
* @param duration The number of frames that the effect should apply for. The minimum is 2
92114
* frames. The maximum is 150.
93115
* @param damage The damage taken per tick. Each damage tick is 20 frames apart.
116+
* @param ignoreBosses Optional. Defaults to false.
94117
*/
95-
AddPoison: (source: EntityRef, duration: int, damage: float) => void;
118+
AddPoison: (
119+
source: EntityRef,
120+
duration: int,
121+
damage: float,
122+
ignoreBosses?: boolean,
123+
) => void;
96124

97125
/**
98126
* Adds a shrink effect to the entity.
99127
*
100128
* @param source Required. If you do not want the effect to have a source, pass
101129
* `EntityRef(undefined)`.
102130
* @param duration The number of frames that the effect should apply for.
131+
* @param ignoreBosses Optional. Defaults to false.
103132
*/
104-
AddShrink: (source: EntityRef, duration: int) => void;
133+
AddShrink: (
134+
source: EntityRef,
135+
duration: int,
136+
ignoreBosses?: boolean,
137+
) => void;
105138

106139
/**
107140
* Adds a slowing effect to the entity.
@@ -111,13 +144,15 @@ declare global {
111144
* @param duration The number of frames that the effect should apply for.
112145
* @param slowValue This is the multiplier applied to the entity's movement speed. For example,
113146
* a value of 0.5 would slow down the entity by 50%.
114-
* @param slowColor
147+
* @param slowColor The color modification to make to the enemy.
148+
* @param ignoreBosses Optional. Defaults to false.
115149
*/
116150
AddSlowing: (
117151
source: EntityRef,
118152
duration: int,
119153
slowValue: float,
120154
slowColor: Color,
155+
ignoreBosses?: boolean,
121156
) => void;
122157

123158
AddVelocity: (velocity: Vector) => void;
@@ -209,6 +244,7 @@ declare global {
209244
IsVulnerableEnemy: () => boolean;
210245

211246
Kill: () => void;
247+
KillWithSource: (source: EntityRef) => void;
212248
MultiplyFriction: (value: float) => void;
213249
PostRender: () => void;
214250
Remove: () => void;

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/Game.d.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,24 @@ declare global {
132132
/**
133133
* @param speed A value between 0 and 1. Using a value of 0 will soft-lock the game. Using a
134134
* value of 1 will instantaneously fade in.
135+
* @param showIcon Optional. Defaults to true.
136+
* @param kColor Optional. Defaults to `K_COLORS.Black`.
135137
*/
136-
Fadein: (speed: float) => void;
138+
Fadein: (speed: float, showIcon?: boolean, kColor?: KColor) => void;
137139

138140
/**
139-
* Using non-valid `FadeoutTarget` values will be interpreted the same as `FadeoutTarget.NONE`.
141+
* Using a non-valid `FadeoutTarget` value will be interpreted the same as `FadeoutTarget.NONE`.
140142
*
141143
* @param speed A value between 0 and 1. Using a value of 0 will never trigger the fade out
142144
* target. Using a value of 1 will instantaneously trigger the fade out target.
143-
* @param fadeoutTarget
145+
* @param fadeoutTarget The place to go after the fade out is completed.
146+
* @param kColor Optional. Defaults to `K_COLORS.Black`.
144147
*/
145-
Fadeout: (speed: float, fadeoutTarget: FadeoutTarget) => void;
148+
Fadeout: (
149+
speed: float,
150+
fadeoutTarget: FadeoutTarget,
151+
kColor?: KColor,
152+
) => void;
146153

147154
/**
148155
* @param position

0 commit comments

Comments
 (0)