isaacscript-common 20.3.0 → 20.3.2

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 (90) hide show
  1. package/dist/index.d.ts +24 -17
  2. package/dist/isaacscript-common.lua +10253 -10004
  3. package/dist/src/classes/ModUpgradedBase.d.ts +1 -1
  4. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +3 -3
  5. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +1 -1
  6. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
  7. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.lua +3 -3
  8. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.lua +1 -1
  9. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/CustomHotkeys.lua +2 -2
  11. package/dist/src/classes/features/other/DeployJSONRoom.lua +1 -1
  12. package/dist/src/classes/features/other/ItemPoolDetection.d.ts.map +1 -1
  13. package/dist/src/classes/features/other/ModdedElementSets.lua +3 -3
  14. package/dist/src/classes/features/other/PersistentEntities.d.ts.map +1 -1
  15. package/dist/src/classes/features/other/PersistentEntities.lua +1 -1
  16. package/dist/src/classes/features/other/PickupIndexCreation.lua +1 -1
  17. package/dist/src/classes/features/other/SaveDataManager.d.ts +3 -2
  18. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
  19. package/dist/src/classes/features/other/customStages/streakText.d.ts.map +1 -1
  20. package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +0 -1
  21. package/dist/src/core/constants.d.ts +1 -1
  22. package/dist/src/core/constants.d.ts.map +1 -1
  23. package/dist/src/enums/ModCallbackCustom.d.ts +5 -1
  24. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  25. package/dist/src/functions/cards.lua +0 -2
  26. package/dist/src/functions/entities.lua +1 -1
  27. package/dist/src/functions/hex.d.ts +4 -3
  28. package/dist/src/functions/hex.d.ts.map +1 -1
  29. package/dist/src/functions/hex.lua +8 -0
  30. package/dist/src/functions/isaacAPIClass.d.ts +1 -1
  31. package/dist/src/functions/isaacAPIClass.d.ts.map +1 -1
  32. package/dist/src/functions/levelGrid.d.ts.map +1 -1
  33. package/dist/src/functions/levelGrid.lua +2 -2
  34. package/dist/src/functions/map.d.ts +2 -2
  35. package/dist/src/functions/map.lua +1 -1
  36. package/dist/src/functions/minimap.lua +1 -1
  37. package/dist/src/functions/table.d.ts +1 -1
  38. package/dist/src/functions/table.d.ts.map +1 -1
  39. package/dist/src/functions/utils.d.ts +5 -5
  40. package/dist/src/functions/utils.d.ts.map +1 -1
  41. package/dist/src/functions/utils.lua +9 -18
  42. package/dist/src/maps/characterNameToTypeMap.d.ts +1 -1
  43. package/dist/src/maps/characterNameToTypeMap.d.ts.map +1 -1
  44. package/dist/src/objects/roomShapeToDoorSlotCoordinates.d.ts +1 -1
  45. package/dist/src/objects/roomShapeToDoorSlotCoordinates.d.ts.map +1 -1
  46. package/dist/src/sets/bossSets.lua +5 -5
  47. package/dist/src/sets/entitiesWithArmorSet.d.ts +1 -1
  48. package/dist/src/sets/entitiesWithArmorSet.d.ts.map +1 -1
  49. package/package.json +2 -2
  50. package/src/classes/ModUpgradedBase.ts +1 -1
  51. package/src/classes/callbacks/PostTrinketBreak.ts +2 -2
  52. package/src/classes/features/callbackLogic/CustomGridEntities.ts +3 -3
  53. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +1 -1
  54. package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +4 -6
  55. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +1 -1
  56. package/src/classes/features/other/CustomHotkeys.ts +2 -8
  57. package/src/classes/features/other/DeployJSONRoom.ts +1 -1
  58. package/src/classes/features/other/FlyingDetection.ts +2 -2
  59. package/src/classes/features/other/ItemPoolDetection.ts +3 -5
  60. package/src/classes/features/other/ModdedElementSets.ts +4 -4
  61. package/src/classes/features/other/PersistentEntities.ts +1 -4
  62. package/src/classes/features/other/PickupIndexCreation.ts +1 -1
  63. package/src/classes/features/other/PonyDetection.ts +2 -2
  64. package/src/classes/features/other/SaveDataManager.ts +3 -2
  65. package/src/classes/features/other/customStages/backdrop.ts +2 -2
  66. package/src/classes/features/other/customStages/streakText.ts +6 -4
  67. package/src/classes/features/other/saveDataManager/glowingHourGlass.ts +2 -2
  68. package/src/core/constants.ts +7 -6
  69. package/src/enums/ModCallbackCustom.ts +5 -1
  70. package/src/functions/bitSet128.ts +1 -1
  71. package/src/functions/color.ts +1 -1
  72. package/src/functions/hex.ts +4 -2
  73. package/src/functions/input.ts +6 -6
  74. package/src/functions/isaacAPIClass.ts +1 -1
  75. package/src/functions/kColor.ts +1 -1
  76. package/src/functions/levelGrid.ts +3 -9
  77. package/src/functions/map.ts +2 -2
  78. package/src/functions/merge.ts +1 -1
  79. package/src/functions/minimap.ts +1 -1
  80. package/src/functions/rng.ts +1 -1
  81. package/src/functions/table.ts +1 -1
  82. package/src/functions/utils.ts +9 -15
  83. package/src/functions/vector.ts +1 -1
  84. package/src/maps/characterNameToTypeMap.ts +86 -85
  85. package/src/objects/roomShapeBounds.ts +2 -2
  86. package/src/objects/roomShapeLayoutSizes.ts +4 -4
  87. package/src/objects/roomShapeToDoorSlotCoordinates.ts +1 -1
  88. package/src/patchErrorFunctions.ts +2 -2
  89. package/src/sets/bossSets.ts +5 -5
  90. package/src/sets/entitiesWithArmorSet.ts +1 -1
