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.
- package/dist/functions/stage.d.ts +17 -5
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +70 -23
- package/dist/index.rollup.d.ts +18 -4
- package/dist/isaacscript-common.lua +166 -179
- package/dist/objects/stageIDNames.d.ts +40 -0
- package/dist/objects/stageIDNames.d.ts.map +1 -0
- package/dist/objects/stageIDNames.lua +41 -0
- package/dist/objects/stageToStageID.d.ts +2 -1
- package/dist/objects/stageToStageID.d.ts.map +1 -1
- package/dist/objects/stageToStageID.lua +29 -0
- package/dist/objects/versusScreenBackgroundColors.d.ts +0 -6
- package/dist/objects/versusScreenBackgroundColors.d.ts.map +1 -1
- package/dist/objects/versusScreenBackgroundColors.lua +2 -8
- package/dist/objects/versusScreenDirtSpotColors.d.ts +0 -6
- package/dist/objects/versusScreenDirtSpotColors.d.ts.map +1 -1
- package/dist/objects/versusScreenDirtSpotColors.lua +2 -8
- package/dist/sets/bossSets.lua +2 -2
- package/package.json +2 -2
- package/src/functions/stage.ts +62 -8
- package/src/objects/stageIDNames.ts +41 -0
- package/src/objects/stageToStageID.ts +33 -1
- package/src/objects/versusScreenBackgroundColors.ts +2 -8
- package/src/objects/versusScreenDirtSpotColors.ts +2 -8
- package/src/sets/bossSets.ts +2 -2
- package/dist/objects/levelNames.d.ts +0 -115
- package/dist/objects/levelNames.d.ts.map +0 -1
- package/dist/objects/levelNames.lua +0 -117
- package/src/objects/levelNames.ts +0 -141
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LevelStage, RoomType, StageType } from "isaac-typescript-definitions";
|
|
1
|
+
import { LevelStage, RoomType, StageID, StageType } from "isaac-typescript-definitions";
|
|
3
2
|
/**
|
|
4
3
|
* Helper function that calculates what the stage type should be for the provided stage. This
|
|
5
4
|
* emulates what the game's internal code does.
|
|
@@ -42,9 +41,13 @@ export declare function getLevelName(stage?: LevelStage, stageType?: StageType):
|
|
|
42
41
|
/** Alias for the `Level.GetStage` method. */
|
|
43
42
|
export declare function getStage(): LevelStage;
|
|
44
43
|
/**
|
|
45
|
-
* Helper function to get the stage ID that corresponds to a particular
|
|
46
|
-
*
|
|
47
|
-
* `getRoomStageID` will not correctly return the `StageID` if the player is
|
|
44
|
+
* Helper function to get the stage ID that corresponds to a particular stage and stage type.
|
|
45
|
+
*
|
|
46
|
+
* This is useful because `getRoomStageID` will not correctly return the `StageID` if the player is
|
|
47
|
+
* in a special room.
|
|
48
|
+
*
|
|
49
|
+
* This correctly handles the case of Greed Mode. In Greed Mode, if an undefined stage and stage
|
|
50
|
+
* type combination are passed, `StageID.SPECIAL_ROOMS` (0) will be returned.
|
|
48
51
|
*
|
|
49
52
|
* @param stage Optional. If not specified, the stage corresponding to the current floor will be
|
|
50
53
|
* used.
|
|
@@ -52,6 +55,15 @@ export declare function getStage(): LevelStage;
|
|
|
52
55
|
* will be used.
|
|
53
56
|
*/
|
|
54
57
|
export declare function getStageID(stage?: LevelStage, stageType?: StageType): StageID;
|
|
58
|
+
/**
|
|
59
|
+
* Helper function to get the English name corresponding to a stage ID. For example, "Caves".
|
|
60
|
+
*
|
|
61
|
+
* This is derived from the data in the "stages.xml" file.
|
|
62
|
+
*
|
|
63
|
+
* Note that unlike "stages.xml", Blue Womb is specified with a name of "Blue Womb" instead of
|
|
64
|
+
* "???".
|
|
65
|
+
*/
|
|
66
|
+
export declare function getStageIDName(stageID: StageID): string;
|
|
55
67
|
/** Alias for the `Level.GetStageType` method. */
|
|
56
68
|
export declare function getStageType(): StageType;
|
|
57
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"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"}
|
package/dist/functions/stage.lua
CHANGED
|
@@ -5,15 +5,17 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
5
5
|
local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
|
|
6
6
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
7
7
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
8
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
8
9
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
9
10
|
local ____cachedClasses = require("core.cachedClasses")
|
|
10
11
|
local game = ____cachedClasses.game
|
|
11
|
-
local ____levelNames = require("objects.levelNames")
|
|
12
|
-
local LEVEL_NAMES = ____levelNames.LEVEL_NAMES
|
|
13
12
|
local ____roomTypeSpecialGotoPrefixes = require("objects.roomTypeSpecialGotoPrefixes")
|
|
14
13
|
local ROOM_TYPE_SPECIAL_GOTO_PREFIXES = ____roomTypeSpecialGotoPrefixes.ROOM_TYPE_SPECIAL_GOTO_PREFIXES
|
|
14
|
+
local ____stageIDNames = require("objects.stageIDNames")
|
|
15
|
+
local STAGE_ID_NAMES = ____stageIDNames.STAGE_ID_NAMES
|
|
15
16
|
local ____stageToStageID = require("objects.stageToStageID")
|
|
16
17
|
local STAGE_TO_STAGE_ID = ____stageToStageID.STAGE_TO_STAGE_ID
|
|
18
|
+
local STAGE_TO_STAGE_ID_GREED_MODE = ____stageToStageID.STAGE_TO_STAGE_ID_GREED_MODE
|
|
17
19
|
local ____stageTypeSuffixes = require("objects.stageTypeSuffixes")
|
|
18
20
|
local STAGE_TYPE_SUFFIXES = ____stageTypeSuffixes.STAGE_TYPE_SUFFIXES
|
|
19
21
|
local ____log = require("functions.log")
|
|
@@ -22,6 +24,45 @@ local ____types = require("functions.types")
|
|
|
22
24
|
local asLevelStage = ____types.asLevelStage
|
|
23
25
|
local ____utils = require("functions.utils")
|
|
24
26
|
local inRange = ____utils.inRange
|
|
27
|
+
--- Helper function to get the stage ID that corresponds to a particular stage and stage type.
|
|
28
|
+
--
|
|
29
|
+
-- This is useful because `getRoomStageID` will not correctly return the `StageID` if the player is
|
|
30
|
+
-- in a special room.
|
|
31
|
+
--
|
|
32
|
+
-- This correctly handles the case of Greed Mode. In Greed Mode, if an undefined stage and stage
|
|
33
|
+
-- type combination are passed, `StageID.SPECIAL_ROOMS` (0) will be returned.
|
|
34
|
+
--
|
|
35
|
+
-- @param stage Optional. If not specified, the stage corresponding to the current floor will be
|
|
36
|
+
-- used.
|
|
37
|
+
-- @param stageType Optional. If not specified, the stage type corresponding to the current floor
|
|
38
|
+
-- will be used.
|
|
39
|
+
function ____exports.getStageID(self, stage, stageType)
|
|
40
|
+
local level = game:GetLevel()
|
|
41
|
+
if stage == nil then
|
|
42
|
+
stage = level:GetStage()
|
|
43
|
+
end
|
|
44
|
+
if stageType == nil then
|
|
45
|
+
stageType = level:GetStageType()
|
|
46
|
+
end
|
|
47
|
+
if game:IsGreedMode() then
|
|
48
|
+
local stageTypeToStageID = STAGE_TO_STAGE_ID_GREED_MODE:get(stage)
|
|
49
|
+
if stageTypeToStageID == nil then
|
|
50
|
+
return StageID.SPECIAL_ROOMS
|
|
51
|
+
end
|
|
52
|
+
return stageTypeToStageID[stageType]
|
|
53
|
+
end
|
|
54
|
+
local stageTypeToStageID = STAGE_TO_STAGE_ID[stage]
|
|
55
|
+
return stageTypeToStageID[stageType]
|
|
56
|
+
end
|
|
57
|
+
--- Helper function to get the English name corresponding to a stage ID. For example, "Caves".
|
|
58
|
+
--
|
|
59
|
+
-- This is derived from the data in the "stages.xml" file.
|
|
60
|
+
--
|
|
61
|
+
-- Note that unlike "stages.xml", Blue Womb is specified with a name of "Blue Womb" instead of
|
|
62
|
+
-- "???".
|
|
63
|
+
function ____exports.getStageIDName(self, stageID)
|
|
64
|
+
return STAGE_ID_NAMES[stageID]
|
|
65
|
+
end
|
|
25
66
|
--- Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
26
67
|
-- `StageType.REPENTANCE_B`.
|
|
27
68
|
function ____exports.isRepentanceStage(self, stageType)
|
|
@@ -114,33 +155,39 @@ function ____exports.getLevelName(self, stage, stageType)
|
|
|
114
155
|
if stageType == nil then
|
|
115
156
|
stageType = level:GetStageType()
|
|
116
157
|
end
|
|
117
|
-
local
|
|
118
|
-
|
|
158
|
+
local stageID = ____exports.getStageID(nil, stage, stageType)
|
|
159
|
+
local stageIDName = ____exports.getStageIDName(nil, stageID)
|
|
160
|
+
local suffix
|
|
161
|
+
repeat
|
|
162
|
+
local ____switch14 = stage
|
|
163
|
+
local ____cond14 = ____switch14 == LevelStage.BASEMENT_1 or ____switch14 == LevelStage.CAVES_1 or ____switch14 == LevelStage.DEPTHS_1 or ____switch14 == LevelStage.WOMB_1
|
|
164
|
+
if ____cond14 then
|
|
165
|
+
do
|
|
166
|
+
suffix = " 1"
|
|
167
|
+
break
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
____cond14 = ____cond14 or (____switch14 == LevelStage.BASEMENT_2 or ____switch14 == LevelStage.CAVES_2 or ____switch14 == LevelStage.DEPTHS_2 or ____switch14 == LevelStage.WOMB_2)
|
|
171
|
+
if ____cond14 then
|
|
172
|
+
do
|
|
173
|
+
suffix = " 2"
|
|
174
|
+
break
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
do
|
|
178
|
+
do
|
|
179
|
+
suffix = ""
|
|
180
|
+
break
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
until true
|
|
184
|
+
return stageIDName .. suffix
|
|
119
185
|
end
|
|
120
186
|
--- Alias for the `Level.GetStage` method.
|
|
121
187
|
function ____exports.getStage(self)
|
|
122
188
|
local level = game:GetLevel()
|
|
123
189
|
return level:GetStage()
|
|
124
190
|
end
|
|
125
|
-
--- Helper function to get the stage ID that corresponds to a particular floor. It does this by
|
|
126
|
-
-- manually converting `LevelStage` and `StageType` into `StageID`. This is useful because
|
|
127
|
-
-- `getRoomStageID` will not correctly return the `StageID` if the player is in a special room.
|
|
128
|
-
--
|
|
129
|
-
-- @param stage Optional. If not specified, the stage corresponding to the current floor will be
|
|
130
|
-
-- used.
|
|
131
|
-
-- @param stageType Optional. If not specified, the stage type corresponding to the current floor
|
|
132
|
-
-- will be used.
|
|
133
|
-
function ____exports.getStageID(self, stage, stageType)
|
|
134
|
-
local level = game:GetLevel()
|
|
135
|
-
if stage == nil then
|
|
136
|
-
stage = level:GetStage()
|
|
137
|
-
end
|
|
138
|
-
if stageType == nil then
|
|
139
|
-
stageType = level:GetStageType()
|
|
140
|
-
end
|
|
141
|
-
local stageTypeToStageID = STAGE_TO_STAGE_ID[stage]
|
|
142
|
-
return stageTypeToStageID[stageType]
|
|
143
|
-
end
|
|
144
191
|
--- Alias for the `Level.GetStageType` method.
|
|
145
192
|
function ____exports.getStageType(self)
|
|
146
193
|
local level = game:GetLevel()
|
package/dist/index.rollup.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ import { RoomType } from 'isaac-typescript-definitions';
|
|
|
76
76
|
import type { SackSubType } from 'isaac-typescript-definitions';
|
|
77
77
|
import { SeedEffect } from 'isaac-typescript-definitions';
|
|
78
78
|
import { SlotVariant } from 'isaac-typescript-definitions';
|
|
79
|
-
import
|
|
79
|
+
import { StageID } from 'isaac-typescript-definitions';
|
|
80
80
|
import { StageType } from 'isaac-typescript-definitions';
|
|
81
81
|
import { TearFlag } from 'isaac-typescript-definitions';
|
|
82
82
|
import type { TearVariant } from 'isaac-typescript-definitions';
|
|
@@ -7893,9 +7893,13 @@ export declare function getSpikes(variant?: number): readonly GridEntitySpikes[]
|
|
|
7893
7893
|
export declare function getStage(): LevelStage;
|
|
7894
7894
|
|
|
7895
7895
|
/**
|
|
7896
|
-
* Helper function to get the stage ID that corresponds to a particular
|
|
7897
|
-
*
|
|
7898
|
-
* `getRoomStageID` will not correctly return the `StageID` if the player is
|
|
7896
|
+
* Helper function to get the stage ID that corresponds to a particular stage and stage type.
|
|
7897
|
+
*
|
|
7898
|
+
* This is useful because `getRoomStageID` will not correctly return the `StageID` if the player is
|
|
7899
|
+
* in a special room.
|
|
7900
|
+
*
|
|
7901
|
+
* This correctly handles the case of Greed Mode. In Greed Mode, if an undefined stage and stage
|
|
7902
|
+
* type combination are passed, `StageID.SPECIAL_ROOMS` (0) will be returned.
|
|
7899
7903
|
*
|
|
7900
7904
|
* @param stage Optional. If not specified, the stage corresponding to the current floor will be
|
|
7901
7905
|
* used.
|
|
@@ -7904,6 +7908,16 @@ export declare function getStage(): LevelStage;
|
|
|
7904
7908
|
*/
|
|
7905
7909
|
export declare function getStageID(stage?: LevelStage, stageType?: StageType): StageID;
|
|
7906
7910
|
|
|
7911
|
+
/**
|
|
7912
|
+
* Helper function to get the English name corresponding to a stage ID. For example, "Caves".
|
|
7913
|
+
*
|
|
7914
|
+
* This is derived from the data in the "stages.xml" file.
|
|
7915
|
+
*
|
|
7916
|
+
* Note that unlike "stages.xml", Blue Womb is specified with a name of "Blue Womb" instead of
|
|
7917
|
+
* "???".
|
|
7918
|
+
*/
|
|
7919
|
+
export declare function getStageIDName(stageID: StageID): string;
|
|
7920
|
+
|
|
7907
7921
|
/** Alias for the `Level.GetStageType` method. */
|
|
7908
7922
|
export declare function getStageType(): StageType;
|
|
7909
7923
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 83.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -11011,9 +11011,20 @@ return ____exports
|
|
|
11011
11011
|
end,
|
|
11012
11012
|
["lua_modules.isaac-typescript-definitions.dist.enums.StageID"] = function(...)
|
|
11013
11013
|
local ____exports = {}
|
|
11014
|
-
--- Corresponds to the filename used in the XML/STB file for the room.
|
|
11014
|
+
--- Corresponds to the filename used in the XML/STB file for the room. It also matches the "id"
|
|
11015
|
+
-- attribute in the "stages.xml" file.
|
|
11015
11016
|
--
|
|
11016
|
-
-- This enum is contiguous.
|
|
11017
|
+
-- This enum is not contiguous. In other words, the enum ranges from `StageID.SPECIAL_ROOMS` (0) to
|
|
11018
|
+
-- `StageID.BACKWARDS` (36), but there is no corresponding `StageID` with the following values:
|
|
11019
|
+
--
|
|
11020
|
+
-- - 18 (corresponds to Afterbirth+ "18.greed special.stb")
|
|
11021
|
+
-- - 19 (corresponds to Afterbirth+ "19.greed basement.stb")
|
|
11022
|
+
-- - 20 (corresponds to Afterbirth+ "20.greed caves.stb")
|
|
11023
|
+
-- - 21 (corresponds to Afterbirth+ "21.greed depths.stb")
|
|
11024
|
+
-- - 22 (corresponds to Afterbirth+ "22.greed womb.stb")
|
|
11025
|
+
-- - 23 (corresponds to Afterbirth+ "23.greed sheol.stb")
|
|
11026
|
+
--
|
|
11027
|
+
-- (These values are now unused in Repentance.)
|
|
11017
11028
|
____exports.StageID = {}
|
|
11018
11029
|
____exports.StageID.SPECIAL_ROOMS = 0
|
|
11019
11030
|
____exports.StageID[____exports.StageID.SPECIAL_ROOMS] = "SPECIAL_ROOMS"
|
|
@@ -11051,22 +11062,10 @@ ____exports.StageID.DARK_ROOM = 16
|
|
|
11051
11062
|
____exports.StageID[____exports.StageID.DARK_ROOM] = "DARK_ROOM"
|
|
11052
11063
|
____exports.StageID.CHEST = 17
|
|
11053
11064
|
____exports.StageID[____exports.StageID.CHEST] = "CHEST"
|
|
11054
|
-
____exports.StageID.
|
|
11055
|
-
____exports.StageID[____exports.StageID.
|
|
11056
|
-
____exports.StageID.
|
|
11057
|
-
____exports.StageID[____exports.StageID.
|
|
11058
|
-
____exports.StageID.CAVES_GREED_MODE = 20
|
|
11059
|
-
____exports.StageID[____exports.StageID.CAVES_GREED_MODE] = "CAVES_GREED_MODE"
|
|
11060
|
-
____exports.StageID.DEPTHS_GREED_MODE = 21
|
|
11061
|
-
____exports.StageID[____exports.StageID.DEPTHS_GREED_MODE] = "DEPTHS_GREED_MODE"
|
|
11062
|
-
____exports.StageID.WOMB_GREED_MODE = 22
|
|
11063
|
-
____exports.StageID[____exports.StageID.WOMB_GREED_MODE] = "WOMB_GREED_MODE"
|
|
11064
|
-
____exports.StageID.SHEOL_GREED_MODE = 23
|
|
11065
|
-
____exports.StageID[____exports.StageID.SHEOL_GREED_MODE] = "SHEOL_GREED_MODE"
|
|
11066
|
-
____exports.StageID.SHOP_GREED_MODE = 24
|
|
11067
|
-
____exports.StageID[____exports.StageID.SHOP_GREED_MODE] = "SHOP_GREED_MODE"
|
|
11068
|
-
____exports.StageID.ULTRA_GREED_GREED_MODE = 25
|
|
11069
|
-
____exports.StageID[____exports.StageID.ULTRA_GREED_GREED_MODE] = "ULTRA_GREED_GREED_MODE"
|
|
11065
|
+
____exports.StageID.SHOP = 24
|
|
11066
|
+
____exports.StageID[____exports.StageID.SHOP] = "SHOP"
|
|
11067
|
+
____exports.StageID.ULTRA_GREED = 25
|
|
11068
|
+
____exports.StageID[____exports.StageID.ULTRA_GREED] = "ULTRA_GREED"
|
|
11070
11069
|
____exports.StageID.VOID = 26
|
|
11071
11070
|
____exports.StageID[____exports.StageID.VOID] = "VOID"
|
|
11072
11071
|
____exports.StageID.DOWNPOUR = 27
|
|
@@ -31830,125 +31829,6 @@ function ____exports.reloadRoom(self)
|
|
|
31830
31829
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
31831
31830
|
____exports.teleport(nil, roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.FADE)
|
|
31832
31831
|
end
|
|
31833
|
-
return ____exports
|
|
31834
|
-
end,
|
|
31835
|
-
["objects.levelNames"] = function(...)
|
|
31836
|
-
local ____exports = {}
|
|
31837
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
31838
|
-
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
31839
|
-
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
31840
|
-
--- A mapping of stage and stage types to the corresponding English level name.
|
|
31841
|
-
--
|
|
31842
|
-
-- This is useful because the `Level.GetName` method returns a localized version of the level name,
|
|
31843
|
-
-- which will not display correctly on some fonts.
|
|
31844
|
-
--
|
|
31845
|
-
-- Note that this contains "Blue Womb" instead of "???" for stage 9.
|
|
31846
|
-
____exports.LEVEL_NAMES = {
|
|
31847
|
-
[LevelStage.BASEMENT_1] = {
|
|
31848
|
-
[StageType.ORIGINAL] = "Basement 1",
|
|
31849
|
-
[StageType.WRATH_OF_THE_LAMB] = "Cellar 1",
|
|
31850
|
-
[StageType.AFTERBIRTH] = "Burning Basement 1",
|
|
31851
|
-
[StageType.GREED_MODE] = "Basement",
|
|
31852
|
-
[StageType.REPENTANCE] = "Downpour 1",
|
|
31853
|
-
[StageType.REPENTANCE_B] = "Dross 1"
|
|
31854
|
-
},
|
|
31855
|
-
[LevelStage.BASEMENT_2] = {
|
|
31856
|
-
[StageType.ORIGINAL] = "Basement 2",
|
|
31857
|
-
[StageType.WRATH_OF_THE_LAMB] = "Cellar 2",
|
|
31858
|
-
[StageType.AFTERBIRTH] = "Burning Basement 2",
|
|
31859
|
-
[StageType.GREED_MODE] = "Basement",
|
|
31860
|
-
[StageType.REPENTANCE] = "Downpour 2",
|
|
31861
|
-
[StageType.REPENTANCE_B] = "Dross 2"
|
|
31862
|
-
},
|
|
31863
|
-
[LevelStage.CAVES_1] = {
|
|
31864
|
-
[StageType.ORIGINAL] = "Caves 1",
|
|
31865
|
-
[StageType.WRATH_OF_THE_LAMB] = "Catacombs 1",
|
|
31866
|
-
[StageType.AFTERBIRTH] = "Flooded Caves 1",
|
|
31867
|
-
[StageType.GREED_MODE] = "Caves",
|
|
31868
|
-
[StageType.REPENTANCE] = "Mines 1",
|
|
31869
|
-
[StageType.REPENTANCE_B] = "Ashpit 1"
|
|
31870
|
-
},
|
|
31871
|
-
[LevelStage.CAVES_2] = {
|
|
31872
|
-
[StageType.ORIGINAL] = "Caves 2",
|
|
31873
|
-
[StageType.WRATH_OF_THE_LAMB] = "Catacombs 2",
|
|
31874
|
-
[StageType.AFTERBIRTH] = "Flooded Caves 2",
|
|
31875
|
-
[StageType.GREED_MODE] = "Caves",
|
|
31876
|
-
[StageType.REPENTANCE] = "Mines 2",
|
|
31877
|
-
[StageType.REPENTANCE_B] = "Ashpit 2"
|
|
31878
|
-
},
|
|
31879
|
-
[LevelStage.DEPTHS_1] = {
|
|
31880
|
-
[StageType.ORIGINAL] = "Depths 1",
|
|
31881
|
-
[StageType.WRATH_OF_THE_LAMB] = "Necropolis 1",
|
|
31882
|
-
[StageType.AFTERBIRTH] = "Dank Depths 1",
|
|
31883
|
-
[StageType.GREED_MODE] = "Depths",
|
|
31884
|
-
[StageType.REPENTANCE] = "Mausoleum 1",
|
|
31885
|
-
[StageType.REPENTANCE_B] = "Gehenna 1"
|
|
31886
|
-
},
|
|
31887
|
-
[LevelStage.DEPTHS_2] = {
|
|
31888
|
-
[StageType.ORIGINAL] = "Depths 2",
|
|
31889
|
-
[StageType.WRATH_OF_THE_LAMB] = "Necropolis 2",
|
|
31890
|
-
[StageType.AFTERBIRTH] = "Dank Depths 2",
|
|
31891
|
-
[StageType.GREED_MODE] = "Depths",
|
|
31892
|
-
[StageType.REPENTANCE] = "Mausoleum 2",
|
|
31893
|
-
[StageType.REPENTANCE_B] = "Gehenna 2"
|
|
31894
|
-
},
|
|
31895
|
-
[LevelStage.WOMB_1] = {
|
|
31896
|
-
[StageType.ORIGINAL] = "Womb 1",
|
|
31897
|
-
[StageType.WRATH_OF_THE_LAMB] = "Utero 1",
|
|
31898
|
-
[StageType.AFTERBIRTH] = "Scarred Womb 1",
|
|
31899
|
-
[StageType.GREED_MODE] = "Womb",
|
|
31900
|
-
[StageType.REPENTANCE] = "Corpse 1",
|
|
31901
|
-
[StageType.REPENTANCE_B] = "Mortis 1"
|
|
31902
|
-
},
|
|
31903
|
-
[LevelStage.WOMB_2] = {
|
|
31904
|
-
[StageType.ORIGINAL] = "Womb 2",
|
|
31905
|
-
[StageType.WRATH_OF_THE_LAMB] = "Utero 2",
|
|
31906
|
-
[StageType.AFTERBIRTH] = "Scarred Womb 2",
|
|
31907
|
-
[StageType.GREED_MODE] = "Womb",
|
|
31908
|
-
[StageType.REPENTANCE] = "Corpse 2",
|
|
31909
|
-
[StageType.REPENTANCE_B] = "Mortis 2"
|
|
31910
|
-
},
|
|
31911
|
-
[LevelStage.BLUE_WOMB] = {
|
|
31912
|
-
[StageType.ORIGINAL] = "Blue Womb",
|
|
31913
|
-
[StageType.WRATH_OF_THE_LAMB] = "Blue Womb",
|
|
31914
|
-
[StageType.AFTERBIRTH] = "Blue Womb",
|
|
31915
|
-
[StageType.GREED_MODE] = "Blue Womb",
|
|
31916
|
-
[StageType.REPENTANCE] = "Blue Womb",
|
|
31917
|
-
[StageType.REPENTANCE_B] = "Blue Womb"
|
|
31918
|
-
},
|
|
31919
|
-
[LevelStage.SHEOL_CATHEDRAL] = {
|
|
31920
|
-
[StageType.ORIGINAL] = "Sheol",
|
|
31921
|
-
[StageType.WRATH_OF_THE_LAMB] = "Cathedral",
|
|
31922
|
-
[StageType.AFTERBIRTH] = "Undefined",
|
|
31923
|
-
[StageType.GREED_MODE] = "Sheol",
|
|
31924
|
-
[StageType.REPENTANCE] = "Undefined",
|
|
31925
|
-
[StageType.REPENTANCE_B] = "Undefined"
|
|
31926
|
-
},
|
|
31927
|
-
[LevelStage.DARK_ROOM_CHEST] = {
|
|
31928
|
-
[StageType.ORIGINAL] = "Dark Room",
|
|
31929
|
-
[StageType.WRATH_OF_THE_LAMB] = "The Chest",
|
|
31930
|
-
[StageType.AFTERBIRTH] = "Undefined",
|
|
31931
|
-
[StageType.GREED_MODE] = "The Shop",
|
|
31932
|
-
[StageType.REPENTANCE] = "Undefined",
|
|
31933
|
-
[StageType.REPENTANCE_B] = "Undefined"
|
|
31934
|
-
},
|
|
31935
|
-
[LevelStage.VOID] = {
|
|
31936
|
-
[StageType.ORIGINAL] = "The Void",
|
|
31937
|
-
[StageType.WRATH_OF_THE_LAMB] = "The Void",
|
|
31938
|
-
[StageType.AFTERBIRTH] = "The Void",
|
|
31939
|
-
[StageType.GREED_MODE] = "The Void",
|
|
31940
|
-
[StageType.REPENTANCE] = "The Void",
|
|
31941
|
-
[StageType.REPENTANCE_B] = "The Void"
|
|
31942
|
-
},
|
|
31943
|
-
[LevelStage.HOME] = {
|
|
31944
|
-
[StageType.ORIGINAL] = "Home",
|
|
31945
|
-
[StageType.WRATH_OF_THE_LAMB] = "Home",
|
|
31946
|
-
[StageType.AFTERBIRTH] = "Home",
|
|
31947
|
-
[StageType.GREED_MODE] = "Home",
|
|
31948
|
-
[StageType.REPENTANCE] = "Home",
|
|
31949
|
-
[StageType.REPENTANCE_B] = "Home"
|
|
31950
|
-
}
|
|
31951
|
-
}
|
|
31952
31832
|
return ____exports
|
|
31953
31833
|
end,
|
|
31954
31834
|
["objects.roomTypeSpecialGotoPrefixes"] = function(...)
|
|
@@ -31986,14 +31866,61 @@ ____exports.ROOM_TYPE_SPECIAL_GOTO_PREFIXES = {
|
|
|
31986
31866
|
[RoomType.BLUE] = "blue",
|
|
31987
31867
|
[RoomType.ULTRA_SECRET] = "ultrasecret"
|
|
31988
31868
|
}
|
|
31869
|
+
return ____exports
|
|
31870
|
+
end,
|
|
31871
|
+
["objects.stageIDNames"] = function(...)
|
|
31872
|
+
local ____exports = {}
|
|
31873
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
31874
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
31875
|
+
--- Derived from "stages.xml". Note that unlike "stages.xml":
|
|
31876
|
+
--
|
|
31877
|
+
-- - `StageID.BLUE_WOMB` (13) is specified with a name of "Blue Womb" instead of "???".
|
|
31878
|
+
-- - `StageID.StageID.BACKWARDS` (36) is specified with a name of "The Ascent" instead of "???".
|
|
31879
|
+
____exports.STAGE_ID_NAMES = {
|
|
31880
|
+
[StageID.SPECIAL_ROOMS] = "Special Rooms",
|
|
31881
|
+
[StageID.BASEMENT] = "Basement",
|
|
31882
|
+
[StageID.CELLAR] = "Cellar",
|
|
31883
|
+
[StageID.BURNING_BASEMENT] = "Burning Basement",
|
|
31884
|
+
[StageID.CAVES] = "Caves",
|
|
31885
|
+
[StageID.CATACOMBS] = "Catacombs",
|
|
31886
|
+
[StageID.FLOODED_CAVES] = "Flooded Caves",
|
|
31887
|
+
[StageID.DEPTHS] = "Depths",
|
|
31888
|
+
[StageID.NECROPOLIS] = "Necropolis",
|
|
31889
|
+
[StageID.DANK_DEPTHS] = "Dank Depths",
|
|
31890
|
+
[StageID.WOMB] = "Womb",
|
|
31891
|
+
[StageID.UTERO] = "Utero",
|
|
31892
|
+
[StageID.SCARRED_WOMB] = "Scarred Womb",
|
|
31893
|
+
[StageID.BLUE_WOMB] = "Blue Womb",
|
|
31894
|
+
[StageID.SHEOL] = "Sheol",
|
|
31895
|
+
[StageID.CATHEDRAL] = "Cathedral",
|
|
31896
|
+
[StageID.DARK_ROOM] = "Dark Room",
|
|
31897
|
+
[StageID.CHEST] = "Chest",
|
|
31898
|
+
[StageID.SHOP] = "The Shop",
|
|
31899
|
+
[StageID.ULTRA_GREED] = "Ultra Greed",
|
|
31900
|
+
[StageID.VOID] = "The Void",
|
|
31901
|
+
[StageID.DOWNPOUR] = "Downpour",
|
|
31902
|
+
[StageID.DROSS] = "Dross",
|
|
31903
|
+
[StageID.MINES] = "Mines",
|
|
31904
|
+
[StageID.ASHPIT] = "Ashpit",
|
|
31905
|
+
[StageID.MAUSOLEUM] = "Mausoleum",
|
|
31906
|
+
[StageID.GEHENNA] = "Gehenna",
|
|
31907
|
+
[StageID.CORPSE] = "Corpse",
|
|
31908
|
+
[StageID.MORTIS] = "Mortis",
|
|
31909
|
+
[StageID.HOME] = "Home",
|
|
31910
|
+
[StageID.BACKWARDS] = "The Ascent"
|
|
31911
|
+
}
|
|
31989
31912
|
return ____exports
|
|
31990
31913
|
end,
|
|
31991
31914
|
["objects.stageToStageID"] = function(...)
|
|
31915
|
+
local ____lualib = require("lualib_bundle")
|
|
31916
|
+
local __TS__New = ____lualib.__TS__New
|
|
31992
31917
|
local ____exports = {}
|
|
31993
31918
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
31994
31919
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
31995
31920
|
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
31996
31921
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
31922
|
+
local ____ReadonlyMap = require("types.ReadonlyMap")
|
|
31923
|
+
local ReadonlyMap = ____ReadonlyMap.ReadonlyMap
|
|
31997
31924
|
local BASEMENT_TO_STAGE_ID = {
|
|
31998
31925
|
[StageType.ORIGINAL] = StageID.BASEMENT,
|
|
31999
31926
|
[StageType.WRATH_OF_THE_LAMB] = StageID.CELLAR,
|
|
@@ -32081,6 +32008,31 @@ ____exports.STAGE_TO_STAGE_ID = {
|
|
|
32081
32008
|
[LevelStage.VOID] = VOID_TO_STAGE_ID,
|
|
32082
32009
|
[LevelStage.HOME] = HOME_TO_STAGE_ID
|
|
32083
32010
|
}
|
|
32011
|
+
local SHOP_TO_STAGE_ID = {
|
|
32012
|
+
[StageType.ORIGINAL] = StageID.SHOP,
|
|
32013
|
+
[StageType.WRATH_OF_THE_LAMB] = StageID.SHOP,
|
|
32014
|
+
[StageType.AFTERBIRTH] = StageID.SHOP,
|
|
32015
|
+
[StageType.GREED_MODE] = StageID.SHOP,
|
|
32016
|
+
[StageType.REPENTANCE] = StageID.SHOP,
|
|
32017
|
+
[StageType.REPENTANCE_B] = StageID.SHOP
|
|
32018
|
+
}
|
|
32019
|
+
local ULTRA_GREED_TO_STAGE_ID = {
|
|
32020
|
+
[StageType.ORIGINAL] = StageID.ULTRA_GREED,
|
|
32021
|
+
[StageType.WRATH_OF_THE_LAMB] = StageID.ULTRA_GREED,
|
|
32022
|
+
[StageType.AFTERBIRTH] = StageID.ULTRA_GREED,
|
|
32023
|
+
[StageType.GREED_MODE] = StageID.ULTRA_GREED,
|
|
32024
|
+
[StageType.REPENTANCE] = StageID.ULTRA_GREED,
|
|
32025
|
+
[StageType.REPENTANCE_B] = StageID.ULTRA_GREED
|
|
32026
|
+
}
|
|
32027
|
+
____exports.STAGE_TO_STAGE_ID_GREED_MODE = __TS__New(ReadonlyMap, {
|
|
32028
|
+
{LevelStage.BASEMENT_GREED_MODE, BASEMENT_TO_STAGE_ID},
|
|
32029
|
+
{LevelStage.CAVES_GREED_MODE, CAVES_TO_STAGE_ID},
|
|
32030
|
+
{LevelStage.DEPTHS_GREED_MODE, DEPTHS_TO_STAGE_ID},
|
|
32031
|
+
{LevelStage.WOMB_GREED_MODE, WOMB_TO_STAGE_ID},
|
|
32032
|
+
{LevelStage.SHEOL_GREED_MODE, SHEOL_CATHEDRAL_TO_STAGE_ID},
|
|
32033
|
+
{LevelStage.SHOP_GREED_MODE, SHOP_TO_STAGE_ID},
|
|
32034
|
+
{LevelStage.ULTRA_GREED_GREED_MODE, ULTRA_GREED_TO_STAGE_ID}
|
|
32035
|
+
})
|
|
32084
32036
|
return ____exports
|
|
32085
32037
|
end,
|
|
32086
32038
|
["objects.stageTypeSuffixes"] = function(...)
|
|
@@ -32105,15 +32057,17 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
32105
32057
|
local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
|
|
32106
32058
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
32107
32059
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
32060
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
32108
32061
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
32109
32062
|
local ____cachedClasses = require("core.cachedClasses")
|
|
32110
32063
|
local game = ____cachedClasses.game
|
|
32111
|
-
local ____levelNames = require("objects.levelNames")
|
|
32112
|
-
local LEVEL_NAMES = ____levelNames.LEVEL_NAMES
|
|
32113
32064
|
local ____roomTypeSpecialGotoPrefixes = require("objects.roomTypeSpecialGotoPrefixes")
|
|
32114
32065
|
local ROOM_TYPE_SPECIAL_GOTO_PREFIXES = ____roomTypeSpecialGotoPrefixes.ROOM_TYPE_SPECIAL_GOTO_PREFIXES
|
|
32066
|
+
local ____stageIDNames = require("objects.stageIDNames")
|
|
32067
|
+
local STAGE_ID_NAMES = ____stageIDNames.STAGE_ID_NAMES
|
|
32115
32068
|
local ____stageToStageID = require("objects.stageToStageID")
|
|
32116
32069
|
local STAGE_TO_STAGE_ID = ____stageToStageID.STAGE_TO_STAGE_ID
|
|
32070
|
+
local STAGE_TO_STAGE_ID_GREED_MODE = ____stageToStageID.STAGE_TO_STAGE_ID_GREED_MODE
|
|
32117
32071
|
local ____stageTypeSuffixes = require("objects.stageTypeSuffixes")
|
|
32118
32072
|
local STAGE_TYPE_SUFFIXES = ____stageTypeSuffixes.STAGE_TYPE_SUFFIXES
|
|
32119
32073
|
local ____log = require("functions.log")
|
|
@@ -32122,6 +32076,45 @@ local ____types = require("functions.types")
|
|
|
32122
32076
|
local asLevelStage = ____types.asLevelStage
|
|
32123
32077
|
local ____utils = require("functions.utils")
|
|
32124
32078
|
local inRange = ____utils.inRange
|
|
32079
|
+
--- Helper function to get the stage ID that corresponds to a particular stage and stage type.
|
|
32080
|
+
--
|
|
32081
|
+
-- This is useful because `getRoomStageID` will not correctly return the `StageID` if the player is
|
|
32082
|
+
-- in a special room.
|
|
32083
|
+
--
|
|
32084
|
+
-- This correctly handles the case of Greed Mode. In Greed Mode, if an undefined stage and stage
|
|
32085
|
+
-- type combination are passed, `StageID.SPECIAL_ROOMS` (0) will be returned.
|
|
32086
|
+
--
|
|
32087
|
+
-- @param stage Optional. If not specified, the stage corresponding to the current floor will be
|
|
32088
|
+
-- used.
|
|
32089
|
+
-- @param stageType Optional. If not specified, the stage type corresponding to the current floor
|
|
32090
|
+
-- will be used.
|
|
32091
|
+
function ____exports.getStageID(self, stage, stageType)
|
|
32092
|
+
local level = game:GetLevel()
|
|
32093
|
+
if stage == nil then
|
|
32094
|
+
stage = level:GetStage()
|
|
32095
|
+
end
|
|
32096
|
+
if stageType == nil then
|
|
32097
|
+
stageType = level:GetStageType()
|
|
32098
|
+
end
|
|
32099
|
+
if game:IsGreedMode() then
|
|
32100
|
+
local stageTypeToStageID = STAGE_TO_STAGE_ID_GREED_MODE:get(stage)
|
|
32101
|
+
if stageTypeToStageID == nil then
|
|
32102
|
+
return StageID.SPECIAL_ROOMS
|
|
32103
|
+
end
|
|
32104
|
+
return stageTypeToStageID[stageType]
|
|
32105
|
+
end
|
|
32106
|
+
local stageTypeToStageID = STAGE_TO_STAGE_ID[stage]
|
|
32107
|
+
return stageTypeToStageID[stageType]
|
|
32108
|
+
end
|
|
32109
|
+
--- Helper function to get the English name corresponding to a stage ID. For example, "Caves".
|
|
32110
|
+
--
|
|
32111
|
+
-- This is derived from the data in the "stages.xml" file.
|
|
32112
|
+
--
|
|
32113
|
+
-- Note that unlike "stages.xml", Blue Womb is specified with a name of "Blue Womb" instead of
|
|
32114
|
+
-- "???".
|
|
32115
|
+
function ____exports.getStageIDName(self, stageID)
|
|
32116
|
+
return STAGE_ID_NAMES[stageID]
|
|
32117
|
+
end
|
|
32125
32118
|
--- Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
32126
32119
|
-- `StageType.REPENTANCE_B`.
|
|
32127
32120
|
function ____exports.isRepentanceStage(self, stageType)
|
|
@@ -32214,33 +32207,39 @@ function ____exports.getLevelName(self, stage, stageType)
|
|
|
32214
32207
|
if stageType == nil then
|
|
32215
32208
|
stageType = level:GetStageType()
|
|
32216
32209
|
end
|
|
32217
|
-
local
|
|
32218
|
-
|
|
32210
|
+
local stageID = ____exports.getStageID(nil, stage, stageType)
|
|
32211
|
+
local stageIDName = ____exports.getStageIDName(nil, stageID)
|
|
32212
|
+
local suffix
|
|
32213
|
+
repeat
|
|
32214
|
+
local ____switch14 = stage
|
|
32215
|
+
local ____cond14 = ____switch14 == LevelStage.BASEMENT_1 or ____switch14 == LevelStage.CAVES_1 or ____switch14 == LevelStage.DEPTHS_1 or ____switch14 == LevelStage.WOMB_1
|
|
32216
|
+
if ____cond14 then
|
|
32217
|
+
do
|
|
32218
|
+
suffix = " 1"
|
|
32219
|
+
break
|
|
32220
|
+
end
|
|
32221
|
+
end
|
|
32222
|
+
____cond14 = ____cond14 or (____switch14 == LevelStage.BASEMENT_2 or ____switch14 == LevelStage.CAVES_2 or ____switch14 == LevelStage.DEPTHS_2 or ____switch14 == LevelStage.WOMB_2)
|
|
32223
|
+
if ____cond14 then
|
|
32224
|
+
do
|
|
32225
|
+
suffix = " 2"
|
|
32226
|
+
break
|
|
32227
|
+
end
|
|
32228
|
+
end
|
|
32229
|
+
do
|
|
32230
|
+
do
|
|
32231
|
+
suffix = ""
|
|
32232
|
+
break
|
|
32233
|
+
end
|
|
32234
|
+
end
|
|
32235
|
+
until true
|
|
32236
|
+
return stageIDName .. suffix
|
|
32219
32237
|
end
|
|
32220
32238
|
--- Alias for the `Level.GetStage` method.
|
|
32221
32239
|
function ____exports.getStage(self)
|
|
32222
32240
|
local level = game:GetLevel()
|
|
32223
32241
|
return level:GetStage()
|
|
32224
32242
|
end
|
|
32225
|
-
--- Helper function to get the stage ID that corresponds to a particular floor. It does this by
|
|
32226
|
-
-- manually converting `LevelStage` and `StageType` into `StageID`. This is useful because
|
|
32227
|
-
-- `getRoomStageID` will not correctly return the `StageID` if the player is in a special room.
|
|
32228
|
-
--
|
|
32229
|
-
-- @param stage Optional. If not specified, the stage corresponding to the current floor will be
|
|
32230
|
-
-- used.
|
|
32231
|
-
-- @param stageType Optional. If not specified, the stage type corresponding to the current floor
|
|
32232
|
-
-- will be used.
|
|
32233
|
-
function ____exports.getStageID(self, stage, stageType)
|
|
32234
|
-
local level = game:GetLevel()
|
|
32235
|
-
if stage == nil then
|
|
32236
|
-
stage = level:GetStage()
|
|
32237
|
-
end
|
|
32238
|
-
if stageType == nil then
|
|
32239
|
-
stageType = level:GetStageType()
|
|
32240
|
-
end
|
|
32241
|
-
local stageTypeToStageID = STAGE_TO_STAGE_ID[stage]
|
|
32242
|
-
return stageTypeToStageID[stageType]
|
|
32243
|
-
end
|
|
32244
32243
|
--- Alias for the `Level.GetStageType` method.
|
|
32245
32244
|
function ____exports.getStageType(self)
|
|
32246
32245
|
local level = game:GetLevel()
|
|
@@ -51156,8 +51155,8 @@ ____exports.BOSS_ID_TO_STAGE_IDS = (function()
|
|
|
51156
51155
|
partialBossIDsToStageIDs[bossID] = stageIDs
|
|
51157
51156
|
end
|
|
51158
51157
|
local bossIDsToStageIDs = partialBossIDsToStageIDs
|
|
51159
|
-
bossIDsToStageIDs[BossID.ULTRA_GREED]:add(StageID.
|
|
51160
|
-
bossIDsToStageIDs[BossID.ULTRA_GREEDIER]:add(StageID.
|
|
51158
|
+
bossIDsToStageIDs[BossID.ULTRA_GREED]:add(StageID.ULTRA_GREED)
|
|
51159
|
+
bossIDsToStageIDs[BossID.ULTRA_GREEDIER]:add(StageID.ULTRA_GREED)
|
|
51161
51160
|
bossIDsToStageIDs[BossID.MAUSOLEUM_MOMS_HEART]:add(StageID.MAUSOLEUM)
|
|
51162
51161
|
bossIDsToStageIDs[BossID.MAUSOLEUM_MOMS_HEART]:add(StageID.GEHENNA)
|
|
51163
51162
|
return bossIDsToStageIDs
|
|
@@ -52074,14 +52073,8 @@ ____exports.VERSUS_SCREEN_BACKGROUND_COLORS = {
|
|
|
52074
52073
|
[StageID.CATHEDRAL] = newReadonlyColor(nil, 6 / 255, 13 / 255, 17 / 255),
|
|
52075
52074
|
[StageID.DARK_ROOM] = newReadonlyColor(nil, 9 / 255, 4 / 255, 3 / 255),
|
|
52076
52075
|
[StageID.CHEST] = newReadonlyColor(nil, 15 / 255, 9 / 255, 6 / 255),
|
|
52077
|
-
[StageID.
|
|
52078
|
-
[StageID.
|
|
52079
|
-
[StageID.CAVES_GREED_MODE] = CAVES_COLOR,
|
|
52080
|
-
[StageID.DEPTHS_GREED_MODE] = DEPTHS_COLOR,
|
|
52081
|
-
[StageID.WOMB_GREED_MODE] = WOMB_COLOR,
|
|
52082
|
-
[StageID.SHEOL_GREED_MODE] = SHEOL_COLOR,
|
|
52083
|
-
[StageID.SHOP_GREED_MODE] = DEFAULT_COLOR,
|
|
52084
|
-
[StageID.ULTRA_GREED_GREED_MODE] = DEFAULT_COLOR,
|
|
52076
|
+
[StageID.SHOP] = DEFAULT_COLOR,
|
|
52077
|
+
[StageID.ULTRA_GREED] = DEFAULT_COLOR,
|
|
52085
52078
|
[StageID.VOID] = newReadonlyColor(nil, 0, 0, 0),
|
|
52086
52079
|
[StageID.DOWNPOUR] = newReadonlyColor(nil, 29 / 255, 30 / 255, 32 / 255),
|
|
52087
52080
|
[StageID.DROSS] = newReadonlyColor(nil, 35 / 255, 35 / 255, 29 / 255),
|
|
@@ -52129,14 +52122,8 @@ ____exports.VERSUS_SCREEN_DIRT_SPOT_COLORS = {
|
|
|
52129
52122
|
[StageID.CATHEDRAL] = newReadonlyColor(nil, 44 / 255, 100 / 255, 111 / 255),
|
|
52130
52123
|
[StageID.DARK_ROOM] = newReadonlyColor(nil, 80 / 255, 38 / 255, 20 / 255),
|
|
52131
52124
|
[StageID.CHEST] = newReadonlyColor(nil, 175 / 255, 108 / 255, 72 / 255),
|
|
52132
|
-
[StageID.
|
|
52133
|
-
[StageID.
|
|
52134
|
-
[StageID.CAVES_GREED_MODE] = CAVES_COLOR,
|
|
52135
|
-
[StageID.DEPTHS_GREED_MODE] = DEPTHS_COLOR,
|
|
52136
|
-
[StageID.WOMB_GREED_MODE] = WOMB_COLOR,
|
|
52137
|
-
[StageID.SHEOL_GREED_MODE] = SHEOL_COLOR,
|
|
52138
|
-
[StageID.SHOP_GREED_MODE] = DEFAULT_COLOR,
|
|
52139
|
-
[StageID.ULTRA_GREED_GREED_MODE] = DEFAULT_COLOR,
|
|
52125
|
+
[StageID.SHOP] = DEFAULT_COLOR,
|
|
52126
|
+
[StageID.ULTRA_GREED] = DEFAULT_COLOR,
|
|
52140
52127
|
[StageID.VOID] = newReadonlyColor(nil, 70 / 255, 5 / 255, 5 / 255),
|
|
52141
52128
|
[StageID.DOWNPOUR] = newReadonlyColor(nil, 149 / 255, 157 / 255, 167 / 255),
|
|
52142
52129
|
[StageID.DROSS] = newReadonlyColor(nil, 179 / 255, 179 / 255, 143 / 255),
|