warframe-worldstate-parser 5.2.16 → 5.2.18
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/dist/{Calendar-CRM0XhAy.d.mts → Calendar-C-rbmV_t.d.mts} +1 -1
- package/dist/{CambionCycle-OI3v1knd.d.mts → CambionCycle-BzR_MfPH.d.mts} +2 -2
- package/dist/{CetusCycle-DQ4n05vO.d.mts → CetusCycle-DaqfF4J1.d.mts} +1 -1
- package/dist/{ConstructionProgress-DG2KzS0X.d.mts → ConstructionProgress-BRxmro3-.d.mts} +1 -1
- package/dist/{DarkSectorBattle-CiSe3kFm.d.mts → DarkSectorBattle-DHRl5tG1.d.mts} +1 -1
- package/dist/{Dependency-CNqXngHD.d.mts → Dependency-Cd-TxBJy.d.mts} +1 -1
- package/dist/{EarthCycle-CxtijnVV.d.mts → EarthCycle-C_oB5gDc.d.mts} +1 -1
- package/dist/{MidrathCycle-E0gMF3AR.d.mts → MidrathCycle-CxveqDtx.d.mts} +1 -1
- package/dist/{News-DxEm-q6V.d.mts → News-CJ3lD7_g.d.mts} +1 -1
- package/dist/{Nightwave-CPqMSqGK.d.mts → Nightwave-BLHH02ht.d.mts} +2 -2
- package/dist/{NightwaveChallenge-CG3uychc.d.mts → NightwaveChallenge-j_m4hVQU.d.mts} +1 -1
- package/dist/{PersistentEnemy-DnnnreSz.d.mts → PersistentEnemy-BJ4twtUY.d.mts} +1 -1
- package/dist/{VallisCycle-6DCaWFoR.d.mts → VallisCycle-as7DM4a-.d.mts} +1 -1
- package/dist/{ZarimanCycle-BrSLIWhD.d.mts → ZarimanCycle-DyYiVfyG.d.mts} +1 -1
- package/dist/{index-Bgx8kIDy.d.mts → index-C4EJ_Mpd.d.mts} +6 -6
- package/dist/lib/WorldState.d.mts +16 -19
- package/dist/lib/WorldState.mjs +32 -48
- package/dist/lib/models/Alert.d.mts +1 -17
- package/dist/lib/models/Alert.mjs +49 -7
- package/dist/lib/models/Archimedea.d.mts +1 -17
- package/dist/lib/models/Archimedea.mjs +88 -4
- package/dist/lib/models/Calendar.d.mts +1 -2
- package/dist/lib/models/Calendar.mjs +79 -4
- package/dist/lib/models/CambionCycle.d.mts +1 -3
- package/dist/lib/models/CambionCycle.mjs +28 -4
- package/dist/lib/models/CetusCycle.d.mts +1 -2
- package/dist/lib/models/CetusCycle.mjs +87 -4
- package/dist/lib/models/ChallengeInstance.d.mts +1 -17
- package/dist/lib/models/ChallengeInstance.mjs +46 -3
- package/dist/lib/models/ConclaveChallenge.d.mts +1 -17
- package/dist/lib/models/ConclaveChallenge.mjs +77 -4
- package/dist/lib/models/ConstructionProgress.d.mts +1 -2
- package/dist/lib/models/ConstructionProgress.mjs +23 -4
- package/dist/lib/models/DailyDeal.d.mts +1 -17
- package/dist/lib/models/DailyDeal.mjs +64 -4
- package/dist/lib/models/DarkSector.d.mts +1 -17
- package/dist/lib/models/DarkSector.mjs +136 -8
- package/dist/lib/models/DarkSectorBattle.d.mts +1 -2
- package/dist/lib/models/DarkSectorBattle.mjs +49 -3
- package/dist/lib/models/DuviriCycle.d.mts +1 -17
- package/dist/lib/models/DuviriCycle.mjs +55 -4
- package/dist/lib/models/EarthCycle.d.mts +1 -2
- package/dist/lib/models/EarthCycle.mjs +73 -4
- package/dist/lib/models/Fissure.d.mts +1 -17
- package/dist/lib/models/Fissure.mjs +83 -4
- package/dist/lib/models/FlashSale.d.mts +1 -17
- package/dist/lib/models/FlashSale.mjs +73 -4
- package/dist/lib/models/GlobalUpgrade.d.mts +1 -17
- package/dist/lib/models/GlobalUpgrade.mjs +56 -4
- package/dist/lib/models/Invasion.d.mts +1 -17
- package/dist/lib/models/Invasion.mjs +106 -6
- package/dist/lib/models/Kinepage.d.mts +1 -1
- package/dist/lib/models/Kinepage.mjs +23 -3
- package/dist/lib/models/Kuva.d.mts +1 -17
- package/dist/lib/models/Kuva.mjs +85 -3
- package/dist/lib/models/MidrathCycle.d.mts +1 -2
- package/dist/lib/models/MidrathCycle.mjs +66 -4
- package/dist/lib/models/Mission.d.mts +1 -17
- package/dist/lib/models/Mission.mjs +138 -5
- package/dist/lib/models/News.d.mts +1 -2
- package/dist/lib/models/News.mjs +116 -4
- package/dist/lib/models/Nightwave.d.mts +1 -3
- package/dist/lib/models/Nightwave.mjs +58 -5
- package/dist/lib/models/NightwaveChallenge.d.mts +1 -2
- package/dist/lib/models/NightwaveChallenge.mjs +51 -4
- package/dist/lib/models/PersistentEnemy.d.mts +1 -2
- package/dist/lib/models/PersistentEnemy.mjs +74 -4
- package/dist/lib/models/Reward.d.mts +1 -17
- package/dist/lib/models/Reward.mjs +71 -4
- package/dist/lib/models/SentientOutpost.d.mts +1 -17
- package/dist/lib/models/SentientOutpost.mjs +63 -3
- package/dist/lib/models/Simaris.d.mts +1 -17
- package/dist/lib/models/Simaris.mjs +33 -3
- package/dist/lib/models/Sortie.d.mts +1 -17
- package/dist/lib/models/Sortie.mjs +71 -8
- package/dist/lib/models/SortieVariant.d.mts +1 -17
- package/dist/lib/models/SortieVariant.mjs +49 -3
- package/dist/lib/models/SteelPathOffering.d.mts +1 -1
- package/dist/lib/models/SteelPathOffering.mjs +81 -3
- package/dist/lib/models/SyndicateJob.d.mts +1 -17
- package/dist/lib/models/SyndicateJob.mjs +161 -7
- package/dist/lib/models/SyndicateMission.d.mts +1 -17
- package/dist/lib/models/SyndicateMission.mjs +64 -8
- package/dist/lib/models/Tmp.d.mts +1 -17
- package/dist/lib/models/Tmp.mjs +28 -4
- package/dist/lib/models/VallisCycle.d.mts +1 -2
- package/dist/lib/models/VallisCycle.mjs +72 -4
- package/dist/lib/models/VoidTrader.d.mts +1 -17
- package/dist/lib/models/VoidTrader.mjs +76 -6
- package/dist/lib/models/VoidTraderItem.d.mts +1 -17
- package/dist/lib/models/VoidTraderItem.mjs +36 -3
- package/dist/lib/models/VoidTraderSchedule.d.mts +1 -17
- package/dist/lib/models/VoidTraderSchedule.mjs +12 -3
- package/dist/lib/models/WeeklyChallenge.d.mts +1 -17
- package/dist/lib/models/WeeklyChallenge.mjs +19 -5
- package/dist/lib/models/WorldEvent.d.mts +1 -17
- package/dist/lib/models/WorldEvent.mjs +211 -9
- package/dist/lib/models/WorldStateObject.d.mts +1 -1
- package/dist/lib/models/WorldStateObject.mjs +52 -3
- package/dist/lib/models/ZarimanCycle.d.mts +1 -2
- package/dist/lib/models/ZarimanCycle.mjs +77 -4
- package/dist/lib/models/index.d.mts +17 -18
- package/dist/lib/models/index.mjs +43 -47
- package/dist/lib/supporting/Dependency.d.mts +1 -1
- package/dist/lib/supporting/Dependency.mjs +1 -1
- package/dist/lib/supporting/DuviriChoice.d.mts +1 -17
- package/dist/lib/supporting/DuviriChoice.mjs +24 -3
- package/dist/lib/supporting/ExternalMission.d.mts +1 -1
- package/dist/lib/supporting/ExternalMission.mjs +1 -1
- package/dist/lib/supporting/FetchProxy.d.mts +1 -1
- package/dist/lib/supporting/FetchProxy.mjs +45 -3
- package/dist/lib/supporting/ImgCdn.d.mts +1 -1
- package/dist/lib/supporting/ImgCdn.mjs +6 -3
- package/dist/lib/supporting/KuvaLogEntry.d.mts +1 -1
- package/dist/lib/supporting/KuvaLogEntry.mjs +1 -1
- package/dist/lib/supporting/RewardData.d.mts +1 -1
- package/dist/lib/supporting/RewardData.mjs +75 -3
- package/dist/lib/supporting/RewardTypes.d.mts +1 -1
- package/dist/lib/supporting/RewardTypes.mjs +326 -3
- package/dist/lib/supporting/index.d.mts +8 -23
- package/dist/lib/supporting/index.mjs +6 -8
- package/dist/main.d.mts +24 -24
- package/dist/main.mjs +48 -51
- package/package.json +1 -1
- package/dist/Alert-CPT2sBmd.mjs +0 -51
- package/dist/Archimedea-Vo36QE99.mjs +0 -90
- package/dist/Calendar-_gEQ9BEd.mjs +0 -81
- package/dist/CambionCycle-B1pqIgks.mjs +0 -30
- package/dist/CetusCycle-Ct51M2pd.mjs +0 -89
- package/dist/ChallengeInstance-BOu_e7ML.mjs +0 -48
- package/dist/ConclaveChallenge-BTN6UyV6.mjs +0 -79
- package/dist/ConstructionProgress-BoF2P9fx.mjs +0 -25
- package/dist/DailyDeal-aoNeCFWT.mjs +0 -66
- package/dist/DarkSector-D0uJWCg7.mjs +0 -138
- package/dist/DarkSectorBattle-CqRYeNpe.mjs +0 -51
- package/dist/Dependency-BR-dAeHI.mjs +0 -1
- package/dist/DuviriChoice-BEBiWA-g.mjs +0 -25
- package/dist/DuviriCycle-Do7mMnoC.mjs +0 -57
- package/dist/EarthCycle-BOAlcAuQ.mjs +0 -75
- package/dist/ExternalMission-D3MSZgnN.mjs +0 -1
- package/dist/FetchProxy-Bkdk15SX.mjs +0 -46
- package/dist/Fissure-diM4hyi3.mjs +0 -85
- package/dist/FlashSale-CNfRaZhM.mjs +0 -75
- package/dist/GlobalUpgrade-CUtZw05z.mjs +0 -58
- package/dist/ImgCdn-BJOdWAbU.mjs +0 -7
- package/dist/Invasion-Corx1lxf.mjs +0 -108
- package/dist/Kinepage-CbSzge67.mjs +0 -24
- package/dist/Kuva-Ijy2ZGBL.mjs +0 -87
- package/dist/KuvaLogEntry-D_VzIT3W.mjs +0 -1
- package/dist/MidrathCycle-XD2T8Dx5.mjs +0 -68
- package/dist/Mission-b8KP-YDf.mjs +0 -140
- package/dist/News-zAK-sYRg.mjs +0 -118
- package/dist/Nightwave-cTRmlbwH.mjs +0 -60
- package/dist/NightwaveChallenge-C8ARG7LC.mjs +0 -53
- package/dist/PersistentEnemy-3Sw5E8AN.mjs +0 -76
- package/dist/Reward-3FBJF_hS.mjs +0 -73
- package/dist/RewardData-C_9b8Yhi.mjs +0 -76
- package/dist/RewardTypes-DUrR7H3G.mjs +0 -328
- package/dist/SentientOutpost-Cadk-pIW.mjs +0 -65
- package/dist/Simaris-D6etEQp_.mjs +0 -35
- package/dist/Sortie-rSBgJc6U.mjs +0 -73
- package/dist/SortieVariant-CnuLkkNZ.mjs +0 -51
- package/dist/SteelPathOffering--wm-7hwb.mjs +0 -83
- package/dist/SyndicateJob-R89tWqvT.mjs +0 -162
- package/dist/SyndicateMission-CKZDWNyf.mjs +0 -66
- package/dist/Tmp-BYL_mYIG.mjs +0 -30
- package/dist/VallisCycle-BW2g49wB.mjs +0 -74
- package/dist/VoidTrader-DtjtVUgR.mjs +0 -78
- package/dist/VoidTraderItem-Cz6x1KTF.mjs +0 -38
- package/dist/VoidTraderSchedule-BsJLu50V.mjs +0 -14
- package/dist/WeeklyChallenge-Dl2ekl6X.mjs +0 -21
- package/dist/WorldEvent-C-LaV2ug.mjs +0 -213
- package/dist/WorldStateObject-45dbRgp7.mjs +0 -54
- package/dist/ZarimanCycle-DoAPwgaM.mjs +0 -79
- package/dist/supporting-BLSXhlWM.mjs +0 -1
- /package/dist/{ExternalMission-C82w4uMq.d.mts → ExternalMission-CT__oi7Q.d.mts} +0 -0
- /package/dist/{FetchProxy-DfSTUgkf.d.mts → FetchProxy-DHSI4JPP.d.mts} +0 -0
- /package/dist/{ImgCdn-D0hSGSB1.d.mts → ImgCdn-DIhZrwap.d.mts} +0 -0
- /package/dist/{Kinepage-B-Ym_VW5.d.mts → Kinepage-CKBuvbv5.d.mts} +0 -0
- /package/dist/{KuvaLogEntry-cftxhjfU.d.mts → KuvaLogEntry-f4ZBn2Xf.d.mts} +0 -0
- /package/dist/{RewardData-DWCgJ3UT.d.mts → RewardData-BdtdUFnh.d.mts} +0 -0
- /package/dist/{RewardTypes-Y3tHrtIJ.d.mts → RewardTypes-BnGaD7VF.d.mts} +0 -0
- /package/dist/{SteelPathOffering-CQkoKi5T.d.mts → SteelPathOffering-DYjZ29sT.d.mts} +0 -0
- /package/dist/{WorldStateObject-C1HEDkH7.d.mts → WorldStateObject-C2KjQZjd.d.mts} +0 -0
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { ct as getItemType, lt as getItemTypeFull, ot as RawReward, st as Reward } from "../../index-Bgx8kIDy.mjs";
|
|
3
|
-
import "../../WorldStateObject-C1HEDkH7.mjs";
|
|
4
|
-
import "../../Calendar-CRM0XhAy.mjs";
|
|
5
|
-
import "../../CetusCycle-DQ4n05vO.mjs";
|
|
6
|
-
import "../../CambionCycle-OI3v1knd.mjs";
|
|
7
|
-
import "../../ConstructionProgress-DG2KzS0X.mjs";
|
|
8
|
-
import "../../DarkSectorBattle-CiSe3kFm.mjs";
|
|
9
|
-
import "../../EarthCycle-CxtijnVV.mjs";
|
|
10
|
-
import "../../MidrathCycle-E0gMF3AR.mjs";
|
|
11
|
-
import "../../News-DxEm-q6V.mjs";
|
|
12
|
-
import "../../NightwaveChallenge-CG3uychc.mjs";
|
|
13
|
-
import "../../Nightwave-CPqMSqGK.mjs";
|
|
14
|
-
import "../../PersistentEnemy-DnnnreSz.mjs";
|
|
15
|
-
import "../../SteelPathOffering-CQkoKi5T.mjs";
|
|
16
|
-
import "../../VallisCycle-6DCaWFoR.mjs";
|
|
17
|
-
import "../../ZarimanCycle-BrSLIWhD.mjs";
|
|
1
|
+
import { ct as getItemType, lt as getItemTypeFull, ot as RawReward, st as Reward } from "../../index-C4EJ_Mpd.mjs";
|
|
18
2
|
export { RawReward, Reward, getItemType, getItemTypeFull };
|
|
@@ -1,4 +1,71 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import RewardTypes_default from "../supporting/RewardTypes.mjs";
|
|
2
|
+
import { insist, languageString } from "warframe-worldstate-data/utilities";
|
|
3
|
+
//#region lib/models/Reward.ts
|
|
4
|
+
/**
|
|
5
|
+
* Returns the type of a given item
|
|
6
|
+
*/
|
|
7
|
+
function getItemType(item, types = RewardTypes_default) {
|
|
8
|
+
return types.find((t) => t.test(item)).name;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns the full type of a given item
|
|
12
|
+
*/
|
|
13
|
+
function getItemTypeFull(item, types = RewardTypes_default) {
|
|
14
|
+
return types.find((t) => t.test(item));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents a mission reward
|
|
18
|
+
*/
|
|
19
|
+
var Reward = class {
|
|
20
|
+
/**
|
|
21
|
+
* The items being rewarded
|
|
22
|
+
*/
|
|
23
|
+
items;
|
|
24
|
+
/**
|
|
25
|
+
* The counted items being rewarded
|
|
26
|
+
*/
|
|
27
|
+
countedItems;
|
|
28
|
+
/**
|
|
29
|
+
* The credits being rewarded
|
|
30
|
+
*/
|
|
31
|
+
credits;
|
|
32
|
+
/**
|
|
33
|
+
* Thumbnail url
|
|
34
|
+
*/
|
|
35
|
+
thumbnail;
|
|
36
|
+
/**
|
|
37
|
+
* Reward color
|
|
38
|
+
*/
|
|
39
|
+
color;
|
|
40
|
+
/**
|
|
41
|
+
* @param data The mission data
|
|
42
|
+
* @param deps The dependencies object
|
|
43
|
+
* @param deps.locale Locale to use for translations
|
|
44
|
+
*/
|
|
45
|
+
constructor(data, { locale = "en" } = { locale: "en" }) {
|
|
46
|
+
insist({ ...data });
|
|
47
|
+
this.items = data.items ? data.items.map((i) => languageString(i, locale)) : [];
|
|
48
|
+
this.countedItems = data.countedItems ? data.countedItems.map((i) => ({
|
|
49
|
+
count: i.ItemCount,
|
|
50
|
+
type: languageString(i.ItemType, locale),
|
|
51
|
+
key: languageString(i.ItemType)
|
|
52
|
+
})) : [];
|
|
53
|
+
this.credits = data.credits || 0;
|
|
54
|
+
this.thumbnail = this.getTypesFull()[0] ? this.getTypesFull()[0].thumbnail : "https://i.imgur.com/JCKyUXJ.png";
|
|
55
|
+
this.color = this.getTypesFull()[0] ? this.getTypesFull()[0].color : 15844367;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The types of all items that are being rewarded
|
|
59
|
+
*/
|
|
60
|
+
getTypes() {
|
|
61
|
+
return this.items.concat(this.countedItems.map((i) => i.key)).map((t) => getItemType(t));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The types of all the items that are being rewarded
|
|
65
|
+
*/
|
|
66
|
+
getTypesFull() {
|
|
67
|
+
return this.items.concat(this.countedItems.map((i) => i.key)).map((t) => getItemTypeFull(t));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { Reward, getItemType, getItemTypeFull };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { D as SentientOutpost, E as OutpostMission } from "../../index-Bgx8kIDy.mjs";
|
|
3
|
-
import "../../WorldStateObject-C1HEDkH7.mjs";
|
|
4
|
-
import "../../Calendar-CRM0XhAy.mjs";
|
|
5
|
-
import "../../CetusCycle-DQ4n05vO.mjs";
|
|
6
|
-
import "../../CambionCycle-OI3v1knd.mjs";
|
|
7
|
-
import "../../ConstructionProgress-DG2KzS0X.mjs";
|
|
8
|
-
import "../../DarkSectorBattle-CiSe3kFm.mjs";
|
|
9
|
-
import "../../EarthCycle-CxtijnVV.mjs";
|
|
10
|
-
import "../../MidrathCycle-E0gMF3AR.mjs";
|
|
11
|
-
import "../../News-DxEm-q6V.mjs";
|
|
12
|
-
import "../../NightwaveChallenge-CG3uychc.mjs";
|
|
13
|
-
import "../../Nightwave-CPqMSqGK.mjs";
|
|
14
|
-
import "../../PersistentEnemy-DnnnreSz.mjs";
|
|
15
|
-
import "../../SteelPathOffering-CQkoKi5T.mjs";
|
|
16
|
-
import "../../VallisCycle-6DCaWFoR.mjs";
|
|
17
|
-
import "../../ZarimanCycle-BrSLIWhD.mjs";
|
|
1
|
+
import { D as SentientOutpost, E as OutpostMission } from "../../index-C4EJ_Mpd.mjs";
|
|
18
2
|
export { OutpostMission, SentientOutpost };
|
|
@@ -1,3 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { node, nodeEnemy, nodeMissionType } from "warframe-worldstate-data/utilities";
|
|
2
|
+
//#region lib/models/SentientOutpost.ts
|
|
3
|
+
const duration = 1800;
|
|
4
|
+
const sat = () => {
|
|
5
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
6
|
+
const cycleSeconds = now % duration;
|
|
7
|
+
const active = cycleSeconds > 0 && cycleSeconds < 1800;
|
|
8
|
+
const start = (now - cycleSeconds) * 1e3;
|
|
9
|
+
const end = (now - cycleSeconds + duration) * 1e3;
|
|
10
|
+
return {
|
|
11
|
+
active,
|
|
12
|
+
expiry: new Date(end),
|
|
13
|
+
activation: new Date(start)
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Represents a set of sentient outposts that are present
|
|
18
|
+
* Parsed source is combined data from DE's worldstate and semlar.com/anomaly.json
|
|
19
|
+
*/
|
|
20
|
+
var SentientOutpost = class {
|
|
21
|
+
node;
|
|
22
|
+
id;
|
|
23
|
+
/**
|
|
24
|
+
* Start time
|
|
25
|
+
*/
|
|
26
|
+
activation;
|
|
27
|
+
/**
|
|
28
|
+
* End time
|
|
29
|
+
*/
|
|
30
|
+
expiry;
|
|
31
|
+
/**
|
|
32
|
+
* Current Mission
|
|
33
|
+
*/
|
|
34
|
+
mission;
|
|
35
|
+
/**
|
|
36
|
+
* Whether or not the object was active during creation
|
|
37
|
+
*/
|
|
38
|
+
active;
|
|
39
|
+
/**
|
|
40
|
+
* @param sfn Sentient outpost node number
|
|
41
|
+
* @param deps Dependencies
|
|
42
|
+
*/
|
|
43
|
+
constructor(sfn, { locale, sentientData, logger }) {
|
|
44
|
+
this.node = sfn || "000";
|
|
45
|
+
const id = `CrewBattleNode${this.node}`;
|
|
46
|
+
if (this.node === "000") this.mission = void 0;
|
|
47
|
+
else this.mission = {
|
|
48
|
+
node: node(id, locale),
|
|
49
|
+
faction: nodeEnemy(id, locale),
|
|
50
|
+
type: nodeMissionType(id, locale)
|
|
51
|
+
};
|
|
52
|
+
({activation: this.activation, expiry: this.expiry} = sat());
|
|
53
|
+
this.active = Boolean(this.mission);
|
|
54
|
+
this.id = `${id}:${this.active}`;
|
|
55
|
+
if (!sentientData) logger?.debug("No outpost data, skipping");
|
|
56
|
+
else {
|
|
57
|
+
this.activation = /* @__PURE__ */ new Date(sentientData.start * 1e3);
|
|
58
|
+
this.expiry = /* @__PURE__ */ new Date(sentientData.end * 1e3);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { SentientOutpost };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { T as Simaris, w as LibraryInfo } from "../../index-Bgx8kIDy.mjs";
|
|
3
|
-
import "../../WorldStateObject-C1HEDkH7.mjs";
|
|
4
|
-
import "../../Calendar-CRM0XhAy.mjs";
|
|
5
|
-
import "../../CetusCycle-DQ4n05vO.mjs";
|
|
6
|
-
import "../../CambionCycle-OI3v1knd.mjs";
|
|
7
|
-
import "../../ConstructionProgress-DG2KzS0X.mjs";
|
|
8
|
-
import "../../DarkSectorBattle-CiSe3kFm.mjs";
|
|
9
|
-
import "../../EarthCycle-CxtijnVV.mjs";
|
|
10
|
-
import "../../MidrathCycle-E0gMF3AR.mjs";
|
|
11
|
-
import "../../News-DxEm-q6V.mjs";
|
|
12
|
-
import "../../NightwaveChallenge-CG3uychc.mjs";
|
|
13
|
-
import "../../Nightwave-CPqMSqGK.mjs";
|
|
14
|
-
import "../../PersistentEnemy-DnnnreSz.mjs";
|
|
15
|
-
import "../../SteelPathOffering-CQkoKi5T.mjs";
|
|
16
|
-
import "../../VallisCycle-6DCaWFoR.mjs";
|
|
17
|
-
import "../../ZarimanCycle-BrSLIWhD.mjs";
|
|
1
|
+
import { T as Simaris, w as LibraryInfo } from "../../index-C4EJ_Mpd.mjs";
|
|
18
2
|
export { LibraryInfo, Simaris };
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { languageString } from "warframe-worldstate-data/utilities";
|
|
2
|
+
//#region lib/models/Simaris.ts
|
|
3
|
+
/**
|
|
4
|
+
* Contains information about sanctuary targets
|
|
5
|
+
*/
|
|
6
|
+
var Simaris = class {
|
|
7
|
+
/**
|
|
8
|
+
* The sanctuary target
|
|
9
|
+
*/
|
|
10
|
+
target;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the target is currently active
|
|
13
|
+
*/
|
|
14
|
+
isTargetActive;
|
|
15
|
+
/**
|
|
16
|
+
* @param data The sanctuary data
|
|
17
|
+
* @param deps The dependencies object
|
|
18
|
+
* @param deps.locale Locale to use for translations
|
|
19
|
+
*/
|
|
20
|
+
constructor(data, { locale } = { locale: "en" }) {
|
|
21
|
+
if (!data || !Object.keys(data).length) data = { LastCompletedTargetType: "" };
|
|
22
|
+
this.target = languageString(data.LastCompletedTargetType, locale) || "N/A";
|
|
23
|
+
this.isTargetActive = !data.LastCompletedTargetType;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A string representation of the current sanctuary status
|
|
27
|
+
*/
|
|
28
|
+
get asString() {
|
|
29
|
+
return `Simaris's ${this.isTargetActive ? "current" : "previous"} objective ${this.isTargetActive ? "is" : "was"} ${this.target}`;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Simaris };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { b as RawSortie, x as Sortie } from "../../index-Bgx8kIDy.mjs";
|
|
3
|
-
import "../../WorldStateObject-C1HEDkH7.mjs";
|
|
4
|
-
import "../../Calendar-CRM0XhAy.mjs";
|
|
5
|
-
import "../../CetusCycle-DQ4n05vO.mjs";
|
|
6
|
-
import "../../CambionCycle-OI3v1knd.mjs";
|
|
7
|
-
import "../../ConstructionProgress-DG2KzS0X.mjs";
|
|
8
|
-
import "../../DarkSectorBattle-CiSe3kFm.mjs";
|
|
9
|
-
import "../../EarthCycle-CxtijnVV.mjs";
|
|
10
|
-
import "../../MidrathCycle-E0gMF3AR.mjs";
|
|
11
|
-
import "../../News-DxEm-q6V.mjs";
|
|
12
|
-
import "../../NightwaveChallenge-CG3uychc.mjs";
|
|
13
|
-
import "../../Nightwave-CPqMSqGK.mjs";
|
|
14
|
-
import "../../PersistentEnemy-DnnnreSz.mjs";
|
|
15
|
-
import "../../SteelPathOffering-CQkoKi5T.mjs";
|
|
16
|
-
import "../../VallisCycle-6DCaWFoR.mjs";
|
|
17
|
-
import "../../ZarimanCycle-BrSLIWhD.mjs";
|
|
1
|
+
import { b as RawSortie, x as Sortie } from "../../index-C4EJ_Mpd.mjs";
|
|
18
2
|
export { RawSortie, Sortie };
|
|
@@ -1,8 +1,71 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Mission } from "./Mission.mjs";
|
|
2
|
+
import { WorldStateObject } from "./WorldStateObject.mjs";
|
|
3
|
+
import { SortieVariant } from "./SortieVariant.mjs";
|
|
4
|
+
import wsData from "warframe-worldstate-data";
|
|
5
|
+
import { fromNow, languageString, parseDate, sortieBoss, sortieFaction, timeDeltaToString } from "warframe-worldstate-data/utilities";
|
|
6
|
+
//#region lib/models/Sortie.ts
|
|
7
|
+
const { sortie: sortieData } = wsData;
|
|
8
|
+
/**
|
|
9
|
+
* Represents a daily sortie
|
|
10
|
+
* @augments {WorldStateObject}
|
|
11
|
+
*/
|
|
12
|
+
var Sortie = class extends WorldStateObject {
|
|
13
|
+
/**
|
|
14
|
+
* The sortie's reward pool
|
|
15
|
+
*/
|
|
16
|
+
rewardPool;
|
|
17
|
+
/**
|
|
18
|
+
* The sortie's variants
|
|
19
|
+
*/
|
|
20
|
+
variants;
|
|
21
|
+
/**
|
|
22
|
+
* Archon hunt missions if sortie is an archon hunt
|
|
23
|
+
*/
|
|
24
|
+
missions;
|
|
25
|
+
/**
|
|
26
|
+
* The sortie's boss
|
|
27
|
+
*/
|
|
28
|
+
boss;
|
|
29
|
+
/**
|
|
30
|
+
* The sortie's faction
|
|
31
|
+
*/
|
|
32
|
+
faction;
|
|
33
|
+
/**
|
|
34
|
+
* The sortie's faction
|
|
35
|
+
*/
|
|
36
|
+
factionKey;
|
|
37
|
+
/**
|
|
38
|
+
* @param data The data for all daily sorties
|
|
39
|
+
* @param deps The dependencies object
|
|
40
|
+
* @param deps.locale Locale to use for translations
|
|
41
|
+
*/
|
|
42
|
+
constructor(data, { locale = "en" } = { locale: "en" }) {
|
|
43
|
+
super(data);
|
|
44
|
+
const opts = {
|
|
45
|
+
sortieData,
|
|
46
|
+
locale
|
|
47
|
+
};
|
|
48
|
+
this.activation = parseDate(data.Activation);
|
|
49
|
+
this.expiry = parseDate(data.Expiry);
|
|
50
|
+
this.rewardPool = languageString(data.Reward, locale);
|
|
51
|
+
this.variants = (data.Variants ?? []).map((v) => new SortieVariant(v, opts));
|
|
52
|
+
this.missions = (data.Missions ?? []).map((v) => new Mission(v, opts));
|
|
53
|
+
this.boss = sortieBoss(data.Boss, locale);
|
|
54
|
+
this.faction = sortieFaction(data.Boss, locale);
|
|
55
|
+
this.factionKey = sortieFaction(data.Boss, "en");
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* ETA string (at time of object creation)
|
|
59
|
+
*/
|
|
60
|
+
get eta() {
|
|
61
|
+
return timeDeltaToString(fromNow(this.expiry));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Whether this is expired (at time of object creation)
|
|
65
|
+
*/
|
|
66
|
+
get expired() {
|
|
67
|
+
return fromNow(this.expiry) < 0;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { Sortie };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { C as SortieVariant, S as RawSortieVariant } from "../../index-Bgx8kIDy.mjs";
|
|
3
|
-
import "../../WorldStateObject-C1HEDkH7.mjs";
|
|
4
|
-
import "../../Calendar-CRM0XhAy.mjs";
|
|
5
|
-
import "../../CetusCycle-DQ4n05vO.mjs";
|
|
6
|
-
import "../../CambionCycle-OI3v1knd.mjs";
|
|
7
|
-
import "../../ConstructionProgress-DG2KzS0X.mjs";
|
|
8
|
-
import "../../DarkSectorBattle-CiSe3kFm.mjs";
|
|
9
|
-
import "../../EarthCycle-CxtijnVV.mjs";
|
|
10
|
-
import "../../MidrathCycle-E0gMF3AR.mjs";
|
|
11
|
-
import "../../News-DxEm-q6V.mjs";
|
|
12
|
-
import "../../NightwaveChallenge-CG3uychc.mjs";
|
|
13
|
-
import "../../Nightwave-CPqMSqGK.mjs";
|
|
14
|
-
import "../../PersistentEnemy-DnnnreSz.mjs";
|
|
15
|
-
import "../../SteelPathOffering-CQkoKi5T.mjs";
|
|
16
|
-
import "../../VallisCycle-6DCaWFoR.mjs";
|
|
17
|
-
import "../../ZarimanCycle-BrSLIWhD.mjs";
|
|
1
|
+
import { C as SortieVariant, S as RawSortieVariant } from "../../index-C4EJ_Mpd.mjs";
|
|
18
2
|
export { RawSortieVariant, SortieVariant };
|
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { insist, missionType, node, sortieModDesc, sortieModifier } from "warframe-worldstate-data/utilities";
|
|
2
|
+
//#region lib/models/SortieVariant.ts
|
|
3
|
+
/**
|
|
4
|
+
* Represents a sortie variant
|
|
5
|
+
* @class
|
|
6
|
+
*/
|
|
7
|
+
var SortieVariant = class {
|
|
8
|
+
/**
|
|
9
|
+
* The variant's mission type
|
|
10
|
+
*/
|
|
11
|
+
missionType;
|
|
12
|
+
/**
|
|
13
|
+
* The variant's mission type unlocalized
|
|
14
|
+
*/
|
|
15
|
+
missionTypeKey;
|
|
16
|
+
/**
|
|
17
|
+
* The mission modifier
|
|
18
|
+
*/
|
|
19
|
+
modifier;
|
|
20
|
+
/**
|
|
21
|
+
* The variant's modifier description
|
|
22
|
+
*/
|
|
23
|
+
modifierDescription;
|
|
24
|
+
/**
|
|
25
|
+
* The node where the variant takes place
|
|
26
|
+
*/
|
|
27
|
+
node;
|
|
28
|
+
/**
|
|
29
|
+
* The node where the variant takes place unlocalized
|
|
30
|
+
*/
|
|
31
|
+
nodeKey;
|
|
32
|
+
/**
|
|
33
|
+
* Make the SortieVariant
|
|
34
|
+
* @param data Sortie variant data
|
|
35
|
+
* @param deps Dependencies
|
|
36
|
+
* @param deps.locale Locale to use for translations
|
|
37
|
+
*/
|
|
38
|
+
constructor(data, { locale = "en" } = { locale: "en" }) {
|
|
39
|
+
insist({ ...data });
|
|
40
|
+
this.missionType = missionType(data.missionType, locale);
|
|
41
|
+
this.missionTypeKey = missionType(data.missionType, "en");
|
|
42
|
+
this.modifier = sortieModifier(data.modifierType, locale);
|
|
43
|
+
this.modifierDescription = sortieModDesc(data.modifierType, locale);
|
|
44
|
+
this.node = node(data.node, locale);
|
|
45
|
+
this.nodeKey = node(data.node, "en");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { SortieVariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SteelPathOfferings, t as Incursion } from "../../SteelPathOffering-
|
|
1
|
+
import { n as SteelPathOfferings, t as Incursion } from "../../SteelPathOffering-DYjZ29sT.mjs";
|
|
2
2
|
export { Incursion, SteelPathOfferings };
|
|
@@ -1,3 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { steelPath, timeDeltaToString } from "warframe-worldstate-data/utilities";
|
|
2
|
+
//#region lib/models/SteelPathOffering.ts
|
|
3
|
+
const monday = 1;
|
|
4
|
+
/**
|
|
5
|
+
* Gets the first day of the week
|
|
6
|
+
*/
|
|
7
|
+
function getFirstDayOfWeek() {
|
|
8
|
+
const resultDate = /* @__PURE__ */ new Date();
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
const offset = resultDate.getUTCDay() === 0 ? 6 : resultDate.getUTCDay() - monday;
|
|
11
|
+
resultDate.setUTCDate(resultDate.getUTCDate() - offset);
|
|
12
|
+
resultDate.setUTCHours(0);
|
|
13
|
+
resultDate.setUTCMinutes(0);
|
|
14
|
+
resultDate.setUTCSeconds(0);
|
|
15
|
+
resultDate.setUTCMilliseconds(0);
|
|
16
|
+
return resultDate;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get the last day of the week
|
|
20
|
+
*/
|
|
21
|
+
function getLastDayOfWeek() {
|
|
22
|
+
const last = new Date(getFirstDayOfWeek());
|
|
23
|
+
last.setUTCDate(last.getUTCDate() + 6);
|
|
24
|
+
last.setUTCHours(23);
|
|
25
|
+
last.setUTCMinutes(59);
|
|
26
|
+
last.setUTCSeconds(59);
|
|
27
|
+
last.setUTCMilliseconds(0);
|
|
28
|
+
return last;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* When was the start of the day
|
|
32
|
+
*/
|
|
33
|
+
function getStartOfDay() {
|
|
34
|
+
const today = /* @__PURE__ */ new Date();
|
|
35
|
+
today.setUTCHours(0);
|
|
36
|
+
today.setUTCMinutes(0);
|
|
37
|
+
today.setUTCSeconds(0);
|
|
38
|
+
today.setUTCMilliseconds(0);
|
|
39
|
+
return today;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* When was the end of the day
|
|
43
|
+
*/
|
|
44
|
+
function getEndOfDay() {
|
|
45
|
+
const last = /* @__PURE__ */ new Date();
|
|
46
|
+
last.setUTCHours(23);
|
|
47
|
+
last.setUTCMinutes(59);
|
|
48
|
+
last.setUTCSeconds(59);
|
|
49
|
+
last.setUTCMilliseconds(0);
|
|
50
|
+
return last;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Start of Steel Path cycle calculations
|
|
54
|
+
*/
|
|
55
|
+
const start = /* @__PURE__ */ new Date("2020-11-16T00:00:00.000Z");
|
|
56
|
+
var SteelPathOfferings = class {
|
|
57
|
+
currentReward;
|
|
58
|
+
activation;
|
|
59
|
+
expiry;
|
|
60
|
+
remaining;
|
|
61
|
+
rotation;
|
|
62
|
+
evergreens;
|
|
63
|
+
incursions;
|
|
64
|
+
constructor({ locale }) {
|
|
65
|
+
const sSinceStart = (Date.now() - start.getTime()) / 1e3;
|
|
66
|
+
const ind = Math.floor(sSinceStart % 4838400 / 604800);
|
|
67
|
+
this.currentReward = steelPath(locale).rotation[ind];
|
|
68
|
+
this.activation = getFirstDayOfWeek();
|
|
69
|
+
this.expiry = getLastDayOfWeek();
|
|
70
|
+
this.remaining = timeDeltaToString(this.expiry.getTime() - Date.now());
|
|
71
|
+
this.rotation = steelPath(locale).rotation;
|
|
72
|
+
this.evergreens = steelPath(locale).evergreen;
|
|
73
|
+
this.incursions = {
|
|
74
|
+
id: `spi:${getStartOfDay().getTime()}`,
|
|
75
|
+
activation: getStartOfDay(),
|
|
76
|
+
expiry: getEndOfDay()
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { SteelPathOfferings };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { _ as RawSyndicateJob, v as RewardDrop, y as SyndicateJob } from "../../index-Bgx8kIDy.mjs";
|
|
3
|
-
import "../../WorldStateObject-C1HEDkH7.mjs";
|
|
4
|
-
import "../../Calendar-CRM0XhAy.mjs";
|
|
5
|
-
import "../../CetusCycle-DQ4n05vO.mjs";
|
|
6
|
-
import "../../CambionCycle-OI3v1knd.mjs";
|
|
7
|
-
import "../../ConstructionProgress-DG2KzS0X.mjs";
|
|
8
|
-
import "../../DarkSectorBattle-CiSe3kFm.mjs";
|
|
9
|
-
import "../../EarthCycle-CxtijnVV.mjs";
|
|
10
|
-
import "../../MidrathCycle-E0gMF3AR.mjs";
|
|
11
|
-
import "../../News-DxEm-q6V.mjs";
|
|
12
|
-
import "../../NightwaveChallenge-CG3uychc.mjs";
|
|
13
|
-
import "../../Nightwave-CPqMSqGK.mjs";
|
|
14
|
-
import "../../PersistentEnemy-DnnnreSz.mjs";
|
|
15
|
-
import "../../SteelPathOffering-CQkoKi5T.mjs";
|
|
16
|
-
import "../../VallisCycle-6DCaWFoR.mjs";
|
|
17
|
-
import "../../ZarimanCycle-BrSLIWhD.mjs";
|
|
1
|
+
import { _ as RawSyndicateJob, v as RewardDrop, y as SyndicateJob } from "../../index-C4EJ_Mpd.mjs";
|
|
18
2
|
export { RawSyndicateJob, RewardDrop, SyndicateJob };
|