warframe-worldstate-parser 4.3.1 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/WorldState.js
CHANGED
|
@@ -368,14 +368,15 @@ export class WorldState {
|
|
|
368
368
|
|
|
369
369
|
this.kinepage = new Kinepage(tmp.pgr, deps.locale);
|
|
370
370
|
|
|
371
|
-
|
|
371
|
+
const key = Object.keys(tmp).find((k) => k.startsWith('lqo'));
|
|
372
|
+
if (key) {
|
|
372
373
|
const { activation, expiry } = this.nightwave.activeChallenges.filter((c) => !c.isDaily)[0];
|
|
373
374
|
|
|
374
375
|
/**
|
|
375
376
|
* The current Deep Archimedea missions and modifiers
|
|
376
377
|
* @type {DeepArchimedea}
|
|
377
378
|
*/
|
|
378
|
-
this.deepArchimedea = new DeepArchimedea(activation, expiry, tmp
|
|
379
|
+
this.deepArchimedea = new DeepArchimedea(activation, expiry, tmp[key]);
|
|
379
380
|
}
|
|
380
381
|
|
|
381
382
|
this.calendar = parseArray(Calendar, data.KnownCalendarSeasons, deps);
|
package/lib/models/Calendar.js
CHANGED
|
@@ -45,7 +45,11 @@ export default class Calendar {
|
|
|
45
45
|
this.expiry = parseDate(calendar.Expiry);
|
|
46
46
|
|
|
47
47
|
this.days = Array.isArray(calendar.Days)
|
|
48
|
-
? calendar.Days.filter(Boolean).map((d) => ({
|
|
48
|
+
? calendar.Days.filter(Boolean).map((d) => ({
|
|
49
|
+
...d,
|
|
50
|
+
date: this.getDate(d.day).toISOString(),
|
|
51
|
+
events: d.events.map((e) => new DayEvent(e)),
|
|
52
|
+
}))
|
|
49
53
|
: [];
|
|
50
54
|
|
|
51
55
|
this.season = translateSeason(calendar.Season);
|
|
@@ -56,4 +60,15 @@ export default class Calendar {
|
|
|
56
60
|
|
|
57
61
|
this.requirements = calendar.UpgradeAvaliabilityRequirements;
|
|
58
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Converts number of day to a date in 1999 in UTC
|
|
66
|
+
* @param {number} day number of the day in a year
|
|
67
|
+
* @returns {Date} the date in 1999
|
|
68
|
+
*/
|
|
69
|
+
getDate(day) {
|
|
70
|
+
const date = new Date(Date.UTC(1999));
|
|
71
|
+
date.setUTCDate(date.getUTCDate() + day - 1);
|
|
72
|
+
return date;
|
|
73
|
+
}
|
|
59
74
|
}
|
package/package.json
CHANGED
|
@@ -7,4 +7,10 @@ export default class Calendar {
|
|
|
7
7
|
yearIteration: any;
|
|
8
8
|
version: any;
|
|
9
9
|
requirements: any;
|
|
10
|
+
/**
|
|
11
|
+
* Converts number of day to a date in 1999 in UTC
|
|
12
|
+
* @param {number} day number of the day in a year
|
|
13
|
+
* @returns {Date} the date in 1999
|
|
14
|
+
*/
|
|
15
|
+
getDate(day: number): Date;
|
|
10
16
|
}
|