coh-content-db 2.0.0-rc.16 → 2.0.0-rc.18
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/.github/workflows/build.yml +1 -1
- package/CHANGELOG.md +3 -1
- package/dist/coh-content-db.d.ts +95 -37
- package/dist/coh-content-db.js +189 -80
- package/dist/coh-content-db.js.map +1 -1
- package/dist/coh-content-db.mjs +187 -81
- package/dist/coh-content-db.mjs.map +1 -1
- package/jest.config.mjs +1 -0
- package/package.json +1 -1
- package/src/main/api/badge-data.ts +2 -1
- package/src/main/api/contact-data.ts +2 -1
- package/src/main/api/level-range-data.ts +4 -0
- package/src/main/api/mission-data.ts +3 -29
- package/src/main/api/mission-flashback-data.ts +31 -0
- package/src/main/api/set-title-data.ts +4 -0
- package/src/main/api/zone-data.ts +24 -0
- package/src/main/api/zone-type.ts +59 -0
- package/src/main/db/badge-index.ts +3 -1
- package/src/main/db/badge.ts +3 -2
- package/src/main/db/contact.ts +4 -3
- package/src/main/db/level-range.ts +15 -0
- package/src/main/db/mission.ts +10 -9
- package/src/main/db/set-title-ids.ts +10 -0
- package/src/main/db/zone.ts +29 -0
- package/src/main/index.ts +6 -0
- package/src/test/api/zone-data.fixture.ts +1 -0
- package/src/test/db/badge.test.ts +4 -2
- package/src/test/db/contact.test.ts +2 -1
- package/src/test/db/level-range.test.ts +47 -0
- package/src/test/db/mission.test.ts +8 -6
- package/src/test/db/morality-list.test.ts +1 -1
- package/src/test/db/set-title-ids.test.ts +19 -0
- package/src/test/db/zone.test.ts +45 -0
package/dist/coh-content-db.js
CHANGED
|
@@ -98,12 +98,71 @@ function compareSex(a, b) {
|
|
|
98
98
|
return orderA - orderB;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
const ZONE_TYPE = [
|
|
102
|
+
/**
|
|
103
|
+
* The standard zone type, even if not technically occurring in the 'City' proper.
|
|
104
|
+
*/
|
|
105
|
+
"city",
|
|
106
|
+
/**
|
|
107
|
+
* An Ouroboros flashback to a zone as it was in a previous era.
|
|
108
|
+
*/
|
|
109
|
+
"echo",
|
|
110
|
+
/**
|
|
111
|
+
* Tutorial zon, usually inaccessible after leaving.
|
|
112
|
+
*/
|
|
113
|
+
"tutorial",
|
|
114
|
+
/**
|
|
115
|
+
* Trial zones, like the Abandoned Sewers trial.
|
|
116
|
+
*/
|
|
117
|
+
"trial",
|
|
118
|
+
/**
|
|
119
|
+
* Hazard zones like the Hollows.
|
|
120
|
+
*/
|
|
121
|
+
"hazard",
|
|
122
|
+
/**
|
|
123
|
+
* Mayhem mission zones.
|
|
124
|
+
*/
|
|
125
|
+
"mayhem",
|
|
126
|
+
/**
|
|
127
|
+
* Safeguard mission zones.
|
|
128
|
+
*/
|
|
129
|
+
"safeguard",
|
|
130
|
+
/**
|
|
131
|
+
* Exists inside a mission not covered by the other types.
|
|
132
|
+
*/
|
|
133
|
+
"mission",
|
|
134
|
+
/**
|
|
135
|
+
* Incarnate trial zones.
|
|
136
|
+
*/
|
|
137
|
+
"incarnate",
|
|
138
|
+
/**
|
|
139
|
+
* Cooprative zones where Heroes and Villains can team up for PvE content.
|
|
140
|
+
*/
|
|
141
|
+
"co-op",
|
|
142
|
+
/**
|
|
143
|
+
* PvP zones like Bloody Bay.
|
|
144
|
+
*/
|
|
145
|
+
"pvp",
|
|
146
|
+
/**
|
|
147
|
+
* Located in an arena PvP map.
|
|
148
|
+
*/
|
|
149
|
+
"arena",
|
|
150
|
+
/**
|
|
151
|
+
* A building, usually contained within another zone, like the AE buildings.
|
|
152
|
+
*/
|
|
153
|
+
"building",
|
|
154
|
+
/**
|
|
155
|
+
* Stuff like the (Phone only) zone.
|
|
156
|
+
*/
|
|
157
|
+
"other"
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
var __defProp$c = Object.defineProperty;
|
|
102
161
|
var __typeError$6 = (msg) => {
|
|
103
162
|
throw TypeError(msg);
|
|
104
163
|
};
|
|
105
|
-
var __defNormalProp$
|
|
106
|
-
var __publicField$
|
|
164
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
165
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
107
166
|
var __accessCheck$6 = (obj, member, msg) => member.has(obj) || __typeError$6("Cannot " + msg);
|
|
108
167
|
var __privateGet$5 = (obj, member, getter) => (__accessCheck$6(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
109
168
|
var __privateAdd$6 = (obj, member, value) => member.has(obj) ? __typeError$6("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
@@ -112,11 +171,11 @@ var _items$1;
|
|
|
112
171
|
class AlignmentList {
|
|
113
172
|
constructor(items) {
|
|
114
173
|
__privateAdd$6(this, _items$1);
|
|
115
|
-
__publicField$
|
|
116
|
-
__publicField$
|
|
117
|
-
__publicField$
|
|
118
|
-
__publicField$
|
|
119
|
-
__publicField$
|
|
174
|
+
__publicField$c(this, "hero");
|
|
175
|
+
__publicField$c(this, "villain");
|
|
176
|
+
__publicField$c(this, "praetorian");
|
|
177
|
+
__publicField$c(this, "primal");
|
|
178
|
+
__publicField$c(this, "all");
|
|
120
179
|
const set = new Set(items ?? [...ALIGNMENT]);
|
|
121
180
|
this.hero = set.has("hero") || set.has("primal") || set.has("all");
|
|
122
181
|
this.villain = set.has("villain") || set.has("primal") || set.has("all");
|
|
@@ -247,14 +306,14 @@ validateKey_fn = function(key) {
|
|
|
247
306
|
if (INVALID_KEY_PATTERN.test(key)) throw new Error(`Invalid key: [${key}]; Keys can only contain lowercase characters, numbers and dashes.`);
|
|
248
307
|
};
|
|
249
308
|
|
|
250
|
-
var __defProp$
|
|
251
|
-
var __defNormalProp$
|
|
252
|
-
var __publicField$
|
|
309
|
+
var __defProp$b = Object.defineProperty;
|
|
310
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
311
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
253
312
|
class Archetype {
|
|
254
313
|
constructor(data) {
|
|
255
|
-
__publicField$
|
|
256
|
-
__publicField$
|
|
257
|
-
__publicField$
|
|
314
|
+
__publicField$b(this, "key");
|
|
315
|
+
__publicField$b(this, "name");
|
|
316
|
+
__publicField$b(this, "description");
|
|
258
317
|
this.key = new Key(data.key).value;
|
|
259
318
|
this.name = data.name;
|
|
260
319
|
this.description = data.description;
|
|
@@ -266,9 +325,9 @@ function coalesceToArray(value) {
|
|
|
266
325
|
return Array.isArray(value) ? value : [value];
|
|
267
326
|
}
|
|
268
327
|
|
|
269
|
-
var __defProp$
|
|
270
|
-
var __defNormalProp$
|
|
271
|
-
var __publicField$
|
|
328
|
+
var __defProp$a = Object.defineProperty;
|
|
329
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
330
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
272
331
|
class BadgeRequirement {
|
|
273
332
|
constructor(data) {
|
|
274
333
|
/**
|
|
@@ -276,47 +335,47 @@ class BadgeRequirement {
|
|
|
276
335
|
*
|
|
277
336
|
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
278
337
|
*/
|
|
279
|
-
__publicField$
|
|
338
|
+
__publicField$a(this, "key");
|
|
280
339
|
/**
|
|
281
340
|
* The requirement type.
|
|
282
341
|
*/
|
|
283
|
-
__publicField$
|
|
342
|
+
__publicField$a(this, "type");
|
|
284
343
|
/**
|
|
285
344
|
* If the requirement involves a location, where it is.
|
|
286
345
|
*/
|
|
287
|
-
__publicField$
|
|
346
|
+
__publicField$a(this, "location");
|
|
288
347
|
/**
|
|
289
348
|
* If the requirement involves a badge, the badge key.
|
|
290
349
|
*/
|
|
291
|
-
__publicField$
|
|
350
|
+
__publicField$a(this, "badgeKey");
|
|
292
351
|
/**
|
|
293
352
|
* If the requirement involves a mission, the mission key.
|
|
294
353
|
*/
|
|
295
|
-
__publicField$
|
|
354
|
+
__publicField$a(this, "missionKey");
|
|
296
355
|
/**
|
|
297
356
|
* If the requirement involves a monument, the text that is displayed thereon.
|
|
298
357
|
*/
|
|
299
|
-
__publicField$
|
|
358
|
+
__publicField$a(this, "monumentText");
|
|
300
359
|
/**
|
|
301
360
|
* If the requirement involves crafting an invention, the Level of the invention required.
|
|
302
361
|
*/
|
|
303
|
-
__publicField$
|
|
362
|
+
__publicField$a(this, "inventionLevel");
|
|
304
363
|
/**
|
|
305
364
|
* If the requirement involves crafting an invention, the types of enhancements that will qualify.
|
|
306
365
|
*/
|
|
307
|
-
__publicField$
|
|
366
|
+
__publicField$a(this, "inventionTypes");
|
|
308
367
|
/**
|
|
309
368
|
* Number of times the task needs to be repeated.
|
|
310
369
|
*/
|
|
311
|
-
__publicField$
|
|
370
|
+
__publicField$a(this, "count");
|
|
312
371
|
/**
|
|
313
372
|
* Additional information about the requirement.
|
|
314
373
|
*/
|
|
315
|
-
__publicField$
|
|
374
|
+
__publicField$a(this, "notes");
|
|
316
375
|
/**
|
|
317
376
|
* List of external links. Wiki, forums, etc.
|
|
318
377
|
*/
|
|
319
|
-
__publicField$
|
|
378
|
+
__publicField$a(this, "links");
|
|
320
379
|
this.key = new Key(data.key).value;
|
|
321
380
|
this.type = data.type;
|
|
322
381
|
this.location = coalesceToArray(data.location);
|
|
@@ -331,12 +390,12 @@ class BadgeRequirement {
|
|
|
331
390
|
}
|
|
332
391
|
}
|
|
333
392
|
|
|
334
|
-
var __defProp$
|
|
393
|
+
var __defProp$9 = Object.defineProperty;
|
|
335
394
|
var __typeError$3 = (msg) => {
|
|
336
395
|
throw TypeError(msg);
|
|
337
396
|
};
|
|
338
|
-
var __defNormalProp$
|
|
339
|
-
var __publicField$
|
|
397
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
398
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
340
399
|
var __accessCheck$3 = (obj, member, msg) => member.has(obj) || __typeError$3("Cannot " + msg);
|
|
341
400
|
var __privateGet$2 = (obj, member, getter) => (__accessCheck$3(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
342
401
|
var __privateAdd$3 = (obj, member, value) => member.has(obj) ? __typeError$3("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
@@ -345,19 +404,19 @@ var _items;
|
|
|
345
404
|
class MoralityList {
|
|
346
405
|
constructor(items) {
|
|
347
406
|
__privateAdd$3(this, _items);
|
|
348
|
-
__publicField$
|
|
349
|
-
__publicField$
|
|
350
|
-
__publicField$
|
|
351
|
-
__publicField$
|
|
352
|
-
__publicField$
|
|
353
|
-
__publicField$
|
|
354
|
-
__publicField$
|
|
355
|
-
__publicField$
|
|
356
|
-
__publicField$
|
|
357
|
-
__publicField$
|
|
358
|
-
__publicField$
|
|
359
|
-
__publicField$
|
|
360
|
-
__publicField$
|
|
407
|
+
__publicField$9(this, "hero");
|
|
408
|
+
__publicField$9(this, "vigilante");
|
|
409
|
+
__publicField$9(this, "villain");
|
|
410
|
+
__publicField$9(this, "rogue");
|
|
411
|
+
__publicField$9(this, "resistance");
|
|
412
|
+
__publicField$9(this, "loyalist");
|
|
413
|
+
__publicField$9(this, "primal");
|
|
414
|
+
__publicField$9(this, "praetorian");
|
|
415
|
+
__publicField$9(this, "heroic");
|
|
416
|
+
__publicField$9(this, "villainous");
|
|
417
|
+
__publicField$9(this, "paragonCityAccess");
|
|
418
|
+
__publicField$9(this, "rogueIslesAccess");
|
|
419
|
+
__publicField$9(this, "all");
|
|
361
420
|
const set = new Set(items ?? [...MORALITY]);
|
|
362
421
|
this.hero = set.has("hero") || set.has("primal") || set.has("heroic") || set.has("paragon-city-access") || set.has("all");
|
|
363
422
|
this.vigilante = set.has("vigilante") || set.has("primal") || set.has("heroic") || set.has("paragon-city-access") || set.has("rogue-isles-access") || set.has("all");
|
|
@@ -432,9 +491,9 @@ class MoralityList {
|
|
|
432
491
|
}
|
|
433
492
|
_items = new WeakMap();
|
|
434
493
|
|
|
435
|
-
var __defProp$
|
|
436
|
-
var __defNormalProp$
|
|
437
|
-
var __publicField$
|
|
494
|
+
var __defProp$8 = Object.defineProperty;
|
|
495
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
496
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
438
497
|
class AbstractIndex {
|
|
439
498
|
/**
|
|
440
499
|
* Create a new index.
|
|
@@ -442,8 +501,8 @@ class AbstractIndex {
|
|
|
442
501
|
* @param values Values to index.
|
|
443
502
|
*/
|
|
444
503
|
constructor(keyField, values) {
|
|
445
|
-
__publicField$
|
|
446
|
-
__publicField$
|
|
504
|
+
__publicField$8(this, "_values", []);
|
|
505
|
+
__publicField$8(this, "_hashTable", {});
|
|
447
506
|
this._values = values ?? [];
|
|
448
507
|
this._hashTable = {};
|
|
449
508
|
for (const value of this.values) {
|
|
@@ -474,12 +533,23 @@ function toDate(iso) {
|
|
|
474
533
|
return date;
|
|
475
534
|
}
|
|
476
535
|
|
|
477
|
-
var __defProp$
|
|
536
|
+
var __defProp$7 = Object.defineProperty;
|
|
537
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
538
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
539
|
+
class SetTitleIds {
|
|
540
|
+
constructor(value) {
|
|
541
|
+
__publicField$7(this, "primal");
|
|
542
|
+
__publicField$7(this, "praetorian");
|
|
543
|
+
[this.primal, this.praetorian] = value;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
var __defProp$6 = Object.defineProperty;
|
|
478
548
|
var __typeError$2 = (msg) => {
|
|
479
549
|
throw TypeError(msg);
|
|
480
550
|
};
|
|
481
|
-
var __defNormalProp$
|
|
482
|
-
var __publicField$
|
|
551
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
552
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
483
553
|
var __accessCheck$2 = (obj, member, msg) => member.has(obj) || __typeError$2("Cannot " + msg);
|
|
484
554
|
var __privateGet$1 = (obj, member, getter) => (__accessCheck$2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
485
555
|
var __privateAdd$2 = (obj, member, value) => member.has(obj) ? __typeError$2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
@@ -492,60 +562,60 @@ class Badge {
|
|
|
492
562
|
/**
|
|
493
563
|
* The database key for this badge.
|
|
494
564
|
*/
|
|
495
|
-
__publicField$
|
|
565
|
+
__publicField$6(this, "key");
|
|
496
566
|
/**
|
|
497
567
|
* The type of badge.
|
|
498
568
|
*/
|
|
499
|
-
__publicField$
|
|
569
|
+
__publicField$6(this, "type");
|
|
500
570
|
/**
|
|
501
571
|
* The name of this badge.
|
|
502
572
|
*
|
|
503
573
|
* May vary by character sex or alignment.
|
|
504
574
|
*/
|
|
505
|
-
__publicField$
|
|
575
|
+
__publicField$6(this, "name");
|
|
506
576
|
/**
|
|
507
577
|
* The date that the badge was added to the game.
|
|
508
578
|
*/
|
|
509
|
-
__publicField$
|
|
579
|
+
__publicField$6(this, "releaseDate");
|
|
510
580
|
/**
|
|
511
581
|
* The character moralities that this badge is available to.
|
|
512
582
|
*/
|
|
513
|
-
__publicField$
|
|
583
|
+
__publicField$6(this, "morality");
|
|
514
584
|
/**
|
|
515
585
|
* The badge text as it appears in-game. May vary by character sex or alignment.
|
|
516
586
|
*/
|
|
517
|
-
__publicField$
|
|
587
|
+
__publicField$6(this, "badgeText");
|
|
518
588
|
/**
|
|
519
589
|
* Short description of how to acquire the badge. Detailed instructions will be in the notes field.
|
|
520
590
|
*/
|
|
521
|
-
__publicField$
|
|
591
|
+
__publicField$6(this, "acquisition");
|
|
522
592
|
/**
|
|
523
593
|
* Absolute URL to this badge's icon.
|
|
524
594
|
*
|
|
525
595
|
* May vary by character sex or alignment.
|
|
526
596
|
*/
|
|
527
|
-
__publicField$
|
|
597
|
+
__publicField$6(this, "icon");
|
|
528
598
|
/**
|
|
529
599
|
* Freeform notes or tips about the badge.
|
|
530
600
|
*/
|
|
531
|
-
__publicField$
|
|
601
|
+
__publicField$6(this, "notes");
|
|
532
602
|
/**
|
|
533
603
|
* List of external links. Wiki, forums, etc.
|
|
534
604
|
*/
|
|
535
|
-
__publicField$
|
|
605
|
+
__publicField$6(this, "links");
|
|
536
606
|
/**
|
|
537
607
|
* The id used with the in-game `/settitle` command to apply the badge.
|
|
538
608
|
* The first value is the id for primal characters and the (optional) second number is the id for praetorian characters.
|
|
539
609
|
*/
|
|
540
|
-
__publicField$
|
|
610
|
+
__publicField$6(this, "setTitleId");
|
|
541
611
|
/**
|
|
542
612
|
* A description of the effect the badge will have, such as a buff or granting a temporary power.
|
|
543
613
|
*/
|
|
544
|
-
__publicField$
|
|
614
|
+
__publicField$6(this, "effect");
|
|
545
615
|
/**
|
|
546
616
|
* Some badges are not included in the badge total count... such as Flames of Prometheus, which can be removed by redeeming it for a Notice of the Well.
|
|
547
617
|
*/
|
|
548
|
-
__publicField$
|
|
618
|
+
__publicField$6(this, "ignoreInTotals");
|
|
549
619
|
this.key = new Key(badgeData.key).value;
|
|
550
620
|
this.type = badgeData.type;
|
|
551
621
|
this.name = new Alternates(badgeData.name);
|
|
@@ -557,7 +627,7 @@ class Badge {
|
|
|
557
627
|
this.notes = badgeData.notes;
|
|
558
628
|
this.links = badgeData.links ?? [];
|
|
559
629
|
this.effect = badgeData.effect;
|
|
560
|
-
this.setTitleId = badgeData.setTitleId;
|
|
630
|
+
this.setTitleId = badgeData.setTitleId ? new SetTitleIds(badgeData.setTitleId) : void 0;
|
|
561
631
|
this.ignoreInTotals = badgeData.ignoreInTotals ?? false;
|
|
562
632
|
__privateSet$1(this, _requirementsIndex, new AbstractIndex("key", badgeData.requirements?.map((x) => new BadgeRequirement(x))));
|
|
563
633
|
for (const requirement of __privateGet$1(this, _requirementsIndex).values) {
|
|
@@ -647,7 +717,7 @@ satisfiesQueryPredicate_fn = function(badge, query) {
|
|
|
647
717
|
const queryString = query?.str?.toLowerCase() ?? "";
|
|
648
718
|
const fields = query?.fields ? new Set(query?.fields) : /* @__PURE__ */ new Set(["name"]);
|
|
649
719
|
if (fields.size === 0) return true;
|
|
650
|
-
return !!(fields.has("name") && badge.name.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("badge-text") && badge.badgeText.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("acquisition") && badge.acquisition?.toLowerCase().includes(queryString) || fields.has("effect") && badge.effect?.toLowerCase().includes(queryString) || fields.has("notes") && badge.notes?.toLowerCase().includes(queryString) || fields.has("set-title-id") && badge.setTitleId?.
|
|
720
|
+
return !!(fields.has("name") && badge.name.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("badge-text") && badge.badgeText.canonical.some((x) => x.value.toLowerCase().includes(queryString)) || fields.has("acquisition") && badge.acquisition?.toLowerCase().includes(queryString) || fields.has("effect") && badge.effect?.toLowerCase().includes(queryString) || fields.has("notes") && badge.notes?.toLowerCase().includes(queryString) || fields.has("set-title-id") && badge.setTitleId?.primal.toString() === queryString || fields.has("set-title-id") && badge.setTitleId?.praetorian?.toString() === queryString);
|
|
651
721
|
};
|
|
652
722
|
satisfiesFilterPredicate_fn = function(badge, filter) {
|
|
653
723
|
return (!filter?.type || badge.type === filter.type) && (!filter?.zoneKey || badge.zoneKey === filter.zoneKey) && (!filter?.morality || badge.morality.has(filter.morality));
|
|
@@ -681,39 +751,39 @@ sort_fn = function(badges, sort) {
|
|
|
681
751
|
}
|
|
682
752
|
};
|
|
683
753
|
|
|
684
|
-
var __defProp$
|
|
685
|
-
var __defNormalProp$
|
|
686
|
-
var __publicField$
|
|
754
|
+
var __defProp$5 = Object.defineProperty;
|
|
755
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
756
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
687
757
|
class BundleHeader {
|
|
688
758
|
constructor(data) {
|
|
689
759
|
/**
|
|
690
760
|
* Name of the fork this bundle contains data for.
|
|
691
761
|
*/
|
|
692
|
-
__publicField$
|
|
762
|
+
__publicField$5(this, "name");
|
|
693
763
|
/**
|
|
694
764
|
* Version number for this data package.
|
|
695
765
|
*/
|
|
696
|
-
__publicField$
|
|
766
|
+
__publicField$5(this, "version");
|
|
697
767
|
/**
|
|
698
768
|
* The time this bundle was last updated.
|
|
699
769
|
*/
|
|
700
|
-
__publicField$
|
|
770
|
+
__publicField$5(this, "lastUpdateTime");
|
|
701
771
|
/**
|
|
702
772
|
* Description of the fork.
|
|
703
773
|
*/
|
|
704
|
-
__publicField$
|
|
774
|
+
__publicField$5(this, "description");
|
|
705
775
|
/**
|
|
706
776
|
* Url for the repository where the bundle is maintained.
|
|
707
777
|
*/
|
|
708
|
-
__publicField$
|
|
778
|
+
__publicField$5(this, "repositoryUrl");
|
|
709
779
|
/**
|
|
710
780
|
* Url for the location of the changelog.
|
|
711
781
|
*/
|
|
712
|
-
__publicField$
|
|
782
|
+
__publicField$5(this, "changelogUrl");
|
|
713
783
|
/**
|
|
714
784
|
* List of external links. Wiki, forums, etc.
|
|
715
785
|
*/
|
|
716
|
-
__publicField$
|
|
786
|
+
__publicField$5(this, "links");
|
|
717
787
|
if (!data) throw new Error("Missing header data");
|
|
718
788
|
this.name = data.name;
|
|
719
789
|
this.version = data.version;
|
|
@@ -725,6 +795,22 @@ class BundleHeader {
|
|
|
725
795
|
}
|
|
726
796
|
}
|
|
727
797
|
|
|
798
|
+
var __defProp$4 = Object.defineProperty;
|
|
799
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
800
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
801
|
+
class LevelRange {
|
|
802
|
+
constructor(value) {
|
|
803
|
+
__publicField$4(this, "min");
|
|
804
|
+
__publicField$4(this, "max");
|
|
805
|
+
if (Array.isArray(value)) {
|
|
806
|
+
this.min = value[0];
|
|
807
|
+
this.max = value[1] === void 0 ? void 0 : value[1];
|
|
808
|
+
} else {
|
|
809
|
+
this.min = value;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
728
814
|
var __defProp$3 = Object.defineProperty;
|
|
729
815
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
730
816
|
var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -740,12 +826,32 @@ class Zone {
|
|
|
740
826
|
* The name of the zone as it appears in-game.
|
|
741
827
|
*/
|
|
742
828
|
__publicField$3(this, "name");
|
|
829
|
+
/**
|
|
830
|
+
* The type of zone.
|
|
831
|
+
*/
|
|
832
|
+
__publicField$3(this, "type");
|
|
833
|
+
/**
|
|
834
|
+
* The character moralities that this zone is accessible by.
|
|
835
|
+
*/
|
|
836
|
+
__publicField$3(this, "morality");
|
|
837
|
+
/**
|
|
838
|
+
* The level range this zone is recommended for.
|
|
839
|
+
*/
|
|
840
|
+
__publicField$3(this, "levelRange");
|
|
841
|
+
/**
|
|
842
|
+
* Freeform notes or tips about the zone.
|
|
843
|
+
*/
|
|
844
|
+
__publicField$3(this, "notes");
|
|
743
845
|
/**
|
|
744
846
|
* List of external links. Wiki, forums, etc.
|
|
745
847
|
*/
|
|
746
848
|
__publicField$3(this, "links");
|
|
747
849
|
this.key = new Key(data.key).value;
|
|
748
850
|
this.name = data.name;
|
|
851
|
+
this.type = data.type;
|
|
852
|
+
this.morality = new MoralityList(coalesceToArray(data.morality));
|
|
853
|
+
this.levelRange = data.levelRange ? new LevelRange(data.levelRange) : void 0;
|
|
854
|
+
this.notes = data.notes;
|
|
749
855
|
this.links = data.links ?? [];
|
|
750
856
|
}
|
|
751
857
|
}
|
|
@@ -794,7 +900,7 @@ class Contact {
|
|
|
794
900
|
this.title = data.title;
|
|
795
901
|
this.morality = new MoralityList(coalesceToArray(data.morality));
|
|
796
902
|
this.location = data.location;
|
|
797
|
-
this.levelRange = data.levelRange;
|
|
903
|
+
this.levelRange = data.levelRange ? new LevelRange(data.levelRange) : void 0;
|
|
798
904
|
this.notes = data.notes;
|
|
799
905
|
this.links = data.links ?? [];
|
|
800
906
|
}
|
|
@@ -850,7 +956,7 @@ class Mission {
|
|
|
850
956
|
this.type = data.type;
|
|
851
957
|
this.morality = new MoralityList(coalesceToArray(data.morality));
|
|
852
958
|
this.contactKeys = coalesceToArray(data.contactKeys);
|
|
853
|
-
this.levelRange = data.levelRange;
|
|
959
|
+
this.levelRange = data.levelRange ? new LevelRange(data.levelRange) : void 0;
|
|
854
960
|
this.notes = data.notes;
|
|
855
961
|
this.links = data.links ?? [];
|
|
856
962
|
this.flashback = createFlashback(data);
|
|
@@ -860,7 +966,7 @@ function createFlashback(data) {
|
|
|
860
966
|
if (!data.flashback) return void 0;
|
|
861
967
|
return {
|
|
862
968
|
id: data.flashback.id,
|
|
863
|
-
levelRange: data.flashback.levelRange
|
|
969
|
+
levelRange: data.flashback.levelRange ? new LevelRange(data.flashback.levelRange) : void 0,
|
|
864
970
|
name: data.flashback.name ?? data.name,
|
|
865
971
|
morality: new MoralityList(coalesceToArray(data.flashback.morality ?? data.morality)),
|
|
866
972
|
notes: data.flashback.notes
|
|
@@ -1068,12 +1174,15 @@ exports.CohContentDatabase = CohContentDatabase;
|
|
|
1068
1174
|
exports.Contact = Contact;
|
|
1069
1175
|
exports.ENHANCEMENT_CATEGORY = ENHANCEMENT_CATEGORY;
|
|
1070
1176
|
exports.Key = Key;
|
|
1177
|
+
exports.LevelRange = LevelRange;
|
|
1071
1178
|
exports.Location = Location;
|
|
1072
1179
|
exports.MISSION_TYPE = MISSION_TYPE;
|
|
1073
1180
|
exports.MORALITY = MORALITY;
|
|
1074
1181
|
exports.Mission = Mission;
|
|
1075
1182
|
exports.MoralityList = MoralityList;
|
|
1076
1183
|
exports.SEX = SEX;
|
|
1184
|
+
exports.SetTitleIds = SetTitleIds;
|
|
1185
|
+
exports.ZONE_TYPE = ZONE_TYPE;
|
|
1077
1186
|
exports.Zone = Zone;
|
|
1078
1187
|
exports.badgeLink = badgeLink;
|
|
1079
1188
|
exports.badgeUri = badgeUri;
|