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