isaacscript-common 83.0.0 → 83.1.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.
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Derived from "stages.xml". Note that unlike "stages.xml":
3
+ *
4
+ * - `StageID.BLUE_WOMB` (13) is specified with a name of "Blue Womb" instead of "???".
5
+ * - `StageID.StageID.BACKWARDS` (36) is specified with a name of "The Ascent" instead of "???".
6
+ */
7
+ export declare const STAGE_ID_NAMES: {
8
+ readonly 0: "Special Rooms";
9
+ readonly 1: "Basement";
10
+ readonly 2: "Cellar";
11
+ readonly 3: "Burning Basement";
12
+ readonly 4: "Caves";
13
+ readonly 5: "Catacombs";
14
+ readonly 6: "Flooded Caves";
15
+ readonly 7: "Depths";
16
+ readonly 8: "Necropolis";
17
+ readonly 9: "Dank Depths";
18
+ readonly 10: "Womb";
19
+ readonly 11: "Utero";
20
+ readonly 12: "Scarred Womb";
21
+ readonly 13: "Blue Womb";
22
+ readonly 14: "Sheol";
23
+ readonly 15: "Cathedral";
24
+ readonly 16: "Dark Room";
25
+ readonly 17: "Chest";
26
+ readonly 24: "The Shop";
27
+ readonly 25: "Ultra Greed";
28
+ readonly 26: "The Void";
29
+ readonly 27: "Downpour";
30
+ readonly 28: "Dross";
31
+ readonly 29: "Mines";
32
+ readonly 30: "Ashpit";
33
+ readonly 31: "Mausoleum";
34
+ readonly 32: "Gehenna";
35
+ readonly 33: "Corpse";
36
+ readonly 34: "Mortis";
37
+ readonly 35: "Home";
38
+ readonly 36: "The Ascent";
39
+ };
40
+ //# sourceMappingURL=stageIDNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stageIDNames.d.ts","sourceRoot":"","sources":["../../src/objects/stageIDNames.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCiB,CAAC"}
@@ -0,0 +1,41 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
4
+ --- Derived from "stages.xml". Note that unlike "stages.xml":
5
+ --
6
+ -- - `StageID.BLUE_WOMB` (13) is specified with a name of "Blue Womb" instead of "???".
7
+ -- - `StageID.StageID.BACKWARDS` (36) is specified with a name of "The Ascent" instead of "???".
8
+ ____exports.STAGE_ID_NAMES = {
9
+ [StageID.SPECIAL_ROOMS] = "Special Rooms",
10
+ [StageID.BASEMENT] = "Basement",
11
+ [StageID.CELLAR] = "Cellar",
12
+ [StageID.BURNING_BASEMENT] = "Burning Basement",
13
+ [StageID.CAVES] = "Caves",
14
+ [StageID.CATACOMBS] = "Catacombs",
15
+ [StageID.FLOODED_CAVES] = "Flooded Caves",
16
+ [StageID.DEPTHS] = "Depths",
17
+ [StageID.NECROPOLIS] = "Necropolis",
18
+ [StageID.DANK_DEPTHS] = "Dank Depths",
19
+ [StageID.WOMB] = "Womb",
20
+ [StageID.UTERO] = "Utero",
21
+ [StageID.SCARRED_WOMB] = "Scarred Womb",
22
+ [StageID.BLUE_WOMB] = "Blue Womb",
23
+ [StageID.SHEOL] = "Sheol",
24
+ [StageID.CATHEDRAL] = "Cathedral",
25
+ [StageID.DARK_ROOM] = "Dark Room",
26
+ [StageID.CHEST] = "Chest",
27
+ [StageID.SHOP] = "The Shop",
28
+ [StageID.ULTRA_GREED] = "Ultra Greed",
29
+ [StageID.VOID] = "The Void",
30
+ [StageID.DOWNPOUR] = "Downpour",
31
+ [StageID.DROSS] = "Dross",
32
+ [StageID.MINES] = "Mines",
33
+ [StageID.ASHPIT] = "Ashpit",
34
+ [StageID.MAUSOLEUM] = "Mausoleum",
35
+ [StageID.GEHENNA] = "Gehenna",
36
+ [StageID.CORPSE] = "Corpse",
37
+ [StageID.MORTIS] = "Mortis",
38
+ [StageID.HOME] = "Home",
39
+ [StageID.BACKWARDS] = "The Ascent"
40
+ }
41
+ return ____exports
@@ -1,4 +1,4 @@
1
- import { StageID } from "isaac-typescript-definitions";
1
+ import { LevelStage, StageID, StageType } from "isaac-typescript-definitions";
2
2
  export declare const STAGE_TO_STAGE_ID: {
3
3
  readonly 1: {
4
4
  readonly 0: StageID.BASEMENT;
@@ -105,4 +105,5 @@ export declare const STAGE_TO_STAGE_ID: {
105
105
  readonly 5: StageID.HOME;
106
106
  };
107
107
  };
108
+ export declare const STAGE_TO_STAGE_ID_GREED_MODE: ReadonlyMap<LevelStage, Record<StageType, StageID>>;
108
109
  //# sourceMappingURL=stageToStageID.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stageToStageID.d.ts","sourceRoot":"","sources":["../../src/objects/stageToStageID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAa,MAAM,8BAA8B,CAAC;AAmF9E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAckB,CAAC"}
1
+ {"version":3,"file":"stageToStageID.d.ts","sourceRoot":"","sources":["../../src/objects/stageToStageID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAoF9E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcqC,CAAC;AAoBpE,eAAO,MAAM,4BAA4B,qDAWvC,CAAC"}
@@ -1,8 +1,12 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__New = ____lualib.__TS__New
1
3
  local ____exports = {}
2
4
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
5
  local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
4
6
  local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
5
7
  local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
8
+ local ____ReadonlyMap = require("types.ReadonlyMap")
9
+ local ReadonlyMap = ____ReadonlyMap.ReadonlyMap
6
10
  local BASEMENT_TO_STAGE_ID = {
7
11
  [StageType.ORIGINAL] = StageID.BASEMENT,
8
12
  [StageType.WRATH_OF_THE_LAMB] = StageID.CELLAR,
@@ -90,4 +94,29 @@ ____exports.STAGE_TO_STAGE_ID = {
90
94
  [LevelStage.VOID] = VOID_TO_STAGE_ID,
91
95
  [LevelStage.HOME] = HOME_TO_STAGE_ID
92
96
  }
97
+ local SHOP_TO_STAGE_ID = {
98
+ [StageType.ORIGINAL] = StageID.SHOP,
99
+ [StageType.WRATH_OF_THE_LAMB] = StageID.SHOP,
100
+ [StageType.AFTERBIRTH] = StageID.SHOP,
101
+ [StageType.GREED_MODE] = StageID.SHOP,
102
+ [StageType.REPENTANCE] = StageID.SHOP,
103
+ [StageType.REPENTANCE_B] = StageID.SHOP
104
+ }
105
+ local ULTRA_GREED_TO_STAGE_ID = {
106
+ [StageType.ORIGINAL] = StageID.ULTRA_GREED,
107
+ [StageType.WRATH_OF_THE_LAMB] = StageID.ULTRA_GREED,
108
+ [StageType.AFTERBIRTH] = StageID.ULTRA_GREED,
109
+ [StageType.GREED_MODE] = StageID.ULTRA_GREED,
110
+ [StageType.REPENTANCE] = StageID.ULTRA_GREED,
111
+ [StageType.REPENTANCE_B] = StageID.ULTRA_GREED
112
+ }
113
+ ____exports.STAGE_TO_STAGE_ID_GREED_MODE = __TS__New(ReadonlyMap, {
114
+ {LevelStage.BASEMENT_GREED_MODE, BASEMENT_TO_STAGE_ID},
115
+ {LevelStage.CAVES_GREED_MODE, CAVES_TO_STAGE_ID},
116
+ {LevelStage.DEPTHS_GREED_MODE, DEPTHS_TO_STAGE_ID},
117
+ {LevelStage.WOMB_GREED_MODE, WOMB_TO_STAGE_ID},
118
+ {LevelStage.SHEOL_GREED_MODE, SHEOL_CATHEDRAL_TO_STAGE_ID},
119
+ {LevelStage.SHOP_GREED_MODE, SHOP_TO_STAGE_ID},
120
+ {LevelStage.ULTRA_GREED_GREED_MODE, ULTRA_GREED_TO_STAGE_ID}
121
+ })
93
122
  return ____exports
@@ -18,12 +18,6 @@ export declare const VERSUS_SCREEN_BACKGROUND_COLORS: {
18
18
  readonly 15: Readonly<Color>;
19
19
  readonly 16: Readonly<Color>;
20
20
  readonly 17: Readonly<Color>;
21
- readonly 18: Readonly<Color>;
22
- readonly 19: Readonly<Color>;
23
- readonly 20: Readonly<Color>;
24
- readonly 21: Readonly<Color>;
25
- readonly 22: Readonly<Color>;
26
- readonly 23: Readonly<Color>;
27
21
  readonly 24: Readonly<Color>;
28
22
  readonly 25: Readonly<Color>;
29
23
  readonly 26: Readonly<Color>;
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreenBackgroundColors.d.ts","sourceRoot":"","sources":["../../src/objects/versusScreenBackgroundColors.ts"],"names":[],"mappings":"AAYA,4CAA4C;AAC5C,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCS,CAAC"}
1
+ {"version":3,"file":"versusScreenBackgroundColors.d.ts","sourceRoot":"","sources":["../../src/objects/versusScreenBackgroundColors.ts"],"names":[],"mappings":"AAYA,4CAA4C;AAC5C,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCS,CAAC"}
@@ -30,14 +30,8 @@ ____exports.VERSUS_SCREEN_BACKGROUND_COLORS = {
30
30
  [StageID.CATHEDRAL] = newReadonlyColor(nil, 6 / 255, 13 / 255, 17 / 255),
31
31
  [StageID.DARK_ROOM] = newReadonlyColor(nil, 9 / 255, 4 / 255, 3 / 255),
32
32
  [StageID.CHEST] = newReadonlyColor(nil, 15 / 255, 9 / 255, 6 / 255),
33
- [StageID.SPECIAL_ROOMS_GREED_MODE] = DEFAULT_COLOR,
34
- [StageID.BASEMENT_GREED_MODE] = BASEMENT_COLOR,
35
- [StageID.CAVES_GREED_MODE] = CAVES_COLOR,
36
- [StageID.DEPTHS_GREED_MODE] = DEPTHS_COLOR,
37
- [StageID.WOMB_GREED_MODE] = WOMB_COLOR,
38
- [StageID.SHEOL_GREED_MODE] = SHEOL_COLOR,
39
- [StageID.SHOP_GREED_MODE] = DEFAULT_COLOR,
40
- [StageID.ULTRA_GREED_GREED_MODE] = DEFAULT_COLOR,
33
+ [StageID.SHOP] = DEFAULT_COLOR,
34
+ [StageID.ULTRA_GREED] = DEFAULT_COLOR,
41
35
  [StageID.VOID] = newReadonlyColor(nil, 0, 0, 0),
42
36
  [StageID.DOWNPOUR] = newReadonlyColor(nil, 29 / 255, 30 / 255, 32 / 255),
43
37
  [StageID.DROSS] = newReadonlyColor(nil, 35 / 255, 35 / 255, 29 / 255),
@@ -18,12 +18,6 @@ export declare const VERSUS_SCREEN_DIRT_SPOT_COLORS: {
18
18
  readonly 15: Readonly<Color>;
19
19
  readonly 16: Readonly<Color>;
20
20
  readonly 17: Readonly<Color>;
21
- readonly 18: Readonly<Color>;
22
- readonly 19: Readonly<Color>;
23
- readonly 20: Readonly<Color>;
24
- readonly 21: Readonly<Color>;
25
- readonly 22: Readonly<Color>;
26
- readonly 23: Readonly<Color>;
27
21
  readonly 24: Readonly<Color>;
28
22
  readonly 25: Readonly<Color>;
29
23
  readonly 26: Readonly<Color>;
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreenDirtSpotColors.d.ts","sourceRoot":"","sources":["../../src/objects/versusScreenDirtSpotColors.ts"],"names":[],"mappings":"AAYA,4CAA4C;AAC5C,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCU,CAAC"}
1
+ {"version":3,"file":"versusScreenDirtSpotColors.d.ts","sourceRoot":"","sources":["../../src/objects/versusScreenDirtSpotColors.ts"],"names":[],"mappings":"AAYA,4CAA4C;AAC5C,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCU,CAAC"}
@@ -30,14 +30,8 @@ ____exports.VERSUS_SCREEN_DIRT_SPOT_COLORS = {
30
30
  [StageID.CATHEDRAL] = newReadonlyColor(nil, 44 / 255, 100 / 255, 111 / 255),
31
31
  [StageID.DARK_ROOM] = newReadonlyColor(nil, 80 / 255, 38 / 255, 20 / 255),
32
32
  [StageID.CHEST] = newReadonlyColor(nil, 175 / 255, 108 / 255, 72 / 255),
33
- [StageID.SPECIAL_ROOMS_GREED_MODE] = DEFAULT_COLOR,
34
- [StageID.BASEMENT_GREED_MODE] = BASEMENT_COLOR,
35
- [StageID.CAVES_GREED_MODE] = CAVES_COLOR,
36
- [StageID.DEPTHS_GREED_MODE] = DEPTHS_COLOR,
37
- [StageID.WOMB_GREED_MODE] = WOMB_COLOR,
38
- [StageID.SHEOL_GREED_MODE] = SHEOL_COLOR,
39
- [StageID.SHOP_GREED_MODE] = DEFAULT_COLOR,
40
- [StageID.ULTRA_GREED_GREED_MODE] = DEFAULT_COLOR,
33
+ [StageID.SHOP] = DEFAULT_COLOR,
34
+ [StageID.ULTRA_GREED] = DEFAULT_COLOR,
41
35
  [StageID.VOID] = newReadonlyColor(nil, 70 / 255, 5 / 255, 5 / 255),
42
36
  [StageID.DOWNPOUR] = newReadonlyColor(nil, 149 / 255, 157 / 255, 167 / 255),
43
37
  [StageID.DROSS] = newReadonlyColor(nil, 179 / 255, 179 / 255, 143 / 255),
@@ -458,8 +458,8 @@ ____exports.BOSS_ID_TO_STAGE_IDS = (function()
458
458
  partialBossIDsToStageIDs[bossID] = stageIDs
459
459
  end
460
460
  local bossIDsToStageIDs = partialBossIDsToStageIDs
461
- bossIDsToStageIDs[BossID.ULTRA_GREED]:add(StageID.ULTRA_GREED_GREED_MODE)
462
- bossIDsToStageIDs[BossID.ULTRA_GREEDIER]:add(StageID.ULTRA_GREED_GREED_MODE)
461
+ bossIDsToStageIDs[BossID.ULTRA_GREED]:add(StageID.ULTRA_GREED)
462
+ bossIDsToStageIDs[BossID.ULTRA_GREEDIER]:add(StageID.ULTRA_GREED)
463
463
  bossIDsToStageIDs[BossID.MAUSOLEUM_MOMS_HEART]:add(StageID.MAUSOLEUM)
464
464
  bossIDsToStageIDs[BossID.MAUSOLEUM_MOMS_HEART]:add(StageID.GEHENNA)
465
465
  return bossIDsToStageIDs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "83.0.0",
3
+ "version": "83.1.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -37,6 +37,6 @@
37
37
  "lint": "tsx --tsconfig ./scripts/tsconfig.json ./scripts/lint.mts"
38
38
  },
39
39
  "dependencies": {
40
- "isaac-typescript-definitions": "^39.1.1"
40
+ "isaac-typescript-definitions": "^40.0.0"
41
41
  }
42
42
  }
@@ -1,14 +1,17 @@
1
- import type { StageID } from "isaac-typescript-definitions";
2
1
  import {
3
2
  GameStateFlag,
4
3
  LevelStage,
5
4
  RoomType,
5
+ StageID,
6
6
  StageType,
7
7
  } from "isaac-typescript-definitions";
8
8
  import { game } from "../core/cachedClasses";
9
- import { LEVEL_NAMES } from "../objects/levelNames";
10
9
  import { ROOM_TYPE_SPECIAL_GOTO_PREFIXES } from "../objects/roomTypeSpecialGotoPrefixes";
11
- import { STAGE_TO_STAGE_ID } from "../objects/stageToStageID";
10
+ import { STAGE_ID_NAMES } from "../objects/stageIDNames";
11
+ import {
12
+ STAGE_TO_STAGE_ID,
13
+ STAGE_TO_STAGE_ID_GREED_MODE,
14
+ } from "../objects/stageToStageID";
12
15
  import { STAGE_TYPE_SUFFIXES } from "../objects/stageTypeSuffixes";
13
16
  import { log } from "./log";
14
17
  import { asLevelStage } from "./types";
@@ -138,8 +141,34 @@ export function getLevelName(
138
141
  stageType = level.GetStageType();
139
142
  }
140
143
 
141
- const stageNames = LEVEL_NAMES[stage];
142
- return stageNames[stageType];
144
+ const stageID = getStageID(stage, stageType);
145
+ const stageIDName = getStageIDName(stageID);
146
+
147
+ let suffix: string;
148
+ switch (stage) {
149
+ case LevelStage.BASEMENT_1:
150
+ case LevelStage.CAVES_1:
151
+ case LevelStage.DEPTHS_1:
152
+ case LevelStage.WOMB_1: {
153
+ suffix = " 1";
154
+ break;
155
+ }
156
+
157
+ case LevelStage.BASEMENT_2:
158
+ case LevelStage.CAVES_2:
159
+ case LevelStage.DEPTHS_2:
160
+ case LevelStage.WOMB_2: {
161
+ suffix = " 2";
162
+ break;
163
+ }
164
+
165
+ default: {
166
+ suffix = "";
167
+ break;
168
+ }
169
+ }
170
+
171
+ return stageIDName + suffix;
143
172
  }
144
173
 
145
174
  /** Alias for the `Level.GetStage` method. */
@@ -150,9 +179,13 @@ export function getStage(): LevelStage {
150
179
  }
151
180
 
152
181
  /**
153
- * Helper function to get the stage ID that corresponds to a particular floor. It does this by
154
- * manually converting `LevelStage` and `StageType` into `StageID`. This is useful because
155
- * `getRoomStageID` will not correctly return the `StageID` if the player is in a special room.
182
+ * Helper function to get the stage ID that corresponds to a particular stage and stage type.
183
+ *
184
+ * This is useful because `getRoomStageID` will not correctly return the `StageID` if the player is
185
+ * in a special room.
186
+ *
187
+ * This correctly handles the case of Greed Mode. In Greed Mode, if an undefined stage and stage
188
+ * type combination are passed, `StageID.SPECIAL_ROOMS` (0) will be returned.
156
189
  *
157
190
  * @param stage Optional. If not specified, the stage corresponding to the current floor will be
158
191
  * used.
@@ -170,10 +203,31 @@ export function getStageID(stage?: LevelStage, stageType?: StageType): StageID {
170
203
  stageType = level.GetStageType();
171
204
  }
172
205
 
206
+ if (game.IsGreedMode()) {
207
+ const stageTypeToStageID = STAGE_TO_STAGE_ID_GREED_MODE.get(stage);
208
+ if (stageTypeToStageID === undefined) {
209
+ return StageID.SPECIAL_ROOMS;
210
+ }
211
+
212
+ return stageTypeToStageID[stageType];
213
+ }
214
+
173
215
  const stageTypeToStageID = STAGE_TO_STAGE_ID[stage];
174
216
  return stageTypeToStageID[stageType];
175
217
  }
176
218
 
219
+ /**
220
+ * Helper function to get the English name corresponding to a stage ID. For example, "Caves".
221
+ *
222
+ * This is derived from the data in the "stages.xml" file.
223
+ *
224
+ * Note that unlike "stages.xml", Blue Womb is specified with a name of "Blue Womb" instead of
225
+ * "???".
226
+ */
227
+ export function getStageIDName(stageID: StageID): string {
228
+ return STAGE_ID_NAMES[stageID];
229
+ }
230
+
177
231
  /** Alias for the `Level.GetStageType` method. */
178
232
  export function getStageType(): StageType {
179
233
  const level = game.GetLevel();
@@ -0,0 +1,41 @@
1
+ import { StageID } from "isaac-typescript-definitions";
2
+
3
+ /**
4
+ * Derived from "stages.xml". Note that unlike "stages.xml":
5
+ *
6
+ * - `StageID.BLUE_WOMB` (13) is specified with a name of "Blue Womb" instead of "???".
7
+ * - `StageID.StageID.BACKWARDS` (36) is specified with a name of "The Ascent" instead of "???".
8
+ */
9
+ export const STAGE_ID_NAMES = {
10
+ [StageID.SPECIAL_ROOMS]: "Special Rooms", // 0
11
+ [StageID.BASEMENT]: "Basement", // 1
12
+ [StageID.CELLAR]: "Cellar", // 2
13
+ [StageID.BURNING_BASEMENT]: "Burning Basement", // 3
14
+ [StageID.CAVES]: "Caves", // 4
15
+ [StageID.CATACOMBS]: "Catacombs", // 5
16
+ [StageID.FLOODED_CAVES]: "Flooded Caves", // 6
17
+ [StageID.DEPTHS]: "Depths", // 7
18
+ [StageID.NECROPOLIS]: "Necropolis", // 8
19
+ [StageID.DANK_DEPTHS]: "Dank Depths", // 9
20
+ [StageID.WOMB]: "Womb", // 10
21
+ [StageID.UTERO]: "Utero", // 11
22
+ [StageID.SCARRED_WOMB]: "Scarred Womb", // 12
23
+ [StageID.BLUE_WOMB]: "Blue Womb", // 13
24
+ [StageID.SHEOL]: "Sheol", // 14
25
+ [StageID.CATHEDRAL]: "Cathedral", // 15
26
+ [StageID.DARK_ROOM]: "Dark Room", // 16
27
+ [StageID.CHEST]: "Chest", // 17
28
+ [StageID.SHOP]: "The Shop", // 24
29
+ [StageID.ULTRA_GREED]: "Ultra Greed", // 25
30
+ [StageID.VOID]: "The Void", // 26
31
+ [StageID.DOWNPOUR]: "Downpour", // 27
32
+ [StageID.DROSS]: "Dross", // 28
33
+ [StageID.MINES]: "Mines", // 29
34
+ [StageID.ASHPIT]: "Ashpit", // 30
35
+ [StageID.MAUSOLEUM]: "Mausoleum", // 31
36
+ [StageID.GEHENNA]: "Gehenna", // 32
37
+ [StageID.CORPSE]: "Corpse", // 33
38
+ [StageID.MORTIS]: "Mortis", // 34
39
+ [StageID.HOME]: "Home", // 35
40
+ [StageID.BACKWARDS]: "The Ascent", // 36
41
+ } as const satisfies Record<StageID, string>;
@@ -1,4 +1,5 @@
1
1
  import { LevelStage, StageID, StageType } from "isaac-typescript-definitions";
2
+ import { ReadonlyMap } from "../types/ReadonlyMap";
2
3
 
3
4
  const BASEMENT_TO_STAGE_ID = {
4
5
  [StageType.ORIGINAL]: StageID.BASEMENT, // 0
@@ -95,4 +96,35 @@ export const STAGE_TO_STAGE_ID = {
95
96
  [LevelStage.DARK_ROOM_CHEST]: DARK_ROOM_CHEST_TO_STAGE_ID, // 11
96
97
  [LevelStage.VOID]: VOID_TO_STAGE_ID, // 12
97
98
  [LevelStage.HOME]: HOME_TO_STAGE_ID, // 13
98
- } as const satisfies Record<LevelStage, unknown>;
99
+ } as const satisfies Record<LevelStage, Record<StageType, StageID>>;
100
+
101
+ const SHOP_TO_STAGE_ID = {
102
+ [StageType.ORIGINAL]: StageID.SHOP, // 0
103
+ [StageType.WRATH_OF_THE_LAMB]: StageID.SHOP, // 1
104
+ [StageType.AFTERBIRTH]: StageID.SHOP, // 2
105
+ [StageType.GREED_MODE]: StageID.SHOP, // 3
106
+ [StageType.REPENTANCE]: StageID.SHOP, // 4
107
+ [StageType.REPENTANCE_B]: StageID.SHOP, // 5
108
+ } as const satisfies Record<StageType, StageID>;
109
+
110
+ const ULTRA_GREED_TO_STAGE_ID = {
111
+ [StageType.ORIGINAL]: StageID.ULTRA_GREED, // 0
112
+ [StageType.WRATH_OF_THE_LAMB]: StageID.ULTRA_GREED, // 1
113
+ [StageType.AFTERBIRTH]: StageID.ULTRA_GREED, // 2
114
+ [StageType.GREED_MODE]: StageID.ULTRA_GREED, // 3
115
+ [StageType.REPENTANCE]: StageID.ULTRA_GREED, // 4
116
+ [StageType.REPENTANCE_B]: StageID.ULTRA_GREED, // 5
117
+ } as const satisfies Record<StageType, StageID>;
118
+
119
+ export const STAGE_TO_STAGE_ID_GREED_MODE = new ReadonlyMap<
120
+ LevelStage,
121
+ Record<StageType, StageID>
122
+ >([
123
+ [LevelStage.BASEMENT_GREED_MODE, BASEMENT_TO_STAGE_ID], // 1
124
+ [LevelStage.CAVES_GREED_MODE, CAVES_TO_STAGE_ID], // 2
125
+ [LevelStage.DEPTHS_GREED_MODE, DEPTHS_TO_STAGE_ID], // 3
126
+ [LevelStage.WOMB_GREED_MODE, WOMB_TO_STAGE_ID], // 4
127
+ [LevelStage.SHEOL_GREED_MODE, SHEOL_CATHEDRAL_TO_STAGE_ID], // 5
128
+ [LevelStage.SHOP_GREED_MODE, SHOP_TO_STAGE_ID], // 6
129
+ [LevelStage.ULTRA_GREED_GREED_MODE, ULTRA_GREED_TO_STAGE_ID], // 7
130
+ ]);
@@ -30,14 +30,8 @@ export const VERSUS_SCREEN_BACKGROUND_COLORS = {
30
30
  [StageID.CATHEDRAL]: newReadonlyColor(6 / 255, 13 / 255, 17 / 255), // 15
31
31
  [StageID.DARK_ROOM]: newReadonlyColor(9 / 255, 4 / 255, 3 / 255), // 16
32
32
  [StageID.CHEST]: newReadonlyColor(15 / 255, 9 / 255, 6 / 255), // 17
33
- [StageID.SPECIAL_ROOMS_GREED_MODE]: DEFAULT_COLOR, // 18
34
- [StageID.BASEMENT_GREED_MODE]: BASEMENT_COLOR, // 19
35
- [StageID.CAVES_GREED_MODE]: CAVES_COLOR, // 20
36
- [StageID.DEPTHS_GREED_MODE]: DEPTHS_COLOR, // 21
37
- [StageID.WOMB_GREED_MODE]: WOMB_COLOR, // 22
38
- [StageID.SHEOL_GREED_MODE]: SHEOL_COLOR, // 23
39
- [StageID.SHOP_GREED_MODE]: DEFAULT_COLOR, // 24
40
- [StageID.ULTRA_GREED_GREED_MODE]: DEFAULT_COLOR, // 25
33
+ [StageID.SHOP]: DEFAULT_COLOR, // 24
34
+ [StageID.ULTRA_GREED]: DEFAULT_COLOR, // 25
41
35
  [StageID.VOID]: newReadonlyColor(0, 0, 0), // 26
42
36
  [StageID.DOWNPOUR]: newReadonlyColor(29 / 255, 30 / 255, 32 / 255), // 27
43
37
  [StageID.DROSS]: newReadonlyColor(35 / 255, 35 / 255, 29 / 255), // 28
@@ -30,14 +30,8 @@ export const VERSUS_SCREEN_DIRT_SPOT_COLORS = {
30
30
  [StageID.CATHEDRAL]: newReadonlyColor(44 / 255, 100 / 255, 111 / 255), // 15
31
31
  [StageID.DARK_ROOM]: newReadonlyColor(80 / 255, 38 / 255, 20 / 255), // 16
32
32
  [StageID.CHEST]: newReadonlyColor(175 / 255, 108 / 255, 72 / 255), // 17
33
- [StageID.SPECIAL_ROOMS_GREED_MODE]: DEFAULT_COLOR, // 18
34
- [StageID.BASEMENT_GREED_MODE]: BASEMENT_COLOR, // 19
35
- [StageID.CAVES_GREED_MODE]: CAVES_COLOR, // 20
36
- [StageID.DEPTHS_GREED_MODE]: DEPTHS_COLOR, // 21
37
- [StageID.WOMB_GREED_MODE]: WOMB_COLOR, // 22
38
- [StageID.SHEOL_GREED_MODE]: SHEOL_COLOR, // 23
39
- [StageID.SHOP_GREED_MODE]: DEFAULT_COLOR, // 24
40
- [StageID.ULTRA_GREED_GREED_MODE]: DEFAULT_COLOR, // 25
33
+ [StageID.SHOP]: DEFAULT_COLOR, // 24
34
+ [StageID.ULTRA_GREED]: DEFAULT_COLOR, // 25
41
35
  [StageID.VOID]: newReadonlyColor(70 / 255, 5 / 255, 5 / 255), // 26
42
36
  [StageID.DOWNPOUR]: newReadonlyColor(149 / 255, 157 / 255, 167 / 255), // 27
43
37
  [StageID.DROSS]: newReadonlyColor(179 / 255, 179 / 255, 143 / 255), // 28
@@ -517,8 +517,8 @@ export const BOSS_ID_TO_STAGE_IDS = (() => {
517
517
  // - BossID.MAUSOLEUM_MOMS_HEART (90)
518
518
  // - BossID.RAGLICH (98)
519
519
 
520
- bossIDsToStageIDs[BossID.ULTRA_GREED].add(StageID.ULTRA_GREED_GREED_MODE); // 62
521
- bossIDsToStageIDs[BossID.ULTRA_GREEDIER].add(StageID.ULTRA_GREED_GREED_MODE); // 71
520
+ bossIDsToStageIDs[BossID.ULTRA_GREED].add(StageID.ULTRA_GREED); // 62
521
+ bossIDsToStageIDs[BossID.ULTRA_GREEDIER].add(StageID.ULTRA_GREED); // 71
522
522
  bossIDsToStageIDs[BossID.MAUSOLEUM_MOMS_HEART].add(StageID.MAUSOLEUM); // 90
523
523
  bossIDsToStageIDs[BossID.MAUSOLEUM_MOMS_HEART].add(StageID.GEHENNA); // 90
524
524
 
@@ -1,115 +0,0 @@
1
- /**
2
- * A mapping of stage and stage types to the corresponding English level name.
3
- *
4
- * This is useful because the `Level.GetName` method returns a localized version of the level name,
5
- * which will not display correctly on some fonts.
6
- *
7
- * Note that this contains "Blue Womb" instead of "???" for stage 9.
8
- */
9
- export declare const LEVEL_NAMES: {
10
- readonly 1: {
11
- readonly 0: "Basement 1";
12
- readonly 1: "Cellar 1";
13
- readonly 2: "Burning Basement 1";
14
- readonly 3: "Basement";
15
- readonly 4: "Downpour 1";
16
- readonly 5: "Dross 1";
17
- };
18
- readonly 2: {
19
- readonly 0: "Basement 2";
20
- readonly 1: "Cellar 2";
21
- readonly 2: "Burning Basement 2";
22
- readonly 3: "Basement";
23
- readonly 4: "Downpour 2";
24
- readonly 5: "Dross 2";
25
- };
26
- readonly 3: {
27
- readonly 0: "Caves 1";
28
- readonly 1: "Catacombs 1";
29
- readonly 2: "Flooded Caves 1";
30
- readonly 3: "Caves";
31
- readonly 4: "Mines 1";
32
- readonly 5: "Ashpit 1";
33
- };
34
- readonly 4: {
35
- readonly 0: "Caves 2";
36
- readonly 1: "Catacombs 2";
37
- readonly 2: "Flooded Caves 2";
38
- readonly 3: "Caves";
39
- readonly 4: "Mines 2";
40
- readonly 5: "Ashpit 2";
41
- };
42
- readonly 5: {
43
- readonly 0: "Depths 1";
44
- readonly 1: "Necropolis 1";
45
- readonly 2: "Dank Depths 1";
46
- readonly 3: "Depths";
47
- readonly 4: "Mausoleum 1";
48
- readonly 5: "Gehenna 1";
49
- };
50
- readonly 6: {
51
- readonly 0: "Depths 2";
52
- readonly 1: "Necropolis 2";
53
- readonly 2: "Dank Depths 2";
54
- readonly 3: "Depths";
55
- readonly 4: "Mausoleum 2";
56
- readonly 5: "Gehenna 2";
57
- };
58
- readonly 7: {
59
- readonly 0: "Womb 1";
60
- readonly 1: "Utero 1";
61
- readonly 2: "Scarred Womb 1";
62
- readonly 3: "Womb";
63
- readonly 4: "Corpse 1";
64
- readonly 5: "Mortis 1";
65
- };
66
- readonly 8: {
67
- readonly 0: "Womb 2";
68
- readonly 1: "Utero 2";
69
- readonly 2: "Scarred Womb 2";
70
- readonly 3: "Womb";
71
- readonly 4: "Corpse 2";
72
- readonly 5: "Mortis 2";
73
- };
74
- readonly 9: {
75
- readonly 0: "Blue Womb";
76
- readonly 1: "Blue Womb";
77
- readonly 2: "Blue Womb";
78
- readonly 3: "Blue Womb";
79
- readonly 4: "Blue Womb";
80
- readonly 5: "Blue Womb";
81
- };
82
- readonly 10: {
83
- readonly 0: "Sheol";
84
- readonly 1: "Cathedral";
85
- readonly 2: "Undefined";
86
- readonly 3: "Sheol";
87
- readonly 4: "Undefined";
88
- readonly 5: "Undefined";
89
- };
90
- readonly 11: {
91
- readonly 0: "Dark Room";
92
- readonly 1: "The Chest";
93
- readonly 2: "Undefined";
94
- readonly 3: "The Shop";
95
- readonly 4: "Undefined";
96
- readonly 5: "Undefined";
97
- };
98
- readonly 12: {
99
- readonly 0: "The Void";
100
- readonly 1: "The Void";
101
- readonly 2: "The Void";
102
- readonly 3: "The Void";
103
- readonly 4: "The Void";
104
- readonly 5: "The Void";
105
- };
106
- readonly 13: {
107
- readonly 0: "Home";
108
- readonly 1: "Home";
109
- readonly 2: "Home";
110
- readonly 3: "Home";
111
- readonly 4: "Home";
112
- readonly 5: "Home";
113
- };
114
- };
115
- //# sourceMappingURL=levelNames.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"levelNames.d.ts","sourceRoot":"","sources":["../../src/objects/levelNames.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkI0C,CAAC"}