isaacscript-common 17.4.3 → 17.6.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 +35 -8
  2. package/dist/isaacscript-common.lua +39 -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 +32 -7
  10. package/dist/src/functions/input.d.ts.map +1 -1
  11. package/dist/src/functions/input.lua +49 -8
  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 +51 -8
  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":"roomTypeGotoPrefixes.d.ts","sourceRoot":"","sources":["../../../src/objects/roomTypeGotoPrefixes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,eAAO,MAAM,uBAAuB,EAAE;IACpC,QAAQ,EAAE,GAAG,IAAI,QAAQ,GAAG,MAAM;CA+B1B,CAAC"}
1
+ {"version":3,"file":"roomTypeGotoPrefixes.d.ts","sourceRoot":"","sources":["../../../src/objects/roomTypeGotoPrefixes.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BiB,CAAC"}
@@ -1,5 +1,32 @@
1
- import { RoomType } from "isaac-typescript-definitions";
2
1
  export declare const ROOM_TYPE_NAMES: {
3
- readonly [key in RoomType]: string;
2
+ readonly 1: "default room";
3
+ readonly 2: "shop";
4
+ readonly 3: "I AM ERROR Room";
5
+ readonly 4: "Treasure Room";
6
+ readonly 5: "Boss Room";
7
+ readonly 6: "Miniboss Room";
8
+ readonly 7: "Secret Room";
9
+ readonly 8: "Super Secret Room";
10
+ readonly 9: "Arcade";
11
+ readonly 10: "Curse Room";
12
+ readonly 11: "Challenge Room";
13
+ readonly 12: "Library";
14
+ readonly 13: "Sacrifice Room";
15
+ readonly 14: "Devil Room";
16
+ readonly 15: "Angel Room";
17
+ readonly 16: "Crawl Space";
18
+ readonly 17: "Boss Rush";
19
+ readonly 18: "Clean Bedroom";
20
+ readonly 19: "Dirty Bedroom";
21
+ readonly 20: "Chest Room";
22
+ readonly 21: "Dice Room";
23
+ readonly 22: "Black Market";
24
+ readonly 23: "Greed Exit Room";
25
+ readonly 24: "Planetarium";
26
+ readonly 25: "Teleporter Room";
27
+ readonly 26: "Teleporter Exit Room";
28
+ readonly 27: "Secret Exit";
29
+ readonly 28: "Blue Room";
30
+ readonly 29: "Ultra Secret Room";
4
31
  };
5
32
  //# sourceMappingURL=roomTypeNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roomTypeNames.d.ts","sourceRoot":"","sources":["../../../src/objects/roomTypeNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,eAAO,MAAM,eAAe,EAAE;IAAE,QAAQ,EAAE,GAAG,IAAI,QAAQ,GAAG,MAAM;CA8BxD,CAAC"}
1
+ {"version":3,"file":"roomTypeNames.d.ts","sourceRoot":"","sources":["../../../src/objects/roomTypeNames.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8ByB,CAAC"}
@@ -1,5 +1,9 @@
1
- import { StageType } from "isaac-typescript-definitions";
2
1
  export declare const STAGE_TYPE_SUFFIXES: {
3
- readonly [key in StageType]: string;
2
+ readonly 0: "";
3
+ readonly 1: "a";
4
+ readonly 2: "b";
5
+ readonly 3: "";
6
+ readonly 4: "c";
7
+ readonly 5: "d";
4
8
  };
5
9
  //# sourceMappingURL=stageTypeSuffixes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stageTypeSuffixes.d.ts","sourceRoot":"","sources":["../../../src/objects/stageTypeSuffixes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,eAAO,MAAM,mBAAmB,EAAE;IAChC,QAAQ,EAAE,GAAG,IAAI,SAAS,GAAG,MAAM;CAQ3B,CAAC"}
1
+ {"version":3,"file":"stageTypeSuffixes.d.ts","sourceRoot":"","sources":["../../../src/objects/stageTypeSuffixes.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;CAOsB,CAAC"}
@@ -1,5 +1,9 @@
1
- import { StageType } from "isaac-typescript-definitions";
2
1
  export declare const STAGE_TYPE_TO_LETTER: {
3
- readonly [key in StageType]: string;
2
+ readonly 0: "";
3
+ readonly 1: "a";
4
+ readonly 2: "b";
5
+ readonly 3: "";
6
+ readonly 4: "c";
7
+ readonly 5: "d";
4
8
  };
5
9
  //# sourceMappingURL=stageTypeToLetter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stageTypeToLetter.d.ts","sourceRoot":"","sources":["../../../src/objects/stageTypeToLetter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,eAAO,MAAM,oBAAoB,EAAE;IAAE,QAAQ,EAAE,GAAG,IAAI,SAAS,GAAG,MAAM;CAY9D,CAAC"}
1
+ {"version":3,"file":"stageTypeToLetter.d.ts","sourceRoot":"","sources":["../../../src/objects/stageTypeToLetter.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;CAYqB,CAAC"}
@@ -1,5 +1,17 @@
1
- import { PlayerForm } from "isaac-typescript-definitions";
2
1
  export declare const TRANSFORMATION_NAMES: {
3
- readonly [key in PlayerForm]: string;
2
+ readonly 0: "Guppy";
3
+ readonly 1: "Beelzebub";
4
+ readonly 2: "Fun Guy";
5
+ readonly 3: "Seraphim";
6
+ readonly 4: "Bob";
7
+ readonly 5: "Spun";
8
+ readonly 6: "Yes Mother?";
9
+ readonly 7: "Conjoined";
10
+ readonly 8: "Leviathan";
11
+ readonly 9: "Oh Crap";
12
+ readonly 10: "Bookworm";
13
+ readonly 11: "Adult";
14
+ readonly 12: "Spider Baby";
15
+ readonly 13: "Stompy";
4
16
  };
5
17
  //# sourceMappingURL=transformationNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformationNames.d.ts","sourceRoot":"","sources":["../../../src/objects/transformationNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,eAAO,MAAM,oBAAoB,EAAE;IAAE,QAAQ,EAAE,GAAG,IAAI,UAAU,GAAG,MAAM;CAe/D,CAAC"}
1
+ {"version":3,"file":"transformationNames.d.ts","sourceRoot":"","sources":["../../../src/objects/transformationNames.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;CAesB,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_BACKGROUND_COLORS: {
4
- readonly [key in StageID]: Color;
4
+ readonly [Key in StageID]: Readonly<Color>;
5
5
  };
6
6
  //# sourceMappingURL=versusScreenBackgroundColors.d.ts.map
@@ -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.6.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,29 +65,72 @@ 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
+ * Helper function to check if a player is pressing a specific button (i.e. holding it down).
70
+ *
71
+ * This is a variadic version of `Input.IsActionPressed`, meaning that you can pass as many buttons
72
+ * as you want to check for. This function will return true if any of the buttons are pressed.
73
+ */
74
+ export function isActionPressed(
75
+ controllerIndex: ControllerIndex,
76
+ ...buttonActions: ButtonAction[]
77
+ ): boolean {
78
+ return buttonActions.some((buttonAction) =>
79
+ Input.IsActionPressed(buttonAction, controllerIndex),
80
+ );
81
+ }
82
+
83
+ /**
84
+ * Helper function to iterate over all inputs to determine if a specific button is pressed (i.e.
85
+ * being held down).
86
+ *
87
+ * This function is variadic, meaning you can pass as many buttons as you want to check for. This
88
+ * function will return true if any of the buttons are pressed.
89
+ */
90
+ export function isActionPressedOnAnyInput(
91
+ ...buttonActions: ButtonAction[]
92
+ ): boolean {
70
93
  const controllerIndexes = getEnumValues(ControllerIndex);
71
94
  return controllerIndexes.some((controllerIndex) =>
72
- Input.IsActionPressed(buttonAction, controllerIndex),
95
+ isActionPressed(controllerIndex, ...buttonActions),
73
96
  );
74
97
  }
75
98
 
76
99
  /**
77
- * Iterates over all inputs to determine if a particular button is triggered (i.e. held down and
78
- * then released).
100
+ * Helper function to check if a player is triggering a specific button (i.e. pressing and releasing
101
+ * it).
102
+ *
103
+ * This is a variadic version of `Input.IsActionTriggered`, meaning that you can pass as many
104
+ * buttons as you want to check for. This function will return true if any of the buttons are
105
+ * triggered.
106
+ */
107
+ export function isActionTriggered(
108
+ controllerIndex: ControllerIndex,
109
+ ...buttonActions: ButtonAction[]
110
+ ): boolean {
111
+ return buttonActions.some((buttonAction) =>
112
+ Input.IsActionTriggered(buttonAction, controllerIndex),
113
+ );
114
+ }
115
+
116
+ /**
117
+ * Iterates over all inputs to determine if a specific button is triggered (i.e. held down and then
118
+ * released).
119
+ *
120
+ * This function is variadic, meaning you can pass as many buttons as you want to check for. This
121
+ * function will return true if any of the buttons are pressed.
79
122
  */
80
123
  export function isActionTriggeredOnAnyInput(
81
- buttonAction: ButtonAction,
124
+ ...buttonActions: ButtonAction[]
82
125
  ): boolean {
83
126
  const controllerIndexes = getEnumValues(ControllerIndex);
84
127
  return controllerIndexes.some((controllerIndex) =>
85
- Input.IsActionTriggered(buttonAction, controllerIndex),
128
+ isActionTriggered(controllerIndex, ...buttonActions),
86
129
  );
87
130
  }
88
131
 
89
132
  /**
90
- * Helper function to see if a particular keyboard key is being pressed down by the player.
133
+ * Helper function to see if a specific keyboard key is being held down by the player.
91
134
  *
92
135
  * This function is variadic, meaning you can pass as many keyboard values as you want to check for.
93
136
  * This function will return true if any of the values are pressed.
@@ -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>;