@wfcd/profile-parser 2.0.11 → 2.0.12
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.d.mts +18 -1
- package/dist/Ability.mjs +23 -1
- package/dist/ChallengeProgress.d.mts +19 -1
- package/dist/ChallengeProgress.mjs +24 -1
- package/dist/Enemy.d.mts +43 -1
- package/dist/Enemy.mjs +42 -1
- package/dist/Intrinsics.d.mts +66 -1
- package/dist/Intrinsics.mjs +65 -1
- package/dist/ItemConfig.d.mts +50 -3
- package/dist/ItemConfig.mjs +48 -3
- package/dist/LoadOutInventory.d.mts +52 -6
- package/dist/LoadOutInventory.mjs +50 -7
- package/dist/LoadOutItem.d.mts +119 -4
- package/dist/LoadOutItem.mjs +125 -5
- package/dist/LoadOutPreset.d.mts +82 -1
- package/dist/LoadOutPreset.mjs +81 -2
- package/dist/Mission.d.mts +52 -1
- package/dist/Mission.mjs +53 -1
- package/dist/OperatorLoadOuts.d.mts +80 -3
- package/dist/OperatorLoadOuts.mjs +74 -3
- package/dist/Polarity.d.mts +25 -1
- package/dist/Polarity.mjs +26 -1
- package/dist/Profile.d.mts +10 -14
- package/dist/Profile.mjs +7 -13
- package/dist/ProfileParser.d.mts +5 -11
- package/dist/ProfileParser.mjs +2 -13
- package/dist/Pvp.d.mts +35 -1
- package/dist/Pvp.mjs +34 -1
- package/dist/Race.d.mts +31 -1
- package/dist/Race.mjs +33 -1
- package/dist/Scan.d.mts +26 -1
- package/dist/Scan.mjs +25 -1
- package/dist/Skin.d.mts +27 -1
- package/dist/Skin.mjs +34 -2
- package/dist/Stats.d.mts +7 -7
- package/dist/Stats.mjs +7 -7
- package/dist/Syndicate.d.mts +32 -1
- package/dist/Syndicate.mjs +31 -1
- package/dist/Utils.d.mts +35 -1
- package/dist/Utils.mjs +58 -1
- package/dist/Weapon.d.mts +31 -1
- package/dist/Weapon.mjs +62 -1
- package/dist/XpInfo.d.mts +33 -1
- package/dist/XpInfo.mjs +33 -2
- package/package.json +8 -9
- package/dist/Ability-CmHyNfw4.d.mts +0 -19
- package/dist/Ability-DsyqxzjP.mjs +0 -25
- package/dist/ChallengeProgress-BO8tPybG.d.mts +0 -20
- package/dist/ChallengeProgress-Cpks92At.mjs +0 -26
- package/dist/Enemy-5RVVfZme.d.mts +0 -44
- package/dist/Enemy-B3JSksZZ.mjs +0 -44
- package/dist/Intrinsics-DwonOlUE.d.mts +0 -67
- package/dist/Intrinsics-kYw_LPq1.mjs +0 -67
- package/dist/ItemConfig-DTIrA_P_.mjs +0 -50
- package/dist/ItemConfig-DxhXby04.d.mts +0 -51
- package/dist/LoadOutInventory-B84bUV2-.d.mts +0 -53
- package/dist/LoadOutInventory-BbaIazHX.mjs +0 -52
- package/dist/LoadOutItem-DWQ4aFI_.d.mts +0 -120
- package/dist/LoadOutItem-p-f5RdTB.mjs +0 -127
- package/dist/LoadOutPreset-CwbK2VvR.mjs +0 -83
- package/dist/LoadOutPreset-m_1RVkf9.d.mts +0 -83
- package/dist/Mission-CeX2BRp0.d.mts +0 -53
- package/dist/Mission-DfGQMV7B.mjs +0 -55
- package/dist/OperatorLoadOuts-51DN5Rwo.d.mts +0 -75
- package/dist/OperatorLoadOuts-LYGpTHuj.mjs +0 -76
- package/dist/Polarity-KCoYUO6f.d.mts +0 -26
- package/dist/Polarity-Q2JfovbR.mjs +0 -28
- package/dist/Pvp-DCfleh26.mjs +0 -36
- package/dist/Pvp-R4iYmiAT.d.mts +0 -36
- package/dist/Race-DXOXL9VT.d.mts +0 -32
- package/dist/Race-dyrF8Zs5.mjs +0 -35
- package/dist/Scan-CJnYpzKb.d.mts +0 -27
- package/dist/Scan-D4p43-1c.mjs +0 -27
- package/dist/Skin-DJMr6L-X.d.mts +0 -28
- package/dist/Skin-D_brWp2g.mjs +0 -36
- package/dist/Syndicate-CcRnzmZs.mjs +0 -33
- package/dist/Syndicate-Dq5vLEB-.d.mts +0 -33
- package/dist/Utils-Bqm2Gg1K.mjs +0 -59
- package/dist/Utils-VTFhFHIp.d.mts +0 -37
- package/dist/Weapon-CsKff27X.mjs +0 -64
- package/dist/Weapon-DgQ4hNgE.d.mts +0 -32
- package/dist/XpInfo-IT6LOTzI.mjs +0 -35
- package/dist/XpInfo-qplT5008.d.mts +0 -34
package/dist/Ability.d.mts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Ability.d.ts
|
|
2
|
+
interface RawAbility {
|
|
3
|
+
type: string;
|
|
4
|
+
used: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Represents a players used ability
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
declare class Ability {
|
|
11
|
+
uniqueName: string;
|
|
12
|
+
used: number;
|
|
13
|
+
/**
|
|
14
|
+
* @param ability The ability
|
|
15
|
+
*/
|
|
16
|
+
constructor(ability: RawAbility);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
2
19
|
export { RawAbility, Ability as default };
|
package/dist/Ability.mjs
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Ability.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents a players used ability
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
var Ability = class {
|
|
7
|
+
uniqueName;
|
|
8
|
+
used;
|
|
9
|
+
/**
|
|
10
|
+
* @param ability The ability
|
|
11
|
+
*/
|
|
12
|
+
constructor(ability) {
|
|
13
|
+
/**
|
|
14
|
+
* The ability unique name
|
|
15
|
+
*/
|
|
16
|
+
this.uniqueName = ability.type;
|
|
17
|
+
/**
|
|
18
|
+
* How many time the ability was used in the player's lifetime
|
|
19
|
+
*/
|
|
20
|
+
this.used = ability.used;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
2
23
|
|
|
24
|
+
//#endregion
|
|
3
25
|
export { Ability as default };
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/ChallengeProgress.d.ts
|
|
2
|
+
interface RawChallengeProgress {
|
|
3
|
+
Name: string;
|
|
4
|
+
Progress: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Player completed or in progress challenges
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
declare class ChallengeProgress {
|
|
11
|
+
name: string;
|
|
12
|
+
progress: number;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param challenge The challenge object to parse
|
|
16
|
+
*/
|
|
17
|
+
constructor(challenge: RawChallengeProgress);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
2
20
|
export { RawChallengeProgress, ChallengeProgress as default };
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/ChallengeProgress.ts
|
|
2
|
+
/**
|
|
3
|
+
* Player completed or in progress challenges
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
var ChallengeProgress = class {
|
|
7
|
+
name;
|
|
8
|
+
progress;
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param challenge The challenge object to parse
|
|
12
|
+
*/
|
|
13
|
+
constructor(challenge) {
|
|
14
|
+
/**
|
|
15
|
+
* Name of the challenge
|
|
16
|
+
*/
|
|
17
|
+
this.name = challenge.Name;
|
|
18
|
+
/**
|
|
19
|
+
* Progress towards completing this challenge
|
|
20
|
+
*/
|
|
21
|
+
this.progress = challenge.Progress;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
2
24
|
|
|
25
|
+
//#endregion
|
|
3
26
|
export { ChallengeProgress as default };
|
package/dist/Enemy.d.mts
CHANGED
|
@@ -1,2 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Enemy.d.ts
|
|
2
|
+
interface RawEnemy {
|
|
3
|
+
type: string;
|
|
4
|
+
kills: number;
|
|
5
|
+
headshots: number;
|
|
6
|
+
executions: number;
|
|
7
|
+
assists: number;
|
|
8
|
+
deaths: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An enemy killed/executed by player
|
|
12
|
+
*/
|
|
13
|
+
declare class Enemy {
|
|
14
|
+
/**
|
|
15
|
+
* Enemy's unique name
|
|
16
|
+
*/
|
|
17
|
+
uniqueName: string;
|
|
18
|
+
/**
|
|
19
|
+
* How many times the player has killed this enemy type
|
|
20
|
+
*/
|
|
21
|
+
kills: number;
|
|
22
|
+
/**
|
|
23
|
+
* The amount of kills that were headshots
|
|
24
|
+
*/
|
|
25
|
+
headshots: number;
|
|
26
|
+
/**
|
|
27
|
+
* The amount of kills that were finishers
|
|
28
|
+
*/
|
|
29
|
+
executions: number;
|
|
30
|
+
/**
|
|
31
|
+
* The amount of kills that were assits
|
|
32
|
+
*/
|
|
33
|
+
assists: number;
|
|
34
|
+
/**
|
|
35
|
+
* How many times this enemy type has killed the player
|
|
36
|
+
*/
|
|
37
|
+
deaths: number;
|
|
38
|
+
/**
|
|
39
|
+
* @param enemy The enemy
|
|
40
|
+
*/
|
|
41
|
+
constructor(enemy: RawEnemy);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
2
44
|
export { RawEnemy, Enemy as default };
|
package/dist/Enemy.mjs
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Enemy.ts
|
|
2
|
+
/**
|
|
3
|
+
* An enemy killed/executed by player
|
|
4
|
+
*/
|
|
5
|
+
var Enemy = class {
|
|
6
|
+
/**
|
|
7
|
+
* Enemy's unique name
|
|
8
|
+
*/
|
|
9
|
+
uniqueName;
|
|
10
|
+
/**
|
|
11
|
+
* How many times the player has killed this enemy type
|
|
12
|
+
*/
|
|
13
|
+
kills;
|
|
14
|
+
/**
|
|
15
|
+
* The amount of kills that were headshots
|
|
16
|
+
*/
|
|
17
|
+
headshots;
|
|
18
|
+
/**
|
|
19
|
+
* The amount of kills that were finishers
|
|
20
|
+
*/
|
|
21
|
+
executions;
|
|
22
|
+
/**
|
|
23
|
+
* The amount of kills that were assits
|
|
24
|
+
*/
|
|
25
|
+
assists;
|
|
26
|
+
/**
|
|
27
|
+
* How many times this enemy type has killed the player
|
|
28
|
+
*/
|
|
29
|
+
deaths;
|
|
30
|
+
/**
|
|
31
|
+
* @param enemy The enemy
|
|
32
|
+
*/
|
|
33
|
+
constructor(enemy) {
|
|
34
|
+
this.uniqueName = enemy.type;
|
|
35
|
+
this.kills = enemy.kills;
|
|
36
|
+
this.headshots = enemy.headshots;
|
|
37
|
+
this.executions = enemy.executions;
|
|
38
|
+
this.assists = enemy.assists;
|
|
39
|
+
this.deaths = enemy.deaths;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
2
42
|
|
|
43
|
+
//#endregion
|
|
3
44
|
export { Enemy as default };
|
package/dist/Intrinsics.d.mts
CHANGED
|
@@ -1,2 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Intrinsics.d.ts
|
|
2
|
+
interface RawIntrinsics {
|
|
3
|
+
LPS_ENGINEERING?: number;
|
|
4
|
+
LPS_GUNNERY?: number;
|
|
5
|
+
LPS_PILOTING?: number;
|
|
6
|
+
LPS_TACTICAL?: number;
|
|
7
|
+
LPS_COMMAND?: number;
|
|
8
|
+
LPP_DRIFTER?: number;
|
|
9
|
+
LPS_DRIFT_RIDING?: number;
|
|
10
|
+
LPS_DRIFT_COMBAT?: number;
|
|
11
|
+
LPS_DRIFT_OPPORTUNITY?: number;
|
|
12
|
+
LPS_DRIFT_ENDURANCE?: number;
|
|
13
|
+
LPP_SPACE?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Player's intrinsics ranks
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
declare class Intrinsics {
|
|
20
|
+
/**
|
|
21
|
+
* Intrinsic points for railjack
|
|
22
|
+
*/
|
|
23
|
+
railjack: number;
|
|
24
|
+
/**
|
|
25
|
+
* Railjack engineering rank
|
|
26
|
+
*/
|
|
27
|
+
engineering: number;
|
|
28
|
+
/**
|
|
29
|
+
* Railjack gunnery rank
|
|
30
|
+
*/
|
|
31
|
+
gunnery: number;
|
|
32
|
+
/**
|
|
33
|
+
* Railjack piloting rank
|
|
34
|
+
*/
|
|
35
|
+
piloting: number;
|
|
36
|
+
/**
|
|
37
|
+
* Railjack tactical rank
|
|
38
|
+
*/
|
|
39
|
+
tactical: number;
|
|
40
|
+
/**
|
|
41
|
+
* Railjack command rank
|
|
42
|
+
*/
|
|
43
|
+
command: number;
|
|
44
|
+
/**
|
|
45
|
+
* Intrinsic points for railjack
|
|
46
|
+
*/
|
|
47
|
+
drifter: number;
|
|
48
|
+
/**
|
|
49
|
+
* Drifter riding rank
|
|
50
|
+
*/
|
|
51
|
+
riding: number;
|
|
52
|
+
/**
|
|
53
|
+
* Drifter combat rank
|
|
54
|
+
*/
|
|
55
|
+
combat: number;
|
|
56
|
+
/**
|
|
57
|
+
* Drifter opportunity rank
|
|
58
|
+
*/
|
|
59
|
+
opportunity: number;
|
|
60
|
+
/**
|
|
61
|
+
* Drifter endurance rank
|
|
62
|
+
*/
|
|
63
|
+
endurance: number;
|
|
64
|
+
constructor(skills: RawIntrinsics);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
2
67
|
export { RawIntrinsics, Intrinsics as default };
|
package/dist/Intrinsics.mjs
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Intrinsics.ts
|
|
2
|
+
/**
|
|
3
|
+
* Player's intrinsics ranks
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
var Intrinsics = class {
|
|
7
|
+
/**
|
|
8
|
+
* Intrinsic points for railjack
|
|
9
|
+
*/
|
|
10
|
+
railjack;
|
|
11
|
+
/**
|
|
12
|
+
* Railjack engineering rank
|
|
13
|
+
*/
|
|
14
|
+
engineering;
|
|
15
|
+
/**
|
|
16
|
+
* Railjack gunnery rank
|
|
17
|
+
*/
|
|
18
|
+
gunnery;
|
|
19
|
+
/**
|
|
20
|
+
* Railjack piloting rank
|
|
21
|
+
*/
|
|
22
|
+
piloting;
|
|
23
|
+
/**
|
|
24
|
+
* Railjack tactical rank
|
|
25
|
+
*/
|
|
26
|
+
tactical;
|
|
27
|
+
/**
|
|
28
|
+
* Railjack command rank
|
|
29
|
+
*/
|
|
30
|
+
command;
|
|
31
|
+
/**
|
|
32
|
+
* Intrinsic points for railjack
|
|
33
|
+
*/
|
|
34
|
+
drifter;
|
|
35
|
+
/**
|
|
36
|
+
* Drifter riding rank
|
|
37
|
+
*/
|
|
38
|
+
riding;
|
|
39
|
+
/**
|
|
40
|
+
* Drifter combat rank
|
|
41
|
+
*/
|
|
42
|
+
combat;
|
|
43
|
+
/**
|
|
44
|
+
* Drifter opportunity rank
|
|
45
|
+
*/
|
|
46
|
+
opportunity;
|
|
47
|
+
/**
|
|
48
|
+
* Drifter endurance rank
|
|
49
|
+
*/
|
|
50
|
+
endurance;
|
|
51
|
+
constructor(skills) {
|
|
52
|
+
this.railjack = Math.floor((skills.LPP_SPACE ?? 0) / 1e3);
|
|
53
|
+
this.engineering = skills.LPS_ENGINEERING ?? 0;
|
|
54
|
+
this.gunnery = skills.LPS_GUNNERY ?? 0;
|
|
55
|
+
this.piloting = skills.LPS_PILOTING ?? 0;
|
|
56
|
+
this.tactical = skills.LPS_TACTICAL ?? 0;
|
|
57
|
+
this.command = skills.LPS_COMMAND ?? 0;
|
|
58
|
+
this.drifter = Math.floor((skills.LPP_DRIFTER ?? 0) / 1e3);
|
|
59
|
+
this.riding = skills.LPS_DRIFT_RIDING ?? 0;
|
|
60
|
+
this.combat = skills.LPS_DRIFT_COMBAT ?? 0;
|
|
61
|
+
this.opportunity = skills.LPS_DRIFT_OPPORTUNITY ?? 0;
|
|
62
|
+
this.endurance = skills.LPS_DRIFT_ENDURANCE ?? 0;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
2
65
|
|
|
66
|
+
//#endregion
|
|
3
67
|
export { Intrinsics as default };
|
package/dist/ItemConfig.d.mts
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
import "./Skin
|
|
2
|
-
import "./Utils
|
|
3
|
-
import {
|
|
1
|
+
import Skin from "./Skin.mjs";
|
|
2
|
+
import { ProfileRawColors } from "./Utils.mjs";
|
|
3
|
+
import { ColorMap } from "@wfcd/items";
|
|
4
|
+
import { Locale } from "warframe-worldstate-data";
|
|
5
|
+
|
|
6
|
+
//#region src/ItemConfig.d.ts
|
|
7
|
+
interface RawItemConfig {
|
|
8
|
+
Skins?: string[];
|
|
9
|
+
PvpUpgrades?: string[];
|
|
10
|
+
pricol?: ProfileRawColors;
|
|
11
|
+
sigcol?: ProfileRawColors;
|
|
12
|
+
attcol?: ProfileRawColors;
|
|
13
|
+
syancol?: ProfileRawColors;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Item customizations such as colors and applied skins
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
declare class ItemConfig {
|
|
20
|
+
/**
|
|
21
|
+
* Array of unique names for the skins applied to item
|
|
22
|
+
*/
|
|
23
|
+
skins?: Skin[];
|
|
24
|
+
/**
|
|
25
|
+
* Array of PVP unique name upgrades applied
|
|
26
|
+
*/
|
|
27
|
+
conclaveUpgrades?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Primary colors applied to item if they exist
|
|
30
|
+
*/
|
|
31
|
+
primaryColor?: ColorMap;
|
|
32
|
+
/**
|
|
33
|
+
* Sigil colors applied to item if they exist
|
|
34
|
+
*/
|
|
35
|
+
sigilColor?: ColorMap;
|
|
36
|
+
/**
|
|
37
|
+
* Attachment colors applied to item if they exist
|
|
38
|
+
*/
|
|
39
|
+
attachmentsColor?: ColorMap;
|
|
40
|
+
/**
|
|
41
|
+
* Syandana colors applied to item if they exist
|
|
42
|
+
*/
|
|
43
|
+
syandanaColor?: ColorMap;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param config The configuration
|
|
47
|
+
*/
|
|
48
|
+
constructor(config: RawItemConfig, locale?: Locale);
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
4
51
|
export { RawItemConfig, ItemConfig as default };
|
package/dist/ItemConfig.mjs
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
|
-
import "./Utils
|
|
2
|
-
import "./Skin
|
|
3
|
-
import {
|
|
1
|
+
import { mapToHex } from "./Utils.mjs";
|
|
2
|
+
import Skin from "./Skin.mjs";
|
|
3
|
+
import { colors } from "@wfcd/items/utilities";
|
|
4
4
|
|
|
5
|
+
//#region src/ItemConfig.ts
|
|
6
|
+
/**
|
|
7
|
+
* Item customizations such as colors and applied skins
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
var ItemConfig = class {
|
|
11
|
+
/**
|
|
12
|
+
* Array of unique names for the skins applied to item
|
|
13
|
+
*/
|
|
14
|
+
skins;
|
|
15
|
+
/**
|
|
16
|
+
* Array of PVP unique name upgrades applied
|
|
17
|
+
*/
|
|
18
|
+
conclaveUpgrades;
|
|
19
|
+
/**
|
|
20
|
+
* Primary colors applied to item if they exist
|
|
21
|
+
*/
|
|
22
|
+
primaryColor;
|
|
23
|
+
/**
|
|
24
|
+
* Sigil colors applied to item if they exist
|
|
25
|
+
*/
|
|
26
|
+
sigilColor;
|
|
27
|
+
/**
|
|
28
|
+
* Attachment colors applied to item if they exist
|
|
29
|
+
*/
|
|
30
|
+
attachmentsColor;
|
|
31
|
+
/**
|
|
32
|
+
* Syandana colors applied to item if they exist
|
|
33
|
+
*/
|
|
34
|
+
syandanaColor;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param config The configuration
|
|
38
|
+
*/
|
|
39
|
+
constructor(config, locale = "en") {
|
|
40
|
+
this.skins = config.Skins?.filter(Boolean).map((s) => new Skin({ ItemType: s }, locale));
|
|
41
|
+
if (config.PvpUpgrades) this.conclaveUpgrades = config.PvpUpgrades;
|
|
42
|
+
if (config.pricol) this.primaryColor = colors.mapColors(mapToHex(config.pricol));
|
|
43
|
+
if (config.sigcol) this.sigilColor = colors.mapColors(mapToHex(config.sigcol));
|
|
44
|
+
if (config.attcol) this.attachmentsColor = colors.mapColors(mapToHex(config.attcol));
|
|
45
|
+
if (config.syancol) this.syandanaColor = colors.mapColors(mapToHex(config.syancol));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
5
50
|
export { ItemConfig as default };
|
|
@@ -1,7 +1,53 @@
|
|
|
1
|
-
import "./Skin
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import Skin, { RawSkin } from "./Skin.mjs";
|
|
2
|
+
import LoadOutItem, { RawLoadOutItem } from "./LoadOutItem.mjs";
|
|
3
|
+
import XpInfo, { RawXpItem } from "./XpInfo.mjs";
|
|
4
|
+
import { Locale } from "warframe-worldstate-data";
|
|
5
|
+
|
|
6
|
+
//#region src/LoadOutInventory.d.ts
|
|
7
|
+
interface RawLoadOut {
|
|
8
|
+
WeaponSkins: RawSkin[];
|
|
9
|
+
Suits: RawLoadOutItem[];
|
|
10
|
+
Pistols?: RawLoadOutItem[];
|
|
11
|
+
LongGuns?: RawLoadOutItem[];
|
|
12
|
+
Melee?: RawLoadOutItem[];
|
|
13
|
+
XPInfo: RawXpItem[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Player loudout
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
declare class LoadOutInventory {
|
|
20
|
+
/**
|
|
21
|
+
* Skins applied to weapons
|
|
22
|
+
*/
|
|
23
|
+
weaponSkins: Skin[];
|
|
24
|
+
/**
|
|
25
|
+
* An array of the player's currently equiped Warframe (or powersuits)
|
|
26
|
+
*/
|
|
27
|
+
suits: LoadOutItem[];
|
|
28
|
+
/**
|
|
29
|
+
* An array of the player's currently equiped secondary weapon
|
|
30
|
+
*/
|
|
31
|
+
secondary?: LoadOutItem[];
|
|
32
|
+
/**
|
|
33
|
+
* An array of the player's currently equiped primary weapon
|
|
34
|
+
*/
|
|
35
|
+
primary?: LoadOutItem[];
|
|
36
|
+
/**
|
|
37
|
+
* An array of the player's currently equiped melee weapon
|
|
38
|
+
*/
|
|
39
|
+
melee?: LoadOutItem[];
|
|
40
|
+
/**
|
|
41
|
+
* Items that have counted towards the players mastery rank
|
|
42
|
+
*/
|
|
43
|
+
xpInfo: XpInfo[];
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param item The loadout data
|
|
47
|
+
* @param locale The locale to return loudout items in. Default is en
|
|
48
|
+
* @param withItem Whether or not to include items
|
|
49
|
+
*/
|
|
50
|
+
constructor(item: RawLoadOut, locale?: Locale, withItem?: boolean);
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
7
53
|
export { RawLoadOut, LoadOutInventory as default };
|
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./Polarity-Q2JfovbR.mjs";
|
|
5
|
-
import "./LoadOutItem-p-f5RdTB.mjs";
|
|
6
|
-
import "./XpInfo-IT6LOTzI.mjs";
|
|
7
|
-
import { t as LoadOutInventory } from "./LoadOutInventory-BbaIazHX.mjs";
|
|
1
|
+
import Skin from "./Skin.mjs";
|
|
2
|
+
import LoadOutItem from "./LoadOutItem.mjs";
|
|
3
|
+
import XpInfo from "./XpInfo.mjs";
|
|
8
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
|
|
9
52
|
export { LoadOutInventory as default };
|
package/dist/LoadOutItem.d.mts
CHANGED
|
@@ -1,5 +1,120 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
1
|
+
import { RawDate } from "./Utils.mjs";
|
|
2
|
+
import ItemConfig, { RawItemConfig } from "./ItemConfig.mjs";
|
|
3
|
+
import Polarity, { RawPolarity } from "./Polarity.mjs";
|
|
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
|
|
5
120
|
export { RawLoadOutItem, LoadOutItem as default };
|