isaacscript-common 81.0.4 → 82.0.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/arrays/cachedEnumValues.d.ts +17 -5
- package/dist/arrays/cachedEnumValues.d.ts.map +1 -1
- package/dist/arrays/cachedEnumValues.lua +1 -1
- package/dist/classes/ModFeature.d.ts +1 -1
- package/dist/classes/ModFeature.d.ts.map +1 -1
- package/dist/classes/features/other/CustomItemPools.d.ts +1 -1
- package/dist/classes/features/other/CustomItemPools.d.ts.map +1 -1
- package/dist/classes/features/other/CustomItemPools.lua +4 -2
- package/dist/classes/features/other/CustomStages.lua +2 -2
- package/dist/classes/features/other/DisableInputs.d.ts +1 -1
- package/dist/classes/features/other/DisableInputs.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementSets.d.ts +4 -4
- package/dist/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementSets.lua +7 -2
- package/dist/classes/features/other/Pause.lua +2 -2
- package/dist/classes/features/other/PreventGridEntityRespawn.lua +1 -1
- package/dist/classes/features/other/SaveDataManager.d.ts +1 -1
- package/dist/classes/features/other/SaveDataManager.d.ts.map +1 -1
- package/dist/functions/array.d.ts +5 -5
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/functions/arrayLua.d.ts +14 -14
- package/dist/functions/arrayLua.d.ts.map +1 -1
- package/dist/functions/arrayLua.lua +7 -7
- package/dist/functions/benchmark.d.ts +1 -1
- package/dist/functions/benchmark.d.ts.map +1 -1
- package/dist/functions/bitwise.d.ts +1 -1
- package/dist/functions/bitwise.d.ts.map +1 -1
- package/dist/functions/bosses.d.ts +4 -2
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.lua +8 -7
- package/dist/functions/cards.d.ts +1 -1
- package/dist/functions/cards.d.ts.map +1 -1
- package/dist/functions/challenges.d.ts +1 -1
- package/dist/functions/challenges.d.ts.map +1 -1
- package/dist/functions/curses.d.ts +1 -1
- package/dist/functions/curses.d.ts.map +1 -1
- package/dist/functions/doors.d.ts +5 -5
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/external.d.ts +1 -1
- package/dist/functions/external.d.ts.map +1 -1
- package/dist/functions/flag.d.ts +5 -4
- package/dist/functions/flag.d.ts.map +1 -1
- package/dist/functions/gridEntities.d.ts +5 -5
- package/dist/functions/gridEntities.d.ts.map +1 -1
- package/dist/functions/gridEntities.lua +1 -1
- package/dist/functions/input.d.ts +5 -5
- package/dist/functions/input.d.ts.map +1 -1
- package/dist/functions/itemPool.d.ts +2 -2
- package/dist/functions/itemPool.d.ts.map +1 -1
- package/dist/functions/jsonRoom.d.ts +1 -1
- package/dist/functions/jsonRoom.d.ts.map +1 -1
- package/dist/functions/level.d.ts +2 -2
- package/dist/functions/level.d.ts.map +1 -1
- package/dist/functions/levelGrid.d.ts +2 -2
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/logEntities.d.ts +3 -3
- package/dist/functions/logEntities.d.ts.map +1 -1
- package/dist/functions/logMisc.d.ts +2 -1
- package/dist/functions/logMisc.d.ts.map +1 -1
- package/dist/functions/map.d.ts.map +1 -1
- package/dist/functions/merge.d.ts +1 -1
- package/dist/functions/merge.d.ts.map +1 -1
- package/dist/functions/npcDataStructures.d.ts +3 -3
- package/dist/functions/npcDataStructures.d.ts.map +1 -1
- package/dist/functions/playerCollectibles.d.ts +7 -7
- package/dist/functions/playerCollectibles.d.ts.map +1 -1
- package/dist/functions/playerDataStructures.d.ts +3 -3
- package/dist/functions/playerDataStructures.d.ts.map +1 -1
- package/dist/functions/playerTrinkets.d.ts +2 -2
- package/dist/functions/playerTrinkets.d.ts.map +1 -1
- package/dist/functions/players.d.ts +4 -4
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/rng.d.ts +3 -2
- package/dist/functions/rng.d.ts.map +1 -1
- package/dist/functions/rooms.d.ts +4 -4
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/run.d.ts +2 -2
- package/dist/functions/run.d.ts.map +1 -1
- package/dist/functions/set.d.ts.map +1 -1
- package/dist/functions/sort.d.ts +1 -1
- package/dist/functions/sort.d.ts.map +1 -1
- package/dist/functions/stage.d.ts +3 -3
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/string.d.ts +3 -2
- package/dist/functions/string.d.ts.map +1 -1
- package/dist/functions/table.d.ts +4 -4
- package/dist/functions/table.d.ts.map +1 -1
- package/dist/functions/trinketGive.d.ts +1 -1
- package/dist/functions/trinketGive.d.ts.map +1 -1
- package/dist/functions/utils.d.ts +1 -1
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/vector.d.ts +1 -1
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/functions/weighted.d.ts +2 -2
- package/dist/functions/weighted.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.rollup.d.ts +113 -108
- package/dist/indexLua.d.ts +1 -0
- package/dist/indexLua.d.ts.map +1 -1
- package/dist/isaacscript-common.lua +115 -96
- package/dist/sets/bossSets.d.ts +3 -2
- package/dist/sets/bossSets.d.ts.map +1 -1
- package/dist/sets/bossSets.lua +73 -69
- package/dist/types/AnyFunction.d.ts +1 -1
- package/dist/types/AnyFunction.d.ts.map +1 -1
- package/dist/types/ReadonlyRecord.d.ts +2 -0
- package/dist/types/ReadonlyRecord.d.ts.map +1 -0
- package/dist/types/ReadonlyRecord.lua +2 -0
- package/package.json +2 -2
- package/src/arrays/cachedEnumValues.ts +23 -39
- package/src/classes/ModFeature.ts +4 -4
- package/src/classes/ModUpgraded.ts +1 -1
- package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +1 -0
- package/src/classes/features/other/CustomItemPools.ts +10 -3
- package/src/classes/features/other/CustomStages.ts +2 -2
- package/src/classes/features/other/DisableInputs.ts +4 -1
- package/src/classes/features/other/ItemPoolDetection.ts +2 -2
- package/src/classes/features/other/ModdedElementSets.ts +6 -6
- package/src/classes/features/other/Pause.ts +2 -2
- package/src/classes/features/other/PickupIndexCreation.ts +1 -1
- package/src/classes/features/other/PreventGridEntityRespawn.ts +1 -1
- package/src/classes/features/other/RunInNFrames.ts +2 -0
- package/src/classes/features/other/SaveDataManager.ts +3 -1
- package/src/core/upgradeMod.ts +4 -1
- package/src/functions/array.ts +18 -5
- package/src/functions/arrayLua.ts +20 -20
- package/src/functions/benchmark.ts +1 -1
- package/src/functions/bitwise.ts +1 -1
- package/src/functions/bosses.ts +9 -11
- package/src/functions/cards.ts +1 -1
- package/src/functions/challenges.ts +1 -1
- package/src/functions/curses.ts +1 -1
- package/src/functions/deepCopy.ts +6 -6
- package/src/functions/doors.ts +7 -5
- package/src/functions/external.ts +1 -1
- package/src/functions/flag.ts +5 -4
- package/src/functions/gridEntities.ts +6 -6
- package/src/functions/input.ts +5 -5
- package/src/functions/itemPool.ts +4 -2
- package/src/functions/jsonRoom.ts +1 -1
- package/src/functions/level.ts +2 -2
- package/src/functions/levelGrid.ts +2 -2
- package/src/functions/logEntities.ts +6 -3
- package/src/functions/logMisc.ts +2 -1
- package/src/functions/map.ts +2 -0
- package/src/functions/merge.ts +4 -3
- package/src/functions/npcDataStructures.ts +11 -3
- package/src/functions/playerCollectibles.ts +7 -7
- package/src/functions/playerDataStructures.ts +8 -3
- package/src/functions/playerTrinkets.ts +2 -2
- package/src/functions/players.ts +6 -4
- package/src/functions/rng.ts +8 -2
- package/src/functions/rooms.ts +4 -4
- package/src/functions/run.ts +6 -2
- package/src/functions/set.ts +3 -0
- package/src/functions/sort.ts +5 -1
- package/src/functions/stage.ts +5 -3
- package/src/functions/string.ts +3 -2
- package/src/functions/table.ts +4 -4
- package/src/functions/trinketGive.ts +1 -1
- package/src/functions/utils.ts +1 -1
- package/src/functions/vector.ts +1 -1
- package/src/functions/weighted.ts +2 -2
- package/src/index.ts +1 -0
- package/src/sets/bossSets.ts +81 -117
- package/src/types/AnyFunction.ts +1 -1
- package/src/types/ReadonlyRecord.ts +3 -0
package/dist/sets/bossSets.lua
CHANGED
|
@@ -2,13 +2,15 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
3
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
4
4
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
5
|
+
local Set = ____lualib.Set
|
|
6
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
5
7
|
local ____exports = {}
|
|
6
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
9
|
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
8
10
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
9
|
-
local
|
|
11
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
10
12
|
local ____cachedEnumValues = require("arrays.cachedEnumValues")
|
|
11
|
-
local
|
|
13
|
+
local BOSS_ID_VALUES = ____cachedEnumValues.BOSS_ID_VALUES
|
|
12
14
|
local ____set = require("functions.set")
|
|
13
15
|
local combineSets = ____set.combineSets
|
|
14
16
|
local ____storyBosses = require("functions.storyBosses")
|
|
@@ -17,7 +19,7 @@ local ____ReadonlyMap = require("types.ReadonlyMap")
|
|
|
17
19
|
local ReadonlyMap = ____ReadonlyMap.ReadonlyMap
|
|
18
20
|
local ____ReadonlySet = require("types.ReadonlySet")
|
|
19
21
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
20
|
-
---
|
|
22
|
+
--- For `StageID.BASEMENT` (1).
|
|
21
23
|
local BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
22
24
|
BossID.MONSTRO,
|
|
23
25
|
BossID.LARRY_JR,
|
|
@@ -34,7 +36,7 @@ local BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
34
36
|
BossID.TURDLING,
|
|
35
37
|
BossID.BABY_PLUM
|
|
36
38
|
})
|
|
37
|
-
---
|
|
39
|
+
--- For `StageID.CELLAR` (2).
|
|
38
40
|
local CELLAR_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
39
41
|
BossID.FAMINE,
|
|
40
42
|
BossID.DUKE_OF_FLIES,
|
|
@@ -48,7 +50,7 @@ local CELLAR_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
48
50
|
BossID.RAG_MAN,
|
|
49
51
|
BossID.BABY_PLUM
|
|
50
52
|
})
|
|
51
|
-
---
|
|
53
|
+
--- For `StageID.BURNING_BASEMENT` (3).
|
|
52
54
|
local BURNING_BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
53
55
|
BossID.MONSTRO,
|
|
54
56
|
BossID.LARRY_JR,
|
|
@@ -66,9 +68,9 @@ local BURNING_BASEMENT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
66
68
|
BossID.TURDLING,
|
|
67
69
|
BossID.BABY_PLUM
|
|
68
70
|
})
|
|
69
|
-
---
|
|
71
|
+
--- For `StageID.DOWNPOUR` (27).
|
|
70
72
|
local DOWNPOUR_BOSSES_SET = __TS__New(ReadonlySet, {BossID.LIL_BLUB, BossID.WORMWOOD, BossID.RAINMAKER, BossID.MIN_MIN})
|
|
71
|
-
---
|
|
73
|
+
--- For `StageID.DROSS` (28).
|
|
72
74
|
local DROSS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
73
75
|
BossID.LIL_BLUB,
|
|
74
76
|
BossID.WORMWOOD,
|
|
@@ -76,7 +78,7 @@ local DROSS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
76
78
|
BossID.COLOSTOMIA,
|
|
77
79
|
BossID.TURDLET
|
|
78
80
|
})
|
|
79
|
-
--- The set of unique bosses for Basement, Cellar, and
|
|
81
|
+
--- The set of unique bosses for Basement, Cellar, Burning Basement, Downpour, and Dross.
|
|
80
82
|
local ALL_BASEMENT_BOSSES_SET = combineSets(
|
|
81
83
|
nil,
|
|
82
84
|
BASEMENT_BOSSES_SET,
|
|
@@ -85,14 +87,7 @@ local ALL_BASEMENT_BOSSES_SET = combineSets(
|
|
|
85
87
|
DOWNPOUR_BOSSES_SET,
|
|
86
88
|
DROSS_BOSSES_SET
|
|
87
89
|
)
|
|
88
|
-
|
|
89
|
-
{StageType.ORIGINAL, BASEMENT_BOSSES_SET},
|
|
90
|
-
{StageType.WRATH_OF_THE_LAMB, CELLAR_BOSSES_SET},
|
|
91
|
-
{StageType.AFTERBIRTH, BURNING_BASEMENT_BOSSES_SET},
|
|
92
|
-
{StageType.REPENTANCE, DOWNPOUR_BOSSES_SET},
|
|
93
|
-
{StageType.REPENTANCE_B, DROSS_BOSSES_SET}
|
|
94
|
-
})
|
|
95
|
-
--- Contains just the bosses in Caves (not e.g. Flooded Caves).
|
|
90
|
+
--- For `StageID.CAVES` (4).
|
|
96
91
|
local CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
97
92
|
BossID.CHUB,
|
|
98
93
|
BossID.GURDY,
|
|
@@ -110,7 +105,7 @@ local CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
110
105
|
BossID.BIG_HORN,
|
|
111
106
|
BossID.BUMBINO
|
|
112
107
|
})
|
|
113
|
-
---
|
|
108
|
+
--- For `StageID.CATACOMBS` (5).
|
|
114
109
|
local CATACOMBS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
115
110
|
BossID.PESTILENCE,
|
|
116
111
|
BossID.PEEP,
|
|
@@ -129,7 +124,7 @@ local CATACOMBS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
129
124
|
BossID.BIG_HORN,
|
|
130
125
|
BossID.BUMBINO
|
|
131
126
|
})
|
|
132
|
-
---
|
|
127
|
+
--- For `StageID.FLOODED_CAVES` (6).
|
|
133
128
|
local FLOODED_CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
134
129
|
BossID.CHUB,
|
|
135
130
|
BossID.GURDY,
|
|
@@ -149,9 +144,9 @@ local FLOODED_CAVES_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
149
144
|
BossID.BIG_HORN,
|
|
150
145
|
BossID.BUMBINO
|
|
151
146
|
})
|
|
152
|
-
---
|
|
147
|
+
--- For `StageID.MINES` (29).
|
|
153
148
|
local MINES_BOSSES_SET = __TS__New(ReadonlySet, {BossID.REAP_CREEP, BossID.TUFF_TWINS, BossID.HORNFEL, BossID.GREAT_GIDEON})
|
|
154
|
-
---
|
|
149
|
+
--- For `StageID.ASHPIT` (30).
|
|
155
150
|
local ASHPIT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
156
151
|
BossID.PILE,
|
|
157
152
|
BossID.GREAT_GIDEON,
|
|
@@ -159,7 +154,7 @@ local ASHPIT_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
159
154
|
BossID.SHELL,
|
|
160
155
|
BossID.CLUTCH
|
|
161
156
|
})
|
|
162
|
-
--- The set of unique bosses for Caves, Catacombs, and
|
|
157
|
+
--- The set of unique bosses for Caves, Catacombs, Flooded Caves, Mines, and Ashpit.
|
|
163
158
|
local ALL_CAVES_BOSSES_SET = combineSets(
|
|
164
159
|
nil,
|
|
165
160
|
CAVES_BOSSES_SET,
|
|
@@ -168,14 +163,7 @@ local ALL_CAVES_BOSSES_SET = combineSets(
|
|
|
168
163
|
MINES_BOSSES_SET,
|
|
169
164
|
ASHPIT_BOSSES_SET
|
|
170
165
|
)
|
|
171
|
-
|
|
172
|
-
{StageType.ORIGINAL, CAVES_BOSSES_SET},
|
|
173
|
-
{StageType.WRATH_OF_THE_LAMB, CATACOMBS_BOSSES_SET},
|
|
174
|
-
{StageType.AFTERBIRTH, FLOODED_CAVES_BOSSES_SET},
|
|
175
|
-
{StageType.REPENTANCE, MINES_BOSSES_SET},
|
|
176
|
-
{StageType.REPENTANCE_B, ASHPIT_BOSSES_SET}
|
|
177
|
-
})
|
|
178
|
-
--- Contains just the bosses in Depths (not e.g. Dank Depths).
|
|
166
|
+
--- For `StageID.DEPTHS` (7).
|
|
179
167
|
--
|
|
180
168
|
-- Note that this set includes Mom, even though they are not technically in the boss pool.
|
|
181
169
|
local DEPTHS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
@@ -192,7 +180,7 @@ local DEPTHS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
192
180
|
BossID.SISTERS_VIS,
|
|
193
181
|
BossID.REAP_CREEP
|
|
194
182
|
})
|
|
195
|
-
---
|
|
183
|
+
--- For `StageID.NECROPOLIS` (8).
|
|
196
184
|
--
|
|
197
185
|
-- Note that this set includes Mom, even though they are not technically in the boss pool.
|
|
198
186
|
local NECROPOLIS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
@@ -208,7 +196,7 @@ local NECROPOLIS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
208
196
|
BossID.SISTERS_VIS,
|
|
209
197
|
BossID.PILE
|
|
210
198
|
})
|
|
211
|
-
---
|
|
199
|
+
--- For `StageID.DANK_DEPTHS` (9).
|
|
212
200
|
--
|
|
213
201
|
-- Note that this set includes Mom, even though they are not technically in the boss pool.
|
|
214
202
|
local DANK_DEPTHS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
@@ -225,15 +213,15 @@ local DANK_DEPTHS_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
225
213
|
BossID.SISTERS_VIS,
|
|
226
214
|
BossID.REAP_CREEP
|
|
227
215
|
})
|
|
228
|
-
---
|
|
216
|
+
--- For `StageID.MAUSOLEUM` (31).
|
|
229
217
|
--
|
|
230
218
|
-- Note that this set includes Mausoleum Mom, even though they are not technically in the boss pool.
|
|
231
219
|
local MAUSOLEUM_BOSSES_SET = __TS__New(ReadonlySet, {BossID.SIREN, BossID.HERETIC, BossID.MAUSOLEUM_MOM})
|
|
232
|
-
---
|
|
220
|
+
--- For `StageID.GEHENNA` (32).
|
|
233
221
|
--
|
|
234
222
|
-- Note that this set includes Mausoleum Mom, even though they are not technically in the boss pool.
|
|
235
223
|
local GEHENNA_BOSSES_SET = __TS__New(ReadonlySet, {BossID.VISAGE, BossID.MAUSOLEUM_MOM, BossID.HORNY_BOYS})
|
|
236
|
-
--- The set of unique bosses for Depths, Necropolis, and
|
|
224
|
+
--- The set of unique bosses for Depths, Necropolis, Dank Depths, Mausoleum, and Gehenna.
|
|
237
225
|
local ALL_DEPTHS_BOSSES_SET = combineSets(
|
|
238
226
|
nil,
|
|
239
227
|
DEPTHS_BOSSES_SET,
|
|
@@ -242,14 +230,7 @@ local ALL_DEPTHS_BOSSES_SET = combineSets(
|
|
|
242
230
|
MAUSOLEUM_BOSSES_SET,
|
|
243
231
|
GEHENNA_BOSSES_SET
|
|
244
232
|
)
|
|
245
|
-
|
|
246
|
-
{StageType.ORIGINAL, DEPTHS_BOSSES_SET},
|
|
247
|
-
{StageType.WRATH_OF_THE_LAMB, NECROPOLIS_BOSSES_SET},
|
|
248
|
-
{StageType.AFTERBIRTH, DANK_DEPTHS_BOSSES_SET},
|
|
249
|
-
{StageType.REPENTANCE, MAUSOLEUM_BOSSES_SET},
|
|
250
|
-
{StageType.REPENTANCE_B, GEHENNA_BOSSES_SET}
|
|
251
|
-
})
|
|
252
|
-
--- Contains just the bosses in Womb (not e.g. Scarred Womb).
|
|
233
|
+
--- For `StageID.WOMB` (10).
|
|
253
234
|
--
|
|
254
235
|
-- Note that this set includes Mom's Heart & It Lives, even though they are not technically in the
|
|
255
236
|
-- boss pool.
|
|
@@ -267,7 +248,7 @@ local WOMB_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
267
248
|
BossID.MR_FRED,
|
|
268
249
|
BossID.MATRIARCH
|
|
269
250
|
})
|
|
270
|
-
---
|
|
251
|
+
--- For `StageID.UTERO` (11).
|
|
271
252
|
--
|
|
272
253
|
-- Note that this set includes Mom's Heart & It Lives, even though they are not technically in the
|
|
273
254
|
-- boss pool.
|
|
@@ -284,7 +265,7 @@ local UTERO_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
284
265
|
BossID.DADDY_LONG_LEGS,
|
|
285
266
|
BossID.TRIACHNID
|
|
286
267
|
})
|
|
287
|
-
---
|
|
268
|
+
--- For `StageID.SCARRED_WOMB` (12).
|
|
288
269
|
--
|
|
289
270
|
-- Note that this set includes Mom's Heart & It Lives, even though they are not technically in the
|
|
290
271
|
-- boss pool.
|
|
@@ -303,11 +284,11 @@ local SCARRED_WOMB_BOSSES_SET = __TS__New(ReadonlySet, {
|
|
|
303
284
|
BossID.MR_FRED,
|
|
304
285
|
BossID.MATRIARCH
|
|
305
286
|
})
|
|
306
|
-
---
|
|
287
|
+
--- For `StageID.CORPSE` (33).
|
|
307
288
|
--
|
|
308
|
-
-- Note that this set includes Mother, even though
|
|
289
|
+
-- Note that this set includes Mother, even though she is not technically in the boss pool.
|
|
309
290
|
local CORPSE_BOSSES_SET = __TS__New(ReadonlySet, {BossID.SCOURGE, BossID.CHIMERA, BossID.ROTGUT, BossID.MOTHER})
|
|
310
|
-
--- The set of unique bosses for Womb, Utero, and
|
|
291
|
+
--- The set of unique bosses for Womb, Utero, Scarred Womb, and Corpse.
|
|
311
292
|
local ALL_WOMB_BOSSES_SET = combineSets(
|
|
312
293
|
nil,
|
|
313
294
|
WOMB_BOSSES_SET,
|
|
@@ -315,38 +296,46 @@ local ALL_WOMB_BOSSES_SET = combineSets(
|
|
|
315
296
|
SCARRED_WOMB_BOSSES_SET,
|
|
316
297
|
CORPSE_BOSSES_SET
|
|
317
298
|
)
|
|
318
|
-
local WOMB_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, WOMB_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, UTERO_BOSSES_SET}, {StageType.AFTERBIRTH, SCARRED_WOMB_BOSSES_SET}, {StageType.REPENTANCE, CORPSE_BOSSES_SET}})
|
|
319
299
|
local BLUE_WOMB_BOSSES_SET = __TS__New(ReadonlySet, {BossID.HUSH})
|
|
320
|
-
local BLUE_WOMB_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, BLUE_WOMB_BOSSES_SET}})
|
|
321
300
|
local SHEOL_BOSSES_SET = __TS__New(ReadonlySet, {BossID.SATAN})
|
|
322
301
|
local CATHEDRAL_BOSSES_SET = __TS__New(ReadonlySet, {BossID.ISAAC})
|
|
323
302
|
local ALL_STAGE_10_BOSSES_SET = combineSets(nil, SHEOL_BOSSES_SET, CATHEDRAL_BOSSES_SET)
|
|
324
|
-
local STAGE_10_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, SHEOL_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CATHEDRAL_BOSSES_SET}})
|
|
325
303
|
--- Note that this set includes Mega Satan, even though they are not technically in the boss pool.
|
|
326
304
|
local DARK_ROOM_BOSSES_SET = __TS__New(ReadonlySet, {BossID.LAMB, BossID.MEGA_SATAN})
|
|
327
305
|
--- Note that this set includes Mega Satan, even though they are not technically in the boss pool.
|
|
328
306
|
local CHEST_BOSSES_SET = __TS__New(ReadonlySet, {BossID.BLUE_BABY, BossID.MEGA_SATAN})
|
|
329
307
|
local ALL_STAGE_11_BOSSES_SET = combineSets(nil, DARK_ROOM_BOSSES_SET, CHEST_BOSSES_SET)
|
|
330
|
-
local STAGE_11_STAGE_TYPE_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {{StageType.ORIGINAL, DARK_ROOM_BOSSES_SET}, {StageType.WRATH_OF_THE_LAMB, CHEST_BOSSES_SET}})
|
|
331
308
|
local VOID_BOSSES_SET = __TS__New(ReadonlySet, {BossID.DELIRIUM})
|
|
332
|
-
|
|
333
|
-
|
|
309
|
+
--- Includes Dogma and The Beast. Does not include Ultra Famine, Ultra Pestilence, Ultra War, and
|
|
310
|
+
-- Ultra Death (since they do not have boss IDs).
|
|
334
311
|
local HOME_BOSSES_SET = __TS__New(ReadonlySet, {BossID.DOGMA, BossID.BEAST})
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
{
|
|
338
|
-
{
|
|
339
|
-
{
|
|
340
|
-
{
|
|
341
|
-
{
|
|
342
|
-
{
|
|
343
|
-
{
|
|
344
|
-
{
|
|
345
|
-
{
|
|
346
|
-
{
|
|
347
|
-
{
|
|
348
|
-
{
|
|
349
|
-
{
|
|
312
|
+
____exports.STAGE_ID_TO_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
|
|
313
|
+
{StageID.BASEMENT, BASEMENT_BOSSES_SET},
|
|
314
|
+
{StageID.CELLAR, CELLAR_BOSSES_SET},
|
|
315
|
+
{StageID.BURNING_BASEMENT, BURNING_BASEMENT_BOSSES_SET},
|
|
316
|
+
{StageID.DOWNPOUR, DOWNPOUR_BOSSES_SET},
|
|
317
|
+
{StageID.DROSS, DROSS_BOSSES_SET},
|
|
318
|
+
{StageID.CAVES, CAVES_BOSSES_SET},
|
|
319
|
+
{StageID.CATACOMBS, CATACOMBS_BOSSES_SET},
|
|
320
|
+
{StageID.FLOODED_CAVES, FLOODED_CAVES_BOSSES_SET},
|
|
321
|
+
{StageID.MINES, MINES_BOSSES_SET},
|
|
322
|
+
{StageID.ASHPIT, ASHPIT_BOSSES_SET},
|
|
323
|
+
{StageID.DEPTHS, DEPTHS_BOSSES_SET},
|
|
324
|
+
{StageID.NECROPOLIS, NECROPOLIS_BOSSES_SET},
|
|
325
|
+
{StageID.DANK_DEPTHS, DANK_DEPTHS_BOSSES_SET},
|
|
326
|
+
{StageID.MAUSOLEUM, MAUSOLEUM_BOSSES_SET},
|
|
327
|
+
{StageID.GEHENNA, GEHENNA_BOSSES_SET},
|
|
328
|
+
{StageID.WOMB, WOMB_BOSSES_SET},
|
|
329
|
+
{StageID.UTERO, UTERO_BOSSES_SET},
|
|
330
|
+
{StageID.SCARRED_WOMB, SCARRED_WOMB_BOSSES_SET},
|
|
331
|
+
{StageID.CORPSE, CORPSE_BOSSES_SET},
|
|
332
|
+
{StageID.BLUE_WOMB, BLUE_WOMB_BOSSES_SET},
|
|
333
|
+
{StageID.SHEOL, SHEOL_BOSSES_SET},
|
|
334
|
+
{StageID.CATHEDRAL, CATHEDRAL_BOSSES_SET},
|
|
335
|
+
{StageID.DARK_ROOM, DARK_ROOM_BOSSES_SET},
|
|
336
|
+
{StageID.CHEST, CHEST_BOSSES_SET},
|
|
337
|
+
{StageID.VOID, VOID_BOSSES_SET},
|
|
338
|
+
{StageID.HOME, HOME_BOSSES_SET}
|
|
350
339
|
})
|
|
351
340
|
____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
|
|
352
341
|
{LevelStage.BASEMENT_1, ALL_BASEMENT_BOSSES_SET},
|
|
@@ -366,7 +355,7 @@ ____exports.STAGE_TO_COMBINED_BOSS_SET_MAP = __TS__New(ReadonlyMap, {
|
|
|
366
355
|
____exports.ALL_BOSSES_SET = __TS__New(
|
|
367
356
|
ReadonlySet,
|
|
368
357
|
__TS__ArrayFilter(
|
|
369
|
-
|
|
358
|
+
BOSS_ID_VALUES,
|
|
370
359
|
function(____, bossID) return bossID ~= BossID.RAGLICH end
|
|
371
360
|
)
|
|
372
361
|
)
|
|
@@ -377,4 +366,19 @@ ____exports.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = __TS__New(
|
|
|
377
366
|
function(____, bossID) return not isStoryBossID(nil, bossID) end
|
|
378
367
|
)
|
|
379
368
|
)
|
|
369
|
+
____exports.BOSS_ID_TO_STAGE_IDS = (function()
|
|
370
|
+
local bossIDsToStageIDs = {}
|
|
371
|
+
for ____, bossID in ipairs(BOSS_ID_VALUES) do
|
|
372
|
+
local stageIDs = __TS__New(Set)
|
|
373
|
+
for ____, ____value in __TS__Iterator(____exports.STAGE_ID_TO_BOSS_SET_MAP) do
|
|
374
|
+
local stageID = ____value[1]
|
|
375
|
+
local bossSet = ____value[2]
|
|
376
|
+
if bossSet:has(bossID) then
|
|
377
|
+
stageIDs:add(stageID)
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
bossIDsToStageIDs[bossID] = stageIDs
|
|
381
|
+
end
|
|
382
|
+
return bossIDsToStageIDs
|
|
383
|
+
end)(nil)
|
|
380
384
|
return ____exports
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Helper type to represent any function. This is safer than using the built-in `Function` type, as
|
|
3
3
|
* it does not completely turn off all type safety.
|
|
4
4
|
*/
|
|
5
|
-
export type AnyFunction = (...args: unknown[]) => unknown;
|
|
5
|
+
export type AnyFunction = (...args: readonly unknown[]) => unknown;
|
|
6
6
|
//# sourceMappingURL=AnyFunction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnyFunction.d.ts","sourceRoot":"","sources":["../../src/types/AnyFunction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"AnyFunction.d.ts","sourceRoot":"","sources":["../../src/types/AnyFunction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,SAAS,OAAO,EAAE,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadonlyRecord.d.ts","sourceRoot":"","sources":["../../src/types/ReadonlyRecord.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,IAAI,QAAQ,CAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "82.0.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.0.
|
|
40
|
+
"isaac-typescript-definitions": "^39.0.6"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -27,64 +27,48 @@ import { PlayerStat } from "../enums/PlayerStat";
|
|
|
27
27
|
import { SerializationBrand } from "../enums/private/SerializationBrand";
|
|
28
28
|
import { getEnumValues } from "../functions/enums";
|
|
29
29
|
|
|
30
|
-
export const ACTIVE_SLOT_VALUES
|
|
31
|
-
getEnumValues(ActiveSlot);
|
|
30
|
+
export const ACTIVE_SLOT_VALUES = getEnumValues(ActiveSlot);
|
|
32
31
|
|
|
33
|
-
export const
|
|
32
|
+
export const BOSS_ID_VALUES = getEnumValues(BossID);
|
|
34
33
|
|
|
35
|
-
export const CACHE_FLAG_VALUES
|
|
34
|
+
export const CACHE_FLAG_VALUES = getEnumValues(CacheFlag);
|
|
36
35
|
|
|
37
|
-
export const CONTROLLER_INDEX_VALUES
|
|
38
|
-
getEnumValues(ControllerIndex);
|
|
36
|
+
export const CONTROLLER_INDEX_VALUES = getEnumValues(ControllerIndex);
|
|
39
37
|
|
|
40
|
-
export const DOOR_SLOT_FLAG_VALUES
|
|
41
|
-
getEnumValues(DoorSlotFlag);
|
|
38
|
+
export const DOOR_SLOT_FLAG_VALUES = getEnumValues(DoorSlotFlag);
|
|
42
39
|
|
|
43
|
-
export const DOOR_SLOT_VALUES
|
|
40
|
+
export const DOOR_SLOT_VALUES = getEnumValues(DoorSlot);
|
|
44
41
|
|
|
45
|
-
export const GRID_ENTITY_TYPE_VALUES
|
|
46
|
-
getEnumValues(GridEntityType);
|
|
42
|
+
export const GRID_ENTITY_TYPE_VALUES = getEnumValues(GridEntityType);
|
|
47
43
|
|
|
48
|
-
export const GRID_ENTITY_XML_TYPE_VALUES
|
|
49
|
-
getEnumValues(GridEntityXMLType);
|
|
44
|
+
export const GRID_ENTITY_XML_TYPE_VALUES = getEnumValues(GridEntityXMLType);
|
|
50
45
|
|
|
51
|
-
export const MOD_CALLBACK_CUSTOM_VALUES
|
|
52
|
-
getEnumValues(ModCallbackCustom);
|
|
46
|
+
export const MOD_CALLBACK_CUSTOM_VALUES = getEnumValues(ModCallbackCustom);
|
|
53
47
|
|
|
54
|
-
export const ITEM_CONFIG_TAG_VALUES
|
|
55
|
-
getEnumValues(ItemConfigTag);
|
|
48
|
+
export const ITEM_CONFIG_TAG_VALUES = getEnumValues(ItemConfigTag);
|
|
56
49
|
|
|
57
|
-
export const ITEM_CONFIG_CARD_TYPE_VALUES
|
|
58
|
-
getEnumValues(ItemConfigCardType);
|
|
50
|
+
export const ITEM_CONFIG_CARD_TYPE_VALUES = getEnumValues(ItemConfigCardType);
|
|
59
51
|
|
|
60
|
-
export const ITEM_POOL_TYPE_VALUES
|
|
61
|
-
getEnumValues(ItemPoolType);
|
|
52
|
+
export const ITEM_POOL_TYPE_VALUES = getEnumValues(ItemPoolType);
|
|
62
53
|
|
|
63
|
-
export const KEYBOARD_VALUES
|
|
54
|
+
export const KEYBOARD_VALUES = getEnumValues(Keyboard);
|
|
64
55
|
|
|
65
|
-
export const HEALTH_TYPE_VALUES
|
|
66
|
-
getEnumValues(HealthType);
|
|
56
|
+
export const HEALTH_TYPE_VALUES = getEnumValues(HealthType);
|
|
67
57
|
|
|
68
|
-
export const PILL_COLOR_VALUES
|
|
58
|
+
export const PILL_COLOR_VALUES = getEnumValues(PillColor);
|
|
69
59
|
|
|
70
|
-
export const PLAYER_FORM_VALUES
|
|
71
|
-
getEnumValues(PlayerForm);
|
|
60
|
+
export const PLAYER_FORM_VALUES = getEnumValues(PlayerForm);
|
|
72
61
|
|
|
73
|
-
export const POCKET_ITEM_SLOT_VALUES
|
|
74
|
-
getEnumValues(PocketItemSlot);
|
|
62
|
+
export const POCKET_ITEM_SLOT_VALUES = getEnumValues(PocketItemSlot);
|
|
75
63
|
|
|
76
|
-
export const ROOM_SHAPE_VALUES
|
|
64
|
+
export const ROOM_SHAPE_VALUES = getEnumValues(RoomShape);
|
|
77
65
|
|
|
78
|
-
export const SEED_EFFECTS
|
|
66
|
+
export const SEED_EFFECTS = getEnumValues(SeedEffect);
|
|
79
67
|
|
|
80
|
-
export const SERIALIZATION_BRAND_VALUES
|
|
81
|
-
getEnumValues(SerializationBrand);
|
|
68
|
+
export const SERIALIZATION_BRAND_VALUES = getEnumValues(SerializationBrand);
|
|
82
69
|
|
|
83
|
-
export const SOUND_EFFECT_VALUES
|
|
84
|
-
getEnumValues(SoundEffect);
|
|
70
|
+
export const SOUND_EFFECT_VALUES = getEnumValues(SoundEffect);
|
|
85
71
|
|
|
86
|
-
export const PLAYER_STAT_VALUES
|
|
87
|
-
getEnumValues(PlayerStat);
|
|
72
|
+
export const PLAYER_STAT_VALUES = getEnumValues(PlayerStat);
|
|
88
73
|
|
|
89
|
-
export const TRINKET_SLOT_VALUES
|
|
90
|
-
getEnumValues(TrinketSlot);
|
|
74
|
+
export const TRINKET_SLOT_VALUES = getEnumValues(TrinketSlot);
|
|
@@ -94,7 +94,7 @@ export class ModFeature {
|
|
|
94
94
|
| (<T extends boolean>(
|
|
95
95
|
vanilla: T,
|
|
96
96
|
modCallback: T extends true ? ModCallback : ModCallbackCustom,
|
|
97
|
-
...callbackArgs: unknown[]
|
|
97
|
+
...callbackArgs: readonly unknown[]
|
|
98
98
|
) => boolean)
|
|
99
99
|
| null = null;
|
|
100
100
|
|
|
@@ -249,12 +249,12 @@ function addCallback(
|
|
|
249
249
|
modCallback: ModCallback | ModCallbackCustom,
|
|
250
250
|
priority: CallbackPriority | int,
|
|
251
251
|
callback: Function, // eslint-disable-line @typescript-eslint/ban-types
|
|
252
|
-
parameters: unknown[],
|
|
252
|
+
parameters: readonly unknown[],
|
|
253
253
|
vanilla: boolean,
|
|
254
254
|
) {
|
|
255
255
|
// We need to wrap the callback in a new function so that we can explicitly pass the class as the
|
|
256
256
|
// first argument. (Otherwise, the method will not be able to properly access `this`.
|
|
257
|
-
const wrappedCallback = (...callbackArgs: unknown[]) => {
|
|
257
|
+
const wrappedCallback = (...callbackArgs: readonly unknown[]) => {
|
|
258
258
|
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
259
259
|
const conditionalFunc = modFeature["shouldCallbackMethodsFire"];
|
|
260
260
|
if (conditionalFunc !== null) {
|
|
@@ -266,7 +266,7 @@ function addCallback(
|
|
|
266
266
|
|
|
267
267
|
const castedCallback = callback as (
|
|
268
268
|
this: void,
|
|
269
|
-
...args: unknown[]
|
|
269
|
+
...args: readonly unknown[]
|
|
270
270
|
) => unknown;
|
|
271
271
|
return castedCallback(modFeature, ...callbackArgs);
|
|
272
272
|
};
|
|
@@ -453,7 +453,7 @@ function getExportedMethodsFromFeature(
|
|
|
453
453
|
|
|
454
454
|
// In order for "this" to work properly in the method, we have to wrap the method invocation in
|
|
455
455
|
// an arrow function.
|
|
456
|
-
const wrappedMethod = (...args: unknown[]) =>
|
|
456
|
+
const wrappedMethod = (...args: readonly unknown[]) =>
|
|
457
457
|
// We use a non-null assertion since we have already validated that the function exists. (See
|
|
458
458
|
// the above comment.)
|
|
459
459
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -125,6 +125,7 @@ export class PlayerReorderedCallbacks extends Feature {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
function dequeue(
|
|
128
|
+
// eslint-disable-next-line isaacscript/prefer-readonly-parameter-types
|
|
128
129
|
queue: QueueElement[],
|
|
129
130
|
fireFunc: (player: EntityPlayer, renderOffset: Vector) => void,
|
|
130
131
|
) {
|
|
@@ -6,12 +6,16 @@ import { arrayRemoveIndexInPlace } from "../../../functions/array";
|
|
|
6
6
|
import { copyMap } from "../../../functions/map";
|
|
7
7
|
import { assertDefined } from "../../../functions/utils";
|
|
8
8
|
import { getRandomIndexFromWeightedArray } from "../../../functions/weighted";
|
|
9
|
+
import { ReadonlyMap } from "../../../types/ReadonlyMap";
|
|
9
10
|
import type { WeightedArray } from "../../../types/WeightedArray";
|
|
10
11
|
import { Feature } from "../../private/Feature";
|
|
11
12
|
|
|
12
13
|
const v = {
|
|
13
14
|
run: {
|
|
14
|
-
customItemPools: new
|
|
15
|
+
customItemPools: new ReadonlyMap<
|
|
16
|
+
ItemPoolType,
|
|
17
|
+
WeightedArray<CollectibleType>
|
|
18
|
+
>(),
|
|
15
19
|
},
|
|
16
20
|
};
|
|
17
21
|
|
|
@@ -80,7 +84,7 @@ export class CustomItemPools extends Feature {
|
|
|
80
84
|
@Exported
|
|
81
85
|
public registerCustomItemPool(
|
|
82
86
|
itemPoolTypeCustom: ItemPoolType,
|
|
83
|
-
collectibles: WeightedArray<CollectibleType
|
|
87
|
+
collectibles: Readonly<WeightedArray<CollectibleType>>,
|
|
84
88
|
): void {
|
|
85
89
|
if (customItemPoolMap.has(itemPoolTypeCustom)) {
|
|
86
90
|
error(
|
|
@@ -88,7 +92,10 @@ export class CustomItemPools extends Feature {
|
|
|
88
92
|
);
|
|
89
93
|
}
|
|
90
94
|
|
|
91
|
-
customItemPoolMap.set(
|
|
95
|
+
customItemPoolMap.set(
|
|
96
|
+
itemPoolTypeCustom,
|
|
97
|
+
collectibles as WeightedArray<CollectibleType>,
|
|
98
|
+
);
|
|
92
99
|
}
|
|
93
100
|
|
|
94
101
|
/**
|
|
@@ -244,7 +244,7 @@ export class CustomStages extends Feature {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
if (!this.usingRedKey) {
|
|
247
|
-
return;
|
|
247
|
+
return undefined;
|
|
248
248
|
}
|
|
249
249
|
this.usingRedKey = false;
|
|
250
250
|
|
|
@@ -277,7 +277,7 @@ export class CustomStages extends Feature {
|
|
|
277
277
|
): Record<string, unknown> | undefined => {
|
|
278
278
|
const customStage = v.run.currentCustomStage;
|
|
279
279
|
if (customStage === null) {
|
|
280
|
-
return;
|
|
280
|
+
return undefined;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
streakTextGetShaderParams(customStage, shaderName);
|
|
@@ -164,7 +164,10 @@ export class DisableInputs extends Feature {
|
|
|
164
164
|
* @public
|
|
165
165
|
*/
|
|
166
166
|
@Exported
|
|
167
|
-
public disableInputs(
|
|
167
|
+
public disableInputs(
|
|
168
|
+
key: string,
|
|
169
|
+
...buttonActions: readonly ButtonAction[]
|
|
170
|
+
): void {
|
|
168
171
|
const buttonActionsSet = new ReadonlySet(buttonActions);
|
|
169
172
|
v.run.disableInputs.set(key, buttonActionsSet);
|
|
170
173
|
}
|
|
@@ -215,8 +215,8 @@ function removeItemsAndTrinketsThatAffectItemPools(): {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
function restoreItemsAndTrinketsThatAffectItemPools(
|
|
218
|
-
removedItemsMap:
|
|
219
|
-
removedTrinketsMap:
|
|
218
|
+
removedItemsMap: ReadonlyMap<PlayerIndex, CollectibleType[]>,
|
|
219
|
+
removedTrinketsMap: ReadonlyMap<PlayerIndex, TrinketType[]>,
|
|
220
220
|
) {
|
|
221
221
|
for (const player of getAllPlayers()) {
|
|
222
222
|
const removedItems = mapGetPlayer(removedItemsMap, player);
|
|
@@ -1362,7 +1362,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1362
1362
|
*/
|
|
1363
1363
|
@Exported
|
|
1364
1364
|
public getCardTypesOfType(
|
|
1365
|
-
...itemConfigCardTypes: ItemConfigCardType[]
|
|
1365
|
+
...itemConfigCardTypes: readonly ItemConfigCardType[]
|
|
1366
1366
|
): readonly CardType[] {
|
|
1367
1367
|
this.lazyInit();
|
|
1368
1368
|
|
|
@@ -1406,7 +1406,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1406
1406
|
public getRandomCardTypeOfType(
|
|
1407
1407
|
itemConfigCardType: ItemConfigCardType,
|
|
1408
1408
|
seedOrRNG: Seed | RNG | undefined,
|
|
1409
|
-
exceptions: CardType[] = [],
|
|
1409
|
+
exceptions: readonly CardType[] = [],
|
|
1410
1410
|
): CardType {
|
|
1411
1411
|
const cardTypes = this.getCardTypesOfType(itemConfigCardType);
|
|
1412
1412
|
return getRandomArrayElement(cardTypes, seedOrRNG, exceptions);
|
|
@@ -1436,7 +1436,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1436
1436
|
@Exported
|
|
1437
1437
|
public getRandomCard(
|
|
1438
1438
|
seedOrRNG: Seed | RNG | undefined,
|
|
1439
|
-
exceptions: CardType[] = [],
|
|
1439
|
+
exceptions: readonly CardType[] = [],
|
|
1440
1440
|
): CardType {
|
|
1441
1441
|
this.lazyInit();
|
|
1442
1442
|
return getRandomArrayElement(this.cardTypeCardArray, seedOrRNG, exceptions);
|
|
@@ -1463,10 +1463,10 @@ export class ModdedElementSets extends Feature {
|
|
|
1463
1463
|
@Exported
|
|
1464
1464
|
public getRandomRune(
|
|
1465
1465
|
seedOrRNG: Seed | RNG | undefined,
|
|
1466
|
-
exceptions: CardType[] = [],
|
|
1466
|
+
exceptions: readonly CardType[] = [],
|
|
1467
1467
|
): CardType {
|
|
1468
1468
|
const runeCardTypes = this.getCardTypesOfType(ItemConfigCardType.RUNE);
|
|
1469
|
-
exceptions
|
|
1470
|
-
return getRandomArrayElement(runeCardTypes, seedOrRNG,
|
|
1469
|
+
const runeExceptions = [...exceptions, CardType.RUNE_SHARD];
|
|
1470
|
+
return getRandomArrayElement(runeCardTypes, seedOrRNG, runeExceptions);
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
@@ -108,11 +108,11 @@ export class Pause extends Feature {
|
|
|
108
108
|
buttonAction: ButtonAction,
|
|
109
109
|
): boolean | float | undefined => {
|
|
110
110
|
if (buttonAction !== ButtonAction.SHOOT_RIGHT) {
|
|
111
|
-
return;
|
|
111
|
+
return undefined;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
if (!v.run.shouldUnpause) {
|
|
115
|
-
return;
|
|
115
|
+
return undefined;
|
|
116
116
|
}
|
|
117
117
|
v.run.shouldUnpause = false;
|
|
118
118
|
|
|
@@ -279,7 +279,7 @@ export class PickupIndexCreation extends Feature {
|
|
|
279
279
|
|
|
280
280
|
function getStoredPickupIndex(
|
|
281
281
|
pickup: Entity,
|
|
282
|
-
pickupDescriptions:
|
|
282
|
+
pickupDescriptions: ReadonlyMap<PickupIndex, PickupDescription>,
|
|
283
283
|
): PickupIndex | undefined {
|
|
284
284
|
for (const [pickupIndex, pickupDescription] of pickupDescriptions) {
|
|
285
285
|
if (
|
|
@@ -76,7 +76,7 @@ export class PreventGridEntityRespawn extends Feature {
|
|
|
76
76
|
|
|
77
77
|
const roomListIndex = getRoomListIndex();
|
|
78
78
|
if (!v.level.roomListIndexToDecorationGridIndexes.has(roomListIndex)) {
|
|
79
|
-
return;
|
|
79
|
+
return undefined;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// Since the room was filled with decorations to prevent any grid entities from respawning, if
|