isaacscript-common 17.4.3 → 17.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/index.d.ts +13 -5
  2. package/dist/isaacscript-common.lua +23 -21
  3. package/dist/src/callbacks.d.ts +1 -1
  4. package/dist/src/classes/features/other/customStages/backdrop.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/customStages/shadows.d.ts.map +1 -1
  6. package/dist/src/classes/features/other/customStages/streakText.d.ts.map +1 -1
  7. package/dist/src/classes/features/other/customStages/versusScreen.d.ts.map +1 -1
  8. package/dist/src/classes/features/other/customStages/versusScreen.lua +6 -10
  9. package/dist/src/functions/input.d.ts +11 -3
  10. package/dist/src/functions/input.d.ts.map +1 -1
  11. package/dist/src/functions/input.lua +18 -4
  12. package/dist/src/functions/roomShape.lua +0 -2
  13. package/dist/src/objects/LRoomShapeToRectangles.d.ts +5 -5
  14. package/dist/src/objects/LRoomShapeToRectangles.d.ts.map +1 -1
  15. package/dist/src/objects/backdropTypeToRockAltType.d.ts +60 -2
  16. package/dist/src/objects/backdropTypeToRockAltType.d.ts.map +1 -1
  17. package/dist/src/objects/bossNamePNGFileNames.d.ts +101 -2
  18. package/dist/src/objects/bossNamePNGFileNames.d.ts.map +1 -1
  19. package/dist/src/objects/bossPortraitPNGFileNames.d.ts +101 -2
  20. package/dist/src/objects/bossPortraitPNGFileNames.d.ts.map +1 -1
  21. package/dist/src/objects/cardDescriptions.d.ts +98 -2
  22. package/dist/src/objects/cardDescriptions.d.ts.map +1 -1
  23. package/dist/src/objects/cardNames.d.ts +98 -2
  24. package/dist/src/objects/cardNames.d.ts.map +1 -1
  25. package/dist/src/objects/challengeNames.d.ts +46 -2
  26. package/dist/src/objects/challengeNames.d.ts.map +1 -1
  27. package/dist/src/objects/characterDamageMultipliers.d.ts +42 -2
  28. package/dist/src/objects/characterDamageMultipliers.d.ts.map +1 -1
  29. package/dist/src/objects/characterNames.d.ts +42 -2
  30. package/dist/src/objects/characterNames.d.ts.map +1 -1
  31. package/dist/src/objects/coinSubTypeToValue.d.ts +8 -2
  32. package/dist/src/objects/coinSubTypeToValue.d.ts.map +1 -1
  33. package/dist/src/objects/directionNames.d.ts +5 -2
  34. package/dist/src/objects/directionNames.d.ts.map +1 -1
  35. package/dist/src/objects/directionToDegrees.d.ts +5 -2
  36. package/dist/src/objects/directionToDegrees.d.ts.map +1 -1
  37. package/dist/src/objects/directionToVector.d.ts +1 -1
  38. package/dist/src/objects/directionToVector.d.ts.map +1 -1
  39. package/dist/src/objects/doorSlotFlagToDoorSlot.d.ts +2 -2
  40. package/dist/src/objects/doorSlotFlagToDoorSlot.d.ts.map +1 -1
  41. package/dist/src/objects/doorSlotToDirection.d.ts +10 -2
  42. package/dist/src/objects/doorSlotToDirection.d.ts.map +1 -1
  43. package/dist/src/objects/doorSlotToDoorSlotFlag.d.ts +45 -2
  44. package/dist/src/objects/doorSlotToDoorSlotFlag.d.ts.map +1 -1
  45. package/dist/src/objects/isaacAPIClassTypeToBrand.d.ts +5 -2
  46. package/dist/src/objects/isaacAPIClassTypeToBrand.d.ts.map +1 -1
  47. package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts +1 -1
  48. package/dist/src/objects/languageNames.d.ts +7 -2
  49. package/dist/src/objects/languageNames.d.ts.map +1 -1
  50. package/dist/src/objects/oppositeDoorSlots.d.ts +9 -1
  51. package/dist/src/objects/oppositeDoorSlots.d.ts.map +1 -1
  52. package/dist/src/objects/pillEffectClasses.d.ts +51 -2
  53. package/dist/src/objects/pillEffectClasses.d.ts.map +1 -1
  54. package/dist/src/objects/pillEffectNames.d.ts +50 -2
  55. package/dist/src/objects/pillEffectNames.d.ts.map +1 -1
  56. package/dist/src/objects/pillEffectTypes.d.ts +51 -2
  57. package/dist/src/objects/pillEffectTypes.d.ts.map +1 -1
  58. package/dist/src/objects/playerNamePNGFileNames.d.ts +42 -2
  59. package/dist/src/objects/playerNamePNGFileNames.d.ts.map +1 -1
  60. package/dist/src/objects/playerPortraitPNGFileNames.d.ts +42 -2
  61. package/dist/src/objects/playerPortraitPNGFileNames.d.ts.map +1 -1
  62. package/dist/src/objects/roomShapeBounds.d.ts +1 -1
  63. package/dist/src/objects/roomShapeBounds.d.ts.map +1 -1
  64. package/dist/src/objects/roomShapeCorners.d.ts +1 -1
  65. package/dist/src/objects/roomShapeCorners.d.ts.map +1 -1
  66. package/dist/src/objects/roomShapeLayoutSizes.d.ts +1 -1
  67. package/dist/src/objects/roomShapeLayoutSizes.d.ts.map +1 -1
  68. package/dist/src/objects/roomShapeToBottomRightPosition.d.ts +1 -1
  69. package/dist/src/objects/roomShapeToBottomRightPosition.d.ts.map +1 -1
  70. package/dist/src/objects/roomShapeToDoorSlotCoordinates.d.ts +1 -1
  71. package/dist/src/objects/roomShapeToDoorSlotCoordinates.d.ts.map +1 -1
  72. package/dist/src/objects/roomShapeToDoorSlots.d.ts +1 -1
  73. package/dist/src/objects/roomShapeToDoorSlots.d.ts.map +1 -1
  74. package/dist/src/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts +1 -1
  75. package/dist/src/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts.map +1 -1
  76. package/dist/src/objects/roomShapeToGridWidth.d.ts +12 -2
  77. package/dist/src/objects/roomShapeToGridWidth.d.ts.map +1 -1
  78. package/dist/src/objects/roomShapeToTopLeftPosition.d.ts +1 -1
  79. package/dist/src/objects/roomShapeToTopLeftPosition.d.ts.map +1 -1
  80. package/dist/src/objects/roomShapeVolumes.d.ts +12 -2
  81. package/dist/src/objects/roomShapeVolumes.d.ts.map +1 -1
  82. package/dist/src/objects/roomTypeGotoPrefixes.d.ts +29 -2
  83. package/dist/src/objects/roomTypeGotoPrefixes.d.ts.map +1 -1
  84. package/dist/src/objects/roomTypeNames.d.ts +29 -2
  85. package/dist/src/objects/roomTypeNames.d.ts.map +1 -1
  86. package/dist/src/objects/stageTypeSuffixes.d.ts +6 -2
  87. package/dist/src/objects/stageTypeSuffixes.d.ts.map +1 -1
  88. package/dist/src/objects/stageTypeToLetter.d.ts +6 -2
  89. package/dist/src/objects/stageTypeToLetter.d.ts.map +1 -1
  90. package/dist/src/objects/transformationNames.d.ts +14 -2
  91. package/dist/src/objects/transformationNames.d.ts.map +1 -1
  92. package/dist/src/objects/versusScreenBackgroundColors.d.ts +1 -1
  93. package/dist/src/objects/versusScreenBackgroundColors.d.ts.map +1 -1
  94. package/dist/src/objects/versusScreenDirtSpotColors.d.ts +1 -1
  95. package/dist/src/objects/versusScreenDirtSpotColors.d.ts.map +1 -1
  96. package/dist/src/types/HasAllEnumKeys.d.ts +2 -2
  97. package/package.json +1 -1
  98. package/src/callbacks.ts +2 -2
  99. package/src/classes/features/other/customStages/backdrop.ts +4 -5
  100. package/src/classes/features/other/customStages/shadows.ts +3 -4
  101. package/src/classes/features/other/customStages/streakText.ts +3 -4
  102. package/src/classes/features/other/customStages/versusScreen.ts +4 -12
  103. package/src/functions/input.ts +19 -5
  104. package/src/objects/LRoomShapeToRectangles.ts +8 -6
  105. package/src/objects/backdropTypeToRockAltType.ts +3 -4
  106. package/src/objects/bossNamePNGFileNames.ts +3 -4
  107. package/src/objects/bossPortraitPNGFileNames.ts +3 -4
  108. package/src/objects/cardDescriptions.ts +3 -2
  109. package/src/objects/cardNames.ts +3 -2
  110. package/src/objects/challengeNames.ts +3 -2
  111. package/src/objects/characterDamageMultipliers.ts +3 -4
  112. package/src/objects/characterNames.ts +3 -2
  113. package/src/objects/coinSubTypeToValue.ts +3 -2
  114. package/src/objects/directionNames.ts +3 -4
  115. package/src/objects/directionToDegrees.ts +3 -4
  116. package/src/objects/directionToVector.ts +3 -1
  117. package/src/objects/doorSlotFlagToDoorSlot.ts +3 -4
  118. package/src/objects/doorSlotToDirection.ts +12 -12
  119. package/src/objects/doorSlotToDoorSlotFlag.ts +3 -4
  120. package/src/objects/isaacAPIClassTypeToBrand.ts +6 -4
  121. package/src/objects/isaacAPIClassTypeToFunctions.ts +3 -3
  122. package/src/objects/languageNames.ts +3 -4
  123. package/src/objects/oppositeDoorSlots.ts +3 -4
  124. package/src/objects/pillEffectClasses.ts +3 -4
  125. package/src/objects/pillEffectNames.ts +3 -2
  126. package/src/objects/pillEffectTypes.ts +3 -4
  127. package/src/objects/playerNamePNGFileNames.ts +3 -4
  128. package/src/objects/playerPortraitPNGFileNames.ts +3 -4
  129. package/src/objects/roomShapeBounds.ts +3 -1
  130. package/src/objects/roomShapeCorners.ts +3 -1
  131. package/src/objects/roomShapeLayoutSizes.ts +3 -1
  132. package/src/objects/roomShapeToBottomRightPosition.ts +8 -3
  133. package/src/objects/roomShapeToDoorSlotCoordinates.ts +3 -1
  134. package/src/objects/roomShapeToDoorSlots.ts +3 -1
  135. package/src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts +3 -1
  136. package/src/objects/roomShapeToGridWidth.ts +3 -4
  137. package/src/objects/roomShapeToTopLeftPosition.ts +5 -3
  138. package/src/objects/roomShapeVolumes.ts +3 -4
  139. package/src/objects/roomTypeGotoPrefixes.ts +3 -4
  140. package/src/objects/roomTypeNames.ts +3 -2
  141. package/src/objects/stageTypeSuffixes.ts +3 -4
  142. package/src/objects/stageTypeToLetter.ts +3 -2
  143. package/src/objects/transformationNames.ts +3 -2
  144. package/src/objects/versusScreenBackgroundColors.ts +4 -2
  145. package/src/objects/versusScreenDirtSpotColors.ts +4 -2
  146. package/src/types/HasAllEnumKeys.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreenBackgroundColors.d.ts","sourceRoot":"","sources":["../../../src/objects/versusScreenBackgroundColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAKvD,4CAA4C;AAC5C,eAAO,MAAM,+BAA+B,EAAE;IAC5C,QAAQ,EAAE,GAAG,IAAI,OAAO,GAAG,KAAK;CA+BxB,CAAC"}