@@ -9,15 +9,14 @@ import { CONSOLE_COMMANDS_SET } from "../sets/consoleCommandsSet";
9
9
  * - For example, `eRange(1, 3)` will return `[1, 2]`.
10
10
  * - For example, `eRange(2)` will return `[0, 1]`.
11
11
  *
12
- * @param start The number to start at.
13
- * @param end Optional. The number to end at. If not specified, then the start will be 0 and the
12
+ * @param start The integer to start at.
13
+ * @param end Optional. The integer to end at. If not specified, then the start will be 0 and the
14
14
  * first argument will be the end.
15
15
  * @param increment Optional. The increment to use. Default is 1.
16
16
  */
17
17
  export function eRange(start: int, end?: int, increment = 1): int[] {
18
18
  if (end === undefined) {
19
- end = start;
20
- start = 0;
19
+ return eRange(0, start);
21
20
  }
22
21
 
23
22
  const array: int[] = [];
@@ -52,23 +51,18 @@ export function getTraversalDescription(
52
51
  * - For example, `iRange(1, 3)` will return `[1, 2, 3]`.
53
52
  * - For example, `iRange(2)` will return `[0, 1, 2]`.
54
53
  *
55
- * @param start The number to start at.
56
- * @param end Optional. The number to end at. If not specified, then the start will be 0 and the
54
+ * @param start The integer to start at.
55
+ * @param end Optional. The integer to end at. If not specified, then the start will be 0 and the
57
56
  * first argument will be the end.
58
57
  * @param increment Optional. The increment to use. Default is 1.
59
58
  */
60
59
  export function iRange(start: int, end?: int, increment = 1): int[] {
61
60
  if (end === undefined) {
62
- end = start;
63
- start = 0;
61
+ return iRange(0, start);
64
62
  }
65
63
 
66
- const array: int[] = [];
67
- for (let i = start; i <= end; i += increment) {
68
- array.push(i);
69
- }
70
-
71
- return array;
64
+ const exclusiveEnd = end + 1;
65
+ return eRange(start, exclusiveEnd, increment);
72
66
  }
73
67
 
74
68
  /**
@@ -226,7 +220,7 @@ export function twoDimensionalSort<T>(array1: T[], array2: T[]): -1 | 0 | 1 {
226
220
  *
227
221
  * This function is only meant to be used with interfaces (i.e. types that will not exist at
228
222
  * run-time). If you are generating an object that will contain all of the keys of an enum, use the
229
- * `newObjectWithEnumKeys` helper function instead.
223
+ * `satisfies` operator with the `HasAllEnumValues` helper type instead.
230
224
  */
231
225
  export function validateInterfaceMatchesEnum<
232
226
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -20,7 +20,7 @@ export type SerializedVector = LuaMap<string, unknown> & {
20
20
  };
21
21
 
22
22
  const OBJECT_NAME = "Vector";
23
- const KEYS = ["X", "Y"];
23
+ const KEYS = ["X", "Y"] as const;
24
24
 
25
25
  /** Helper function to copy a `Vector` Isaac API class. */
26
26
  export function copyVector(vector: Vector): Vector {
@@ -1,88 +1,89 @@
1
1
  import { PlayerType } from "isaac-typescript-definitions";
2
2
 
3
3
  /** Maps character names to the values of the `PlayerType` enum. */
4
- export const CHARACTER_NAME_TO_TYPE_MAP = new Map<string, PlayerType>([
5
- ["isaac", PlayerType.ISAAC], // 0
6
- ["magdalene", PlayerType.MAGDALENE], // 1
7
- ["maggy", PlayerType.MAGDALENE], // 1
8
- ["cain", PlayerType.CAIN], // 2
9
- ["judas", PlayerType.JUDAS], // 3
10
- ["blueBaby", PlayerType.BLUE_BABY], // 4
11
- ["bb", PlayerType.BLUE_BABY], // 4
12
- ["eve", PlayerType.EVE], // 5
13
- ["samson", PlayerType.SAMSON], // 6
14
- ["azazel", PlayerType.AZAZEL], // 7
15
- ["lazarus", PlayerType.LAZARUS], // 8
16
- // Needed so that "laz2" does not take precedence over "lazarus".
17
- ["laz", PlayerType.LAZARUS], // 8
18
- ["eden", PlayerType.EDEN], // 9
19
- ["theLost", PlayerType.LOST], // 10
20
- ["lost", PlayerType.LOST], // 10
21
- ["lazarus2", PlayerType.LAZARUS_2], // 11
22
- ["laz2", PlayerType.LAZARUS_2], // 11
23
- ["darkJudas", PlayerType.DARK_JUDAS], // 12
24
- ["dJudas", PlayerType.DARK_JUDAS], // 12
25
- ["blackJudas", PlayerType.DARK_JUDAS], // 12
26
- ["bJudas", PlayerType.DARK_JUDAS], // 12
27
- ["lilith", PlayerType.LILITH], // 13
28
- ["keeper", PlayerType.KEEPER], // 14
29
- ["apollyon", PlayerType.APOLLYON], // 15
30
- ["theForgotten", PlayerType.FORGOTTEN], // 16
31
- ["forgotten", PlayerType.FORGOTTEN], // 16
32
- ["theSoul", PlayerType.SOUL], // 17
33
- ["soul", PlayerType.SOUL], // 17
34
- ["bethany", PlayerType.BETHANY], // 18
35
- ["jacob", PlayerType.JACOB], // 19
36
- ["esau", PlayerType.ESAU], // 20
37
- ["taintedIsaac", PlayerType.ISAAC_B], // 21
38
- ["tIsaac", PlayerType.ISAAC_B], // 21
39
- ["taintedMagdalene", PlayerType.MAGDALENE_B], // 22
40
- ["tMagdalene", PlayerType.MAGDALENE_B], // 22
41
- ["taintedMaggy", PlayerType.MAGDALENE_B], // 22
42
- ["tMaggy", PlayerType.MAGDALENE_B], // 22
43
- ["taintedCain", PlayerType.CAIN_B], // 23
44
- ["tCain", PlayerType.CAIN_B], // 23
45
- ["taintedJudas", PlayerType.JUDAS_B], // 24
46
- ["tJudas", PlayerType.JUDAS_B], // 24
47
- ["taintedBlueBaby", PlayerType.BLUE_BABY_B], // 25
48
- ["tBlueBaby", PlayerType.BLUE_BABY_B], // 25
49
- ["tbb", PlayerType.BLUE_BABY_B], // 25
50
- ["taintedEve", PlayerType.EVE_B], // 26
51
- ["tEve", PlayerType.EVE_B], // 26
52
- ["taintedSamson", PlayerType.SAMSON_B], // 27
53
- ["tSamson", PlayerType.SAMSON_B], // 27
54
- ["taintedAzazel", PlayerType.AZAZEL_B], // 28
55
- ["tAzazel", PlayerType.AZAZEL_B], // 28
56
- ["taintedLazarus", PlayerType.LAZARUS_B], // 29
57
- ["tLazarus", PlayerType.LAZARUS_B], // 29
58
- ["taintedLaz", PlayerType.LAZARUS_B], // 29
59
- ["tLaz", PlayerType.LAZARUS_B], // 29
60
- ["taintedEden", PlayerType.EDEN_B], // 30
61
- ["tEden", PlayerType.EDEN_B], // 30
62
- ["taintedLost", PlayerType.LOST_B], // 31
63
- ["tLost", PlayerType.LOST_B], // 31
64
- ["taintedLilith", PlayerType.LILITH_B], // 32
65
- ["tLilith", PlayerType.LILITH_B], // 32
66
- ["taintedKeeper", PlayerType.KEEPER_B], // 33
67
- ["tKeeper", PlayerType.KEEPER_B], // 33
68
- ["taintedApollyon", PlayerType.APOLLYON_B], // 34
69
- ["tApollyon", PlayerType.APOLLYON_B], // 34
70
- ["taintedForgotten", PlayerType.FORGOTTEN_B], // 35
71
- ["tForgotten", PlayerType.FORGOTTEN_B], // 35
72
- ["taintedBethany", PlayerType.BETHANY_B], // 36
73
- ["tBethany", PlayerType.BETHANY_B], // 36
74
- ["taintedJacob", PlayerType.JACOB_B], // 37
75
- ["tJacob", PlayerType.JACOB_B], // 37
76
- ["taintedLazarusDead", PlayerType.LAZARUS_2_B], // 38
77
- ["tLazarusDead", PlayerType.LAZARUS_2_B], // 38
78
- ["taintedLazDead", PlayerType.LAZARUS_2_B], // 38
79
- ["tLazDead", PlayerType.LAZARUS_2_B], // 38
80
- ["deadTaintedLazarus", PlayerType.LAZARUS_2_B], // 38
81
- ["deadTLazarus", PlayerType.LAZARUS_2_B], // 38
82
- ["deadTaintedLaz", PlayerType.LAZARUS_2_B], // 38
83
- ["deadTLaz", PlayerType.LAZARUS_2_B], // 38
84
- ["taintedJacobGhost", PlayerType.JACOB_2_B], // 39
85
- ["tJacobGhost", PlayerType.JACOB_2_B], // 39
86
- ["taintedSoul", PlayerType.SOUL_B], // 40
87
- ["tSoul", PlayerType.SOUL_B], // 40
88
- ]);
4
+ export const CHARACTER_NAME_TO_TYPE_MAP: ReadonlyMap<string, PlayerType> =
5
+ new Map([
6
+ ["isaac", PlayerType.ISAAC], // 0
7
+ ["magdalene", PlayerType.MAGDALENE], // 1
8
+ ["maggy", PlayerType.MAGDALENE], // 1
9
+ ["cain", PlayerType.CAIN], // 2
10
+ ["judas", PlayerType.JUDAS], // 3
11
+ ["blueBaby", PlayerType.BLUE_BABY], // 4
12
+ ["bb", PlayerType.BLUE_BABY], // 4
13
+ ["eve", PlayerType.EVE], // 5
14
+ ["samson", PlayerType.SAMSON], // 6
15
+ ["azazel", PlayerType.AZAZEL], // 7
16
+ ["lazarus", PlayerType.LAZARUS], // 8
17
+ // Needed so that "laz2" does not take precedence over "lazarus".
18
+ ["laz", PlayerType.LAZARUS], // 8
19
+ ["eden", PlayerType.EDEN], // 9
20
+ ["theLost", PlayerType.LOST], // 10
21
+ ["lost", PlayerType.LOST], // 10
22
+ ["lazarus2", PlayerType.LAZARUS_2], // 11
23
+ ["laz2", PlayerType.LAZARUS_2], // 11
24
+ ["darkJudas", PlayerType.DARK_JUDAS], // 12
25
+ ["dJudas", PlayerType.DARK_JUDAS], // 12
26
+ ["blackJudas", PlayerType.DARK_JUDAS], // 12
27
+ ["bJudas", PlayerType.DARK_JUDAS], // 12
28
+ ["lilith", PlayerType.LILITH], // 13
29
+ ["keeper", PlayerType.KEEPER], // 14
30
+ ["apollyon", PlayerType.APOLLYON], // 15
31
+ ["theForgotten", PlayerType.FORGOTTEN], // 16
32
+ ["forgotten", PlayerType.FORGOTTEN], // 16
33
+ ["theSoul", PlayerType.SOUL], // 17
34
+ ["soul", PlayerType.SOUL], // 17
35
+ ["bethany", PlayerType.BETHANY], // 18
36
+ ["jacob", PlayerType.JACOB], // 19
37
+ ["esau", PlayerType.ESAU], // 20
38
+ ["taintedIsaac", PlayerType.ISAAC_B], // 21
39
+ ["tIsaac", PlayerType.ISAAC_B], // 21
40
+ ["taintedMagdalene", PlayerType.MAGDALENE_B], // 22
41
+ ["tMagdalene", PlayerType.MAGDALENE_B], // 22
42
+ ["taintedMaggy", PlayerType.MAGDALENE_B], // 22
43
+ ["tMaggy", PlayerType.MAGDALENE_B], // 22
44
+ ["taintedCain", PlayerType.CAIN_B], // 23
45
+ ["tCain", PlayerType.CAIN_B], // 23
46
+ ["taintedJudas", PlayerType.JUDAS_B], // 24
47
+ ["tJudas", PlayerType.JUDAS_B], // 24
48
+ ["taintedBlueBaby", PlayerType.BLUE_BABY_B], // 25
49
+ ["tBlueBaby", PlayerType.BLUE_BABY_B], // 25
50
+ ["tbb", PlayerType.BLUE_BABY_B], // 25
51
+ ["taintedEve", PlayerType.EVE_B], // 26
52
+ ["tEve", PlayerType.EVE_B], // 26
53
+ ["taintedSamson", PlayerType.SAMSON_B], // 27
54
+ ["tSamson", PlayerType.SAMSON_B], // 27
55
+ ["taintedAzazel", PlayerType.AZAZEL_B], // 28
56
+ ["tAzazel", PlayerType.AZAZEL_B], // 28
57
+ ["taintedLazarus", PlayerType.LAZARUS_B], // 29
58
+ ["tLazarus", PlayerType.LAZARUS_B], // 29
59
+ ["taintedLaz", PlayerType.LAZARUS_B], // 29
60
+ ["tLaz", PlayerType.LAZARUS_B], // 29
61
+ ["taintedEden", PlayerType.EDEN_B], // 30
62
+ ["tEden", PlayerType.EDEN_B], // 30
63
+ ["taintedLost", PlayerType.LOST_B], // 31
64
+ ["tLost", PlayerType.LOST_B], // 31
65
+ ["taintedLilith", PlayerType.LILITH_B], // 32
66
+ ["tLilith", PlayerType.LILITH_B], // 32
67
+ ["taintedKeeper", PlayerType.KEEPER_B], // 33
68
+ ["tKeeper", PlayerType.KEEPER_B], // 33
69
+ ["taintedApollyon", PlayerType.APOLLYON_B], // 34
70
+ ["tApollyon", PlayerType.APOLLYON_B], // 34
71
+ ["taintedForgotten", PlayerType.FORGOTTEN_B], // 35
72
+ ["tForgotten", PlayerType.FORGOTTEN_B], // 35
73
+ ["taintedBethany", PlayerType.BETHANY_B], // 36
74
+ ["tBethany", PlayerType.BETHANY_B], // 36
75
+ ["taintedJacob", PlayerType.JACOB_B], // 37
76
+ ["tJacob", PlayerType.JACOB_B], // 37
77
+ ["taintedLazarusDead", PlayerType.LAZARUS_2_B], // 38
78
+ ["tLazarusDead", PlayerType.LAZARUS_2_B], // 38
79
+ ["taintedLazDead", PlayerType.LAZARUS_2_B], // 38
80
+ ["tLazDead", PlayerType.LAZARUS_2_B], // 38
81
+ ["deadTaintedLazarus", PlayerType.LAZARUS_2_B], // 38
82
+ ["deadTLazarus", PlayerType.LAZARUS_2_B], // 38
83
+ ["deadTaintedLaz", PlayerType.LAZARUS_2_B], // 38
84
+ ["deadTLaz", PlayerType.LAZARUS_2_B], // 38
85
+ ["taintedJacobGhost", PlayerType.JACOB_2_B], // 39
86
+ ["tJacobGhost", PlayerType.JACOB_2_B], // 39
87
+ ["taintedSoul", PlayerType.SOUL_B], // 40
88
+ ["tSoul", PlayerType.SOUL_B], // 40
89
+ ]);
@@ -6,10 +6,10 @@ import {
6
6
  ONE_BY_ONE_CONTENTS_WIDTH,
7
7
  } from "./roomShapeVolumes";
8
8
 
9
- const TWO_BY_TWO_BOUNDS: [width: int, height: int] = [
9
+ const TWO_BY_TWO_BOUNDS: readonly [width: int, height: int] = [
10
10
  ONE_BY_ONE_CONTENTS_WIDTH * 2,
11
11
  ONE_BY_ONE_CONTENTS_HEIGHT * 2,
12
- ];
12
+ ] as const;
13
13
 
14
14
  /**
15
15
  * The size of a room shape's contents. This does not include the tiles that the walls are on. L
@@ -7,19 +7,19 @@ import {
7
7
  const ONE_BY_ONE_LAYOUT_SIZE: readonly [width: int, height: int] = [
8
8
  ONE_BY_ONE_CONTENTS_WIDTH,
9
9
  ONE_BY_ONE_CONTENTS_HEIGHT,
10
- ];
10
+ ] as const;
11
11
  const TWO_BY_ONE_VERTICAL_LAYOUT_SIZE: readonly [width: int, height: int] = [
12
12
  ONE_BY_ONE_CONTENTS_WIDTH,
13
13
  ONE_BY_ONE_CONTENTS_HEIGHT * 2,
14
- ];
14
+ ] as const;
15
15
  const TWO_BY_ONE_HORIZONTAL_LAYOUT_SIZE: readonly [width: int, height: int] = [
16
16
  ONE_BY_ONE_CONTENTS_WIDTH * 2,
17
17
  ONE_BY_ONE_CONTENTS_HEIGHT,
18
- ];
18
+ ] as const;
19
19
  const TWO_BY_TWO_LAYOUT_SIZE: readonly [width: int, height: int] = [
20
20
  ONE_BY_ONE_CONTENTS_WIDTH * 2,
21
21
  ONE_BY_ONE_CONTENTS_HEIGHT * 2,
22
- ];
22
+ ] as const;
23
23
 
24
24
  /**
25
25
  * The dimensions of a room shape's layout. This is NOT the size of the room's actual contents! For
@@ -8,7 +8,7 @@ import { DoorSlot, RoomShape } from "isaac-typescript-definitions";
8
8
  // We need the maps to be read-only, so we specify the type instead of using the `satisfies`
9
9
  // operator.
10
10
  export const ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES: {
11
- readonly [Key in RoomShape]: ReadonlyMap<DoorSlot, [x: int, y: int]>;
11
+ readonly [Key in RoomShape]: ReadonlyMap<DoorSlot, readonly [x: int, y: int]>;
12
12
  } = {
13
13
  // 1
14
14
  [RoomShape.SHAPE_1x1]: new Map([
@@ -11,14 +11,14 @@ const LINE_SEPARATOR = "\n";
11
11
  * These must be listed in order from how they appear in the traceback from top to bottom, or they
12
12
  * won't be properly removed.
13
13
  */
14
- const USELESS_TRACEBACK_MESSAGES: readonly string[] = [
14
+ const USELESS_TRACEBACK_MESSAGES = [
15
15
  // The second line of the traceback will always be the "getTraceback" function.
16
16
  "in upvalue 'getTraceback'",
17
17
  "in function 'sandbox.GetTraceback'",
18
18
 
19
19
  // The third line of the traceback will always be a line within the "errorWithTraceback" function.
20
20
  "in function 'error'",
21
- ];
21
+ ] as const;
22
22
 
23
23
  let vanillaError: ErrorFunction | undefined;
24
24
 
@@ -3,7 +3,7 @@ import {
3
3
  ChubVariant,
4
4
  DaddyLongLegsVariant,
5
5
  DingleVariant,
6
- DukeVariant,
6
+ DukeOfFliesVariant,
7
7
  EntityType,
8
8
  FallenVariant,
9
9
  FistulaVariant,
@@ -44,7 +44,7 @@ const BASEMENT_BOSSES_SET: ReadonlySet<string> = new Set([
44
44
  `${EntityType.LARRY_JR}.${LarryJrVariant.LARRY_JR}`, // 19.0
45
45
  `${EntityType.MONSTRO}.0`, // 20.0
46
46
  `${EntityType.FAMINE}.0`, // 63.0
47
- `${EntityType.DUKE}.${DukeVariant.DUKE_OF_FLIES}`, // 67.0
47
+ `${EntityType.DUKE_OF_FLIES}.${DukeOfFliesVariant.DUKE_OF_FLIES}`, // 67.0
48
48
  `${EntityType.GEMINI}.${GeminiVariant.GEMINI}`, // 79.0
49
49
  `${EntityType.GEMINI}.${GeminiVariant.STEVEN}`, // 79.1
50
50
  `${EntityType.FALLEN}.${FallenVariant.FALLEN}`, // 81.0
@@ -61,7 +61,7 @@ const BASEMENT_BOSSES_SET: ReadonlySet<string> = new Set([
61
61
  const CELLAR_BOSSES_SET: ReadonlySet<string> = new Set([
62
62
  `${EntityType.PIN}.${PinVariant.PIN}`, // 62.0
63
63
  `${EntityType.FAMINE}.0`, // 63.0
64
- `${EntityType.DUKE}.${DukeVariant.DUKE_OF_FLIES}`, // 67.0
64
+ `${EntityType.DUKE_OF_FLIES}.${DukeOfFliesVariant.DUKE_OF_FLIES}`, // 67.0
65
65
  `${EntityType.GEMINI}.${GeminiVariant.BLIGHTED_OVUM}`, // 79.2
66
66
  `${EntityType.FALLEN}.${FallenVariant.FALLEN}`, // 81.0
67
67
  `${EntityType.HEADLESS_HORSEMAN}.0`, // 82.0
@@ -77,7 +77,7 @@ const BURNING_BASEMENT_BOSSES_SET: ReadonlySet<string> = new Set([
77
77
  `${EntityType.LARRY_JR}.${LarryJrVariant.LARRY_JR}`, // 19.0
78
78
  `${EntityType.MONSTRO}.0`, // 20.0
79
79
  `${EntityType.FAMINE}.0`, // 63.0
80
- `${EntityType.DUKE}.${DukeVariant.DUKE_OF_FLIES}`, // 67.0
80
+ `${EntityType.DUKE_OF_FLIES}.${DukeOfFliesVariant.DUKE_OF_FLIES}`, // 67.0
81
81
  `${EntityType.GEMINI}.${GeminiVariant.GEMINI}`, // 79.0
82
82
  `${EntityType.GEMINI}.${GeminiVariant.STEVEN}`, // 79.1
83
83
  `${EntityType.FALLEN}.${FallenVariant.FALLEN}`, // 81.0
@@ -153,7 +153,7 @@ const CATACOMBS_BOSSES_SET: ReadonlySet<string> = new Set([
153
153
  `${EntityType.CHUB}.${ChubVariant.CARRION_QUEEN}`, // 28.2
154
154
  `${EntityType.PIN}.${PinVariant.FRAIL}`, // 62.2
155
155
  `${EntityType.PESTILENCE}.0`, // 64.0
156
- `${EntityType.DUKE}.${DukeVariant.THE_HUSK}`, // 67.1
156
+ `${EntityType.DUKE_OF_FLIES}.${DukeOfFliesVariant.THE_HUSK}`, // 67.1
157
157
  `${EntityType.PEEP}.${PeepVariant.PEEP}`, // 68.0
158
158
  `${EntityType.FALLEN}.${FallenVariant.FALLEN}`, // 81.0
159
159
  `${EntityType.HEADLESS_HORSEMAN}.0`, // 82.0
@@ -33,7 +33,7 @@ import {
33
33
  *
34
34
  * We use strings instead of a type + variant tuple so that we can have O(1) lookups.
35
35
  */
36
- export const ENTITIES_WITH_ARMOR_SET = new Set([
36
+ export const ENTITIES_WITH_ARMOR_SET: ReadonlySet<string> = new Set([
37
37
  `${EntityType.POOTER}.${PooterVariant.TAINTED_POOTER}`, // 14.2
38
38
  `${EntityType.HIVE}.${HiveVariant.TAINTED_MULLIGAN}`, // 22.3
39
39
  `${EntityType.BOOM_FLY}.${BoomFlyVariant.TAINTED_BOOM_FLY}`, // 25.6