isaacscript-common 38.0.1 → 39.0.1
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/index.rollup.d.ts +25 -20
- package/dist/isaacscript-common.lua +59 -90
- package/dist/src/classes/features/other/ModdedElementDetection.d.ts +23 -20
- package/dist/src/classes/features/other/ModdedElementDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/ModdedElementDetection.lua +5 -12
- package/dist/src/classes/features/other/ModdedElementSets.d.ts +2 -0
- package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/src/classes/features/other/ModdedElementSets.lua +53 -77
- package/package.json +1 -1
- package/src/classes/features/other/ModdedElementDetection.ts +27 -32
- package/src/classes/features/other/ModdedElementSets.ts +53 -89
|
@@ -72,6 +72,8 @@ const TRANSFORMATION_TO_TAG_MAP = new ReadonlyMap<PlayerForm, ItemConfigTag>([
|
|
|
72
72
|
]);
|
|
73
73
|
|
|
74
74
|
export class ModdedElementSets extends Feature {
|
|
75
|
+
private arraysInitialized = false;
|
|
76
|
+
|
|
75
77
|
private readonly allCollectibleTypesArray: CollectibleType[] = [];
|
|
76
78
|
private readonly allCollectibleTypesSet = new Set<CollectibleType>();
|
|
77
79
|
|
|
@@ -146,11 +148,28 @@ export class ModdedElementSets extends Feature {
|
|
|
146
148
|
this.moddedElementDetection = moddedElementDetection;
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
private
|
|
150
|
-
if (this.
|
|
151
|
+
private lazyInit() {
|
|
152
|
+
if (this.arraysInitialized) {
|
|
151
153
|
return;
|
|
152
154
|
}
|
|
155
|
+
this.arraysInitialized = true;
|
|
153
156
|
|
|
157
|
+
this.lazyInitVanillaCollectibleTypes();
|
|
158
|
+
this.lazyInitModdedCollectibleTypes();
|
|
159
|
+
this.lazyInitVanillaTrinketTypes();
|
|
160
|
+
this.lazyInitModdedTrinketTypes();
|
|
161
|
+
this.lazyInitVanillaCardTypes();
|
|
162
|
+
this.lazyInitModdedCardTypes();
|
|
163
|
+
this.lazyInitTagToCollectibleTypesMap();
|
|
164
|
+
this.lazyInitCacheFlagToCollectibleTypesMap();
|
|
165
|
+
this.lazyInitCacheFlagToTrinketTypesMap();
|
|
166
|
+
this.lazyInitFlyingCollectibleTypesSet();
|
|
167
|
+
this.lazyInitFlyingTrinketTypesSet();
|
|
168
|
+
this.lazyInitEdenCollectibleTypesSet();
|
|
169
|
+
this.lazyInitCardTypes();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
private lazyInitVanillaCollectibleTypes() {
|
|
154
173
|
const vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange();
|
|
155
174
|
for (const collectibleType of vanillaCollectibleTypeRange) {
|
|
156
175
|
// Vanilla collectible types are not contiguous, so we must check every value. (There are
|
|
@@ -164,12 +183,6 @@ export class ModdedElementSets extends Feature {
|
|
|
164
183
|
}
|
|
165
184
|
|
|
166
185
|
private lazyInitModdedCollectibleTypes() {
|
|
167
|
-
if (this.moddedCollectibleTypesArray.length > 0) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
this.lazyInitVanillaCollectibleTypes();
|
|
172
|
-
|
|
173
186
|
for (const collectibleType of this.vanillaCollectibleTypesArray) {
|
|
174
187
|
this.allCollectibleTypesArray.push(collectibleType);
|
|
175
188
|
this.allCollectibleTypesSet.add(collectibleType);
|
|
@@ -191,10 +204,6 @@ export class ModdedElementSets extends Feature {
|
|
|
191
204
|
}
|
|
192
205
|
|
|
193
206
|
private lazyInitVanillaTrinketTypes() {
|
|
194
|
-
if (this.vanillaTrinketTypesArray.length > 0) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
207
|
const vanillaTrinketTypeRange = getVanillaTrinketTypeRange();
|
|
199
208
|
for (const trinketType of vanillaTrinketTypeRange) {
|
|
200
209
|
// Vanilla trinket types are not contiguous, so we must check every value. (The only gap is 47
|
|
@@ -208,12 +217,6 @@ export class ModdedElementSets extends Feature {
|
|
|
208
217
|
}
|
|
209
218
|
|
|
210
219
|
private lazyInitModdedTrinketTypes() {
|
|
211
|
-
if (this.moddedTrinketTypesArray.length > 0) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
this.lazyInitVanillaTrinketTypes();
|
|
216
|
-
|
|
217
220
|
for (const trinketType of this.vanillaTrinketTypesArray) {
|
|
218
221
|
this.allTrinketTypesArray.push(trinketType);
|
|
219
222
|
this.allTrinketTypesSet.add(trinketType);
|
|
@@ -235,10 +238,6 @@ export class ModdedElementSets extends Feature {
|
|
|
235
238
|
}
|
|
236
239
|
|
|
237
240
|
private lazyInitVanillaCardTypes() {
|
|
238
|
-
if (this.vanillaCardTypesArray.length > 0) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
241
|
const vanillaCardTypes = getVanillaCardTypes();
|
|
243
242
|
for (const cardType of vanillaCardTypes) {
|
|
244
243
|
// Vanilla card types are contiguous, but we check every value just to be safe (and so that
|
|
@@ -252,12 +251,6 @@ export class ModdedElementSets extends Feature {
|
|
|
252
251
|
}
|
|
253
252
|
|
|
254
253
|
private lazyInitModdedCardTypes() {
|
|
255
|
-
if (this.moddedCardTypesArray.length > 0) {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
this.lazyInitVanillaCardTypes();
|
|
260
|
-
|
|
261
254
|
for (const cardType of this.vanillaCardTypesArray) {
|
|
262
255
|
this.allCardTypesArray.push(cardType);
|
|
263
256
|
this.allCardTypesSet.add(cardType);
|
|
@@ -265,7 +258,8 @@ export class ModdedElementSets extends Feature {
|
|
|
265
258
|
|
|
266
259
|
const moddedCardTypes = this.moddedElementDetection.getModdedCardTypes();
|
|
267
260
|
for (const cardType of moddedCardTypes) {
|
|
268
|
-
// Modded card types are contiguous, but we check every value just
|
|
261
|
+
// Modded card types are contiguous, but we check every value just to be safe (and so that the
|
|
262
|
+
// code is similar to the collectible and trinket functions above).
|
|
269
263
|
const itemConfigCard = itemConfig.GetCard(cardType);
|
|
270
264
|
if (itemConfigCard !== undefined) {
|
|
271
265
|
this.moddedCardTypesArray.push(cardType);
|
|
@@ -278,10 +272,6 @@ export class ModdedElementSets extends Feature {
|
|
|
278
272
|
}
|
|
279
273
|
|
|
280
274
|
private lazyInitTagToCollectibleTypesMap() {
|
|
281
|
-
if (this.tagToCollectibleTypesMap.size > 0) {
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
275
|
// The tag to collectible types map should be valid for every tag, so we initialize it with
|
|
286
276
|
// empty sets.
|
|
287
277
|
for (const itemConfigTag of ITEM_CONFIG_TAG_VALUES) {
|
|
@@ -308,10 +298,6 @@ export class ModdedElementSets extends Feature {
|
|
|
308
298
|
}
|
|
309
299
|
|
|
310
300
|
private lazyInitCacheFlagToCollectibleTypesMap() {
|
|
311
|
-
if (this.cacheFlagToCollectibleTypesMap.size > 0) {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
301
|
for (const cacheFlag of CACHE_FLAG_VALUES) {
|
|
316
302
|
const collectiblesSet = new Set<CollectibleType>();
|
|
317
303
|
|
|
@@ -326,14 +312,10 @@ export class ModdedElementSets extends Feature {
|
|
|
326
312
|
}
|
|
327
313
|
|
|
328
314
|
private lazyInitCacheFlagToTrinketTypesMap() {
|
|
329
|
-
if (this.cacheFlagToTrinketTypesMap.size > 0) {
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
315
|
for (const cacheFlag of CACHE_FLAG_VALUES) {
|
|
334
316
|
const trinketsSet = new Set<TrinketType>();
|
|
335
317
|
|
|
336
|
-
for (const trinketType of this.
|
|
318
|
+
for (const trinketType of this.getTrinketArray()) {
|
|
337
319
|
if (trinketHasCacheFlag(trinketType, cacheFlag)) {
|
|
338
320
|
trinketsSet.add(trinketType);
|
|
339
321
|
}
|
|
@@ -344,10 +326,6 @@ export class ModdedElementSets extends Feature {
|
|
|
344
326
|
}
|
|
345
327
|
|
|
346
328
|
private lazyInitFlyingCollectibleTypesSet() {
|
|
347
|
-
if (this.flyingCollectibleTypesSet.size > 0) {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
329
|
// Instead of manually compiling a list of collectibles that grant flying, we can instead
|
|
352
330
|
// dynamically look for collectibles that have `CacheFlag.FLYING`.
|
|
353
331
|
this.flyingCollectibleTypesSet = copySet(
|
|
@@ -379,10 +357,6 @@ export class ModdedElementSets extends Feature {
|
|
|
379
357
|
}
|
|
380
358
|
|
|
381
359
|
private lazyInitFlyingTrinketTypesSet() {
|
|
382
|
-
if (this.flyingTrinketTypesSet.size > 0) {
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
360
|
// Instead of manually compiling a list of trinkets that grant flying, we can instead
|
|
387
361
|
// dynamically look for collectibles that have `CacheFlag.FLYING`.
|
|
388
362
|
this.flyingTrinketTypesSet = copySet(
|
|
@@ -399,10 +373,6 @@ export class ModdedElementSets extends Feature {
|
|
|
399
373
|
}
|
|
400
374
|
|
|
401
375
|
private lazyInitEdenCollectibleTypesSet() {
|
|
402
|
-
if (this.edenActiveCollectibleTypesSet.size > 0) {
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
376
|
for (const collectibleType of this.getCollectibleArray()) {
|
|
407
377
|
if (
|
|
408
378
|
isHiddenCollectible(collectibleType) ||
|
|
@@ -422,10 +392,6 @@ export class ModdedElementSets extends Feature {
|
|
|
422
392
|
}
|
|
423
393
|
|
|
424
394
|
private lazyInitCardTypes() {
|
|
425
|
-
if (this.itemConfigCardTypeToCardTypeMap.size > 0) {
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
395
|
// The card type to cards map should be valid for every card type, so we initialize it with
|
|
430
396
|
// empty sets.
|
|
431
397
|
for (const itemConfigCardType of ITEM_CONFIG_CARD_TYPE_VALUES) {
|
|
@@ -471,7 +437,7 @@ export class ModdedElementSets extends Feature {
|
|
|
471
437
|
*/
|
|
472
438
|
@Exported
|
|
473
439
|
public getCardArray(): readonly CardType[] {
|
|
474
|
-
this.
|
|
440
|
+
this.lazyInit();
|
|
475
441
|
return this.allCardTypesArray;
|
|
476
442
|
}
|
|
477
443
|
|
|
@@ -488,7 +454,7 @@ export class ModdedElementSets extends Feature {
|
|
|
488
454
|
*/
|
|
489
455
|
@Exported
|
|
490
456
|
public getCardSet(): ReadonlySet<CardType> {
|
|
491
|
-
this.
|
|
457
|
+
this.lazyInit();
|
|
492
458
|
return this.allCardTypesSet;
|
|
493
459
|
}
|
|
494
460
|
|
|
@@ -507,9 +473,7 @@ export class ModdedElementSets extends Feature {
|
|
|
507
473
|
public getCardTypesOfType(
|
|
508
474
|
...itemConfigCardTypes: ItemConfigCardType[]
|
|
509
475
|
): Set<CardType> {
|
|
510
|
-
|
|
511
|
-
this.lazyInitCardTypes();
|
|
512
|
-
}
|
|
476
|
+
this.lazyInit();
|
|
513
477
|
|
|
514
478
|
const matchingCardTypes = new Set<CardType>();
|
|
515
479
|
for (const itemConfigCardType of itemConfigCardTypes) {
|
|
@@ -543,7 +507,7 @@ export class ModdedElementSets extends Feature {
|
|
|
543
507
|
*/
|
|
544
508
|
@Exported
|
|
545
509
|
public getCollectibleArray(): readonly CollectibleType[] {
|
|
546
|
-
this.
|
|
510
|
+
this.lazyInit();
|
|
547
511
|
return this.allCollectibleTypesArray;
|
|
548
512
|
}
|
|
549
513
|
|
|
@@ -562,7 +526,7 @@ export class ModdedElementSets extends Feature {
|
|
|
562
526
|
*/
|
|
563
527
|
@Exported
|
|
564
528
|
public getCollectibleSet(): ReadonlySet<CollectibleType> {
|
|
565
|
-
this.
|
|
529
|
+
this.lazyInit();
|
|
566
530
|
return this.allCollectibleTypesSet;
|
|
567
531
|
}
|
|
568
532
|
|
|
@@ -613,7 +577,7 @@ export class ModdedElementSets extends Feature {
|
|
|
613
577
|
public getCollectiblesWithCacheFlag(
|
|
614
578
|
cacheFlag: CacheFlag,
|
|
615
579
|
): ReadonlySet<CollectibleType> {
|
|
616
|
-
this.
|
|
580
|
+
this.lazyInit();
|
|
617
581
|
|
|
618
582
|
const collectiblesSet = this.cacheFlagToCollectibleTypesMap.get(cacheFlag);
|
|
619
583
|
if (collectiblesSet === undefined) {
|
|
@@ -643,7 +607,7 @@ export class ModdedElementSets extends Feature {
|
|
|
643
607
|
public getCollectiblesWithTag(
|
|
644
608
|
itemConfigTag: ItemConfigTag,
|
|
645
609
|
): ReadonlySet<CollectibleType> {
|
|
646
|
-
this.
|
|
610
|
+
this.lazyInit();
|
|
647
611
|
|
|
648
612
|
const collectibleTypes = this.tagToCollectibleTypesMap.get(itemConfigTag);
|
|
649
613
|
assertDefined(
|
|
@@ -666,7 +630,7 @@ export class ModdedElementSets extends Feature {
|
|
|
666
630
|
*/
|
|
667
631
|
@Exported
|
|
668
632
|
public getEdenActiveCollectibles(): ReadonlySet<CollectibleType> {
|
|
669
|
-
this.
|
|
633
|
+
this.lazyInit();
|
|
670
634
|
return this.edenActiveCollectibleTypesSet;
|
|
671
635
|
}
|
|
672
636
|
|
|
@@ -682,7 +646,7 @@ export class ModdedElementSets extends Feature {
|
|
|
682
646
|
*/
|
|
683
647
|
@Exported
|
|
684
648
|
public getEdenPassiveCollectibles(): ReadonlySet<CollectibleType> {
|
|
685
|
-
this.
|
|
649
|
+
this.lazyInit();
|
|
686
650
|
return this.edenPassiveCollectibleTypesSet;
|
|
687
651
|
}
|
|
688
652
|
|
|
@@ -706,7 +670,7 @@ export class ModdedElementSets extends Feature {
|
|
|
706
670
|
public getFlyingCollectibles(
|
|
707
671
|
includeConditionalItems: boolean,
|
|
708
672
|
): ReadonlySet<CollectibleType> {
|
|
709
|
-
this.
|
|
673
|
+
this.lazyInit();
|
|
710
674
|
|
|
711
675
|
return includeConditionalItems
|
|
712
676
|
? this.flyingCollectibleTypesSet
|
|
@@ -724,7 +688,7 @@ export class ModdedElementSets extends Feature {
|
|
|
724
688
|
*/
|
|
725
689
|
@Exported
|
|
726
690
|
public getFlyingTrinkets(): ReadonlySet<TrinketType> {
|
|
727
|
-
this.
|
|
691
|
+
this.lazyInit();
|
|
728
692
|
|
|
729
693
|
return this.flyingTrinketTypesSet;
|
|
730
694
|
}
|
|
@@ -742,7 +706,7 @@ export class ModdedElementSets extends Feature {
|
|
|
742
706
|
*/
|
|
743
707
|
@Exported
|
|
744
708
|
public getModdedCardArray(): readonly CardType[] {
|
|
745
|
-
this.
|
|
709
|
+
this.lazyInit();
|
|
746
710
|
return this.moddedCardTypesArray;
|
|
747
711
|
}
|
|
748
712
|
|
|
@@ -759,7 +723,7 @@ export class ModdedElementSets extends Feature {
|
|
|
759
723
|
*/
|
|
760
724
|
@Exported
|
|
761
725
|
public getModdedCardSet(): ReadonlySet<CardType> {
|
|
762
|
-
this.
|
|
726
|
+
this.lazyInit();
|
|
763
727
|
return this.moddedCardTypesSet;
|
|
764
728
|
}
|
|
765
729
|
|
|
@@ -777,7 +741,7 @@ export class ModdedElementSets extends Feature {
|
|
|
777
741
|
*/
|
|
778
742
|
@Exported
|
|
779
743
|
public getModdedCollectibleArray(): readonly CollectibleType[] {
|
|
780
|
-
this.
|
|
744
|
+
this.lazyInit();
|
|
781
745
|
return this.moddedCollectibleTypesArray;
|
|
782
746
|
}
|
|
783
747
|
|
|
@@ -795,7 +759,7 @@ export class ModdedElementSets extends Feature {
|
|
|
795
759
|
*/
|
|
796
760
|
@Exported
|
|
797
761
|
public getModdedCollectibleSet(): ReadonlySet<CollectibleType> {
|
|
798
|
-
this.
|
|
762
|
+
this.lazyInit();
|
|
799
763
|
return this.moddedCollectibleTypesSet;
|
|
800
764
|
}
|
|
801
765
|
|
|
@@ -812,7 +776,7 @@ export class ModdedElementSets extends Feature {
|
|
|
812
776
|
*/
|
|
813
777
|
@Exported
|
|
814
778
|
public getModdedTrinketArray(): readonly TrinketType[] {
|
|
815
|
-
this.
|
|
779
|
+
this.lazyInit();
|
|
816
780
|
return this.moddedTrinketTypesArray;
|
|
817
781
|
}
|
|
818
782
|
|
|
@@ -829,7 +793,7 @@ export class ModdedElementSets extends Feature {
|
|
|
829
793
|
*/
|
|
830
794
|
@Exported
|
|
831
795
|
public getModdedTrinketSet(): ReadonlySet<TrinketType> {
|
|
832
|
-
this.
|
|
796
|
+
this.lazyInit();
|
|
833
797
|
return this.moddedTrinketTypesSet;
|
|
834
798
|
}
|
|
835
799
|
|
|
@@ -1022,7 +986,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1022
986
|
seedOrRNG: Seed | RNG = getRandomSeed(),
|
|
1023
987
|
exceptions: CardType[] = [],
|
|
1024
988
|
): CardType {
|
|
1025
|
-
this.
|
|
989
|
+
this.lazyInit();
|
|
1026
990
|
return getRandomSetElement(this.cardSet, seedOrRNG, exceptions);
|
|
1027
991
|
}
|
|
1028
992
|
|
|
@@ -1085,7 +1049,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1085
1049
|
seedOrRNG: Seed | RNG = getRandomSeed(),
|
|
1086
1050
|
exceptions: CollectibleType[] | readonly CollectibleType[] = [],
|
|
1087
1051
|
): CollectibleType {
|
|
1088
|
-
this.
|
|
1052
|
+
this.lazyInit();
|
|
1089
1053
|
return getRandomSetElement(
|
|
1090
1054
|
this.edenPassiveCollectibleTypesSet,
|
|
1091
1055
|
seedOrRNG,
|
|
@@ -1111,7 +1075,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1111
1075
|
seedOrRNG: Seed | RNG = getRandomSeed(),
|
|
1112
1076
|
exceptions: CollectibleType[] | readonly CollectibleType[] = [],
|
|
1113
1077
|
): CollectibleType {
|
|
1114
|
-
this.
|
|
1078
|
+
this.lazyInit();
|
|
1115
1079
|
return getRandomSetElement(
|
|
1116
1080
|
this.edenPassiveCollectibleTypesSet,
|
|
1117
1081
|
seedOrRNG,
|
|
@@ -1132,7 +1096,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1132
1096
|
*/
|
|
1133
1097
|
@Exported
|
|
1134
1098
|
public getTrinketArray(): readonly TrinketType[] {
|
|
1135
|
-
this.
|
|
1099
|
+
this.lazyInit();
|
|
1136
1100
|
return this.allTrinketTypesArray;
|
|
1137
1101
|
}
|
|
1138
1102
|
|
|
@@ -1149,7 +1113,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1149
1113
|
*/
|
|
1150
1114
|
@Exported
|
|
1151
1115
|
public getTrinketSet(): ReadonlySet<TrinketType> {
|
|
1152
|
-
this.
|
|
1116
|
+
this.lazyInit();
|
|
1153
1117
|
return this.allTrinketTypesSet;
|
|
1154
1118
|
}
|
|
1155
1119
|
|
|
@@ -1166,7 +1130,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1166
1130
|
public getTrinketsWithCacheFlag(
|
|
1167
1131
|
cacheFlag: CacheFlag,
|
|
1168
1132
|
): ReadonlySet<TrinketType> {
|
|
1169
|
-
this.
|
|
1133
|
+
this.lazyInit();
|
|
1170
1134
|
|
|
1171
1135
|
const trinketsSet = this.cacheFlagToTrinketTypesMap.get(cacheFlag);
|
|
1172
1136
|
if (trinketsSet === undefined) {
|
|
@@ -1186,7 +1150,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1186
1150
|
*/
|
|
1187
1151
|
@Exported
|
|
1188
1152
|
public getVanillaCardArray(): readonly CardType[] {
|
|
1189
|
-
this.
|
|
1153
|
+
this.lazyInit();
|
|
1190
1154
|
return this.vanillaCardTypesArray;
|
|
1191
1155
|
}
|
|
1192
1156
|
|
|
@@ -1200,7 +1164,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1200
1164
|
*/
|
|
1201
1165
|
@Exported
|
|
1202
1166
|
public getVanillaCardSet(): ReadonlySet<CardType> {
|
|
1203
|
-
this.
|
|
1167
|
+
this.lazyInit();
|
|
1204
1168
|
return this.vanillaCardTypesSet;
|
|
1205
1169
|
}
|
|
1206
1170
|
|
|
@@ -1214,7 +1178,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1214
1178
|
*/
|
|
1215
1179
|
@Exported
|
|
1216
1180
|
public getVanillaCollectibleArray(): readonly CollectibleType[] {
|
|
1217
|
-
this.
|
|
1181
|
+
this.lazyInit();
|
|
1218
1182
|
return this.vanillaCollectibleTypesArray;
|
|
1219
1183
|
}
|
|
1220
1184
|
|
|
@@ -1228,7 +1192,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1228
1192
|
*/
|
|
1229
1193
|
@Exported
|
|
1230
1194
|
public getVanillaCollectibleSet(): ReadonlySet<CollectibleType> {
|
|
1231
|
-
this.
|
|
1195
|
+
this.lazyInit();
|
|
1232
1196
|
return this.vanillaCollectibleTypesSet;
|
|
1233
1197
|
}
|
|
1234
1198
|
|
|
@@ -1242,7 +1206,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1242
1206
|
*/
|
|
1243
1207
|
@Exported
|
|
1244
1208
|
public getVanillaTrinketArray(): readonly TrinketType[] {
|
|
1245
|
-
this.
|
|
1209
|
+
this.lazyInit();
|
|
1246
1210
|
return this.vanillaTrinketTypesArray;
|
|
1247
1211
|
}
|
|
1248
1212
|
|
|
@@ -1256,7 +1220,7 @@ export class ModdedElementSets extends Feature {
|
|
|
1256
1220
|
*/
|
|
1257
1221
|
@Exported
|
|
1258
1222
|
public getVanillaTrinketSet(): ReadonlySet<TrinketType> {
|
|
1259
|
-
this.
|
|
1223
|
+
this.lazyInit();
|
|
1260
1224
|
return this.vanillaTrinketTypesSet;
|
|
1261
1225
|
}
|
|
1262
1226
|
}
|