warframe-worldstate-parser 2.23.0 → 2.24.0
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/lib/Alert.js +8 -8
- package/lib/CambionCycle.js +1 -5
- package/lib/CetusCycle.js +3 -3
- package/lib/ChallengeInstance.js +6 -6
- package/lib/ConclaveChallenge.js +2 -5
- package/lib/ConstructionProgress.js +4 -2
- package/lib/DailyDeal.js +1 -3
- package/lib/DarkSector.js +11 -8
- package/lib/EarthCycle.js +4 -4
- package/lib/Fissure.js +3 -3
- package/lib/FlashSale.js +2 -7
- package/lib/GlobalUpgrade.js +5 -5
- package/lib/Invasion.js +11 -10
- package/lib/Kuva.js +16 -10
- package/lib/Mission.js +30 -20
- package/lib/News.js +13 -15
- package/lib/Nightwave.js +7 -4
- package/lib/NightwaveChallenge.js +2 -4
- package/lib/PersistentEnemy.js +1 -3
- package/lib/Reward.js +64 -60
- package/lib/SentientOutpost.js +6 -8
- package/lib/Simaris.js +5 -3
- package/lib/Sortie.js +12 -8
- package/lib/SortieVariant.js +13 -13
- package/lib/SyndicateJob.js +49 -17
- package/lib/SyndicateMission.js +6 -6
- package/lib/VallisCycle.js +2 -2
- package/lib/VoidTrader.js +9 -13
- package/lib/WeeklyChallenge.js +4 -3
- package/lib/WorldEvent.js +24 -30
- package/lib/WorldState.js +32 -24
- package/lib/WorldstateObject.js +3 -3
- package/lib/ZarimanCycle.js +136 -0
- package/lib/timeDate.js +2 -2
- package/lib/translation.js +22 -12
- package/package.json +3 -118
- package/types/lib/Alert.d.ts +1 -1
- package/types/lib/CambionCycle.d.ts +1 -0
- package/types/lib/ConclaveChallenge.d.ts +1 -1
- package/types/lib/DailyDeal.d.ts +1 -1
- package/types/lib/DarkSector.d.ts +1 -1
- package/types/lib/Fissure.d.ts +3 -3
- package/types/lib/FlashSale.d.ts +1 -1
- package/types/lib/GlobalUpgrade.d.ts +1 -1
- package/types/lib/Invasion.d.ts +4 -4
- package/types/lib/Kuva.d.ts +1 -6
- package/types/lib/Mission.d.ts +11 -4
- package/types/lib/News.d.ts +4 -4
- package/types/lib/Nightwave.d.ts +1 -1
- package/types/lib/NightwaveChallenge.d.ts +1 -1
- package/types/lib/PersistentEnemy.d.ts +1 -1
- package/types/lib/SentientOutpost.d.ts +1 -1
- package/types/lib/Sortie.d.ts +1 -1
- package/types/lib/SortieVariant.d.ts +10 -10
- package/types/lib/SyndicateJob.d.ts +13 -9
- package/types/lib/SyndicateMission.d.ts +1 -1
- package/types/lib/VoidTrader.d.ts +1 -1
- package/types/lib/WorldEvent.d.ts +3 -3
- package/types/lib/WorldState.d.ts +5 -0
- package/types/lib/ZarimanCycle.d.ts +55 -0
package/lib/translation.js
CHANGED
|
@@ -32,7 +32,10 @@ function toTitleCase(str) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
function splitResourceName(str) {
|
|
35
|
-
return str
|
|
35
|
+
return str
|
|
36
|
+
.split(/([A-Z]?[^A-Z]*)/g)
|
|
37
|
+
.filter((item) => item)
|
|
38
|
+
.join(' ');
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
const i18n = (locale = 'en') => data[locale] || data;
|
|
@@ -47,7 +50,8 @@ function faction(key, dataOverride) {
|
|
|
47
50
|
function node(key, dataOverride) {
|
|
48
51
|
if (key in i18n(dataOverride).solNodes) {
|
|
49
52
|
return i18n(dataOverride).solNodes[key].value;
|
|
50
|
-
}
|
|
53
|
+
}
|
|
54
|
+
if (key) {
|
|
51
55
|
return key.split('/').slice(-1)[0];
|
|
52
56
|
}
|
|
53
57
|
return key;
|
|
@@ -56,7 +60,8 @@ function node(key, dataOverride) {
|
|
|
56
60
|
function nodeMissionType(key, dataOverride) {
|
|
57
61
|
if (key in i18n(dataOverride).solNodes) {
|
|
58
62
|
return i18n(dataOverride).solNodes[key].type;
|
|
59
|
-
}
|
|
63
|
+
}
|
|
64
|
+
if (key) {
|
|
60
65
|
return key.split('/').slice(-1)[0];
|
|
61
66
|
}
|
|
62
67
|
return key;
|
|
@@ -65,7 +70,8 @@ function nodeMissionType(key, dataOverride) {
|
|
|
65
70
|
function nodeEnemy(key, dataOverride) {
|
|
66
71
|
if (key in i18n(dataOverride).solNodes) {
|
|
67
72
|
return i18n(dataOverride).solNodes[key].enemy;
|
|
68
|
-
}
|
|
73
|
+
}
|
|
74
|
+
if (key) {
|
|
69
75
|
return key.split('/').slice(-1)[0];
|
|
70
76
|
}
|
|
71
77
|
return key;
|
|
@@ -75,7 +81,8 @@ function languageString(key, dataOverride) {
|
|
|
75
81
|
const lowerKey = String(key).toLowerCase();
|
|
76
82
|
if (lowerKey in i18n(dataOverride).languages) {
|
|
77
83
|
return i18n(dataOverride).languages[lowerKey].value;
|
|
78
|
-
}
|
|
84
|
+
}
|
|
85
|
+
if (key) {
|
|
79
86
|
return toTitleCase(splitResourceName(String(key).split('/').slice(-1)[0]));
|
|
80
87
|
}
|
|
81
88
|
return key;
|
|
@@ -85,7 +92,8 @@ function languageDesc(key, dataOverride) {
|
|
|
85
92
|
const lowerKey = String(key).toLowerCase();
|
|
86
93
|
if (lowerKey in i18n(dataOverride).languages) {
|
|
87
94
|
return i18n(dataOverride).languages[lowerKey].desc;
|
|
88
|
-
}
|
|
95
|
+
}
|
|
96
|
+
if (key) {
|
|
89
97
|
return `[PH] ${toTitleCase(splitResourceName(String(key).split('/').slice(-1)[0]))} Desc`;
|
|
90
98
|
}
|
|
91
99
|
return key;
|
|
@@ -94,7 +102,8 @@ function languageDesc(key, dataOverride) {
|
|
|
94
102
|
function missionType(key, dataOverride) {
|
|
95
103
|
if (key in i18n(dataOverride).missionTypes) {
|
|
96
104
|
return i18n(dataOverride).missionTypes[key].value;
|
|
97
|
-
}
|
|
105
|
+
}
|
|
106
|
+
if (key) {
|
|
98
107
|
return toTitleCase(key.replace(/^MT_/, ''));
|
|
99
108
|
}
|
|
100
109
|
return key;
|
|
@@ -178,8 +187,7 @@ function sortieModifier(key, dataOverride) {
|
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
function sortieModDesc(key, dataOverride) {
|
|
181
|
-
if (i18n(dataOverride).sortie.modifierDescriptions
|
|
182
|
-
&& key in i18n(dataOverride).sortie.modifierDescriptions) {
|
|
190
|
+
if (i18n(dataOverride).sortie.modifierDescriptions && key in i18n(dataOverride).sortie.modifierDescriptions) {
|
|
183
191
|
return i18n(dataOverride).sortie.modifierDescriptions[key];
|
|
184
192
|
}
|
|
185
193
|
return key;
|
|
@@ -195,9 +203,11 @@ function region(key, dataOverride) {
|
|
|
195
203
|
function conclaveChallenge(key, dataOverride) {
|
|
196
204
|
const splitKey = String(key).split('/').slice(-1)[0];
|
|
197
205
|
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
|
|
206
|
+
if (
|
|
207
|
+
i18n(dataOverride).conclave &&
|
|
208
|
+
i18n(dataOverride).conclave.challenges &&
|
|
209
|
+
i18n(dataOverride).conclave.challenges[splitKey]
|
|
210
|
+
) {
|
|
201
211
|
return i18n(dataOverride).conclave.challenges[splitKey];
|
|
202
212
|
}
|
|
203
213
|
return {
|
package/package.json
CHANGED
|
@@ -1,59 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warframe-worldstate-parser",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"description": "An Open parser for Warframe's Worldstate in Javascript",
|
|
5
5
|
"types": "./types/main.d.ts",
|
|
6
6
|
"main": "main.js",
|
|
7
|
-
"directories": {
|
|
8
|
-
"test": "test"
|
|
9
|
-
},
|
|
10
7
|
"dependencies": {
|
|
11
8
|
"node-fetch": "^2.6.1"
|
|
12
9
|
},
|
|
13
10
|
"peerDependencies": {
|
|
14
11
|
"warframe-worldstate-data": ">=1.0"
|
|
15
12
|
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@types/chai": "^4.2.11",
|
|
18
|
-
"@types/node-fetch": "^2.5.8",
|
|
19
|
-
"@types/rewire": "^2.5.28",
|
|
20
|
-
"@types/sinon-chai": "^3.2.5",
|
|
21
|
-
"chai": "^4.2.0",
|
|
22
|
-
"coveralls": "^3.1.0",
|
|
23
|
-
"eslint": "^8.2.0",
|
|
24
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
25
|
-
"eslint-plugin-import": "^2.20.1",
|
|
26
|
-
"greenkeeper-lockfile": "^1.15.1",
|
|
27
|
-
"mocha": "^9.0.2",
|
|
28
|
-
"nyc": "^15.1.0",
|
|
29
|
-
"precommit-hook": "^3.0.0",
|
|
30
|
-
"rewire": "^5.0.0",
|
|
31
|
-
"sinon": "^12.0.1",
|
|
32
|
-
"sinon-chai": "^3.5.0",
|
|
33
|
-
"typescript": "^4.0.5"
|
|
34
|
-
},
|
|
35
13
|
"engines": {
|
|
36
14
|
"node": ">=8.9.0"
|
|
37
15
|
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"test": "nyc mocha",
|
|
40
|
-
"test:integration": "npm run test -- -g 'should parse live worldstate data'",
|
|
41
|
-
"printcov": "nyc report",
|
|
42
|
-
"coverage": "npm test && nyc report --reporter=text-lcov | coveralls",
|
|
43
|
-
"build-docs": "jsdoc -c jsdoc-config.json -d docs",
|
|
44
|
-
"lint": "eslint main.js lib/ test/",
|
|
45
|
-
"lint:fix": "eslint main.js lib/ test/ --fix",
|
|
46
|
-
"prepublishOnly": "npm run build:types",
|
|
47
|
-
"build:types": "tsc -p tsconfig.declaration.json",
|
|
48
|
-
"validate": "npm run lint:fix && git add -u ."
|
|
49
|
-
},
|
|
50
16
|
"files": [
|
|
51
17
|
"lib",
|
|
52
18
|
"main.js",
|
|
53
19
|
"LICENSE",
|
|
54
20
|
"types"
|
|
55
21
|
],
|
|
56
|
-
"repository": "wfcd/warframe-worldstate-parser",
|
|
22
|
+
"repository": "github:wfcd/warframe-worldstate-parser",
|
|
57
23
|
"keywords": [
|
|
58
24
|
"warframe-worldstate",
|
|
59
25
|
"warframe"
|
|
@@ -66,86 +32,5 @@
|
|
|
66
32
|
"bugs": {
|
|
67
33
|
"url": "https://github.com/wfcd/warframe-worldstate-parser/issues"
|
|
68
34
|
},
|
|
69
|
-
"homepage": "https://github.com/wfcd/warframe-worldstate-parser#readme"
|
|
70
|
-
"release": {
|
|
71
|
-
"branch": "master"
|
|
72
|
-
},
|
|
73
|
-
"eslintIgnore": [
|
|
74
|
-
".github/**",
|
|
75
|
-
"docs/**",
|
|
76
|
-
"resources/**",
|
|
77
|
-
"types/**"
|
|
78
|
-
],
|
|
79
|
-
"eslintConfig": {
|
|
80
|
-
"extends": "airbnb-base",
|
|
81
|
-
"parserOptions": {
|
|
82
|
-
"sourceType": "script"
|
|
83
|
-
},
|
|
84
|
-
"rules": {
|
|
85
|
-
"valid-jsdoc": [
|
|
86
|
-
"error",
|
|
87
|
-
{
|
|
88
|
-
"requireReturn": false,
|
|
89
|
-
"requireReturnDescription": false,
|
|
90
|
-
"preferType": {
|
|
91
|
-
"String": "string",
|
|
92
|
-
"Number": "number",
|
|
93
|
-
"Boolean": "boolean",
|
|
94
|
-
"Function": "function",
|
|
95
|
-
"object": "Object",
|
|
96
|
-
"date": "Date",
|
|
97
|
-
"error": "Error"
|
|
98
|
-
},
|
|
99
|
-
"prefer": {
|
|
100
|
-
"return": "returns"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"no-underscore-dangle": "off",
|
|
105
|
-
"strict": [
|
|
106
|
-
"error",
|
|
107
|
-
"safe"
|
|
108
|
-
],
|
|
109
|
-
"linebreak-style": "off",
|
|
110
|
-
"import/no-unresolved": 0
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"pre-commit": [
|
|
114
|
-
"validate"
|
|
115
|
-
],
|
|
116
|
-
"mocha": {
|
|
117
|
-
"exit": true,
|
|
118
|
-
"spec": "test/**/*.spec.js",
|
|
119
|
-
"timeout": 10000
|
|
120
|
-
},
|
|
121
|
-
"nyc": {
|
|
122
|
-
"exclude": [
|
|
123
|
-
"test/**",
|
|
124
|
-
"lib/DarkSector*.js",
|
|
125
|
-
"lib/Alert.js",
|
|
126
|
-
"lib/PersistentEnemy.js",
|
|
127
|
-
"lib/GlobalUpgrade.js",
|
|
128
|
-
"lib/ChallengeInstance.js",
|
|
129
|
-
"lib/WeeklyChallenge.js"
|
|
130
|
-
],
|
|
131
|
-
"reporter": [
|
|
132
|
-
"lcov",
|
|
133
|
-
"text"
|
|
134
|
-
],
|
|
135
|
-
"skip-full": true
|
|
136
|
-
},
|
|
137
|
-
"clean-package": {
|
|
138
|
-
"remove": [
|
|
139
|
-
"devDependencies",
|
|
140
|
-
"scripts",
|
|
141
|
-
"release",
|
|
142
|
-
"eslintIgnore",
|
|
143
|
-
"eslintConfig",
|
|
144
|
-
"pre-commit",
|
|
145
|
-
"nyc",
|
|
146
|
-
"mocha",
|
|
147
|
-
"clean-package",
|
|
148
|
-
"directories"
|
|
149
|
-
]
|
|
150
|
-
}
|
|
35
|
+
"homepage": "https://github.com/wfcd/warframe-worldstate-parser#readme"
|
|
151
36
|
}
|
package/types/lib/Alert.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare class Alert extends WorldstateObject {
|
|
|
13
13
|
* @param {Reward} Reward The Reward parser
|
|
14
14
|
* @param {string} locale Locale to use for translations
|
|
15
15
|
*/
|
|
16
|
-
constructor(data: any, { mdConfig, translator, timeDate, Mission, Reward, locale
|
|
16
|
+
constructor(data: any, { mdConfig, translator, timeDate, Mission, Reward, locale }: MarkdownSettings);
|
|
17
17
|
/**
|
|
18
18
|
* The markdown settings
|
|
19
19
|
* @type {MarkdownSettings}
|
|
@@ -12,7 +12,7 @@ declare class ConclaveChallenge extends WorldstateObject {
|
|
|
12
12
|
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
13
13
|
* @param {string} deps.locale Locale to use for translations
|
|
14
14
|
*/
|
|
15
|
-
constructor(data: any, { mdConfig, translator, timeDate, locale
|
|
15
|
+
constructor(data: any, { mdConfig, translator, timeDate, locale }: {
|
|
16
16
|
mdConfig: MarkdownSettings;
|
|
17
17
|
translator: Translator;
|
|
18
18
|
timeDate: TimeDateFunctions;
|
package/types/lib/DailyDeal.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare class DailyDeal {
|
|
|
11
11
|
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
12
12
|
* @param {string} deps.locale Locale to use for translations
|
|
13
13
|
*/
|
|
14
|
-
constructor(data: any, { mdConfig, translator, timeDate, locale
|
|
14
|
+
constructor(data: any, { mdConfig, translator, timeDate, locale }: {
|
|
15
15
|
mdConfig: MarkdownSettings;
|
|
16
16
|
translator: Translator;
|
|
17
17
|
timeDate: TimeDateFunctions;
|
|
@@ -15,7 +15,7 @@ declare class DarkSector extends WorldstateObject {
|
|
|
15
15
|
* @param {Reward} deps.Reward The reward parser
|
|
16
16
|
* @param {string} deps.locale Locale to use for translations
|
|
17
17
|
*/
|
|
18
|
-
constructor(data: any, { mdConfig, translator, timeDate, Mission, DarkSectorBattle, Reward, locale
|
|
18
|
+
constructor(data: any, { mdConfig, translator, timeDate, Mission, DarkSectorBattle, Reward, locale }: {
|
|
19
19
|
mdConfig: MarkdownSettings;
|
|
20
20
|
translator: Translator;
|
|
21
21
|
timeDate: TimeDateFunctions;
|
package/types/lib/Fissure.d.ts
CHANGED
|
@@ -42,9 +42,9 @@ declare class Fissure extends WorldstateObject {
|
|
|
42
42
|
*/
|
|
43
43
|
enemyKey: string;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
* The node key where the fissure has appeared
|
|
46
|
+
* @type {string}
|
|
47
|
+
*/
|
|
48
48
|
nodeKey: string;
|
|
49
49
|
/**
|
|
50
50
|
* The fissure's tier
|
package/types/lib/FlashSale.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare class FlashSale {
|
|
|
11
11
|
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
12
12
|
* @param {string} deps.locale Locale to use for translations
|
|
13
13
|
*/
|
|
14
|
-
constructor(data: any, { translator, mdConfig, timeDate, locale
|
|
14
|
+
constructor(data: any, { translator, mdConfig, timeDate, locale }: {
|
|
15
15
|
mdConfig: MarkdownSettings;
|
|
16
16
|
translator: Translator;
|
|
17
17
|
timeDate: TimeDateFunctions;
|
|
@@ -11,7 +11,7 @@ declare class GlobalUpgrade {
|
|
|
11
11
|
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
12
12
|
* @param {string} deps.locale Locale to use for translations
|
|
13
13
|
*/
|
|
14
|
-
constructor(data: any, { translator, timeDate, mdConfig, locale
|
|
14
|
+
constructor(data: any, { translator, timeDate, mdConfig, locale }: {
|
|
15
15
|
translator: Translator;
|
|
16
16
|
timeDate: TimeDateFunctions;
|
|
17
17
|
mdConfig: MarkdownSettings;
|
package/types/lib/Invasion.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare class Invasion extends WorldstateObject {
|
|
|
19
19
|
* @param {Reward} deps.Reward The Reward parser
|
|
20
20
|
* @param {string} deps.locale Locale to use for translations
|
|
21
21
|
*/
|
|
22
|
-
constructor(data: any, { mdConfig, translator, timeDate, Reward, locale
|
|
22
|
+
constructor(data: any, { mdConfig, translator, timeDate, Reward, locale }: {
|
|
23
23
|
mdConfig: MarkdownSettings;
|
|
24
24
|
translator: Translator;
|
|
25
25
|
timeDate: TimeDateFunctions;
|
|
@@ -38,9 +38,9 @@ declare class Invasion extends WorldstateObject {
|
|
|
38
38
|
*/
|
|
39
39
|
node: string;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
* The node key where the invasion is taking place
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
44
|
nodeKey: string;
|
|
45
45
|
/**
|
|
46
46
|
* The invasion's description
|
package/types/lib/Kuva.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export = Kuva;
|
|
2
|
-
/**
|
|
3
|
-
* Stores and parses kuva data from https://10o.io/kuvalog.json
|
|
4
|
-
* @property {ExternalMission[]} kuva currently active kuva missions
|
|
5
|
-
* @property {ExternalMission} arbitration current arbitration
|
|
6
|
-
*/
|
|
7
2
|
declare class Kuva {
|
|
8
|
-
constructor({ kuvaData, translator, locale, logger
|
|
3
|
+
constructor({ kuvaData, translator, locale, logger }: {
|
|
9
4
|
kuvaData: any;
|
|
10
5
|
translator: any;
|
|
11
6
|
locale: any;
|
package/types/lib/Mission.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export = Mission;
|
|
2
|
-
/**
|
|
3
|
-
* Represents an in-game mission
|
|
4
|
-
*/
|
|
5
2
|
declare class Mission {
|
|
6
3
|
/**
|
|
7
4
|
* @param {Object} data The mission data
|
|
@@ -11,7 +8,7 @@ declare class Mission {
|
|
|
11
8
|
* @param {Reward} deps.Reward The Reward parser
|
|
12
9
|
* @param {string} deps.locale Locale to use for translations
|
|
13
10
|
*/
|
|
14
|
-
constructor(data: any, { mdConfig, translator, Reward, locale
|
|
11
|
+
constructor(data: any, { mdConfig, translator, Reward, locale }: {
|
|
15
12
|
mdConfig: MarkdownSettings;
|
|
16
13
|
translator: Translator;
|
|
17
14
|
Reward: Reward;
|
|
@@ -33,11 +30,21 @@ declare class Mission {
|
|
|
33
30
|
* @type {string}
|
|
34
31
|
*/
|
|
35
32
|
node: string;
|
|
33
|
+
/**
|
|
34
|
+
* Unlocalized {@link mission#node}
|
|
35
|
+
* @type {string}
|
|
36
|
+
*/
|
|
37
|
+
nodeKey: string;
|
|
36
38
|
/**
|
|
37
39
|
* The mission's type
|
|
38
40
|
* @type {string}
|
|
39
41
|
*/
|
|
40
42
|
type: string;
|
|
43
|
+
/**
|
|
44
|
+
* The mission's type
|
|
45
|
+
* @type {string}
|
|
46
|
+
*/
|
|
47
|
+
typeKey: string;
|
|
41
48
|
/**
|
|
42
49
|
* The factions that the players must fight in the mission
|
|
43
50
|
* @type {string}
|
package/types/lib/News.d.ts
CHANGED
|
@@ -107,10 +107,10 @@ declare class News extends WorldstateObject {
|
|
|
107
107
|
*/
|
|
108
108
|
isStream(): boolean;
|
|
109
109
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
* The title of the news item in the specified language
|
|
111
|
+
* @param {string} langCode Ex. 'es', 'de', 'fr'
|
|
112
|
+
* @returns {string}
|
|
113
|
+
*/
|
|
114
114
|
getTitle(langCode: string): string;
|
|
115
115
|
}
|
|
116
116
|
import WorldstateObject = require("./WorldstateObject");
|
package/types/lib/Nightwave.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare class Nightwave extends WorldstateObject {
|
|
|
14
14
|
* @param {Reward} deps.Reward The Reward parser
|
|
15
15
|
* @param {string} deps.locale Locale to use for translations
|
|
16
16
|
*/
|
|
17
|
-
constructor(data: any, { mdConfig, translator, timeDate, Mission, Reward, locale
|
|
17
|
+
constructor(data: any, { mdConfig, translator, timeDate, Mission, Reward, locale }: {
|
|
18
18
|
mdConfig: MarkdownSettings;
|
|
19
19
|
translator: Translator;
|
|
20
20
|
timeDate: TimeDateFunctions;
|
|
@@ -11,7 +11,7 @@ declare class NightwaveChallenge extends WorldstateObject {
|
|
|
11
11
|
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
12
12
|
* @param {string} deps.locale Locale to use for translations
|
|
13
13
|
*/
|
|
14
|
-
constructor(data: any, { translator, timeDate, locale
|
|
14
|
+
constructor(data: any, { translator, timeDate, locale }: {
|
|
15
15
|
translator: Translator;
|
|
16
16
|
timeDate: TimeDateFunctions;
|
|
17
17
|
locale: string;
|
|
@@ -11,7 +11,7 @@ declare class PersistentEnemy extends WorldstateObject {
|
|
|
11
11
|
* @param {Translator} deps.translator The string translator
|
|
12
12
|
* @param {string} deps.locale Locale to use for translations
|
|
13
13
|
*/
|
|
14
|
-
constructor(data: any, { mdConfig, translator, timeDate, locale
|
|
14
|
+
constructor(data: any, { mdConfig, translator, timeDate, locale }: {
|
|
15
15
|
mdConfig: MarkdownSettings;
|
|
16
16
|
translator: Translator;
|
|
17
17
|
locale: string;
|
|
@@ -20,7 +20,7 @@ export = SentientOutpost;
|
|
|
20
20
|
* @property {Date} previous.expiry When the mission became or becomes inactive
|
|
21
21
|
*/
|
|
22
22
|
declare class SentientOutpost {
|
|
23
|
-
constructor(data: any, { translator, locale, sentientData, logger
|
|
23
|
+
constructor(data: any, { translator, locale, sentientData, logger }: {
|
|
24
24
|
translator: any;
|
|
25
25
|
locale: any;
|
|
26
26
|
sentientData: any;
|
package/types/lib/Sortie.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare class Sortie extends WorldstateObject {
|
|
|
14
14
|
* @param {SortieVariant} deps.SortieVariant The sortie variant parser
|
|
15
15
|
* @param {string} deps.locale Locale to use for translations
|
|
16
16
|
*/
|
|
17
|
-
constructor(data: any, { mdConfig, translator, timeDate, sortieData, SortieVariant, locale
|
|
17
|
+
constructor(data: any, { mdConfig, translator, timeDate, sortieData, SortieVariant, locale }: {
|
|
18
18
|
mdConfig: MarkdownSettings;
|
|
19
19
|
translator: Translator;
|
|
20
20
|
timeDate: TimeDateFunctions;
|
|
@@ -11,7 +11,7 @@ declare class SortieVariant {
|
|
|
11
11
|
* @param {Object} deps.sortieData The data used to parse sorties
|
|
12
12
|
* @param {string} deps.locale Locale to use for translations
|
|
13
13
|
*/
|
|
14
|
-
constructor(data: any, { mdConfig, translator, locale
|
|
14
|
+
constructor(data: any, { mdConfig, translator, locale }: {
|
|
15
15
|
mdConfig: MarkdownSettings;
|
|
16
16
|
translator: Translator;
|
|
17
17
|
sortieData: any;
|
|
@@ -24,19 +24,19 @@ declare class SortieVariant {
|
|
|
24
24
|
*/
|
|
25
25
|
private mdConfig;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* The variant's mission type
|
|
28
|
+
* @type {string}
|
|
29
|
+
*/
|
|
30
30
|
missionType: string;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
* The variant's modifier
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
35
|
modifier: string;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
* The variant's modifier description
|
|
38
|
+
* @type {string}
|
|
39
|
+
*/
|
|
40
40
|
modifierDescription: string;
|
|
41
41
|
/**
|
|
42
42
|
* The node where the variant takes place
|
|
@@ -5,16 +5,14 @@ export = SyndicateJob;
|
|
|
5
5
|
*/
|
|
6
6
|
declare class SyndicateJob extends WorldstateObject {
|
|
7
7
|
/**
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
8
|
+
* @param {Object} data The syndicate mission data
|
|
9
|
+
* @param {Date} expiry The syndicate job expiration
|
|
10
|
+
* @param {Object} deps The dependencies object
|
|
11
|
+
* @param {Object} timeDate Time/Date functions
|
|
12
|
+
* @param {Translator} translator The string translator
|
|
13
|
+
* @param {string} locale Locale to use for translations
|
|
13
14
|
*/
|
|
14
|
-
constructor(data: any, expiry: Date, { translator, timeDate, locale }:
|
|
15
|
-
translator: Translator;
|
|
16
|
-
locale: string;
|
|
17
|
-
});
|
|
15
|
+
constructor(data: any, expiry: Date, { translator, timeDate, locale }: any);
|
|
18
16
|
/**
|
|
19
17
|
* Array of strings describing rewards
|
|
20
18
|
* @type {Array.<String>}
|
|
@@ -51,5 +49,11 @@ declare class SyndicateJob extends WorldstateObject {
|
|
|
51
49
|
* @type {string|null}
|
|
52
50
|
*/
|
|
53
51
|
locationTag: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* What time phase this bounty is bound to
|
|
54
|
+
* @type {string}
|
|
55
|
+
*/
|
|
56
|
+
timeBound: string;
|
|
57
|
+
timeBoound: string;
|
|
54
58
|
}
|
|
55
59
|
import WorldstateObject = require("./WorldstateObject");
|
|
@@ -12,7 +12,7 @@ declare class SyndicateMission extends WorldstateObject {
|
|
|
12
12
|
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
13
13
|
* @param {string} deps.locale Locale to use for translations
|
|
14
14
|
*/
|
|
15
|
-
constructor(data: any, { mdConfig, translator, timeDate, locale
|
|
15
|
+
constructor(data: any, { mdConfig, translator, timeDate, locale }: {
|
|
16
16
|
mdConfig: MarkdownSettings;
|
|
17
17
|
translator: Translator;
|
|
18
18
|
timeDate: TimeDateFunctions;
|
|
@@ -12,7 +12,7 @@ declare class VoidTrader extends WorldstateObject {
|
|
|
12
12
|
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
13
13
|
* @param {string} deps.locale Locale to use for translations
|
|
14
14
|
*/
|
|
15
|
-
constructor(data: any, { mdConfig, translator, timeDate, locale
|
|
15
|
+
constructor(data: any, { mdConfig, translator, timeDate, locale }: {
|
|
16
16
|
mdConfig: MarkdownSettings;
|
|
17
17
|
translator: Translator;
|
|
18
18
|
timeDate: TimeDateFunctions;
|
|
@@ -30,7 +30,7 @@ declare class WorldEvent extends WorldstateObject {
|
|
|
30
30
|
* @param {Reward} deps.Reward The Reward parser
|
|
31
31
|
* @param {string} deps.locale Locale to use for translations
|
|
32
32
|
*/
|
|
33
|
-
constructor(data: any, { mdConfig, translator, timeDate, Reward, locale
|
|
33
|
+
constructor(data: any, { mdConfig, translator, timeDate, Reward, locale }: {
|
|
34
34
|
mdConfig: MarkdownSettings;
|
|
35
35
|
translator: Translator;
|
|
36
36
|
timeDate: TimeDateFunctions;
|
|
@@ -128,9 +128,9 @@ declare class WorldEvent extends WorldstateObject {
|
|
|
128
128
|
interimSteps: InterimStep[];
|
|
129
129
|
/**
|
|
130
130
|
* Progress Steps, if any are present
|
|
131
|
-
* @type {
|
|
131
|
+
* @type {ProgressStep[]}
|
|
132
132
|
*/
|
|
133
|
-
progressSteps:
|
|
133
|
+
progressSteps: ProgressStep[];
|
|
134
134
|
/**
|
|
135
135
|
* Total of all MultiProgress
|
|
136
136
|
* @type {Number}
|
|
@@ -91,6 +91,11 @@ declare class WorldState {
|
|
|
91
91
|
* @type {CambionCycle}
|
|
92
92
|
*/
|
|
93
93
|
cambionCycle: CambionCycle;
|
|
94
|
+
/**
|
|
95
|
+
* The current Zariman cycle based off current time
|
|
96
|
+
* @type {ZarimanCycle}
|
|
97
|
+
*/
|
|
98
|
+
zarimanCycle: ZarimanCycle;
|
|
94
99
|
/**
|
|
95
100
|
* Weekly challenges
|
|
96
101
|
* @type {Array.<WeeklyChallenge>}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export = ZarimanCycle;
|
|
2
|
+
declare class ZarimanCycle extends WorldstateObject {
|
|
3
|
+
/**
|
|
4
|
+
* @param {Date} currentTime The current time to calculate Zariman cycle for
|
|
5
|
+
* @param {Object} deps The dependencies object
|
|
6
|
+
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
7
|
+
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
8
|
+
*/
|
|
9
|
+
constructor(currentTime: Date, { mdConfig, timeDate }: {
|
|
10
|
+
mdConfig: MarkdownSettings;
|
|
11
|
+
timeDate: TimeDateFunctions;
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* The markdown settings
|
|
15
|
+
* @type {MarkdownSettings}
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
private mdConfig;
|
|
19
|
+
/**
|
|
20
|
+
* The end of the Zariman bounties timer, the faction changes exactly half way through
|
|
21
|
+
* @type {Date}
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
private currentTime;
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not this it's daytime
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
*/
|
|
29
|
+
isCorpus: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Current cycle state. One of `corpus`, `grineer`
|
|
32
|
+
* @type {string}
|
|
33
|
+
*/
|
|
34
|
+
state: string;
|
|
35
|
+
/**
|
|
36
|
+
* Time remaining string
|
|
37
|
+
* @type {string}
|
|
38
|
+
*/
|
|
39
|
+
timeLeft: string;
|
|
40
|
+
shortString: string;
|
|
41
|
+
/**
|
|
42
|
+
* Get whether or not the event has expired
|
|
43
|
+
* @returns {boolean}
|
|
44
|
+
*/
|
|
45
|
+
getExpired(): boolean;
|
|
46
|
+
getCurrentZarimanCycle(): {
|
|
47
|
+
corpusTime: boolean;
|
|
48
|
+
timeLeft: any;
|
|
49
|
+
expiry: Date;
|
|
50
|
+
expiresIn: number;
|
|
51
|
+
state: string;
|
|
52
|
+
start: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
import WorldstateObject = require("./WorldstateObject");
|