coh-content-db 2.0.0-rc.6 → 2.0.0-rc.8
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/.github/workflows/pull-request.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/README.md +3 -3
- package/dist/coh-content-db.d.ts +444 -194
- package/dist/coh-content-db.js +720 -413
- package/dist/coh-content-db.js.map +1 -1
- package/dist/coh-content-db.mjs +708 -412
- package/dist/coh-content-db.mjs.map +1 -1
- package/eslint.config.mjs +1 -0
- package/package.json +1 -1
- package/src/main/api/alignment.ts +18 -2
- package/src/main/api/badge-data.ts +12 -42
- package/src/main/api/badge-requirement-data.ts +17 -35
- package/src/main/api/badge-requirement-type.ts +28 -7
- package/src/main/api/badge-type.ts +15 -15
- package/src/main/api/contact-data.ts +7 -5
- package/src/main/api/content-bundle.ts +6 -0
- package/src/main/api/enhancement-category.ts +26 -26
- package/src/main/api/location-data.ts +28 -0
- package/src/main/api/mission-data.ts +83 -0
- package/src/main/api/mission-type.ts +2 -0
- package/src/main/api/morality.ts +31 -0
- package/src/main/api/sex.ts +8 -1
- package/src/main/api/zone-data.ts +1 -1
- package/src/main/changelog.ts +5 -4
- package/src/main/db/abstract-index.ts +41 -0
- package/src/main/db/alignment-list.ts +54 -0
- package/src/main/db/alternates.ts +15 -32
- package/src/main/db/badge-index.ts +14 -50
- package/src/main/db/badge-requirement.ts +22 -43
- package/src/main/db/badge-search-options.ts +4 -4
- package/src/main/db/badge.ts +53 -54
- package/src/main/db/bundle-metadata.ts +8 -2
- package/src/main/db/coh-content-database.ts +80 -67
- package/src/main/db/contact.ts +17 -14
- package/src/main/db/location.ts +30 -0
- package/src/main/db/mission.ts +107 -0
- package/src/main/db/morality-list.ts +99 -0
- package/src/main/db/zone.ts +1 -1
- package/src/main/index.ts +8 -3
- package/src/main/util.ts +43 -3
- package/src/test/api/alignment.test.ts +38 -4
- package/src/test/api/badge-data.fixture.ts +1 -17
- package/src/test/api/badge-data.test.ts +3 -3
- package/src/test/api/badge-requirement-data.fixture.ts +1 -11
- package/src/test/api/badge-requirement-type.test.ts +3 -3
- package/src/test/api/badge-type.test.ts +5 -5
- package/src/test/api/contact-data.fixture.ts +0 -6
- package/src/test/api/content-bundle.fixture.ts +1 -17
- package/src/test/api/enhancement-category.test.ts +5 -5
- package/src/test/api/mission-data.fixture.ts +12 -0
- package/src/test/api/sex.test.ts +33 -1
- package/src/test/api/zone-data.fixture.ts +1 -1
- package/src/test/db/abstract-index.test.ts +86 -0
- package/src/test/db/alignment-list.test.ts +200 -0
- package/src/test/db/alternates.test.ts +60 -56
- package/src/test/db/badge-index.test.ts +220 -183
- package/src/test/db/badge-requirement.test.ts +35 -70
- package/src/test/db/badge.test.ts +185 -64
- package/src/test/db/bundle-metadata.test.ts +17 -0
- package/src/test/db/coh-content-database.test.ts +193 -119
- package/src/test/db/contact.test.ts +25 -24
- package/src/test/db/location.test.ts +51 -0
- package/src/test/db/mission.test.ts +171 -0
- package/src/test/db/morality-list.test.ts +457 -0
- package/src/test/db/zone.test.ts +4 -4
- package/src/test/util.test.ts +54 -1
- package/src/main/api/plaque-type.ts +0 -6
- package/src/main/db/alignments.ts +0 -17
- package/src/test/api/alignments.test.ts +0 -40
- package/src/test/api/plaque-type.test.ts +0 -31
package/dist/coh-content-db.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
declare const ALIGNMENT: readonly ["
|
|
1
|
+
declare const ALIGNMENT: readonly ["hero", "villain", "praetorian"];
|
|
2
2
|
type Alignment = typeof ALIGNMENT[number];
|
|
3
|
+
type AlignmentExtended = Alignment
|
|
4
|
+
/**
|
|
5
|
+
* The alignments available for Primal Earth characters - Hero and Villain.
|
|
6
|
+
*/
|
|
7
|
+
| 'primal'
|
|
8
|
+
/**
|
|
9
|
+
* All the alignments.
|
|
10
|
+
*/
|
|
11
|
+
| 'all';
|
|
12
|
+
declare function compareAlignment(a?: Alignment, b?: Alignment): number;
|
|
3
13
|
|
|
4
14
|
declare const SEX: readonly ["M", "F"];
|
|
5
15
|
type Sex = typeof SEX[number];
|
|
16
|
+
declare function compareSex(a?: Sex, b?: Sex): number;
|
|
6
17
|
|
|
7
18
|
/**
|
|
8
19
|
* Some badge values differ based on the alignment or sex of the character.
|
|
@@ -28,15 +39,12 @@ interface ArchetypeData {
|
|
|
28
39
|
readonly description?: string;
|
|
29
40
|
}
|
|
30
41
|
|
|
31
|
-
declare const ENHANCEMENT_CATEGORY: readonly ["
|
|
42
|
+
declare const ENHANCEMENT_CATEGORY: readonly ["defense-debuff", "to-hit-debuff", "taunt", "confuse", "healing", "defense-buff", "resist-damage", "intangibility", "sleep", "slow", "hold", "stun", "immobilize", "fear", "endurance-modification", "endurance-reduction", "recharge-reduction", "interrupt-duration", "accuracy", "to-hit-buff", "damage", "knockback", "run-speed", "jump", "fly-speed", "range"];
|
|
32
43
|
type EnhancementCategory = typeof ENHANCEMENT_CATEGORY[number];
|
|
33
44
|
|
|
34
|
-
declare const BADGE_REQUIREMENT_TYPE: readonly ["
|
|
45
|
+
declare const BADGE_REQUIREMENT_TYPE: readonly ["badge", "invention", "invention-plus-one", "location", "monument", "mission", "task"];
|
|
35
46
|
type BadgeRequirementType = typeof BADGE_REQUIREMENT_TYPE[number];
|
|
36
47
|
|
|
37
|
-
declare const PLAQUE_TYPE: string[];
|
|
38
|
-
type PlaqueType = typeof PLAQUE_TYPE[number];
|
|
39
|
-
|
|
40
48
|
/**
|
|
41
49
|
* Tage type to indicate that a string will accept {@link https://www.markdownguide.org/|Markdown} format.
|
|
42
50
|
*/
|
|
@@ -47,61 +55,71 @@ interface Link {
|
|
|
47
55
|
href: string;
|
|
48
56
|
}
|
|
49
57
|
|
|
50
|
-
interface
|
|
58
|
+
interface LocationData {
|
|
51
59
|
/**
|
|
52
|
-
* Key.
|
|
60
|
+
* Key of the {@link Zone} that the location references.
|
|
53
61
|
*/
|
|
54
|
-
readonly
|
|
62
|
+
readonly zoneKey?: string;
|
|
55
63
|
/**
|
|
56
|
-
*
|
|
64
|
+
* In-game `/loc` coordinates of the location.
|
|
57
65
|
*/
|
|
58
|
-
readonly
|
|
66
|
+
readonly coords?: Coords;
|
|
59
67
|
/**
|
|
60
|
-
*
|
|
68
|
+
* The type of icon to use if the location appears on a map. (Typically the Vidiot map icon).
|
|
61
69
|
*/
|
|
62
|
-
readonly
|
|
70
|
+
readonly icon?: LocationIcon;
|
|
63
71
|
/**
|
|
64
|
-
*
|
|
72
|
+
* The text that should appear in the location icon. (Typically a number or symbol from the Vidiot map).
|
|
65
73
|
*/
|
|
66
|
-
readonly
|
|
74
|
+
readonly iconText?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Coordinates as they appear using the in-game `/loc` command.
|
|
78
|
+
*/
|
|
79
|
+
type Coords = [number, number, number];
|
|
80
|
+
type LocationIcon = 'badge' | 'plaque' | 'pedestal' | 'object';
|
|
81
|
+
|
|
82
|
+
interface BadgeRequirementData {
|
|
67
83
|
/**
|
|
68
|
-
*
|
|
84
|
+
* Unique key used to reference this badge requirement.
|
|
85
|
+
*
|
|
86
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
69
87
|
*/
|
|
70
|
-
readonly
|
|
88
|
+
readonly key: string;
|
|
71
89
|
/**
|
|
72
|
-
*
|
|
90
|
+
* The requirement type.
|
|
73
91
|
*/
|
|
74
|
-
readonly
|
|
92
|
+
readonly type: BadgeRequirementType;
|
|
75
93
|
/**
|
|
76
|
-
*
|
|
94
|
+
* If the requirement involves a location, where it is.
|
|
77
95
|
*/
|
|
78
|
-
readonly
|
|
96
|
+
readonly location?: LocationData | LocationData[];
|
|
79
97
|
/**
|
|
80
|
-
*
|
|
98
|
+
* If the requirement involves a badge, the badge key.
|
|
81
99
|
*/
|
|
82
100
|
readonly badgeKey?: string;
|
|
83
101
|
/**
|
|
84
|
-
*
|
|
102
|
+
* If the requirement involves a mission, the mission key.
|
|
85
103
|
*/
|
|
86
|
-
readonly
|
|
104
|
+
readonly missionKey?: string;
|
|
87
105
|
/**
|
|
88
|
-
*
|
|
106
|
+
* If the requirement involves a monument, the text that is displayed thereon.
|
|
89
107
|
*/
|
|
90
|
-
readonly
|
|
108
|
+
readonly monumentText?: string;
|
|
91
109
|
/**
|
|
92
|
-
* Level of the invention required.
|
|
110
|
+
* If the requirement involves crafting an invention, the Level of the invention required.
|
|
93
111
|
*/
|
|
94
112
|
readonly inventionLevel?: number;
|
|
95
113
|
/**
|
|
96
|
-
*
|
|
114
|
+
* If the requirement involves crafting an invention, the types of enhancements that will qualify.
|
|
97
115
|
*/
|
|
98
116
|
readonly inventionTypes?: EnhancementCategory[];
|
|
99
117
|
/**
|
|
100
|
-
* Number of
|
|
118
|
+
* Number of times the task needs to be repeated.
|
|
101
119
|
*/
|
|
102
|
-
readonly
|
|
120
|
+
readonly count?: number;
|
|
103
121
|
/**
|
|
104
|
-
*
|
|
122
|
+
* Additional information about the requirement.
|
|
105
123
|
*/
|
|
106
124
|
readonly notes?: MarkdownString;
|
|
107
125
|
/**
|
|
@@ -110,14 +128,46 @@ interface BadgeRequirementData {
|
|
|
110
128
|
readonly links?: Link[];
|
|
111
129
|
}
|
|
112
130
|
|
|
113
|
-
declare const BADGE_TYPE: readonly ["
|
|
131
|
+
declare const BADGE_TYPE: readonly ["exploration", "history", "accomplishment", "achievement", "accolade", "gladiator", "veteran", "pvp", "invention", "defeat", "event", "ouroboros", "consignment", "day-job", "architect-entertainment"];
|
|
114
132
|
type BadgeType = typeof BADGE_TYPE[number];
|
|
115
133
|
|
|
134
|
+
declare const MORALITY: readonly ["hero", "vigilante", "villain", "rogue", "resistance", "loyalist"];
|
|
135
|
+
type Morality = typeof MORALITY[number];
|
|
136
|
+
type MoralityExtended = Morality
|
|
137
|
+
/**
|
|
138
|
+
* Any of the Primal Earth moralities - Hero, Vigilante, Villain, Rogue.
|
|
139
|
+
*/
|
|
140
|
+
| 'primal'
|
|
141
|
+
/**
|
|
142
|
+
* Either of the Praetorian Earth moralities - Resistance or Loyalist.
|
|
143
|
+
*/
|
|
144
|
+
| 'praetorian'
|
|
145
|
+
/**
|
|
146
|
+
* The moralities that roll up to the Hero {@link Alignment} - Hero and Vigilante.
|
|
147
|
+
*/
|
|
148
|
+
| 'heroic'
|
|
149
|
+
/**
|
|
150
|
+
* The moralities that roll up to the Villain {@link Alignment} - Villain and Rogue.
|
|
151
|
+
*/
|
|
152
|
+
| 'villainous'
|
|
153
|
+
/**
|
|
154
|
+
* Moralities with access to Paragon City - Hero, Vigilante and Rogue.
|
|
155
|
+
*/
|
|
156
|
+
| 'paragon-city-access'
|
|
157
|
+
/**
|
|
158
|
+
* Moralities with access to the Rogue Isles - Villain, Rogue and Vigilante.
|
|
159
|
+
*/
|
|
160
|
+
| 'rogue-isles-access'
|
|
161
|
+
/**
|
|
162
|
+
* All the moralities.
|
|
163
|
+
*/
|
|
164
|
+
| 'all';
|
|
165
|
+
|
|
116
166
|
interface BadgeData {
|
|
117
167
|
/**
|
|
118
168
|
* Unique key used to reference this badge.
|
|
119
169
|
*
|
|
120
|
-
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
170
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
121
171
|
*/
|
|
122
172
|
readonly key: string;
|
|
123
173
|
/**
|
|
@@ -129,15 +179,15 @@ interface BadgeData {
|
|
|
129
179
|
*
|
|
130
180
|
* If the value differs by sex or alignment, include an {@link AlternateData} for each variant.
|
|
131
181
|
*/
|
|
132
|
-
readonly name: AlternateData<string>[];
|
|
182
|
+
readonly name: string | AlternateData<string>[];
|
|
133
183
|
/**
|
|
134
|
-
* The
|
|
184
|
+
* The {@link MoralityExtended|moralities} that this badge is available to. If undefined then all moralities will be assumed.
|
|
135
185
|
*/
|
|
136
|
-
readonly
|
|
186
|
+
readonly morality?: MoralityExtended | MoralityExtended[];
|
|
137
187
|
/**
|
|
138
188
|
* The badge text as it appears in-game. May vary by character sex or alignment.
|
|
139
189
|
*/
|
|
140
|
-
readonly badgeText?: AlternateData<
|
|
190
|
+
readonly badgeText?: AlternateData<MarkdownString>[] | MarkdownString;
|
|
141
191
|
/**
|
|
142
192
|
* Short description of how to acquire the badge. Detailed instructions should go in the notes field.
|
|
143
193
|
*/
|
|
@@ -147,7 +197,7 @@ interface BadgeData {
|
|
|
147
197
|
*
|
|
148
198
|
* If the value differs by sex or alignment, include an {@link AlternateData} for each variant.
|
|
149
199
|
*/
|
|
150
|
-
readonly icon?: AlternateData<string>[];
|
|
200
|
+
readonly icon?: string | AlternateData<string>[];
|
|
151
201
|
/**
|
|
152
202
|
* Freeform notes or tips about the badge.
|
|
153
203
|
*/
|
|
@@ -157,45 +207,18 @@ interface BadgeData {
|
|
|
157
207
|
*/
|
|
158
208
|
readonly links?: Link[];
|
|
159
209
|
/**
|
|
160
|
-
*
|
|
161
|
-
|
|
162
|
-
readonly zoneKey?: string;
|
|
163
|
-
/**
|
|
164
|
-
* For exploration badges, the `/loc` coordinates of the badge.
|
|
165
|
-
*/
|
|
166
|
-
readonly loc?: [number, number, number];
|
|
167
|
-
/**
|
|
168
|
-
* For plaques that appear on a Vidiot Map, the number or letter the badge appears as.
|
|
169
|
-
*/
|
|
170
|
-
readonly vidiotMapKey?: string;
|
|
171
|
-
/**
|
|
172
|
-
* ID used with the in-game `/settitle` command to apply the badge.
|
|
210
|
+
* The id used with the in-game `/settitle` command to apply the badge.
|
|
211
|
+
* The first value is the id for primal characters and the (optional) second number is the id for praetorian characters.
|
|
173
212
|
*/
|
|
174
|
-
readonly
|
|
175
|
-
/**
|
|
176
|
-
* `/settitle` id.
|
|
177
|
-
*/
|
|
178
|
-
id?: number;
|
|
179
|
-
/**
|
|
180
|
-
* `/settitle` id if different for praetorian characters.
|
|
181
|
-
*/
|
|
182
|
-
praetorianId?: number;
|
|
183
|
-
};
|
|
213
|
+
readonly setTitleId?: [number, number?];
|
|
184
214
|
/**
|
|
185
215
|
* A description of the effect the badge will have, such as a buff or granting a temporary power.
|
|
186
216
|
*/
|
|
187
217
|
readonly effect?: MarkdownString;
|
|
188
218
|
/**
|
|
189
|
-
* Represents the
|
|
190
|
-
* such as visiting plaques for history badges or collecting other badges.
|
|
191
|
-
*
|
|
192
|
-
* The outer array represents groups of requirements evaluated with OR logic —
|
|
193
|
-
* fulfilling any group satisfies the badge.
|
|
194
|
-
*
|
|
195
|
-
* Each inner array represents individual requirements evaluated with AND logic —
|
|
196
|
-
* all conditions in the group must be met.
|
|
219
|
+
* Represents the requirements for badges with multiple fulfillment steps, such as visiting monuments for history badges, completing missions, or collecting other badges.
|
|
197
220
|
*/
|
|
198
|
-
readonly requirements?: BadgeRequirementData[]
|
|
221
|
+
readonly requirements?: BadgeRequirementData[];
|
|
199
222
|
/**
|
|
200
223
|
* 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.
|
|
201
224
|
*/
|
|
@@ -221,7 +244,7 @@ interface ContactData {
|
|
|
221
244
|
/**
|
|
222
245
|
* Unique key used to reference this contact.
|
|
223
246
|
*
|
|
224
|
-
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
247
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
225
248
|
*/
|
|
226
249
|
readonly key: string;
|
|
227
250
|
/**
|
|
@@ -233,13 +256,13 @@ interface ContactData {
|
|
|
233
256
|
*/
|
|
234
257
|
readonly title?: string;
|
|
235
258
|
/**
|
|
236
|
-
* The
|
|
259
|
+
* The character moralities that this contact will interact with.
|
|
237
260
|
*/
|
|
238
|
-
readonly
|
|
261
|
+
readonly morality?: MoralityExtended | MoralityExtended[];
|
|
239
262
|
/**
|
|
240
|
-
* The
|
|
263
|
+
* The location of this contact.
|
|
241
264
|
*/
|
|
242
|
-
readonly
|
|
265
|
+
readonly location?: LocationData;
|
|
243
266
|
/**
|
|
244
267
|
* The level range this contact will offer missions for.
|
|
245
268
|
*/
|
|
@@ -258,7 +281,7 @@ interface ZoneData {
|
|
|
258
281
|
/**
|
|
259
282
|
* Unique key used to reference this zone.
|
|
260
283
|
*
|
|
261
|
-
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
284
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
262
285
|
*/
|
|
263
286
|
readonly key: string;
|
|
264
287
|
/**
|
|
@@ -271,6 +294,74 @@ interface ZoneData {
|
|
|
271
294
|
readonly links?: Link[];
|
|
272
295
|
}
|
|
273
296
|
|
|
297
|
+
declare const MISSION_TYPE: readonly ["story-arc", "mission", "task-force", "strike-force", "trial", "personal-story"];
|
|
298
|
+
type MissionType = typeof MISSION_TYPE[number];
|
|
299
|
+
|
|
300
|
+
interface MissionData {
|
|
301
|
+
/**
|
|
302
|
+
* Unique key used to reference this mission.
|
|
303
|
+
*
|
|
304
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
305
|
+
*/
|
|
306
|
+
readonly key: string;
|
|
307
|
+
/**
|
|
308
|
+
* The name of the mission as it appears from the contact.
|
|
309
|
+
*
|
|
310
|
+
* The name may be different when viewed in Ouroboros as a Flashback.
|
|
311
|
+
*/
|
|
312
|
+
readonly name: string;
|
|
313
|
+
/**
|
|
314
|
+
* The type of mission... Story arc, task force, trial, etc.
|
|
315
|
+
*/
|
|
316
|
+
readonly type: MissionType;
|
|
317
|
+
/**
|
|
318
|
+
* The character moralities that may accept the mission.
|
|
319
|
+
*/
|
|
320
|
+
readonly morality?: MoralityExtended | MoralityExtended[];
|
|
321
|
+
/**
|
|
322
|
+
* The keys of any contacts that provide this mission.
|
|
323
|
+
*/
|
|
324
|
+
readonly contactKeys?: string | string[];
|
|
325
|
+
/**
|
|
326
|
+
* The level range this mission is available for.
|
|
327
|
+
*/
|
|
328
|
+
readonly levelRange?: [number, number?];
|
|
329
|
+
/**
|
|
330
|
+
* Freeform notes or tips about the mission.
|
|
331
|
+
*/
|
|
332
|
+
readonly notes?: MarkdownString;
|
|
333
|
+
/**
|
|
334
|
+
* List of external links. Wiki, forums, etc.
|
|
335
|
+
*/
|
|
336
|
+
readonly links?: Link[];
|
|
337
|
+
/**
|
|
338
|
+
* If the mission is available in Ouroboros as a Flashback.
|
|
339
|
+
*/
|
|
340
|
+
readonly flashback?: MissionFlashbackData;
|
|
341
|
+
}
|
|
342
|
+
interface MissionFlashbackData {
|
|
343
|
+
/**
|
|
344
|
+
* The id of the mission as seen in the Flashback menu, i.e. '14.01'.
|
|
345
|
+
*/
|
|
346
|
+
readonly id: string;
|
|
347
|
+
/**
|
|
348
|
+
* The level range this mission appears under as a Flashback. Leave undefined if the same as the base mission.
|
|
349
|
+
*/
|
|
350
|
+
readonly levelRange?: [number, number?];
|
|
351
|
+
/**
|
|
352
|
+
* The name as it appears in the Flashback list. Leave undefined if the same as the base mission.
|
|
353
|
+
*/
|
|
354
|
+
readonly name?: string;
|
|
355
|
+
/**
|
|
356
|
+
* The character moralities that the mission will appear for in the Flashback list. Leave undefined if the same as the base mission.
|
|
357
|
+
*/
|
|
358
|
+
readonly morality?: MoralityExtended | MoralityExtended[];
|
|
359
|
+
/**
|
|
360
|
+
* Freeform notes or tips about the Flashback version of the mission.
|
|
361
|
+
*/
|
|
362
|
+
readonly notes?: MarkdownString;
|
|
363
|
+
}
|
|
364
|
+
|
|
274
365
|
/**
|
|
275
366
|
* A content bundle holds the data that makes up one forked instance of the game since the original sunset, such as Homecoming (https://forums.homecomingservers.com/).
|
|
276
367
|
*/
|
|
@@ -308,6 +399,10 @@ interface ContentBundle {
|
|
|
308
399
|
* List of contacts available in this fork.
|
|
309
400
|
*/
|
|
310
401
|
readonly contacts?: ContactData[];
|
|
402
|
+
/**
|
|
403
|
+
* List of missions available in this fork.
|
|
404
|
+
*/
|
|
405
|
+
readonly missions?: MissionData[];
|
|
311
406
|
/**
|
|
312
407
|
* List of badges available on this fork.
|
|
313
408
|
*/
|
|
@@ -318,18 +413,25 @@ interface ContentBundle {
|
|
|
318
413
|
readonly changelog?: Change[];
|
|
319
414
|
}
|
|
320
415
|
|
|
321
|
-
declare class
|
|
322
|
-
|
|
416
|
+
declare class AlignmentList {
|
|
417
|
+
#private;
|
|
323
418
|
readonly hero: boolean;
|
|
324
419
|
readonly villain: boolean;
|
|
325
420
|
readonly praetorian: boolean;
|
|
326
421
|
readonly primal: boolean;
|
|
327
|
-
|
|
422
|
+
readonly all: boolean;
|
|
423
|
+
constructor(items?: AlignmentExtended[]);
|
|
424
|
+
get items(): Alignment[];
|
|
425
|
+
has(alignment?: AlignmentExtended): boolean;
|
|
328
426
|
}
|
|
329
427
|
|
|
330
428
|
declare class Alternates<T> {
|
|
331
429
|
#private;
|
|
332
|
-
|
|
430
|
+
/**
|
|
431
|
+
* Create an alternate set from either a list of categorized values, or a single value when there are no alternates.
|
|
432
|
+
* @param value List of alternates, or a single value.
|
|
433
|
+
*/
|
|
434
|
+
constructor(value: AlternateData<T>[] | T);
|
|
333
435
|
getValue(alignment?: Alignment, sex?: Sex): T | undefined;
|
|
334
436
|
/**
|
|
335
437
|
* Get the default value for this list of alternates, the value with the highest priority and lowest specificity.
|
|
@@ -353,61 +455,67 @@ declare class Archetype {
|
|
|
353
455
|
constructor(data: ArchetypeData);
|
|
354
456
|
}
|
|
355
457
|
|
|
356
|
-
declare class
|
|
458
|
+
declare class Location {
|
|
357
459
|
/**
|
|
358
|
-
* Key.
|
|
460
|
+
* Key of the {@link Zone} that the location references.
|
|
359
461
|
*/
|
|
360
|
-
readonly
|
|
462
|
+
readonly zoneKey?: string;
|
|
361
463
|
/**
|
|
362
|
-
*
|
|
464
|
+
* In-game `/loc` coordinates of the location.
|
|
363
465
|
*/
|
|
364
|
-
readonly
|
|
466
|
+
readonly coords?: Coords;
|
|
365
467
|
/**
|
|
366
|
-
*
|
|
468
|
+
* The type of icon to use if the location appears on a map. (Typically the Vidiot map icon).
|
|
367
469
|
*/
|
|
368
|
-
readonly
|
|
470
|
+
readonly icon?: LocationIcon;
|
|
369
471
|
/**
|
|
370
|
-
*
|
|
472
|
+
* The text that should appear in the location icon. (Typically a number or symbol from the Vidiot map).
|
|
371
473
|
*/
|
|
372
|
-
readonly
|
|
474
|
+
readonly iconText?: string;
|
|
475
|
+
constructor(data: LocationData);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
declare class BadgeRequirement {
|
|
373
479
|
/**
|
|
374
|
-
*
|
|
480
|
+
* Unique key used to reference this badge requirement.
|
|
481
|
+
*
|
|
482
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
375
483
|
*/
|
|
376
|
-
readonly
|
|
484
|
+
readonly key: string;
|
|
377
485
|
/**
|
|
378
|
-
*
|
|
486
|
+
* The requirement type.
|
|
379
487
|
*/
|
|
380
|
-
readonly
|
|
488
|
+
readonly type: BadgeRequirementType;
|
|
381
489
|
/**
|
|
382
|
-
*
|
|
490
|
+
* If the requirement involves a location, where it is.
|
|
383
491
|
*/
|
|
384
|
-
readonly
|
|
492
|
+
readonly location?: Location[];
|
|
385
493
|
/**
|
|
386
|
-
*
|
|
494
|
+
* If the requirement involves a badge, the badge key.
|
|
387
495
|
*/
|
|
388
496
|
readonly badgeKey?: string;
|
|
389
497
|
/**
|
|
390
|
-
*
|
|
498
|
+
* If the requirement involves a mission, the mission key.
|
|
391
499
|
*/
|
|
392
|
-
readonly
|
|
500
|
+
readonly missionKey?: string;
|
|
393
501
|
/**
|
|
394
|
-
*
|
|
502
|
+
* If the requirement involves a monument, the text that is displayed thereon.
|
|
395
503
|
*/
|
|
396
|
-
readonly
|
|
504
|
+
readonly monumentText?: string;
|
|
397
505
|
/**
|
|
398
|
-
* Level of the invention required.
|
|
506
|
+
* If the requirement involves crafting an invention, the Level of the invention required.
|
|
399
507
|
*/
|
|
400
508
|
readonly inventionLevel?: number;
|
|
401
509
|
/**
|
|
402
|
-
*
|
|
510
|
+
* If the requirement involves crafting an invention, the types of enhancements that will qualify.
|
|
403
511
|
*/
|
|
404
512
|
readonly inventionTypes?: EnhancementCategory[];
|
|
405
513
|
/**
|
|
406
|
-
* Number of
|
|
514
|
+
* Number of times the task needs to be repeated.
|
|
407
515
|
*/
|
|
408
|
-
readonly
|
|
516
|
+
readonly count?: number;
|
|
409
517
|
/**
|
|
410
|
-
*
|
|
518
|
+
* Additional information about the requirement.
|
|
411
519
|
*/
|
|
412
520
|
readonly notes?: MarkdownString;
|
|
413
521
|
/**
|
|
@@ -417,6 +525,26 @@ declare class BadgeRequirement {
|
|
|
417
525
|
constructor(data: BadgeRequirementData);
|
|
418
526
|
}
|
|
419
527
|
|
|
528
|
+
declare class MoralityList {
|
|
529
|
+
#private;
|
|
530
|
+
readonly hero: boolean;
|
|
531
|
+
readonly vigilante: boolean;
|
|
532
|
+
readonly villain: boolean;
|
|
533
|
+
readonly rogue: boolean;
|
|
534
|
+
readonly resistance: boolean;
|
|
535
|
+
readonly loyalist: boolean;
|
|
536
|
+
readonly primal: boolean;
|
|
537
|
+
readonly praetorian: boolean;
|
|
538
|
+
readonly heroic: boolean;
|
|
539
|
+
readonly villainous: boolean;
|
|
540
|
+
readonly paragonCityAccess: boolean;
|
|
541
|
+
readonly rogueIslesAccess: boolean;
|
|
542
|
+
readonly all: boolean;
|
|
543
|
+
constructor(items?: MoralityExtended[]);
|
|
544
|
+
get items(): Morality[];
|
|
545
|
+
has(morality?: MoralityExtended): boolean;
|
|
546
|
+
}
|
|
547
|
+
|
|
420
548
|
declare class Badge {
|
|
421
549
|
#private;
|
|
422
550
|
/**
|
|
@@ -434,13 +562,13 @@ declare class Badge {
|
|
|
434
562
|
*/
|
|
435
563
|
readonly name: Alternates<string>;
|
|
436
564
|
/**
|
|
437
|
-
* The character
|
|
565
|
+
* The character moralities that this badge is available to.
|
|
438
566
|
*/
|
|
439
|
-
readonly
|
|
567
|
+
readonly morality: MoralityList;
|
|
440
568
|
/**
|
|
441
569
|
* The badge text as it appears in-game. May vary by character sex or alignment.
|
|
442
570
|
*/
|
|
443
|
-
readonly badgeText: Alternates<
|
|
571
|
+
readonly badgeText: Alternates<MarkdownString>;
|
|
444
572
|
/**
|
|
445
573
|
* Short description of how to acquire the badge. Detailed instructions will be in the notes field.
|
|
446
574
|
*/
|
|
@@ -460,52 +588,35 @@ declare class Badge {
|
|
|
460
588
|
*/
|
|
461
589
|
readonly links: Link[];
|
|
462
590
|
/**
|
|
463
|
-
*
|
|
464
|
-
|
|
465
|
-
readonly zoneKey?: string;
|
|
466
|
-
/**
|
|
467
|
-
* For exploration badges, the `/loc` coordinates of the badge.
|
|
591
|
+
* The id used with the in-game `/settitle` command to apply the badge.
|
|
592
|
+
* The first value is the id for primal characters and the (optional) second number is the id for praetorian characters.
|
|
468
593
|
*/
|
|
469
|
-
readonly
|
|
470
|
-
/**
|
|
471
|
-
* For plaques that appear on a Vidiot Map, the number or letter the badge appears as.
|
|
472
|
-
*/
|
|
473
|
-
readonly vidiotMapKey?: string;
|
|
474
|
-
/**
|
|
475
|
-
* ID used with the in-game `/settitle` command to apply the badge.
|
|
476
|
-
*/
|
|
477
|
-
readonly setTitle?: {
|
|
478
|
-
/**
|
|
479
|
-
* `/settitle` id.
|
|
480
|
-
*/
|
|
481
|
-
id?: number;
|
|
482
|
-
/**
|
|
483
|
-
* `/settitle` id if different for praetorian characters.
|
|
484
|
-
*/
|
|
485
|
-
praetorianId?: number;
|
|
486
|
-
};
|
|
594
|
+
readonly setTitleId?: [number, number?];
|
|
487
595
|
/**
|
|
488
596
|
* A description of the effect the badge will have, such as a buff or granting a temporary power.
|
|
489
597
|
*/
|
|
490
598
|
readonly effect?: MarkdownString;
|
|
491
599
|
/**
|
|
492
|
-
* Represents the
|
|
493
|
-
* such as visiting plaques for history badges or collecting other badges.
|
|
494
|
-
*
|
|
495
|
-
* The outer array represents groups of requirements evaluated with OR logic —
|
|
496
|
-
* fulfilling any group satisfies the badge.
|
|
497
|
-
*
|
|
498
|
-
* Each inner array represents individual requirements evaluated with AND logic —
|
|
499
|
-
* all conditions in the group must be met.
|
|
600
|
+
* Represents the requirements for badges with multiple fulfillment steps, such as visiting monuments for history badges, completing missions, or collecting other badges.
|
|
500
601
|
*/
|
|
501
|
-
readonly requirements?: BadgeRequirement[]
|
|
602
|
+
readonly requirements?: BadgeRequirement[];
|
|
502
603
|
/**
|
|
503
604
|
* 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.
|
|
504
605
|
*/
|
|
505
606
|
readonly ignoreInTotals: boolean;
|
|
506
607
|
constructor(badgeData: BadgeData);
|
|
507
608
|
getRequirement(key: string): BadgeRequirement;
|
|
609
|
+
/**
|
|
610
|
+
* Return a list of all the zone keys referenced by this badge.
|
|
611
|
+
*/
|
|
612
|
+
get zoneKeys(): string[];
|
|
613
|
+
/**
|
|
614
|
+
* The zone key if this badge relates to a single zone.
|
|
615
|
+
*/
|
|
616
|
+
get zoneKey(): string | undefined;
|
|
508
617
|
}
|
|
618
|
+
declare function compareByDefaultName(a?: Badge, b?: Badge): number;
|
|
619
|
+
declare function compareByZoneKey(a?: Badge, b?: Badge): number;
|
|
509
620
|
|
|
510
621
|
interface BadgeSearchOptions {
|
|
511
622
|
/**
|
|
@@ -530,7 +641,7 @@ interface BadgeSearchOptions {
|
|
|
530
641
|
filter?: {
|
|
531
642
|
type?: BadgeType;
|
|
532
643
|
zoneKey?: string;
|
|
533
|
-
|
|
644
|
+
morality?: MoralityExtended;
|
|
534
645
|
};
|
|
535
646
|
/**
|
|
536
647
|
* Sort results.
|
|
@@ -538,8 +649,8 @@ interface BadgeSearchOptions {
|
|
|
538
649
|
* Badges are assumed to be in canonical order in the content bundle, and should match the in-game display order.
|
|
539
650
|
*/
|
|
540
651
|
sort?: {
|
|
541
|
-
by?: '
|
|
542
|
-
dir?: '
|
|
652
|
+
by?: 'canonical' | 'badge-name' | 'zone-key';
|
|
653
|
+
dir?: 'asc' | 'desc';
|
|
543
654
|
};
|
|
544
655
|
/**
|
|
545
656
|
* The page (1-based)
|
|
@@ -551,24 +662,6 @@ interface BadgeSearchOptions {
|
|
|
551
662
|
pageSize?: number;
|
|
552
663
|
}
|
|
553
664
|
|
|
554
|
-
declare class Zone {
|
|
555
|
-
/**
|
|
556
|
-
* Unique key used to reference this zone.
|
|
557
|
-
*
|
|
558
|
-
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
559
|
-
*/
|
|
560
|
-
readonly key: string;
|
|
561
|
-
/**
|
|
562
|
-
* The name of the zone as it appears in-game.
|
|
563
|
-
*/
|
|
564
|
-
readonly name: string;
|
|
565
|
-
/**
|
|
566
|
-
* List of external links. Wiki, forums, etc.
|
|
567
|
-
*/
|
|
568
|
-
readonly links: Link[];
|
|
569
|
-
constructor(data: ZoneData);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
665
|
interface Paged<T> {
|
|
573
666
|
items: T[];
|
|
574
667
|
page: number;
|
|
@@ -577,12 +670,34 @@ interface Paged<T> {
|
|
|
577
670
|
totalPages: number;
|
|
578
671
|
}
|
|
579
672
|
|
|
580
|
-
|
|
673
|
+
type KeysOfType<T, V> = {
|
|
674
|
+
[P in keyof T]: T[P] extends V ? P : never;
|
|
675
|
+
}[keyof T];
|
|
676
|
+
declare class AbstractIndex<T> {
|
|
581
677
|
#private;
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
678
|
+
protected _values: T[];
|
|
679
|
+
protected _hashTable: Record<string, T>;
|
|
680
|
+
constructor(keyField: KeysOfType<T, string>);
|
|
681
|
+
/**
|
|
682
|
+
* Return all indexed values
|
|
683
|
+
*/
|
|
684
|
+
get values(): T[];
|
|
685
|
+
/**
|
|
686
|
+
* Load the given list of values into the index, replacing any existing data.
|
|
687
|
+
* @param values List of values.
|
|
688
|
+
*/
|
|
689
|
+
load(values: T[] | undefined): void;
|
|
690
|
+
/**
|
|
691
|
+
* Get a value from the index
|
|
692
|
+
* @param key Key string
|
|
693
|
+
*/
|
|
694
|
+
get(key: string | undefined): T | undefined;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
declare class BadgeIndex extends AbstractIndex<Badge> {
|
|
698
|
+
#private;
|
|
699
|
+
constructor();
|
|
700
|
+
search(options?: BadgeSearchOptions): Paged<Badge>;
|
|
586
701
|
}
|
|
587
702
|
|
|
588
703
|
declare class BundleMetadata {
|
|
@@ -601,19 +716,41 @@ declare class BundleMetadata {
|
|
|
601
716
|
/**
|
|
602
717
|
* List of external links. Wiki, forums, etc.
|
|
603
718
|
*/
|
|
604
|
-
readonly links
|
|
719
|
+
readonly links?: Link[];
|
|
605
720
|
/**
|
|
606
721
|
* Change log for this data package.
|
|
607
722
|
*/
|
|
608
|
-
readonly changelog
|
|
723
|
+
readonly changelog?: Change[];
|
|
724
|
+
/**
|
|
725
|
+
* The current version of the data package.
|
|
726
|
+
*/
|
|
727
|
+
readonly version?: string;
|
|
609
728
|
constructor(bundle: ContentBundle);
|
|
610
729
|
}
|
|
611
730
|
|
|
731
|
+
declare class Zone {
|
|
732
|
+
/**
|
|
733
|
+
* Unique key used to reference this zone.
|
|
734
|
+
*
|
|
735
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
736
|
+
*/
|
|
737
|
+
readonly key: string;
|
|
738
|
+
/**
|
|
739
|
+
* The name of the zone as it appears in-game.
|
|
740
|
+
*/
|
|
741
|
+
readonly name: string;
|
|
742
|
+
/**
|
|
743
|
+
* List of external links. Wiki, forums, etc.
|
|
744
|
+
*/
|
|
745
|
+
readonly links: Link[];
|
|
746
|
+
constructor(data: ZoneData);
|
|
747
|
+
}
|
|
748
|
+
|
|
612
749
|
declare class Contact {
|
|
613
750
|
/**
|
|
614
751
|
* Unique key used to reference this contact.
|
|
615
752
|
*
|
|
616
|
-
* Keys can only contain lowercase letters, numbers and hyphens (`-`).
|
|
753
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
617
754
|
*/
|
|
618
755
|
readonly key: string;
|
|
619
756
|
/**
|
|
@@ -625,13 +762,13 @@ declare class Contact {
|
|
|
625
762
|
*/
|
|
626
763
|
readonly title?: string;
|
|
627
764
|
/**
|
|
628
|
-
* The
|
|
765
|
+
* The character moralities that this contact will interact with.
|
|
629
766
|
*/
|
|
630
|
-
readonly
|
|
767
|
+
readonly morality?: MoralityList;
|
|
631
768
|
/**
|
|
632
|
-
* The
|
|
769
|
+
* The location of this contact.
|
|
633
770
|
*/
|
|
634
|
-
readonly
|
|
771
|
+
readonly location?: Location;
|
|
635
772
|
/**
|
|
636
773
|
* The level range this contact will offer missions for.
|
|
637
774
|
*/
|
|
@@ -644,49 +781,136 @@ declare class Contact {
|
|
|
644
781
|
* List of external links. Wiki, forums, etc.
|
|
645
782
|
*/
|
|
646
783
|
readonly links: Link[];
|
|
647
|
-
constructor(
|
|
784
|
+
constructor(data: ContactData);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
declare class Mission {
|
|
788
|
+
/**
|
|
789
|
+
* Unique key used to reference this mission.
|
|
790
|
+
*
|
|
791
|
+
* Keys must be unique and can only contain lowercase letters, numbers and hyphens (`-`).
|
|
792
|
+
*/
|
|
793
|
+
readonly key: string;
|
|
794
|
+
/**
|
|
795
|
+
* The name of the mission as it appears from the contact.
|
|
796
|
+
*
|
|
797
|
+
* The name may be different when viewed in Ouroboros as a Flashback.
|
|
798
|
+
*/
|
|
799
|
+
readonly name: string;
|
|
800
|
+
/**
|
|
801
|
+
* The type of mission... Story arc, task force, trial, etc.
|
|
802
|
+
*/
|
|
803
|
+
readonly type: MissionType;
|
|
804
|
+
/**
|
|
805
|
+
* The character moralities that may accept the mission.
|
|
806
|
+
*/
|
|
807
|
+
readonly morality: MoralityList;
|
|
808
|
+
/**
|
|
809
|
+
* The keys of any contacts that provide this mission.
|
|
810
|
+
*/
|
|
811
|
+
readonly contactKeys?: string[];
|
|
812
|
+
/**
|
|
813
|
+
* The level range this mission is available for.
|
|
814
|
+
*/
|
|
815
|
+
readonly levelRange?: [number, number?];
|
|
816
|
+
/**
|
|
817
|
+
* Freeform notes or tips about the mission.
|
|
818
|
+
*/
|
|
819
|
+
readonly notes?: MarkdownString;
|
|
820
|
+
/**
|
|
821
|
+
* List of external links. Wiki, forums, etc.
|
|
822
|
+
*/
|
|
823
|
+
readonly links: Link[];
|
|
824
|
+
/**
|
|
825
|
+
* If the mission is available in Ouroboros as a Flashback.
|
|
826
|
+
*/
|
|
827
|
+
readonly flashback?: {
|
|
828
|
+
/**
|
|
829
|
+
* The id of the mission as seen in the Flashback menu, i.e. '14.01'.
|
|
830
|
+
*/
|
|
831
|
+
readonly id: string;
|
|
832
|
+
/**
|
|
833
|
+
* The level range this mission appears under as a Flashback. Leave undefined if the same as the base mission.
|
|
834
|
+
*/
|
|
835
|
+
readonly levelRange?: [number, number?];
|
|
836
|
+
/**
|
|
837
|
+
* The name as it appears in the Flashback list. Leave undefined if the same as the base mission.
|
|
838
|
+
*/
|
|
839
|
+
readonly name?: string;
|
|
840
|
+
/**
|
|
841
|
+
* The character moralities that the mission will appear for in the Flashback list. Leave undefined if the same as the base mission.
|
|
842
|
+
*/
|
|
843
|
+
readonly morality?: MoralityList;
|
|
844
|
+
/**
|
|
845
|
+
* Freeform notes or tips about the Flashback version of the mission.
|
|
846
|
+
*/
|
|
847
|
+
readonly notes?: MarkdownString;
|
|
848
|
+
};
|
|
849
|
+
constructor(data: MissionData);
|
|
648
850
|
}
|
|
649
851
|
|
|
650
852
|
declare class CohContentDatabase {
|
|
651
853
|
#private;
|
|
854
|
+
/**
|
|
855
|
+
* Load the given content bundle, resetting the db if a bundle is already loaded.
|
|
856
|
+
* @param bundle The bundle to load.
|
|
857
|
+
*/
|
|
858
|
+
load(bundle: ContentBundle): void;
|
|
652
859
|
/**
|
|
653
860
|
* Metadata about the content bundle.
|
|
654
861
|
*/
|
|
655
|
-
|
|
862
|
+
get metadata(): BundleMetadata | undefined;
|
|
656
863
|
/**
|
|
657
864
|
* List of the game server names.
|
|
658
865
|
*
|
|
659
866
|
* Torchbearer, Excelsior, etc.
|
|
660
867
|
*/
|
|
661
|
-
|
|
868
|
+
get servers(): string[];
|
|
662
869
|
/**
|
|
663
870
|
* List of archetypes.
|
|
664
871
|
*/
|
|
665
|
-
|
|
872
|
+
get archetypes(): Archetype[];
|
|
873
|
+
/**
|
|
874
|
+
* Get archetype by key.
|
|
875
|
+
* @param key The key.
|
|
876
|
+
*/
|
|
877
|
+
getArchetype(key: string | undefined): Archetype | undefined;
|
|
666
878
|
/**
|
|
667
879
|
* List of game zones.
|
|
668
880
|
*/
|
|
669
|
-
|
|
881
|
+
get zones(): Zone[];
|
|
882
|
+
/**
|
|
883
|
+
* Get zone by key.
|
|
884
|
+
* @param key The key.
|
|
885
|
+
*/
|
|
886
|
+
getZone(key: string | undefined): Zone | undefined;
|
|
670
887
|
/**
|
|
671
888
|
* List of contacts.
|
|
672
889
|
*/
|
|
673
|
-
|
|
890
|
+
get contacts(): Contact[];
|
|
891
|
+
/**
|
|
892
|
+
* Get contact by key.
|
|
893
|
+
* @param key The key.
|
|
894
|
+
*/
|
|
895
|
+
getContact(key: string | undefined): Contact | undefined;
|
|
896
|
+
/**
|
|
897
|
+
* List of missions.
|
|
898
|
+
*/
|
|
899
|
+
get missions(): Mission[];
|
|
900
|
+
/**
|
|
901
|
+
* Get mission by key.
|
|
902
|
+
* @param key The key.
|
|
903
|
+
*/
|
|
904
|
+
getMission(key: string | undefined): Mission | undefined;
|
|
674
905
|
/**
|
|
675
906
|
* List of badges.
|
|
676
907
|
*/
|
|
677
|
-
|
|
908
|
+
get badges(): Badge[];
|
|
678
909
|
/**
|
|
679
|
-
*
|
|
680
|
-
* @param
|
|
910
|
+
* Get badge by key.
|
|
911
|
+
* @param key The key.
|
|
681
912
|
*/
|
|
682
|
-
|
|
683
|
-
getArchetype(key: string): Archetype;
|
|
684
|
-
getZone(key: string): Zone;
|
|
685
|
-
getContact(key: string): Contact;
|
|
686
|
-
zoneExists(key: string): boolean;
|
|
687
|
-
contactExists(key: string): boolean;
|
|
688
|
-
getBadge(key: string): Badge;
|
|
689
|
-
badgeExists(key: string): boolean;
|
|
913
|
+
getBadge(key: string | undefined): Badge | undefined;
|
|
690
914
|
/**
|
|
691
915
|
* Search, sort and filter the badge list.
|
|
692
916
|
* This is a fairly brute-forced approach and will not be as performant as loading the badge data into a traditional
|
|
@@ -705,7 +929,7 @@ declare class Key {
|
|
|
705
929
|
declare const CHANGELOG: Change[];
|
|
706
930
|
|
|
707
931
|
/**
|
|
708
|
-
* Returns the URI of the given badge that can be used in {@link MarkdownString}
|
|
932
|
+
* Returns the URI of the given badge that can be used in {@link MarkdownString} fields.
|
|
709
933
|
*
|
|
710
934
|
* URI format: `badge://<key>`
|
|
711
935
|
*
|
|
@@ -721,7 +945,7 @@ declare function badgeUri(target: string | Badge | BadgeData): string;
|
|
|
721
945
|
*/
|
|
722
946
|
declare function badgeLink(target: string | Badge | BadgeData): string;
|
|
723
947
|
/**
|
|
724
|
-
* Returns the URI of the given contact that can be used in {@link MarkdownString}
|
|
948
|
+
* Returns the URI of the given contact that can be used in {@link MarkdownString} fields.
|
|
725
949
|
*
|
|
726
950
|
* URI format: `contact://<key>`
|
|
727
951
|
*
|
|
@@ -737,7 +961,23 @@ declare function contactUri(target: string | Contact | ContactData): string;
|
|
|
737
961
|
*/
|
|
738
962
|
declare function contactLink(target: string | Contact | ContactData): string;
|
|
739
963
|
/**
|
|
740
|
-
* Returns the URI of the given
|
|
964
|
+
* Returns the URI of the given mission that can be used in {@link MarkdownString} fields.
|
|
965
|
+
*
|
|
966
|
+
* URI format: `mission://<key>`
|
|
967
|
+
*
|
|
968
|
+
* @param target The {@link Mission} or mission key to target.
|
|
969
|
+
*/
|
|
970
|
+
declare function missionUri(target: string | Mission | MissionData): string;
|
|
971
|
+
/**
|
|
972
|
+
* Returns a {@link MarkdownString} link to the given mission.
|
|
973
|
+
*
|
|
974
|
+
* Link format: `[<key>](mission://<key>)`
|
|
975
|
+
*
|
|
976
|
+
* @param target The {@link Mission} or mission key to target.
|
|
977
|
+
*/
|
|
978
|
+
declare function missionLink(target: string | Mission | MissionData): string;
|
|
979
|
+
/**
|
|
980
|
+
* Returns the URI of the given zone that can be used in {@link MarkdownString} fields.
|
|
741
981
|
*
|
|
742
982
|
* URI format: `zone://<key>`
|
|
743
983
|
*
|
|
@@ -752,5 +992,15 @@ declare function zoneUri(target: string | Zone | ZoneData): string;
|
|
|
752
992
|
* @param target The {@link Zone} or zone key to target.
|
|
753
993
|
*/
|
|
754
994
|
declare function zoneLink(target: string | Zone | ZoneData): string;
|
|
995
|
+
/**
|
|
996
|
+
* For fields that accept either an array of values or a single value, coalesces the value to an array.
|
|
997
|
+
*
|
|
998
|
+
* Arrays are returned as-is.
|
|
999
|
+
* Single values are returned as a single-value array.
|
|
1000
|
+
* Undefined values are returned as undefined.
|
|
1001
|
+
*
|
|
1002
|
+
* @param value The value to coalesce.
|
|
1003
|
+
*/
|
|
1004
|
+
declare function coalesceToArray<T>(value?: T | T[]): T[] | undefined;
|
|
755
1005
|
|
|
756
|
-
export { ALIGNMENT, type Alignment,
|
|
1006
|
+
export { ALIGNMENT, type Alignment, type AlignmentExtended, AlignmentList, type AlternateData, Alternates, Archetype, type ArchetypeData, BADGE_REQUIREMENT_TYPE, BADGE_TYPE, Badge, type BadgeData, BadgeIndex, BadgeRequirement, type BadgeRequirementData, type BadgeRequirementType, type BadgeSearchOptions, type BadgeType, BundleMetadata, CHANGELOG, type Change, CohContentDatabase, Contact, type ContactData, type ContentBundle, type Coords, ENHANCEMENT_CATEGORY, type EnhancementCategory, Key, type Link, Location, type LocationData, type LocationIcon, MISSION_TYPE, MORALITY, type MarkdownString, Mission, type MissionData, type MissionFlashbackData, type MissionType, type Morality, type MoralityExtended, MoralityList, type Paged, SEX, type Sex, Zone, type ZoneData, badgeLink, badgeUri, coalesceToArray, compareAlignment, compareByDefaultName, compareByZoneKey, compareSex, contactLink, contactUri, missionLink, missionUri, zoneLink, zoneUri };
|