-
Notifications
You must be signed in to change notification settings - Fork 21
/
ItemConfigTag.ts
329 lines (294 loc) · 6.47 KB
/
ItemConfigTag.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
/**
* Matches the ItemConfig.TAG_ members of the ItemConfig class. In IsaacScript, we re-implement this
* as an object instead, since it is cleaner.
*
* This is represented as an object instead of an enum due to limitations with TypeScript enums. (We
* want this type to be a child of the `BitFlag` type.)
*
* @enum
* @notExported
* @rename ItemConfigTag
*/
const ItemConfigTagInternal = {
/**
* Dead things (for the Parasite unlock).
*
* Equal to "dead" in "items_metadata.xml".
*
* 1 << 0 (1)
*/
DEAD: 1 << 0,
/**
* Syringes (for Little Baggy and the Spun transformation).
*
* Equal to "syringe" in "items_metadata.xml".
*
* 1 << 1 (2)
*/
SYRINGE: 1 << 1,
/**
* Mom's things (for Mom's Contact and the Yes Mother transformation).
*
* Equal to "mom" in "items_metadata.xml".
*
* 1 << 2 (4)
*/
MOM: 1 << 2,
/**
* Technology items (for the Technology Zero unlock).
*
* Equal to "tech" in "items_metadata.xml".
*
* 1 << 3 (8)
*/
TECH: 1 << 3,
/**
* Battery items (for the Jumper Cables unlock).
*
* Equal to "battery" in "items_metadata.xml".
*
* 1 << 4 (16)
*/
BATTERY: 1 << 4,
/**
* Guppy items (Guppy transformation).
*
* Equal to "guppy" in "items_metadata.xml".
*
* 1 << 5 (32)
*/
GUPPY: 1 << 5,
/**
* Fly items (Beelzebub transformation).
*
* Equal to "fly" in "items_metadata.xml".
*
* 1 << 6 (64)
*/
FLY: 1 << 6,
/**
* Bob items (Bob transformation).
*
* Equal to "bob" in "items_metadata.xml".
*
* 1 << 7 (128)
*/
BOB: 1 << 7,
/**
* Mushroom items (Fun Guy transformation).
*
* Equal to "mushroom" in "items_metadata.xml".
*
* 1 << 8 (256)
*/
MUSHROOM: 1 << 8,
/**
* Baby items (Conjoined transformation).
*
* Equal to "mushroom" in "items_metadata.xml".
*
* 1 << 9 (512)
*/
BABY: 1 << 9,
/**
* Angel items (Seraphim transformation).
*
* Equal to "angel" in "items_metadata.xml".
*
* 1 << 10 (1024)
*/
ANGEL: 1 << 10,
/**
* Devil items (Leviathan transformation).
*
* Equal to "devil" in "items_metadata.xml".
*
* 1 << 11 (2048)
*/
DEVIL: 1 << 11,
/**
* Poop items (Oh Shit transformation).
*
* Equal to "poop" in "items_metadata.xml".
*
* 1 << 12 (4096)
*/
POOP: 1 << 12,
/**
* Book items (Book Worm transformation).
*
* Equal to "book" in "items_metadata.xml".
*
* 1 << 13 (8192)
*/
BOOK: 1 << 13,
/**
* Spider items (Spider Baby transformation).
*
* Equal to "spider" in "items_metadata.xml".
*
* 1 << 14 (16384)
*/
SPIDER: 1 << 14,
/**
* Quest item (cannot be rerolled or randomly obtained).
*
* Equal to "quest" in "items_metadata.xml".
*
* 1 << 15 (32768)
*/
QUEST: 1 << 15,
/**
* Can be spawned by Monster Manual.
*
* Equal to "monstermanual" in "items_metadata.xml".
*
* 1 << 16 (65536)
*/
MONSTER_MANUAL: 1 << 16,
/**
* Cannot appear in Greed Mode.
*
* Equal to "nogreed" in "items_metadata.xml".
*
* 1 << 17 (131072)
*/
NO_GREED: 1 << 17,
/**
* Food item (for Binge Eater).
*
* Equal to "food" in "items_metadata.xml".
*
* 1 << 18 (262144)
*/
FOOD: 1 << 18,
/**
* Tears up item (for Lachryphagy unlock detection).
*
* Equal to "tearsup" in "items_metadata.xml".
*
* 1 << 19 (524288)
*/
TEARS_UP: 1 << 19,
/**
* Whitelisted item for Tainted Lost.
*
* Equal to "offensive" in "items_metadata.xml".
*
* 1 << 20 (1048576)
*/
OFFENSIVE: 1 << 20,
/**
* Blacklisted item for Keeper & Tainted Keeper.
*
* Equal to "nokeeper" in "items_metadata.xml".
*
* 1 << 21 (2097152)
*/
NO_KEEPER: 1 << 21,
/**
* Blacklisted item for The Lost's Birthright.
*
* Equal to "nolostbr" in "items_metadata.xml".
*
* 1 << 22 (4194304)
*/
NO_LOST_BR: 1 << 22,
/**
* Star themed items (for the Planetarium unlock).
*
* Equal to "stars" in "items_metadata.xml".
*
* 1 << 23 (8388608)
*/
STARS: 1 << 23,
/**
* Summonable items (for Tainted Bethany).
*
* Equal to "summonable" in "items_metadata.xml".
*
* 1 << 24 (16777216)
*/
SUMMONABLE: 1 << 24,
/**
* Can't be obtained in Cantripped challenge.
*
* Equal to "nocantrip" in "items_metadata.xml".
*
* 1 << 25 (33554432)
*/
NO_CANTRIP: 1 << 25,
/**
* Active items that have wisps attached to them (automatically set).
*
* Not equal to any particular tag in "items_metadata.xml". Instead, this is set for all of the
* items in the "wisps.xml" file.
*
* 1 << 26 (67108864)
*/
WISP: 1 << 26,
/**
* Unique familiars that cannot be duplicated.
*
* Equal to "uniquefamiliar" in "items_metadata.xml".
*
* 1 << 27 (134217728)
*/
UNIQUE_FAMILIAR: 1 << 27,
/**
* Items that should not be obtainable in challenges.
*
* Equal to "nochallenge" in "items_metadata.xml".
*
* 1 << 28 (268435456)
*/
NO_CHALLENGE: 1 << 28,
/**
* Items that should not be obtainable in daily runs.
*
* Equal to "nodaily" in "items_metadata.xml".
*
* 1 << 29 (536870912)
*/
NO_DAILY: 1 << 29,
/**
* Items that should be shared between Tainted Lazarus' forms.
*
* This is different from `LAZ_SHARED_GLOBAL` in that it does apply stat changes from the item for
* both characters.
*
* Equal to "lazarusshared" in "items_metadata.xml".
*
* 1 << 30 (1073741824)
*/
LAZ_SHARED: 1 << 30,
/**
* Items that should be shared between Tainted Lazarus' forms but only through global checks (such
* as `PlayerManager::HasCollectible`).
*
* This is different from `LAZ_SHARED` in that it does not apply stat changes from the item for
* both characters.
*
* Equal to "lazarussharedglobal" in "items_metadata.xml".
*
* 1 << 31 (2147483648)
*/
LAZ_SHARED_GLOBAL: 1 << 31,
/**
* Items that will not be a random starting item for Eden and Tainted Eden.
*
* Equal to "noeden" in "items_metadata.xml".
*
* 1 << 32 (4294967296)
*/
NO_EDEN: 1 << 32,
} as const;
type ItemConfigTagValue = BitFlag & {
readonly __itemConfigTagBrand: symbol;
};
type ItemConfigTagType = {
readonly [K in keyof typeof ItemConfigTagInternal]: ItemConfigTagValue;
};
export const ItemConfigTag = ItemConfigTagInternal as ItemConfigTagType;
export type ItemConfigTag = ItemConfigTagType[keyof ItemConfigTagType];
export const ItemConfigTagZero = 0 as BitFlags<ItemConfigTag>;