@wfcd/profile-parser 2.0.0 → 2.0.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/dist/Ability-D1F1s_19.js +25 -0
- package/dist/Ability-DzKgEG5R.d.ts +19 -0
- package/dist/Ability.d.ts +2 -0
- package/dist/Ability.js +3 -0
- package/dist/ArchonCrystal.d.ts +23 -0
- package/dist/ArchonCrystal.js +29 -0
- package/dist/ChallengeProgress-B8Kv32oi.d.ts +20 -0
- package/dist/ChallengeProgress-DKKtijWw.js +26 -0
- package/dist/ChallengeProgress.d.ts +2 -0
- package/dist/ChallengeProgress.js +3 -0
- package/dist/Enemy-BqxhFdkB.js +44 -0
- package/{src/Enemy.ts → dist/Enemy-toy1Spyi.d.ts} +6 -17
- package/dist/Enemy.d.ts +2 -0
- package/dist/Enemy.js +3 -0
- package/dist/Intrinsics-CqFOpLxp.js +67 -0
- package/{src/Intrinsics.ts → dist/Intrinsics-azrsOZJd.d.ts} +6 -37
- package/dist/Intrinsics.d.ts +2 -0
- package/dist/Intrinsics.js +3 -0
- package/dist/ItemConfig-7as-gjPG.d.ts +51 -0
- package/dist/ItemConfig-uU36aJFJ.js +50 -0
- package/dist/ItemConfig.d.ts +4 -0
- package/dist/ItemConfig.js +5 -0
- package/{src/LoadOutInventory.ts → dist/LoadOutInventory-BsPRtXfG.d.ts} +10 -26
- package/dist/LoadOutInventory-CPVZJ_W5.js +52 -0
- package/dist/LoadOutInventory.d.ts +8 -0
- package/dist/LoadOutInventory.js +9 -0
- package/dist/LoadOutItem-B_6G9dXC.js +127 -0
- package/dist/LoadOutItem-BlRFZMNd.d.ts +120 -0
- package/dist/LoadOutItem.d.ts +6 -0
- package/dist/LoadOutItem.js +7 -0
- package/{src/LoadOutPreset.ts → dist/LoadOutPreset-BshJF0LH.d.ts} +11 -50
- package/dist/LoadOutPreset-CMbZo-II.js +83 -0
- package/dist/LoadOutPreset.d.ts +2 -0
- package/dist/LoadOutPreset.js +4 -0
- package/{src/Mission.ts → dist/Mission-BZgLMluh.d.ts} +7 -29
- package/dist/Mission-D2n1i5R2.js +55 -0
- package/dist/Mission.d.ts +2 -0
- package/dist/Mission.js +3 -0
- package/dist/OperatorLoadOuts-B8bEy2dp.js +76 -0
- package/dist/OperatorLoadOuts-Dk2uMwby.d.ts +75 -0
- package/dist/OperatorLoadOuts.d.ts +4 -0
- package/dist/OperatorLoadOuts.js +5 -0
- package/dist/Polarity--RYq3iwF.js +28 -0
- package/dist/Polarity-DDWqEVm2.d.ts +26 -0
- package/dist/Polarity.d.ts +2 -0
- package/dist/Polarity.js +3 -0
- package/dist/Profile-WWZ2BDf0.js +193 -0
- package/{src/Profile.ts → dist/Profile-rva_Xss5.d.ts} +27 -123
- package/dist/Profile.d.ts +15 -0
- package/dist/Profile.js +16 -0
- package/dist/ProfileParser.d.ts +71 -0
- package/dist/ProfileParser.js +71 -0
- package/{src/Pvp.ts → dist/Pvp-Cb1KNKvw.d.ts} +6 -13
- package/dist/Pvp-hyzYfVBB.js +36 -0
- package/dist/Pvp.d.ts +2 -0
- package/dist/Pvp.js +3 -0
- package/dist/Race-5Q0StEkE.js +35 -0
- package/{src/Race.ts → dist/Race-DCxzjMpC.d.ts} +9 -13
- package/dist/Race.d.ts +2 -0
- package/dist/Race.js +3 -0
- package/{src/Scan.ts → dist/Scan-BWfZiLoW.d.ts} +6 -9
- package/dist/Scan-Dlrv6viG.js +27 -0
- package/dist/Scan.d.ts +2 -0
- package/dist/Scan.js +3 -0
- package/dist/Skin-BbUkegH1.d.ts +28 -0
- package/dist/Skin-D6v6jC9U.js +36 -0
- package/dist/Skin.d.ts +2 -0
- package/dist/Skin.js +4 -0
- package/dist/Stats-Bm1bpQe5.js +305 -0
- package/{src/Stats.ts → dist/Stats-DtkR2w1A.d.ts} +22 -201
- package/dist/Stats.d.ts +9 -0
- package/dist/Stats.js +10 -0
- package/dist/Syndicate-CjUKKAsk.js +33 -0
- package/{src/Syndicate.ts → dist/Syndicate-FSUt1PP5.d.ts} +7 -13
- package/dist/Syndicate.d.ts +2 -0
- package/dist/Syndicate.js +3 -0
- package/dist/Utils-C3kZCO6a.js +60 -0
- package/dist/Utils-C7BZqK4e.d.ts +37 -0
- package/dist/Utils.d.ts +2 -0
- package/dist/Utils.js +3 -0
- package/dist/Weapon-4KlXEHQF.js +64 -0
- package/dist/Weapon-DAJp-nbn.d.ts +32 -0
- package/dist/Weapon.d.ts +2 -0
- package/dist/Weapon.js +3 -0
- package/dist/XpInfo-CXC3I0NQ.js +35 -0
- package/{src/XpInfo.ts → dist/XpInfo-ChJ_lJaH.d.ts} +7 -14
- package/dist/XpInfo.d.ts +2 -0
- package/dist/XpInfo.js +4 -0
- package/package.json +2 -2
- package/src/Ability.ts +0 -29
- package/src/ArchonCrystal.ts +0 -33
- package/src/ChallengeProgress.ts +0 -30
- package/src/ItemConfig.ts +0 -71
- package/src/LoadOutItem.ts +0 -194
- package/src/OperatorLoadOuts.ts +0 -108
- package/src/Polarity.ts +0 -31
- package/src/ProfileParser.ts +0 -66
- package/src/Skin.ts +0 -41
- package/src/Utils.ts +0 -85
- package/src/Weapon.ts +0 -79
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Skin } from "./Skin-D6v6jC9U.js";
|
|
2
|
+
import { LoadOutItem } from "./LoadOutItem-B_6G9dXC.js";
|
|
3
|
+
import { XpInfo } from "./XpInfo-CXC3I0NQ.js";
|
|
4
|
+
|
|
5
|
+
//#region src/LoadOutInventory.ts
|
|
6
|
+
/**
|
|
7
|
+
* Player loudout
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
var LoadOutInventory = class {
|
|
11
|
+
/**
|
|
12
|
+
* Skins applied to weapons
|
|
13
|
+
*/
|
|
14
|
+
weaponSkins;
|
|
15
|
+
/**
|
|
16
|
+
* An array of the player's currently equiped Warframe (or powersuits)
|
|
17
|
+
*/
|
|
18
|
+
suits;
|
|
19
|
+
/**
|
|
20
|
+
* An array of the player's currently equiped secondary weapon
|
|
21
|
+
*/
|
|
22
|
+
secondary;
|
|
23
|
+
/**
|
|
24
|
+
* An array of the player's currently equiped primary weapon
|
|
25
|
+
*/
|
|
26
|
+
primary;
|
|
27
|
+
/**
|
|
28
|
+
* An array of the player's currently equiped melee weapon
|
|
29
|
+
*/
|
|
30
|
+
melee;
|
|
31
|
+
/**
|
|
32
|
+
* Items that have counted towards the players mastery rank
|
|
33
|
+
*/
|
|
34
|
+
xpInfo;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param item The loadout data
|
|
38
|
+
* @param locale The locale to return loudout items in. Default is en
|
|
39
|
+
* @param withItem Whether or not to include items
|
|
40
|
+
*/
|
|
41
|
+
constructor(item, locale = "en", withItem = false) {
|
|
42
|
+
this.weaponSkins = item.WeaponSkins.map((s) => new Skin(s, locale));
|
|
43
|
+
this.suits = item.Suits.map((s) => new LoadOutItem(s, locale));
|
|
44
|
+
this.secondary = item.Pistols?.map((p) => new LoadOutItem(p, locale));
|
|
45
|
+
this.primary = item.LongGuns?.map((lg) => new LoadOutItem(lg, locale));
|
|
46
|
+
this.melee = item.Melee?.map((m) => new LoadOutItem(m, locale));
|
|
47
|
+
this.xpInfo = item.XPInfo.map((xp) => new XpInfo(xp, locale, withItem));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { LoadOutInventory };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./Skin-BbUkegH1.js";
|
|
2
|
+
import "./Utils-C7BZqK4e.js";
|
|
3
|
+
import "./ItemConfig-7as-gjPG.js";
|
|
4
|
+
import "./Polarity-DDWqEVm2.js";
|
|
5
|
+
import "./LoadOutItem-BlRFZMNd.js";
|
|
6
|
+
import "./XpInfo-ChJ_lJaH.js";
|
|
7
|
+
import { LoadOutInventory, RawLoadOut } from "./LoadOutInventory-BsPRtXfG.js";
|
|
8
|
+
export { RawLoadOut, LoadOutInventory as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./Utils-C3kZCO6a.js";
|
|
2
|
+
import "./Skin-D6v6jC9U.js";
|
|
3
|
+
import "./ItemConfig-uU36aJFJ.js";
|
|
4
|
+
import "./Polarity--RYq3iwF.js";
|
|
5
|
+
import "./LoadOutItem-B_6G9dXC.js";
|
|
6
|
+
import "./XpInfo-CXC3I0NQ.js";
|
|
7
|
+
import { LoadOutInventory } from "./LoadOutInventory-CPVZJ_W5.js";
|
|
8
|
+
|
|
9
|
+
export { LoadOutInventory as default };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { find } from "./Utils-C3kZCO6a.js";
|
|
2
|
+
import { ItemConfig } from "./ItemConfig-uU36aJFJ.js";
|
|
3
|
+
import { Polarity } from "./Polarity--RYq3iwF.js";
|
|
4
|
+
import { parseDate, toTitleCase } from "warframe-worldstate-data/utilities";
|
|
5
|
+
import { colors } from "@wfcd/items/utilities";
|
|
6
|
+
|
|
7
|
+
//#region src/LoadOutItem.ts
|
|
8
|
+
/**
|
|
9
|
+
* An an item in LoadOutInventory
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
var LoadOutItem = class {
|
|
13
|
+
/**
|
|
14
|
+
* Item ID
|
|
15
|
+
*/
|
|
16
|
+
itemId;
|
|
17
|
+
/**
|
|
18
|
+
* Item unique name
|
|
19
|
+
*/
|
|
20
|
+
uniqueName;
|
|
21
|
+
/**
|
|
22
|
+
* Item in-game name
|
|
23
|
+
*/
|
|
24
|
+
name;
|
|
25
|
+
/**
|
|
26
|
+
* Complete item from @wfcd/items
|
|
27
|
+
*/
|
|
28
|
+
item;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the Lich, Sister, or Technocyte
|
|
31
|
+
*/
|
|
32
|
+
nemesis;
|
|
33
|
+
/**
|
|
34
|
+
* Configuration for this weapon. Such as colors and skins applied by the player
|
|
35
|
+
*/
|
|
36
|
+
configs;
|
|
37
|
+
/**
|
|
38
|
+
* The upgrade that was applied to this weapon
|
|
39
|
+
*/
|
|
40
|
+
upgradeType;
|
|
41
|
+
/**
|
|
42
|
+
* Information on the upgradeType that was applied
|
|
43
|
+
* TODO need model for for fingerprint
|
|
44
|
+
*/
|
|
45
|
+
upgradeFingerprint;
|
|
46
|
+
features;
|
|
47
|
+
upgradeVer;
|
|
48
|
+
/**
|
|
49
|
+
* XP earned with this weapon
|
|
50
|
+
*/
|
|
51
|
+
xp;
|
|
52
|
+
/**
|
|
53
|
+
* How many mod slots are currently polarized.
|
|
54
|
+
*/
|
|
55
|
+
polarized;
|
|
56
|
+
/**
|
|
57
|
+
* Which polarity types exist on the weapon
|
|
58
|
+
*/
|
|
59
|
+
polarity;
|
|
60
|
+
/**
|
|
61
|
+
* Focus lens applied
|
|
62
|
+
*/
|
|
63
|
+
focuseLens;
|
|
64
|
+
customizationSlotPurchases;
|
|
65
|
+
/**
|
|
66
|
+
* Primary colors applied to item if they exist
|
|
67
|
+
*/
|
|
68
|
+
primaryColor;
|
|
69
|
+
/**
|
|
70
|
+
* Sigil colors applied to item if they exist
|
|
71
|
+
*/
|
|
72
|
+
sigilColor;
|
|
73
|
+
/**
|
|
74
|
+
* Whether prime details are enabled or not
|
|
75
|
+
*/
|
|
76
|
+
enablePrime;
|
|
77
|
+
/**
|
|
78
|
+
* Attachment colors applied to item if they exist
|
|
79
|
+
*/
|
|
80
|
+
attachmentsColor;
|
|
81
|
+
/**
|
|
82
|
+
* Syandana colors applied to item if they exist
|
|
83
|
+
*/
|
|
84
|
+
syandanaColor;
|
|
85
|
+
/**
|
|
86
|
+
* If set will show when the player's warframe was infested.
|
|
87
|
+
*/
|
|
88
|
+
infestationDate;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @param {Object} loadOutItem The loadout item from LoadoutInventory
|
|
92
|
+
* @param {string} [locale='en'] The locale to return item in
|
|
93
|
+
*/
|
|
94
|
+
constructor(loadOutItem, locale = "en") {
|
|
95
|
+
this.itemId = loadOutItem.ItemId.$oid;
|
|
96
|
+
this.uniqueName = loadOutItem.ItemType;
|
|
97
|
+
const item = find(loadOutItem.ItemType, locale);
|
|
98
|
+
if (item) {
|
|
99
|
+
this.name = item.name;
|
|
100
|
+
this.item = item;
|
|
101
|
+
}
|
|
102
|
+
if (loadOutItem.ItemName) {
|
|
103
|
+
const [, nemesis] = loadOutItem.ItemName.split("|");
|
|
104
|
+
if (nemesis !== void 0) this.nemesis = toTitleCase(nemesis);
|
|
105
|
+
else this.name = loadOutItem.ItemName;
|
|
106
|
+
}
|
|
107
|
+
this.configs = loadOutItem.Configs.map((c) => new ItemConfig(c));
|
|
108
|
+
if (loadOutItem.UpgradeType) this.upgradeType = loadOutItem.UpgradeType;
|
|
109
|
+
this.upgradeFingerprint = loadOutItem.UpgradeFingerprint;
|
|
110
|
+
this.features = loadOutItem.Features;
|
|
111
|
+
this.upgradeVer = loadOutItem.UpgradeVer;
|
|
112
|
+
this.xp = loadOutItem.XP;
|
|
113
|
+
this.polarized = loadOutItem.Polarized;
|
|
114
|
+
this.polarity = loadOutItem.Polarity?.map((p) => new Polarity(p));
|
|
115
|
+
this.focuseLens = loadOutItem.FocusLens;
|
|
116
|
+
this.customizationSlotPurchases = loadOutItem.CustomizationSlotPurchases ?? 0;
|
|
117
|
+
if (loadOutItem.pricol) this.primaryColor = colors.mapColors(loadOutItem.pricol);
|
|
118
|
+
if (loadOutItem.sigcol) this.sigilColor = colors.mapColors(loadOutItem.sigcol);
|
|
119
|
+
this.enablePrime = loadOutItem.ugly ?? false;
|
|
120
|
+
if (loadOutItem.attcol) this.attachmentsColor = colors.mapColors(loadOutItem.attcol);
|
|
121
|
+
if (loadOutItem.syancol) this.syandanaColor = colors.mapColors(loadOutItem.syancol);
|
|
122
|
+
if (loadOutItem.InfestationDate) this.infestationDate = parseDate(loadOutItem.InfestationDate);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
export { LoadOutItem };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { RawDate } from "./Utils-C7BZqK4e.js";
|
|
2
|
+
import { ItemConfig, RawItemConfig } from "./ItemConfig-7as-gjPG.js";
|
|
3
|
+
import { Polarity, RawPolarity } from "./Polarity-DDWqEVm2.js";
|
|
4
|
+
import { ColorMap, Item, RawColors } from "@wfcd/items";
|
|
5
|
+
import { Locale } from "warframe-worldstate-data";
|
|
6
|
+
|
|
7
|
+
//#region src/LoadOutItem.d.ts
|
|
8
|
+
interface RawLoadOutItem {
|
|
9
|
+
ItemId: {
|
|
10
|
+
$oid: string;
|
|
11
|
+
};
|
|
12
|
+
ItemType: string;
|
|
13
|
+
ItemName?: string;
|
|
14
|
+
Configs: RawItemConfig[];
|
|
15
|
+
UpgradeType?: string;
|
|
16
|
+
UpgradeFingerprint?: unknown;
|
|
17
|
+
Features: number;
|
|
18
|
+
UpgradeVer: number;
|
|
19
|
+
XP?: number;
|
|
20
|
+
Polarized?: number;
|
|
21
|
+
Polarity?: RawPolarity[];
|
|
22
|
+
FocusLens?: string;
|
|
23
|
+
CustomizationSlotPurchases?: number;
|
|
24
|
+
pricol?: RawColors;
|
|
25
|
+
sigcol?: RawColors;
|
|
26
|
+
ugly?: boolean;
|
|
27
|
+
attcol?: RawColors;
|
|
28
|
+
syancol?: RawColors;
|
|
29
|
+
InfestationDate?: RawDate;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* An an item in LoadOutInventory
|
|
33
|
+
* @module
|
|
34
|
+
*/
|
|
35
|
+
declare class LoadOutItem {
|
|
36
|
+
/**
|
|
37
|
+
* Item ID
|
|
38
|
+
*/
|
|
39
|
+
itemId: string;
|
|
40
|
+
/**
|
|
41
|
+
* Item unique name
|
|
42
|
+
*/
|
|
43
|
+
uniqueName: string;
|
|
44
|
+
/**
|
|
45
|
+
* Item in-game name
|
|
46
|
+
*/
|
|
47
|
+
name?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Complete item from @wfcd/items
|
|
50
|
+
*/
|
|
51
|
+
item?: Item;
|
|
52
|
+
/**
|
|
53
|
+
* The name of the Lich, Sister, or Technocyte
|
|
54
|
+
*/
|
|
55
|
+
nemesis?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Configuration for this weapon. Such as colors and skins applied by the player
|
|
58
|
+
*/
|
|
59
|
+
configs: ItemConfig[];
|
|
60
|
+
/**
|
|
61
|
+
* The upgrade that was applied to this weapon
|
|
62
|
+
*/
|
|
63
|
+
upgradeType?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Information on the upgradeType that was applied
|
|
66
|
+
* TODO need model for for fingerprint
|
|
67
|
+
*/
|
|
68
|
+
upgradeFingerprint: unknown;
|
|
69
|
+
features: number;
|
|
70
|
+
upgradeVer: number;
|
|
71
|
+
/**
|
|
72
|
+
* XP earned with this weapon
|
|
73
|
+
*/
|
|
74
|
+
xp?: number;
|
|
75
|
+
/**
|
|
76
|
+
* How many mod slots are currently polarized.
|
|
77
|
+
*/
|
|
78
|
+
polarized?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Which polarity types exist on the weapon
|
|
81
|
+
*/
|
|
82
|
+
polarity?: Polarity[];
|
|
83
|
+
/**
|
|
84
|
+
* Focus lens applied
|
|
85
|
+
*/
|
|
86
|
+
focuseLens?: string;
|
|
87
|
+
customizationSlotPurchases: number;
|
|
88
|
+
/**
|
|
89
|
+
* Primary colors applied to item if they exist
|
|
90
|
+
*/
|
|
91
|
+
primaryColor?: ColorMap;
|
|
92
|
+
/**
|
|
93
|
+
* Sigil colors applied to item if they exist
|
|
94
|
+
*/
|
|
95
|
+
sigilColor?: ColorMap;
|
|
96
|
+
/**
|
|
97
|
+
* Whether prime details are enabled or not
|
|
98
|
+
*/
|
|
99
|
+
enablePrime: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Attachment colors applied to item if they exist
|
|
102
|
+
*/
|
|
103
|
+
attachmentsColor?: ColorMap;
|
|
104
|
+
/**
|
|
105
|
+
* Syandana colors applied to item if they exist
|
|
106
|
+
*/
|
|
107
|
+
syandanaColor?: ColorMap;
|
|
108
|
+
/**
|
|
109
|
+
* If set will show when the player's warframe was infested.
|
|
110
|
+
*/
|
|
111
|
+
infestationDate?: Date;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @param {Object} loadOutItem The loadout item from LoadoutInventory
|
|
115
|
+
* @param {string} [locale='en'] The locale to return item in
|
|
116
|
+
*/
|
|
117
|
+
constructor(loadOutItem: RawLoadOutItem, locale?: Locale);
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
export { LoadOutItem, RawLoadOutItem };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { numberToLetter } from './Utils';
|
|
4
|
-
|
|
1
|
+
//#region src/LoadOutPreset.d.ts
|
|
5
2
|
interface RawSlotPreset {
|
|
6
|
-
ItemId?: {
|
|
3
|
+
ItemId?: {
|
|
4
|
+
$oid: string;
|
|
5
|
+
};
|
|
7
6
|
mod?: number;
|
|
8
7
|
cus?: number;
|
|
9
8
|
hide?: boolean;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
export interface RawLoadOutPreset {
|
|
10
|
+
interface RawLoadOutPreset {
|
|
13
11
|
FocusSchool: string;
|
|
14
12
|
PresetIcon: string;
|
|
15
13
|
Favorite: boolean;
|
|
@@ -22,25 +20,14 @@ export interface RawLoadOutPreset {
|
|
|
22
20
|
a?: RawSlotPreset;
|
|
23
21
|
b?: RawSlotPreset;
|
|
24
22
|
}
|
|
25
|
-
|
|
26
|
-
class SlotPreset {
|
|
23
|
+
declare class SlotPreset {
|
|
27
24
|
id?: string;
|
|
28
25
|
modPreset?: string;
|
|
29
26
|
appearancePreset?: string;
|
|
30
27
|
isHidden: boolean;
|
|
31
|
-
|
|
32
|
-
constructor(slot: RawSlotPreset) {
|
|
33
|
-
if (slot?.ItemId?.$oid) this.id = slot.ItemId.$oid;
|
|
34
|
-
|
|
35
|
-
if (slot?.mod !== undefined) this.modPreset = numberToLetter(slot.mod);
|
|
36
|
-
|
|
37
|
-
if (slot?.cus !== undefined) this.appearancePreset = numberToLetter(slot.cus);
|
|
38
|
-
|
|
39
|
-
this.isHidden = slot?.hide ?? false;
|
|
40
|
-
}
|
|
28
|
+
constructor(slot: RawSlotPreset);
|
|
41
29
|
}
|
|
42
|
-
|
|
43
|
-
export default class LoadOutPreset {
|
|
30
|
+
declare class LoadOutPreset {
|
|
44
31
|
/**
|
|
45
32
|
* Focus School
|
|
46
33
|
*/
|
|
@@ -60,27 +47,22 @@ export default class LoadOutPreset {
|
|
|
60
47
|
* Preset name
|
|
61
48
|
*/
|
|
62
49
|
name: string;
|
|
63
|
-
|
|
64
50
|
/**
|
|
65
51
|
* Warframe equipped in preset
|
|
66
52
|
*/
|
|
67
53
|
warframe: SlotPreset;
|
|
68
|
-
|
|
69
54
|
/**
|
|
70
55
|
* Primary equipped in preset
|
|
71
56
|
*/
|
|
72
57
|
primary?: SlotPreset;
|
|
73
|
-
|
|
74
58
|
/**
|
|
75
59
|
* Secondary equipped in preset
|
|
76
60
|
*/
|
|
77
61
|
secondary?: SlotPreset;
|
|
78
|
-
|
|
79
62
|
/**
|
|
80
63
|
* Heavy equipped in preset
|
|
81
64
|
*/
|
|
82
65
|
heavy?: SlotPreset;
|
|
83
|
-
|
|
84
66
|
/**
|
|
85
67
|
* Melee equiped in preset
|
|
86
68
|
*/
|
|
@@ -95,28 +77,7 @@ export default class LoadOutPreset {
|
|
|
95
77
|
* i.e Sevagoth has his shadow and his shadow's claws both of which can be modded separately
|
|
96
78
|
*/
|
|
97
79
|
exaltedB?: SlotPreset;
|
|
98
|
-
|
|
99
|
-
constructor(preset: RawLoadOutPreset) {
|
|
100
|
-
this.focusSchool = translatePolarity(preset.FocusSchool);
|
|
101
|
-
|
|
102
|
-
this.icon = preset.PresetIcon;
|
|
103
|
-
|
|
104
|
-
this.isFavorite = preset.Favorite;
|
|
105
|
-
|
|
106
|
-
this.name = preset.n;
|
|
107
|
-
|
|
108
|
-
this.warframe = new SlotPreset(preset.s);
|
|
109
|
-
|
|
110
|
-
if (preset.l) this.primary = new SlotPreset(preset.l);
|
|
111
|
-
|
|
112
|
-
if (preset.p) this.secondary = new SlotPreset(preset.p);
|
|
113
|
-
|
|
114
|
-
if (preset.h) this.heavy = new SlotPreset(preset.h);
|
|
115
|
-
|
|
116
|
-
if (preset.m) this.melee = new SlotPreset(preset.m);
|
|
117
|
-
|
|
118
|
-
if (preset.a) this.exalted = new SlotPreset(preset.a);
|
|
119
|
-
|
|
120
|
-
if (preset.b) this.exaltedB = new SlotPreset(preset.b);
|
|
121
|
-
}
|
|
80
|
+
constructor(preset: RawLoadOutPreset);
|
|
122
81
|
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { LoadOutPreset, RawLoadOutPreset };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { numberToLetter } from "./Utils-C3kZCO6a.js";
|
|
2
|
+
import { translatePolarity } from "warframe-worldstate-data/utilities";
|
|
3
|
+
|
|
4
|
+
//#region src/LoadOutPreset.ts
|
|
5
|
+
var SlotPreset = class {
|
|
6
|
+
id;
|
|
7
|
+
modPreset;
|
|
8
|
+
appearancePreset;
|
|
9
|
+
isHidden;
|
|
10
|
+
constructor(slot) {
|
|
11
|
+
if (slot?.ItemId?.$oid) this.id = slot.ItemId.$oid;
|
|
12
|
+
if (slot?.mod !== void 0) this.modPreset = numberToLetter(slot.mod);
|
|
13
|
+
if (slot?.cus !== void 0) this.appearancePreset = numberToLetter(slot.cus);
|
|
14
|
+
this.isHidden = slot?.hide ?? false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var LoadOutPreset = class {
|
|
18
|
+
/**
|
|
19
|
+
* Focus School
|
|
20
|
+
*/
|
|
21
|
+
focusSchool;
|
|
22
|
+
/**
|
|
23
|
+
* Preset icon
|
|
24
|
+
*
|
|
25
|
+
* Note:
|
|
26
|
+
* Icon in-game seems to be an image of whatever Warframe is equipped on it
|
|
27
|
+
*/
|
|
28
|
+
icon;
|
|
29
|
+
/**
|
|
30
|
+
* Whether this preset is a favorite
|
|
31
|
+
*/
|
|
32
|
+
isFavorite;
|
|
33
|
+
/**
|
|
34
|
+
* Preset name
|
|
35
|
+
*/
|
|
36
|
+
name;
|
|
37
|
+
/**
|
|
38
|
+
* Warframe equipped in preset
|
|
39
|
+
*/
|
|
40
|
+
warframe;
|
|
41
|
+
/**
|
|
42
|
+
* Primary equipped in preset
|
|
43
|
+
*/
|
|
44
|
+
primary;
|
|
45
|
+
/**
|
|
46
|
+
* Secondary equipped in preset
|
|
47
|
+
*/
|
|
48
|
+
secondary;
|
|
49
|
+
/**
|
|
50
|
+
* Heavy equipped in preset
|
|
51
|
+
*/
|
|
52
|
+
heavy;
|
|
53
|
+
/**
|
|
54
|
+
* Melee equiped in preset
|
|
55
|
+
*/
|
|
56
|
+
melee;
|
|
57
|
+
/**
|
|
58
|
+
* Exalted ability
|
|
59
|
+
*/
|
|
60
|
+
exalted;
|
|
61
|
+
/**
|
|
62
|
+
* Secondary exalted ability
|
|
63
|
+
*
|
|
64
|
+
* i.e Sevagoth has his shadow and his shadow's claws both of which can be modded separately
|
|
65
|
+
*/
|
|
66
|
+
exaltedB;
|
|
67
|
+
constructor(preset) {
|
|
68
|
+
this.focusSchool = translatePolarity(preset.FocusSchool);
|
|
69
|
+
this.icon = preset.PresetIcon;
|
|
70
|
+
this.isFavorite = preset.Favorite;
|
|
71
|
+
this.name = preset.n;
|
|
72
|
+
this.warframe = new SlotPreset(preset.s);
|
|
73
|
+
if (preset.l) this.primary = new SlotPreset(preset.l);
|
|
74
|
+
if (preset.p) this.secondary = new SlotPreset(preset.p);
|
|
75
|
+
if (preset.h) this.heavy = new SlotPreset(preset.h);
|
|
76
|
+
if (preset.m) this.melee = new SlotPreset(preset.m);
|
|
77
|
+
if (preset.a) this.exalted = new SlotPreset(preset.a);
|
|
78
|
+
if (preset.b) this.exaltedB = new SlotPreset(preset.b);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { LoadOutPreset };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Locale } from
|
|
2
|
-
import { node, nodeEnemy, nodeMissionType } from 'warframe-worldstate-data/utilities';
|
|
1
|
+
import { Locale } from "warframe-worldstate-data";
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
//#region src/Mission.d.ts
|
|
4
|
+
interface RawMission {
|
|
5
5
|
Tag?: string | undefined;
|
|
6
6
|
type?: string;
|
|
7
7
|
Mission?: string;
|
|
@@ -9,67 +9,45 @@ export interface RawMission {
|
|
|
9
9
|
Completes?: number;
|
|
10
10
|
Tier?: number;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
12
|
/**
|
|
14
13
|
* A mission completed by the player
|
|
15
14
|
* @module
|
|
16
15
|
*/
|
|
17
|
-
|
|
16
|
+
declare class Mission {
|
|
18
17
|
/**
|
|
19
18
|
* Node name
|
|
20
19
|
*/
|
|
21
20
|
node: string;
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
22
|
* Node unique name
|
|
25
23
|
*/
|
|
26
24
|
nodeKey: string;
|
|
27
|
-
|
|
28
25
|
/**
|
|
29
26
|
* Node mission type
|
|
30
27
|
*/
|
|
31
28
|
missionType: string;
|
|
32
|
-
|
|
33
29
|
/**
|
|
34
30
|
* Node faction
|
|
35
31
|
*/
|
|
36
32
|
faction: string;
|
|
37
|
-
|
|
38
33
|
/**
|
|
39
34
|
* Highest score earned in this mission
|
|
40
35
|
*/
|
|
41
36
|
highScore?: number;
|
|
42
|
-
|
|
43
37
|
/**
|
|
44
38
|
* How many times the mission was completed
|
|
45
39
|
*/
|
|
46
40
|
completes?: number;
|
|
47
|
-
|
|
48
41
|
/**
|
|
49
42
|
* Denotes a steel path node
|
|
50
43
|
*/
|
|
51
44
|
tier?: number;
|
|
52
|
-
|
|
53
45
|
/**
|
|
54
46
|
*
|
|
55
47
|
* @param mission The mission data
|
|
56
48
|
* @param locale The locale to return in
|
|
57
49
|
*/
|
|
58
|
-
constructor(mission: RawMission, locale
|
|
59
|
-
const uniqueName = (mission.type || mission.Tag)!;
|
|
60
|
-
|
|
61
|
-
this.node = node(uniqueName, locale);
|
|
62
|
-
|
|
63
|
-
this.nodeKey = uniqueName;
|
|
64
|
-
|
|
65
|
-
this.missionType = nodeMissionType(uniqueName, locale);
|
|
66
|
-
|
|
67
|
-
this.faction = nodeEnemy(uniqueName, locale);
|
|
68
|
-
|
|
69
|
-
if (mission.highScore) this.highScore = mission.highScore;
|
|
70
|
-
|
|
71
|
-
if (mission.Completes) this.completes = mission.Completes;
|
|
72
|
-
|
|
73
|
-
if (mission.Tier) this.tier = mission.Tier;
|
|
74
|
-
}
|
|
50
|
+
constructor(mission: RawMission, locale?: Locale);
|
|
75
51
|
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Mission, RawMission };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { node, nodeEnemy, nodeMissionType } from "warframe-worldstate-data/utilities";
|
|
2
|
+
|
|
3
|
+
//#region src/Mission.ts
|
|
4
|
+
/**
|
|
5
|
+
* A mission completed by the player
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
var Mission = class {
|
|
9
|
+
/**
|
|
10
|
+
* Node name
|
|
11
|
+
*/
|
|
12
|
+
node;
|
|
13
|
+
/**
|
|
14
|
+
* Node unique name
|
|
15
|
+
*/
|
|
16
|
+
nodeKey;
|
|
17
|
+
/**
|
|
18
|
+
* Node mission type
|
|
19
|
+
*/
|
|
20
|
+
missionType;
|
|
21
|
+
/**
|
|
22
|
+
* Node faction
|
|
23
|
+
*/
|
|
24
|
+
faction;
|
|
25
|
+
/**
|
|
26
|
+
* Highest score earned in this mission
|
|
27
|
+
*/
|
|
28
|
+
highScore;
|
|
29
|
+
/**
|
|
30
|
+
* How many times the mission was completed
|
|
31
|
+
*/
|
|
32
|
+
completes;
|
|
33
|
+
/**
|
|
34
|
+
* Denotes a steel path node
|
|
35
|
+
*/
|
|
36
|
+
tier;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param mission The mission data
|
|
40
|
+
* @param locale The locale to return in
|
|
41
|
+
*/
|
|
42
|
+
constructor(mission, locale = "en") {
|
|
43
|
+
const uniqueName = mission.type || mission.Tag;
|
|
44
|
+
this.node = node(uniqueName, locale);
|
|
45
|
+
this.nodeKey = uniqueName;
|
|
46
|
+
this.missionType = nodeMissionType(uniqueName, locale);
|
|
47
|
+
this.faction = nodeEnemy(uniqueName, locale);
|
|
48
|
+
if (mission.highScore) this.highScore = mission.highScore;
|
|
49
|
+
if (mission.Completes) this.completes = mission.Completes;
|
|
50
|
+
if (mission.Tier) this.tier = mission.Tier;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Mission };
|
package/dist/Mission.js
ADDED