warframe-worldstate-parser 3.0.5 → 3.0.7
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.
|
@@ -21,16 +21,25 @@ export default class GlobalUpgrade {
|
|
|
21
21
|
if (!data.Activation || !data.ExpiryDate) {
|
|
22
22
|
throw new TypeError('The provided data does not have the required properties.');
|
|
23
23
|
}
|
|
24
|
+
|
|
24
25
|
/**
|
|
25
26
|
* The time and date at which the global upgrade starts being active
|
|
26
27
|
* @type {Date}
|
|
27
28
|
*/
|
|
28
|
-
this.
|
|
29
|
+
this.activation = parseDate(data.Activation);
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `activation` instead
|
|
32
|
+
*/
|
|
33
|
+
this.start = this.activation;
|
|
29
34
|
|
|
30
35
|
/**
|
|
31
36
|
* The time and date at which the global upgrade stops being active
|
|
32
37
|
* @type {Date}
|
|
33
38
|
*/
|
|
39
|
+
this.expiry = parseDate(data.ExpiryDate);
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use `expiry` instead
|
|
42
|
+
*/
|
|
34
43
|
this.end = parseDate(data.ExpiryDate);
|
|
35
44
|
|
|
36
45
|
/**
|
package/lib/models/WorldEvent.js
CHANGED
|
@@ -256,7 +256,12 @@ export default class WorldEvent extends WorldstateObject {
|
|
|
256
256
|
* @returns {string} the event's string representation
|
|
257
257
|
*/
|
|
258
258
|
toString() {
|
|
259
|
-
let lines = [
|
|
259
|
+
let lines = [];
|
|
260
|
+
if (this.faction) {
|
|
261
|
+
lines.push(`${this.description} : ${this.faction}`);
|
|
262
|
+
} else {
|
|
263
|
+
lines.push(this.description);
|
|
264
|
+
}
|
|
260
265
|
|
|
261
266
|
if (this.scoreLocTag && this.maximumScore) {
|
|
262
267
|
lines.push(`${this.scoreLocTag} : ${this.maximumScore}`);
|
package/package.json
CHANGED
|
@@ -14,12 +14,20 @@ export default class GlobalUpgrade {
|
|
|
14
14
|
* The time and date at which the global upgrade starts being active
|
|
15
15
|
* @type {Date}
|
|
16
16
|
*/
|
|
17
|
+
activation: Date;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `activation` instead
|
|
20
|
+
*/
|
|
17
21
|
start: Date;
|
|
18
22
|
/**
|
|
19
23
|
* The time and date at which the global upgrade stops being active
|
|
20
24
|
* @type {Date}
|
|
21
25
|
*/
|
|
22
|
-
|
|
26
|
+
expiry: Date;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `expiry` instead
|
|
29
|
+
*/
|
|
30
|
+
end: any;
|
|
23
31
|
/**
|
|
24
32
|
* The effect of the upgrade
|
|
25
33
|
* @type {string}
|