1
+ {"version":3,"file":"versusScreenBackgroundColors.d.ts","sourceRoot":"","sources":["../../../src/objects/versusScreenBackgroundColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAKvD,4CAA4C;AAG5C,eAAO,MAAM,+BAA+B,EAAE;IAC5C,QAAQ,EAAE,GAAG,IAAI,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC;CA+BlC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { StageID } from "isaac-typescript-definitions";
2
2
  /** These values are taken from StageAPI. */
3
3
  export declare const VERSUS_SCREEN_DIRT_SPOT_COLORS: {
4
- readonly [key in StageID]: Color;
4
+ readonly [Key in StageID]: Readonly<Color>;
5
5
  };
6
6
  //# sourceMappingURL=versusScreenDirtSpotColors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreenDirtSpotColors.d.ts","sourceRoot":"","sources":["../../../src/objects/versusScreenDirtSpotColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAKvD,4CAA4C;AAC5C,eAAO,MAAM,8BAA8B,EAAE;IAC3C,QAAQ,EAAE,GAAG,IAAI,OAAO,GAAG,KAAK;CA+BxB,CAAC"}
1
+ {"version":3,"file":"versusScreenDirtSpotColors.d.ts","sourceRoot":"","sources":["../../../src/objects/versusScreenDirtSpotColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAKvD,4CAA4C;AAG5C,eAAO,MAAM,8BAA8B,EAAE;IAC3C,QAAQ,EAAE,GAAG,IAAI,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC;CA+BlC,CAAC"}
@@ -15,12 +15,12 @@
15
15
  * [MyEnum.Value1]: "foo",
16
16
  * [MyEnum.Value2]: "bar",
17
17
  * [MyEnum.Value3]: "baz",
18
- * } as const satisfies HasAllEnumKeys<MyEnum>;
18
+ * } as const satisfies HasAllEnumKeys<MyEnum, string>;
19
19
  *
20
20
  * const value = MyEnumToString[MyEnum.Value2];
21
21
  * ```
22
22
  */
23
23
  export type HasAllEnumKeys<Enum extends string | number, T> = {
24
- readonly [key in Enum]: T;
24
+ readonly [Key in Enum]: T;
25
25
  };
26
26
  //# sourceMappingURL=HasAllEnumKeys.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "17.4.3",
3
+ "version": "17.5.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
package/src/callbacks.ts CHANGED
@@ -120,8 +120,8 @@ const MOD_CALLBACK_CUSTOM_TO_CLASS = newObjectWithEnumKeys(ModCallbackCustom, {
120
120
  } as const);
121
121
 
122
122
  export type ModCallbackCustomToClass = {
123
- readonly [key in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<
124
- typeof MOD_CALLBACK_CUSTOM_TO_CLASS[key]
123
+ readonly [Key in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<
124
+ typeof MOD_CALLBACK_CUSTOM_TO_CLASS[Key]
125
125
  >;
126
126
  };
127
127
 
@@ -21,6 +21,7 @@ import {
21
21
  } from "../../../../functions/string";
22
22
  import { eRange, iRange } from "../../../../functions/utils";
23
23
  import { CustomStage } from "../../../../interfaces/private/CustomStage";
24
+ import { HasAllEnumKeys } from "../../../../types/HasAllEnumKeys";
24
25
  import { ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH } from "./constants";
25
26
 
26
27
  enum BackdropKind {
@@ -42,9 +43,7 @@ const DEFAULT_BACKDROP: NonNullable<CustomStage["backdropPNGPaths"]> = {
42
43
  corners: [`${ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH}/backdrop/corner.png`],
43
44
  } as const;
44
45
 
45
- const ROOM_SHAPE_WALL_ANM2_LAYERS: {
46
- readonly [key in RoomShape]: int;
47
- } = {
46
+ const ROOM_SHAPE_WALL_ANM2_LAYERS = {
48
47
  [RoomShape.SHAPE_1x1]: 44, // 1
49
48
  [RoomShape.IH]: 36, // 2
50
49
  [RoomShape.IV]: 28, // 3
@@ -57,10 +56,10 @@ const ROOM_SHAPE_WALL_ANM2_LAYERS: {
57
56
  [RoomShape.LTR]: 63, // 10
58
57
  [RoomShape.LBL]: 63, // 11
59
58
  [RoomShape.LBR]: 63, // 12
60
- } as const;
59
+ } as const satisfies HasAllEnumKeys<RoomShape, int>;
61
60
 
62
61
  const ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS: {
63
- readonly [key in RoomShape]?: int;
62
+ readonly [Key in RoomShape]?: int;
64
63
  } = {
65
64
  [RoomShape.SHAPE_2x1]: 7, // 6
66
65
  [RoomShape.SHAPE_2x2]: 21, // 8
@@ -5,6 +5,7 @@ import { getRandomArrayElement } from "../../../../functions/array";
5
5
  import { spawnEffectWithSeed } from "../../../../functions/entitiesSpecific";
6
6
  import { removeCharactersBefore } from "../../../../functions/string";
7
7
  import { CustomStage } from "../../../../interfaces/private/CustomStage";
8
+ import { HasAllEnumKeys } from "../../../../types/HasAllEnumKeys";
8
9
  import { ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH } from "./constants";
9
10
 
10
11
  type ShadowAnimation = "1x1" | "1x2" | "2x1" | "2x2";
@@ -21,9 +22,7 @@ const SHADOW_EFFECT_VARIANT = EffectVariant.LADDER;
21
22
  const SHADOW_EFFECT_SUB_TYPE = LadderSubTypeCustom.CUSTOM_SHADOW;
22
23
 
23
24
  /** The animation comes from StageAPI. */
24
- const ROOM_SHAPE_TO_SHADOW_ANIMATION: {
25
- readonly [key in RoomShape]: ShadowAnimation;
26
- } = {
25
+ const ROOM_SHAPE_TO_SHADOW_ANIMATION = {
27
26
  [RoomShape.SHAPE_1x1]: "1x1", // 1
28
27
  [RoomShape.IH]: "1x1", // 2
29
28
  [RoomShape.IV]: "1x1", // 3
@@ -36,7 +35,7 @@ const ROOM_SHAPE_TO_SHADOW_ANIMATION: {
36
35
  [RoomShape.LTR]: "2x2", // 10
37
36
  [RoomShape.LBL]: "2x2", // 11
38
37
  [RoomShape.LBR]: "2x2", // 12
39
- } as const;
38
+ } as const satisfies HasAllEnumKeys<RoomShape, ShadowAnimation>;
40
39
 
41
40
  const FADED_BLACK = Color(0, 0, 0, 0.25);
42
41
 
@@ -8,15 +8,14 @@ import {
8
8
  getScreenTopCenterPos,
9
9
  } from "../../../../functions/ui";
10
10
  import { CustomStage } from "../../../../interfaces/private/CustomStage";
11
+ import { HasAllEnumKeys } from "../../../../types/HasAllEnumKeys";
11
12
 
12
13
  /** Corresponds to "resources/gfx/ui/ui_streak.anm2". */
13
- const UI_STREAK_ANIMATION_END_FRAMES: {
14
- readonly [key in UIStreakAnimation]: int;
15
- } = {
14
+ const UI_STREAK_ANIMATION_END_FRAMES = {
16
15
  [UIStreakAnimation.NONE]: 0,
17
16
  [UIStreakAnimation.TEXT]: 69,
18
17
  [UIStreakAnimation.TEXT_STAY]: 1,
19
- } as const;
18
+ } as const satisfies HasAllEnumKeys<UIStreakAnimation, int>;
20
19
 
21
20
  /** This must match the name of the shader in "shaders.xml". */
22
21
  const EMPTY_SHADER_NAME = "IsaacScript-RenderAboveHUD";
@@ -38,9 +38,7 @@ interface VersusScreenVars {
38
38
  };
39
39
  }
40
40
 
41
- const DEFAULT_CHARACTER = PlayerType.ISAAC;
42
41
  const DEFAULT_STAGE_ID = StageID.BASEMENT;
43
-
44
42
  const VERSUS_SCREEN_ANIMATION_NAME = "Scene";
45
43
 
46
44
  /** The layers range from 0 to 13. */
@@ -242,19 +240,13 @@ function getPlayerPNGPaths(): {
242
240
  } {
243
241
  const player = Isaac.GetPlayer();
244
242
  const character = player.GetPlayerType();
245
-
246
- let namePNGFileName = PLAYER_NAME_PNG_FILE_NAMES[character];
247
- if (namePNGFileName === undefined) {
248
- namePNGFileName = PLAYER_NAME_PNG_FILE_NAMES[DEFAULT_CHARACTER];
243
+ if (character === PlayerType.POSSESSOR) {
244
+ error("Failed to get the player PNG paths since they are a possessor.");
249
245
  }
250
246
 
247
+ const namePNGFileName = PLAYER_NAME_PNG_FILE_NAMES[character];
251
248
  const namePNGPath = `${PNG_PATH_PREFIX}/${namePNGFileName}`;
252
-
253
- let portraitFileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[character];
254
- if (namePNGFileName === undefined) {
255
- portraitFileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[DEFAULT_CHARACTER];
256
- }
257
-
249
+ const portraitFileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[character];
258
250
  const portraitPNGPath = `${PLAYER_PORTRAIT_PNG_PATH_PREFIX}/${portraitFileName}`;
259
251
 
260
252
  return { namePNGPath, portraitPNGPath };
@@ -65,24 +65,38 @@ export function getShootActions(): ReadonlySet<ButtonAction> {
65
65
  return SHOOTING_ACTIONS_SET;
66
66
  }
67
67
 
68
- /** Iterates over all inputs to determine if a particular button is pressed (i.e. held down). */
69
- export function isActionPressedOnAnyInput(buttonAction: ButtonAction): boolean {
68
+ /**
69
+ * Iterates over all inputs to determine if a particular button is pressed (i.e. held down).
70
+ *
71
+ * This function is variadic, meaning you can pass as many buttons as you want to check for. This
72
+ * function will return true if any of the buttons are pressed.
73
+ */
74
+ export function isActionPressedOnAnyInput(
75
+ ...buttonActions: ButtonAction[]
76
+ ): boolean {
70
77
  const controllerIndexes = getEnumValues(ControllerIndex);
71
78
  return controllerIndexes.some((controllerIndex) =>
72
- Input.IsActionPressed(buttonAction, controllerIndex),
79
+ buttonActions.some((buttonAction) =>
80
+ Input.IsActionPressed(buttonAction, controllerIndex),
81
+ ),
73
82
  );
74
83
  }
75
84
 
76
85
  /**
77
86
  * Iterates over all inputs to determine if a particular button is triggered (i.e. held down and
78
87
  * then released).
88
+ *
89
+ * This function is variadic, meaning you can pass as many buttons as you want to check for. This
90
+ * function will return true if any of the buttons are pressed.
79
91
  */
80
92
  export function isActionTriggeredOnAnyInput(
81
- buttonAction: ButtonAction,
93
+ ...buttonActions: ButtonAction[]
82
94
  ): boolean {
83
95
  const controllerIndexes = getEnumValues(ControllerIndex);
84
96
  return controllerIndexes.some((controllerIndex) =>
85
- Input.IsActionTriggered(buttonAction, controllerIndex),
97
+ buttonActions.some((buttonAction) =>
98
+ Input.IsActionTriggered(buttonAction, controllerIndex),
99
+ ),
86
100
  );
87
101
  }
88
102
 
@@ -1,18 +1,20 @@
1
1
  import { RoomShape } from "isaac-typescript-definitions";
2
2
  import { VectorZero } from "../core/constants";
3
3
 
4
- const TWO_BY_TWO_BOTTOM_RIGHT = Vector(25, 13);
4
+ const TWO_BY_TWO_BOTTOM_RIGHT: Readonly<Vector> = Vector(25, 13);
5
5
 
6
6
  /**
7
7
  * "Vector(0, 0)" corresponds to the top left tile of a room, not including the walls. (The top-left
8
8
  * wall would be at "Vector(-1, -1)".)
9
9
  */
10
+ // We need the vectors to be read-only, so we specify the type instead of using the `satisfies`
11
+ // operator.
10
12
  export const L_ROOM_SHAPE_TO_RECTANGLES: {
11
- readonly [key in RoomShape]?: readonly [
12
- verticalTopLeft: Vector,
13
- verticalBottomRight: Vector,
14
- horizontalTopLeft: Vector,
15
- horizontalBottomRight: Vector,
13
+ readonly [Key in RoomShape]?: readonly [
14
+ verticalTopLeft: Readonly<Vector>,
15
+ verticalBottomRight: Readonly<Vector>,
16
+ horizontalTopLeft: Readonly<Vector>,
17
+ horizontalBottomRight: Readonly<Vector>,
16
18
  ];
17
19
  } = {
18
20
  // 9
@@ -1,10 +1,9 @@
1
1
  import { BackdropType } from "isaac-typescript-definitions";
2
2
  import { RockAltType } from "../enums/RockAltType";
3
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
3
4
 
4
5
  /** Used by the `getRockAltType` function. */
5
- export const BACKDROP_TYPE_TO_ROCK_ALT_TYPE: {
6
- readonly [key in BackdropType]: RockAltType;
7
- } = {
6
+ export const BACKDROP_TYPE_TO_ROCK_ALT_TYPE = {
8
7
  [BackdropType.BASEMENT]: RockAltType.URN, // 1
9
8
  [BackdropType.CELLAR]: RockAltType.URN, // 2
10
9
  [BackdropType.BURNT_BASEMENT]: RockAltType.URN, // 3
@@ -65,4 +64,4 @@ export const BACKDROP_TYPE_TO_ROCK_ALT_TYPE: {
65
64
  [BackdropType.MINES_SHAFT]: RockAltType.MUSHROOM, // 58
66
65
  [BackdropType.ASHPIT_SHAFT]: RockAltType.MUSHROOM, // 59
67
66
  [BackdropType.DARK_CLOSET]: RockAltType.SKULL, // 60
68
- } as const;
67
+ } as const satisfies HasAllEnumKeys<BackdropType, RockAltType>;
@@ -1,11 +1,10 @@
1
1
  // cspell:disable
2
2
 
3
3
  import { BossID } from "isaac-typescript-definitions";
4
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
4
5
 
5
6
  /** Used when rendering the "versusscreen.anm2" sprite. */
6
- export const BOSS_NAME_PNG_FILE_NAMES: {
7
- readonly [key in BossID]: string;
8
- } = {
7
+ export const BOSS_NAME_PNG_FILE_NAMES = {
9
8
  [BossID.MONSTRO]: "bossname_20.0_monstro.png", // 1
10
9
  [BossID.LARRY_JR]: "bossname_19.0_larryjr.png", // 2
11
10
  [BossID.CHUB]: "bossname_28.0_chub.png", // 3
@@ -112,4 +111,4 @@ export const BOSS_NAME_PNG_FILE_NAMES: {
112
111
  [BossID.BEAST]: "bossname_dogma.png", // 100
113
112
  [BossID.HORNY_BOYS]: "bossname_hornyboys.png", // 101
114
113
  [BossID.CLUTCH]: "bossname_clutch.png", // 102
115
- } as const;
114
+ } as const satisfies HasAllEnumKeys<BossID, string>;
@@ -1,11 +1,10 @@
1
1
  // cspell:disable
2
2
 
3
3
  import { BossID } from "isaac-typescript-definitions";
4
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
4
5
 
5
6
  /** Used when rendering the "versusscreen.anm2" sprite. */
6
- export const BOSS_PORTRAIT_PNG_FILE_NAMES: {
7
- readonly [key in BossID]: string;
8
- } = {
7
+ export const BOSS_PORTRAIT_PNG_FILE_NAMES = {
9
8
  [BossID.MONSTRO]: "portrait_20.0_monstro.png", // 1
10
9
  [BossID.LARRY_JR]: "portrait_19.0_larryjr.png", // 2
11
10
  [BossID.CHUB]: "portrait_28.0_chub.png", // 3
@@ -115,4 +114,4 @@ export const BOSS_PORTRAIT_PNG_FILE_NAMES: {
115
114
  [BossID.BEAST]: "portrait_dogma.png", // 100
116
115
  [BossID.HORNY_BOYS]: "portrait_hornyboys.png", // 101
117
116
  [BossID.CLUTCH]: "portrait_clutch.png", // 102
118
- } as const;
117
+ } as const satisfies HasAllEnumKeys<BossID, string>;
@@ -1,9 +1,10 @@
1
1
  import { CardType } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  export const DEFAULT_CARD_DESCRIPTION = "Unknown";
4
5
 
5
6
  /** This is a temporary map due to missing features in the vanilla API. */
6
- export const CARD_DESCRIPTIONS: { readonly [key in CardType]: string } = {
7
+ export const CARD_DESCRIPTIONS = {
7
8
  [CardType.NULL]: DEFAULT_CARD_DESCRIPTION, // 0
8
9
  [CardType.FOOL]: "Where journey begins", // 1
9
10
  [CardType.MAGICIAN]: "May you never miss your goal", // 2
@@ -102,4 +103,4 @@ export const CARD_DESCRIPTIONS: { readonly [key in CardType]: string } = {
102
103
  [CardType.SOUL_FORGOTTEN]: "Skeletal protector", // 95
103
104
  [CardType.SOUL_BETHANY]: "Friends from beyond", // 96
104
105
  [CardType.SOUL_JACOB]: "Bound by blood", // 97
105
- } as const;
106
+ } as const satisfies HasAllEnumKeys<CardType, string>;
@@ -1,9 +1,10 @@
1
1
  import { CardType } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  export const DEFAULT_CARD_NAME = "Unknown";
4
5
 
5
6
  /** This is a temporary map due to missing features in the vanilla API. */
6
- export const CARD_NAMES: { readonly [key in CardType]: string } = {
7
+ export const CARD_NAMES = {
7
8
  [CardType.NULL]: DEFAULT_CARD_NAME,
8
9
  [CardType.FOOL]: "0 - The Fool",
9
10
  [CardType.MAGICIAN]: "I - The Magician",
@@ -102,4 +103,4 @@ export const CARD_NAMES: { readonly [key in CardType]: string } = {
102
103
  [CardType.SOUL_FORGOTTEN]: "Soul of the Forgotten",
103
104
  [CardType.SOUL_BETHANY]: "Soul of Bethany",
104
105
  [CardType.SOUL_JACOB]: "Soul of Jacob and Esau",
105
- } as const;
106
+ } as const satisfies HasAllEnumKeys<CardType, string>;
@@ -1,8 +1,9 @@
1
1
  import { Challenge } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  export const DEFAULT_CHALLENGE_NAME = "Unknown";
4
5
 
5
- export const CHALLENGE_NAMES: { readonly [key in Challenge]: string } = {
6
+ export const CHALLENGE_NAMES = {
6
7
  [Challenge.NULL]: DEFAULT_CHALLENGE_NAME, // 0
7
8
  [Challenge.PITCH_BLACK]: "Pitch Black", // 1
8
9
  [Challenge.HIGH_BROW]: "High Brow", // 2
@@ -49,4 +50,4 @@ export const CHALLENGE_NAMES: { readonly [key in Challenge]: string } = {
49
50
  [Challenge.CANTRIPPED]: "Cantripped!", // 43
50
51
  [Challenge.RED_REDEMPTION]: "Red Redemption", // 44
51
52
  [Challenge.DELETE_THIS]: "DELETE THIS", // 45
52
- } as const;
53
+ } as const satisfies HasAllEnumKeys<Challenge, string>;
@@ -1,9 +1,8 @@
1
1
  import { PlayerType } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  /** From: https://bindingofisaacrebirth.fandom.com/wiki/Characters#Regular_Characters */
4
- export const CHARACTER_DAMAGE_MULTIPLIERS: {
5
- readonly [key in PlayerType]: float;
6
- } = {
5
+ export const CHARACTER_DAMAGE_MULTIPLIERS = {
7
6
  [PlayerType.POSSESSOR]: 1.0, // -1
8
7
  [PlayerType.ISAAC]: 1.0, // 0
9
8
  [PlayerType.MAGDALENE]: 1.0, // 1
@@ -46,4 +45,4 @@ export const CHARACTER_DAMAGE_MULTIPLIERS: {
46
45
  [PlayerType.LAZARUS_2_B]: 1.5, // 38
47
46
  [PlayerType.JACOB_2_B]: 1.0, // 39
48
47
  [PlayerType.SOUL_B]: 1.0, // 40
49
- } as const;
48
+ } as const satisfies HasAllEnumKeys<PlayerType, float>;
@@ -1,6 +1,7 @@
1
1
  import { PlayerType } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
- export const CHARACTER_NAMES: { readonly [key in PlayerType]: string } = {
4
+ export const CHARACTER_NAMES = {
4
5
  [PlayerType.POSSESSOR]: "Possessor", // -1
5
6
  [PlayerType.ISAAC]: "Isaac", // 0
6
7
  [PlayerType.MAGDALENE]: "Magdalene", // 1
@@ -43,4 +44,4 @@ export const CHARACTER_NAMES: { readonly [key in PlayerType]: string } = {
43
44
  [PlayerType.LAZARUS_2_B]: "Dead Tainted Lazarus", // 38
44
45
  [PlayerType.JACOB_2_B]: "Dead Tainted Jacob", // 39
45
46
  [PlayerType.SOUL_B]: "Tainted Soul", // 40
46
- } as const;
47
+ } as const satisfies HasAllEnumKeys<PlayerType, string>;
@@ -1,8 +1,9 @@
1
1
  import { CoinSubType } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  export const DEFAULT_COIN_VALUE = 1;
4
5
 
5
- export const COIN_SUB_TYPE_TO_VALUE: { readonly [key in CoinSubType]: int } = {
6
+ export const COIN_SUB_TYPE_TO_VALUE = {
6
7
  [CoinSubType.NULL]: 0, // 0
7
8
  [CoinSubType.PENNY]: 1, // 1
8
9
  [CoinSubType.NICKEL]: 5, // 2
@@ -11,4 +12,4 @@ export const COIN_SUB_TYPE_TO_VALUE: { readonly [key in CoinSubType]: int } = {
11
12
  [CoinSubType.LUCKY_PENNY]: 1, // 5
12
13
  [CoinSubType.STICKY_NICKEL]: 5, // 6
13
14
  [CoinSubType.GOLDEN]: 1, // 7
14
- } as const;
15
+ } as const satisfies HasAllEnumKeys<CoinSubType, int>;
@@ -1,11 +1,10 @@
1
1
  import { Direction } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
- export const DIRECTION_NAMES: {
4
- readonly [key in Direction]: string | undefined;
5
- } = {
4
+ export const DIRECTION_NAMES = {
6
5
  [Direction.NO_DIRECTION]: undefined, // -1
7
6
  [Direction.LEFT]: "left", // 0
8
7
  [Direction.UP]: "up", // 1
9
8
  [Direction.RIGHT]: "right", // 2
10
9
  [Direction.DOWN]: "down", // 3
11
- } as const;
10
+ } as const satisfies HasAllEnumKeys<Direction, string | undefined>;
@@ -1,11 +1,10 @@
1
1
  import { Direction } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
- export const DIRECTION_TO_DEGREES: {
4
- readonly [key in Direction]: int;
5
- } = {
4
+ export const DIRECTION_TO_DEGREES = {
6
5
  [Direction.NO_DIRECTION]: 0, // -1
7
6
  [Direction.LEFT]: 180, // 0
8
7
  [Direction.UP]: 270, // 1
9
8
  [Direction.RIGHT]: 0, // 2
10
9
  [Direction.DOWN]: 90, // 3
11
- } as const;
10
+ } as const satisfies HasAllEnumKeys<Direction, int>;
@@ -1,8 +1,10 @@
1
1
  import { Direction } from "isaac-typescript-definitions";
2
2
  import { VectorZero } from "../core/constants";
3
3
 
4
+ // We need the vectors to be read-only, so we specify the type instead of using the `satisfies`
5
+ // operator.
4
6
  export const DIRECTION_TO_VECTOR: {
5
- readonly [key in Direction]: Readonly<Vector>;
7
+ readonly [Key in Direction]: Readonly<Vector>;
6
8
  } = {
7
9
  [Direction.NO_DIRECTION]: VectorZero, // -1
8
10
  [Direction.LEFT]: Vector(-1, 0), // 0
@@ -1,10 +1,9 @@
1
1
  import { DoorSlot, DoorSlotFlag } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  export const DEFAULT_DOOR_SLOT = DoorSlot.NO_DOOR_SLOT;
4
5
 
5
- export const DOOR_SLOT_FLAG_TO_DOOR_SLOT: {
6
- readonly [key in DoorSlotFlag]: DoorSlot;
7
- } = {
6
+ export const DOOR_SLOT_FLAG_TO_DOOR_SLOT = {
8
7
  [DoorSlotFlag.LEFT_0]: DoorSlot.LEFT_0, // 0
9
8
  [DoorSlotFlag.UP_0]: DoorSlot.UP_0, // 1
10
9
  [DoorSlotFlag.RIGHT_0]: DoorSlot.RIGHT_0, // 2
@@ -13,4 +12,4 @@ export const DOOR_SLOT_FLAG_TO_DOOR_SLOT: {
13
12
  [DoorSlotFlag.UP_1]: DoorSlot.UP_1, // 5
14
13
  [DoorSlotFlag.RIGHT_1]: DoorSlot.RIGHT_1, // 6
15
14
  [DoorSlotFlag.DOWN_1]: DoorSlot.DOWN_1, // 7
16
- } as const;
15
+ } as const satisfies HasAllEnumKeys<DoorSlotFlag, DoorSlot>;
@@ -1,14 +1,14 @@
1
1
  import { Direction, DoorSlot } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
- export const DOOR_SLOT_TO_DIRECTION: { readonly [key in DoorSlot]: Direction } =
4
- {
5
- [DoorSlot.NO_DOOR_SLOT]: Direction.NO_DIRECTION, // -1
6
- [DoorSlot.LEFT_0]: Direction.LEFT, // 0
7
- [DoorSlot.UP_0]: Direction.UP, // 1
8
- [DoorSlot.RIGHT_0]: Direction.RIGHT, // 2
9
- [DoorSlot.DOWN_0]: Direction.DOWN, // 3
10
- [DoorSlot.LEFT_1]: Direction.LEFT, // 4
11
- [DoorSlot.UP_1]: Direction.UP, // 5
12
- [DoorSlot.RIGHT_1]: Direction.RIGHT, // 6
13
- [DoorSlot.DOWN_1]: Direction.DOWN, // 7
14
- } as const;
4
+ export const DOOR_SLOT_TO_DIRECTION = {
5
+ [DoorSlot.NO_DOOR_SLOT]: Direction.NO_DIRECTION, // -1
6
+ [DoorSlot.LEFT_0]: Direction.LEFT, // 0
7
+ [DoorSlot.UP_0]: Direction.UP, // 1
8
+ [DoorSlot.RIGHT_0]: Direction.RIGHT, // 2
9
+ [DoorSlot.DOWN_0]: Direction.DOWN, // 3
10
+ [DoorSlot.LEFT_1]: Direction.LEFT, // 4
11
+ [DoorSlot.UP_1]: Direction.UP, // 5
12
+ [DoorSlot.RIGHT_1]: Direction.RIGHT, // 6
13
+ [DoorSlot.DOWN_1]: Direction.DOWN, // 7
14
+ } as const satisfies HasAllEnumKeys<DoorSlot, Direction>;
@@ -3,10 +3,9 @@ import {
3
3
  DoorSlotFlag,
4
4
  DoorSlotFlagZero,
5
5
  } from "isaac-typescript-definitions";
6
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
6
7
 
7
- export const DOOR_SLOT_TO_DOOR_SLOT_FLAG: {
8
- readonly [key in DoorSlot]: DoorSlotFlag;
9
- } = {
8
+ export const DOOR_SLOT_TO_DOOR_SLOT_FLAG = {
10
9
  [DoorSlot.NO_DOOR_SLOT]: DoorSlotFlagZero, // -1
11
10
  [DoorSlot.LEFT_0]: DoorSlotFlag.LEFT_0, // 0
12
11
  [DoorSlot.UP_0]: DoorSlotFlag.UP_0, // 1
@@ -16,4 +15,4 @@ export const DOOR_SLOT_TO_DOOR_SLOT_FLAG: {
16
15
  [DoorSlot.UP_1]: DoorSlotFlag.UP_1, // 5
17
16
  [DoorSlot.RIGHT_1]: DoorSlotFlag.RIGHT_1, // 6
18
17
  [DoorSlot.DOWN_1]: DoorSlotFlag.DOWN_1, // 7
19
- } as const;
18
+ } as const satisfies HasAllEnumKeys<DoorSlot, DoorSlotFlag>;
@@ -1,12 +1,14 @@
1
1
  import { CopyableIsaacAPIClassType } from "isaac-typescript-definitions";
2
2
  import { SerializationBrand } from "../enums/SerializationBrand";
3
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
3
4
 
4
- export const ISAAC_API_CLASS_TYPE_TO_BRAND: {
5
- readonly [key in CopyableIsaacAPIClassType]: SerializationBrand;
6
- } = {
5
+ export const ISAAC_API_CLASS_TYPE_TO_BRAND = {
7
6
  [CopyableIsaacAPIClassType.BIT_SET_128]: SerializationBrand.BIT_SET_128,
8
7
  [CopyableIsaacAPIClassType.COLOR]: SerializationBrand.COLOR,
9
8
  [CopyableIsaacAPIClassType.K_COLOR]: SerializationBrand.K_COLOR,
10
9
  [CopyableIsaacAPIClassType.RNG]: SerializationBrand.RNG,
11
10
  [CopyableIsaacAPIClassType.VECTOR]: SerializationBrand.VECTOR,
12
- } as const;
11
+ } as const satisfies HasAllEnumKeys<
12
+ CopyableIsaacAPIClassType,
13
+ SerializationBrand
14
+ >;
@@ -81,9 +81,9 @@ export interface IsaacAPIClassTypeFunctions<T, SerializedT> {
81
81
  }
82
82
 
83
83
  export const ISAAC_API_CLASS_TYPE_TO_FUNCTIONS: {
84
- readonly [key in CopyableIsaacAPIClassType]: IsaacAPIClassTypeFunctions<
85
- IsaacAPIClassTypeToType[key],
86
- IsaacAPIClassTypeToSerializedType[key]
84
+ readonly [Key in CopyableIsaacAPIClassType]: IsaacAPIClassTypeFunctions<
85
+ IsaacAPIClassTypeToType[Key],
86
+ IsaacAPIClassTypeToSerializedType[Key]
87
87
  >;
88
88
  } = {
89
89
  [CopyableIsaacAPIClassType.BIT_SET_128]: {
@@ -1,8 +1,7 @@
1
1
  import { LanguageAbbreviation } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
- export const LANGUAGE_NAMES: {
4
- readonly [key in LanguageAbbreviation]: string;
5
- } = {
4
+ export const LANGUAGE_NAMES = {
6
5
  [LanguageAbbreviation.ENGLISH]: "English",
7
6
  [LanguageAbbreviation.JAPANESE]: "Japanese",
8
7
  [LanguageAbbreviation.KOREAN]: "Korean",
@@ -10,4 +9,4 @@ export const LANGUAGE_NAMES: {
10
9
  [LanguageAbbreviation.RUSSIAN]: "Russian",
11
10
  [LanguageAbbreviation.GERMAN]: "German",
12
11
  [LanguageAbbreviation.SPANISH]: "Spanish",
13
- } as const;
12
+ } as const satisfies HasAllEnumKeys<LanguageAbbreviation, string>;
@@ -1,8 +1,7 @@
1
1
  import { DoorSlot } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
- export const OPPOSITE_DOOR_SLOTS: {
4
- readonly [key in DoorSlot]: DoorSlot | undefined;
5
- } = {
4
+ export const OPPOSITE_DOOR_SLOTS = {
6
5
  [DoorSlot.NO_DOOR_SLOT]: undefined, // -1
7
6
  [DoorSlot.LEFT_0]: DoorSlot.RIGHT_0, // 0
8
7
  [DoorSlot.UP_0]: DoorSlot.DOWN_0, // 1
@@ -12,4 +11,4 @@ export const OPPOSITE_DOOR_SLOTS: {
12
11
  [DoorSlot.UP_1]: DoorSlot.DOWN_1, // 5
13
12
  [DoorSlot.RIGHT_1]: DoorSlot.LEFT_1, // 6
14
13
  [DoorSlot.DOWN_1]: DoorSlot.UP_1, // 7
15
- } as const;
14
+ } as const satisfies HasAllEnumKeys<DoorSlot, DoorSlot | undefined>;
@@ -2,12 +2,11 @@ import {
2
2
  ItemConfigPillEffectClass,
3
3
  PillEffect,
4
4
  } from "isaac-typescript-definitions";
5
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
5
6
 
6
7
  export const DEFAULT_PILL_EFFECT_CLASS = ItemConfigPillEffectClass.MODDED;
7
8
 
8
- export const PILL_EFFECT_CLASSES: {
9
- readonly [key in PillEffect]: ItemConfigPillEffectClass;
10
- } = {
9
+ export const PILL_EFFECT_CLASSES = {
11
10
  [PillEffect.BAD_GAS]: ItemConfigPillEffectClass.MINOR,
12
11
  [PillEffect.BAD_TRIP]: ItemConfigPillEffectClass.MEDIUM,
13
12
  [PillEffect.BALLS_OF_STEEL]: ItemConfigPillEffectClass.MEDIUM,
@@ -60,4 +59,4 @@ export const PILL_EFFECT_CLASSES: {
60
59
  [PillEffect.SHOT_SPEED_UP]: ItemConfigPillEffectClass.MAJOR,
61
60
  [PillEffect.EXPERIMENTAL]: ItemConfigPillEffectClass.MAJOR,
62
61
  [PillEffect.EXPERIMENTAL]: ItemConfigPillEffectClass.MAJOR,
63
- } as const;
62
+ } as const satisfies HasAllEnumKeys<PillEffect, ItemConfigPillEffectClass>;
@@ -1,8 +1,9 @@
1
1
  import { PillEffect } from "isaac-typescript-definitions";
2
+ import { HasAllEnumKeys } from "../types/HasAllEnumKeys";
2
3
 
3
4
  export const DEFAULT_PILL_EFFECT_NAME = "Unknown";
4
5
 
5
- export const PILL_EFFECT_NAMES: { readonly [key in PillEffect]: string } = {
6
+ export const PILL_EFFECT_NAMES = {
6
7
  [PillEffect.BAD_GAS]: "Bad Gas",
7
8
  [PillEffect.BAD_TRIP]: "Bad Trip",
8
9
  [PillEffect.BALLS_OF_STEEL]: "Balls of Steel",
@@ -54,4 +55,4 @@ export const PILL_EFFECT_NAMES: { readonly [key in PillEffect]: string } = {
54
55
  [PillEffect.SHOT_SPEED_DOWN]: "Shot Speed Down",
55
56
  [PillEffect.SHOT_SPEED_UP]: "Shot Speed Up",
56
57
  [PillEffect.EXPERIMENTAL]: "Experimental Pill",
57
- } as const;
58
+ } as const satisfies HasAllEnumKeys<PillEffect, string>;