@wfcd/profile-parser 2.0.11 → 2.0.13

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.
Files changed (84) hide show
  1. package/dist/Ability.d.mts +1 -1
  2. package/dist/Ability.mjs +24 -3
  3. package/dist/ArchonCrystal.mjs +1 -3
  4. package/dist/ChallengeProgress.d.mts +1 -1
  5. package/dist/ChallengeProgress.mjs +25 -3
  6. package/dist/Enemy.d.mts +1 -1
  7. package/dist/Enemy.mjs +43 -3
  8. package/dist/Intrinsics.d.mts +1 -1
  9. package/dist/Intrinsics.mjs +66 -3
  10. package/dist/{ItemConfig-DxhXby04.d.mts → ItemConfig-C81QdCpU.d.mts} +2 -2
  11. package/dist/ItemConfig.d.mts +1 -3
  12. package/dist/ItemConfig.mjs +48 -5
  13. package/dist/{LoadOutInventory-B84bUV2-.d.mts → LoadOutInventory-BrtoOtNr.d.mts} +3 -3
  14. package/dist/LoadOutInventory.d.mts +1 -6
  15. package/dist/LoadOutInventory.mjs +50 -9
  16. package/dist/{LoadOutItem-DWQ4aFI_.d.mts → LoadOutItem-Cd_qovNn.d.mts} +3 -3
  17. package/dist/LoadOutItem.d.mts +1 -4
  18. package/dist/LoadOutItem.mjs +125 -7
  19. package/dist/LoadOutPreset.d.mts +1 -1
  20. package/dist/LoadOutPreset.mjs +81 -4
  21. package/dist/Mission.d.mts +1 -1
  22. package/dist/Mission.mjs +53 -3
  23. package/dist/{OperatorLoadOuts-51DN5Rwo.d.mts → OperatorLoadOuts-DvlpRvD1.d.mts} +10 -4
  24. package/dist/OperatorLoadOuts.d.mts +1 -3
  25. package/dist/OperatorLoadOuts.mjs +74 -5
  26. package/dist/Polarity.d.mts +1 -1
  27. package/dist/Polarity.mjs +26 -3
  28. package/dist/Profile.d.mts +10 -14
  29. package/dist/Profile.mjs +8 -16
  30. package/dist/ProfileParser.d.mts +5 -11
  31. package/dist/ProfileParser.mjs +3 -16
  32. package/dist/Pvp.d.mts +1 -1
  33. package/dist/Pvp.mjs +35 -3
  34. package/dist/Race.d.mts +1 -1
  35. package/dist/Race.mjs +34 -3
  36. package/dist/Scan.d.mts +1 -1
  37. package/dist/Scan.mjs +26 -3
  38. package/dist/Skin.d.mts +1 -1
  39. package/dist/Skin.mjs +34 -4
  40. package/dist/Stats.d.mts +7 -7
  41. package/dist/Stats.mjs +8 -10
  42. package/dist/Syndicate.d.mts +1 -1
  43. package/dist/Syndicate.mjs +31 -3
  44. package/dist/{Utils-VTFhFHIp.d.mts → Utils-xGSP1zu-.d.mts} +4 -5
  45. package/dist/Utils.d.mts +1 -1
  46. package/dist/Utils.mjs +58 -3
  47. package/dist/Weapon.d.mts +1 -1
  48. package/dist/Weapon.mjs +63 -3
  49. package/dist/XpInfo.d.mts +1 -1
  50. package/dist/XpInfo.mjs +33 -4
  51. package/package.json +11 -12
  52. package/dist/Ability-DsyqxzjP.mjs +0 -25
  53. package/dist/ChallengeProgress-Cpks92At.mjs +0 -26
  54. package/dist/Enemy-B3JSksZZ.mjs +0 -44
  55. package/dist/Intrinsics-kYw_LPq1.mjs +0 -67
  56. package/dist/ItemConfig-DTIrA_P_.mjs +0 -50
  57. package/dist/LoadOutInventory-BbaIazHX.mjs +0 -52
  58. package/dist/LoadOutItem-p-f5RdTB.mjs +0 -127
  59. package/dist/LoadOutPreset-CwbK2VvR.mjs +0 -83
  60. package/dist/Mission-DfGQMV7B.mjs +0 -55
  61. package/dist/OperatorLoadOuts-LYGpTHuj.mjs +0 -76
  62. package/dist/Polarity-Q2JfovbR.mjs +0 -28
  63. package/dist/Pvp-DCfleh26.mjs +0 -36
  64. package/dist/Race-dyrF8Zs5.mjs +0 -35
  65. package/dist/Scan-D4p43-1c.mjs +0 -27
  66. package/dist/Skin-D_brWp2g.mjs +0 -36
  67. package/dist/Syndicate-CcRnzmZs.mjs +0 -33
  68. package/dist/Utils-Bqm2Gg1K.mjs +0 -59
  69. package/dist/Weapon-CsKff27X.mjs +0 -64
  70. package/dist/XpInfo-IT6LOTzI.mjs +0 -35
  71. /package/dist/{Ability-CmHyNfw4.d.mts → Ability-DcXcbtcE.d.mts} +0 -0
  72. /package/dist/{ChallengeProgress-BO8tPybG.d.mts → ChallengeProgress-BrxgSqf4.d.mts} +0 -0
  73. /package/dist/{Enemy-5RVVfZme.d.mts → Enemy-Das_tHF5.d.mts} +0 -0
  74. /package/dist/{Intrinsics-DwonOlUE.d.mts → Intrinsics-BhwKpPoY.d.mts} +0 -0
  75. /package/dist/{LoadOutPreset-m_1RVkf9.d.mts → LoadOutPreset-CUV29lLL.d.mts} +0 -0
  76. /package/dist/{Mission-CeX2BRp0.d.mts → Mission-C7zlZ4eq.d.mts} +0 -0
  77. /package/dist/{Polarity-KCoYUO6f.d.mts → Polarity-BWadoIXU.d.mts} +0 -0
  78. /package/dist/{Pvp-R4iYmiAT.d.mts → Pvp-D0lygyP6.d.mts} +0 -0
  79. /package/dist/{Race-DXOXL9VT.d.mts → Race-PxkzCRsy.d.mts} +0 -0
  80. /package/dist/{Scan-CJnYpzKb.d.mts → Scan-Cj6jCTNg.d.mts} +0 -0
  81. /package/dist/{Skin-DJMr6L-X.d.mts → Skin-CpQ4dzEs.d.mts} +0 -0
  82. /package/dist/{Syndicate-Dq5vLEB-.d.mts → Syndicate-BwHRq-Iw.d.mts} +0 -0
  83. /package/dist/{Weapon-DgQ4hNgE.d.mts → Weapon-DUlgoPHD.d.mts} +0 -0
  84. /package/dist/{XpInfo-qplT5008.d.mts → XpInfo-C1pzVAdK.d.mts} +0 -0
@@ -1,2 +1,2 @@
1
- import { n as RawAbility, t as Ability } from "./Ability-CmHyNfw4.mjs";
1
+ import { n as RawAbility, t as Ability } from "./Ability-DcXcbtcE.mjs";
2
2
  export { RawAbility, Ability as default };
package/dist/Ability.mjs CHANGED
@@ -1,3 +1,24 @@
1
- import { t as Ability } from "./Ability-DsyqxzjP.mjs";
2
-
3
- export { Ability as default };
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
+ };
23
+ //#endregion
24
+ export { Ability as default };
@@ -1,5 +1,4 @@
1
1
  import { archonShardColor, archonShardUpgradeType } from "warframe-worldstate-data/utilities";
2
-
3
2
  //#region src/ArchonCrystal.ts
4
3
  /**
5
4
  * Represents an Archon shard
@@ -24,6 +23,5 @@ var ArchonCrystal = class {
24
23
  this.modifier = archonShardUpgradeType(crystal.Color, crystal.UpgradeType, locale);
25
24
  }
26
25
  };
27
-
28
26
  //#endregion
29
- export { ArchonCrystal as default };
27
+ export { ArchonCrystal as default };
@@ -1,2 +1,2 @@
1
- import { n as RawChallengeProgress, t as ChallengeProgress } from "./ChallengeProgress-BO8tPybG.mjs";
1
+ import { n as RawChallengeProgress, t as ChallengeProgress } from "./ChallengeProgress-BrxgSqf4.mjs";
2
2
  export { RawChallengeProgress, ChallengeProgress as default };
@@ -1,3 +1,25 @@
1
- import { t as ChallengeProgress } from "./ChallengeProgress-Cpks92At.mjs";
2
-
3
- export { ChallengeProgress as default };
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
+ };
24
+ //#endregion
25
+ export { ChallengeProgress as default };
package/dist/Enemy.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as RawEnemy, t as Enemy } from "./Enemy-5RVVfZme.mjs";
1
+ import { n as RawEnemy, t as Enemy } from "./Enemy-Das_tHF5.mjs";
2
2
  export { RawEnemy, Enemy as default };
package/dist/Enemy.mjs CHANGED
@@ -1,3 +1,43 @@
1
- import { t as Enemy } from "./Enemy-B3JSksZZ.mjs";
2
-
3
- export { Enemy as default };
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
+ };
42
+ //#endregion
43
+ export { Enemy as default };
@@ -1,2 +1,2 @@
1
- import { n as RawIntrinsics, t as Intrinsics } from "./Intrinsics-DwonOlUE.mjs";
1
+ import { n as RawIntrinsics, t as Intrinsics } from "./Intrinsics-BhwKpPoY.mjs";
2
2
  export { RawIntrinsics, Intrinsics as default };
@@ -1,3 +1,66 @@
1
- import { t as Intrinsics } from "./Intrinsics-kYw_LPq1.mjs";
2
-
3
- export { Intrinsics as default };
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
+ };
65
+ //#endregion
66
+ export { Intrinsics as default };
@@ -1,5 +1,5 @@
1
- import { n as Skin } from "./Skin-DJMr6L-X.mjs";
2
- import { t as ProfileRawColors } from "./Utils-VTFhFHIp.mjs";
1
+ import { n as Skin } from "./Skin-CpQ4dzEs.mjs";
2
+ import { t as ProfileRawColors } from "./Utils-xGSP1zu-.mjs";
3
3
  import { ColorMap } from "@wfcd/items";
4
4
  import { Locale } from "warframe-worldstate-data";
5
5
 
@@ -1,4 +1,2 @@
1
- import "./Skin-DJMr6L-X.mjs";
2
- import "./Utils-VTFhFHIp.mjs";
3
- import { n as RawItemConfig, t as ItemConfig } from "./ItemConfig-DxhXby04.mjs";
1
+ import { n as RawItemConfig, t as ItemConfig } from "./ItemConfig-C81QdCpU.mjs";
4
2
  export { RawItemConfig, ItemConfig as default };
@@ -1,5 +1,48 @@
1
- import "./Utils-Bqm2Gg1K.mjs";
2
- import "./Skin-D_brWp2g.mjs";
3
- import { t as ItemConfig } from "./ItemConfig-DTIrA_P_.mjs";
4
-
5
- export { ItemConfig as default };
1
+ import { mapToHex } from "./Utils.mjs";
2
+ import Skin from "./Skin.mjs";
3
+ import { colors } from "@wfcd/items/utilities";
4
+ //#region src/ItemConfig.ts
5
+ /**
6
+ * Item customizations such as colors and applied skins
7
+ * @module
8
+ */
9
+ var ItemConfig = class {
10
+ /**
11
+ * Array of unique names for the skins applied to item
12
+ */
13
+ skins;
14
+ /**
15
+ * Array of PVP unique name upgrades applied
16
+ */
17
+ conclaveUpgrades;
18
+ /**
19
+ * Primary colors applied to item if they exist
20
+ */
21
+ primaryColor;
22
+ /**
23
+ * Sigil colors applied to item if they exist
24
+ */
25
+ sigilColor;
26
+ /**
27
+ * Attachment colors applied to item if they exist
28
+ */
29
+ attachmentsColor;
30
+ /**
31
+ * Syandana colors applied to item if they exist
32
+ */
33
+ syandanaColor;
34
+ /**
35
+ *
36
+ * @param config The configuration
37
+ */
38
+ constructor(config, locale = "en") {
39
+ this.skins = config.Skins?.filter(Boolean).map((s) => new Skin({ ItemType: s }, locale));
40
+ if (config.PvpUpgrades) this.conclaveUpgrades = config.PvpUpgrades;
41
+ if (config.pricol) this.primaryColor = colors.mapColors(mapToHex(config.pricol));
42
+ if (config.sigcol) this.sigilColor = colors.mapColors(mapToHex(config.sigcol));
43
+ if (config.attcol) this.attachmentsColor = colors.mapColors(mapToHex(config.attcol));
44
+ if (config.syancol) this.syandanaColor = colors.mapColors(mapToHex(config.syancol));
45
+ }
46
+ };
47
+ //#endregion
48
+ export { ItemConfig as default };
@@ -1,6 +1,6 @@
1
- import { n as Skin, t as RawSkin } from "./Skin-DJMr6L-X.mjs";
2
- import { n as RawLoadOutItem, t as LoadOutItem } from "./LoadOutItem-DWQ4aFI_.mjs";
3
- import { n as XpInfo, t as RawXpItem } from "./XpInfo-qplT5008.mjs";
1
+ import { n as Skin, t as RawSkin } from "./Skin-CpQ4dzEs.mjs";
2
+ import { n as RawLoadOutItem, t as LoadOutItem } from "./LoadOutItem-Cd_qovNn.mjs";
3
+ import { n as XpInfo, t as RawXpItem } from "./XpInfo-C1pzVAdK.mjs";
4
4
  import { Locale } from "warframe-worldstate-data";
5
5
 
6
6
  //#region src/LoadOutInventory.d.ts
@@ -1,7 +1,2 @@
1
- import "./Skin-DJMr6L-X.mjs";
2
- import "./Utils-VTFhFHIp.mjs";
3
- import "./ItemConfig-DxhXby04.mjs";
4
- import "./LoadOutItem-DWQ4aFI_.mjs";
5
- import "./XpInfo-qplT5008.mjs";
6
- import { n as RawLoadOut, t as LoadOutInventory } from "./LoadOutInventory-B84bUV2-.mjs";
1
+ import { n as RawLoadOut, t as LoadOutInventory } from "./LoadOutInventory-BrtoOtNr.mjs";
7
2
  export { RawLoadOut, LoadOutInventory as default };
@@ -1,9 +1,50 @@
1
- import "./Utils-Bqm2Gg1K.mjs";
2
- import "./Skin-D_brWp2g.mjs";
3
- import "./ItemConfig-DTIrA_P_.mjs";
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";
8
-
9
- export { LoadOutInventory as default };
1
+ import Skin from "./Skin.mjs";
2
+ import LoadOutItem from "./LoadOutItem.mjs";
3
+ import XpInfo from "./XpInfo.mjs";
4
+ //#region src/LoadOutInventory.ts
5
+ /**
6
+ * Player loudout
7
+ * @module
8
+ */
9
+ var LoadOutInventory = class {
10
+ /**
11
+ * Skins applied to weapons
12
+ */
13
+ weaponSkins;
14
+ /**
15
+ * An array of the player's currently equiped Warframe (or powersuits)
16
+ */
17
+ suits;
18
+ /**
19
+ * An array of the player's currently equiped secondary weapon
20
+ */
21
+ secondary;
22
+ /**
23
+ * An array of the player's currently equiped primary weapon
24
+ */
25
+ primary;
26
+ /**
27
+ * An array of the player's currently equiped melee weapon
28
+ */
29
+ melee;
30
+ /**
31
+ * Items that have counted towards the players mastery rank
32
+ */
33
+ xpInfo;
34
+ /**
35
+ *
36
+ * @param item The loadout data
37
+ * @param locale The locale to return loudout items in. Default is en
38
+ * @param withItem Whether or not to include items
39
+ */
40
+ constructor(item, locale = "en", withItem = false) {
41
+ this.weaponSkins = item.WeaponSkins.map((s) => new Skin(s, locale));
42
+ this.suits = item.Suits.map((s) => new LoadOutItem(s, locale));
43
+ this.secondary = item.Pistols?.map((p) => new LoadOutItem(p, locale));
44
+ this.primary = item.LongGuns?.map((lg) => new LoadOutItem(lg, locale));
45
+ this.melee = item.Melee?.map((m) => new LoadOutItem(m, locale));
46
+ this.xpInfo = item.XPInfo.map((xp) => new XpInfo(xp, locale, withItem));
47
+ }
48
+ };
49
+ //#endregion
50
+ export { LoadOutInventory as default };
@@ -1,6 +1,6 @@
1
- import { n as RawDate } from "./Utils-VTFhFHIp.mjs";
2
- import { n as RawItemConfig, t as ItemConfig } from "./ItemConfig-DxhXby04.mjs";
3
- import { n as RawPolarity, t as Polarity } from "./Polarity-KCoYUO6f.mjs";
1
+ import { n as RawDate } from "./Utils-xGSP1zu-.mjs";
2
+ import { n as RawItemConfig, t as ItemConfig } from "./ItemConfig-C81QdCpU.mjs";
3
+ import { n as RawPolarity, t as Polarity } from "./Polarity-BWadoIXU.mjs";
4
4
  import { ColorMap, Item, RawColors } from "@wfcd/items";
5
5
  import { Locale } from "warframe-worldstate-data";
6
6
 
@@ -1,5 +1,2 @@
1
- import "./Skin-DJMr6L-X.mjs";
2
- import "./Utils-VTFhFHIp.mjs";
3
- import "./ItemConfig-DxhXby04.mjs";
4
- import { n as RawLoadOutItem, t as LoadOutItem } from "./LoadOutItem-DWQ4aFI_.mjs";
1
+ import { n as RawLoadOutItem, t as LoadOutItem } from "./LoadOutItem-Cd_qovNn.mjs";
5
2
  export { RawLoadOutItem, LoadOutItem as default };
@@ -1,7 +1,125 @@
1
- import "./Utils-Bqm2Gg1K.mjs";
2
- import "./Skin-D_brWp2g.mjs";
3
- import "./ItemConfig-DTIrA_P_.mjs";
4
- import "./Polarity-Q2JfovbR.mjs";
5
- import { t as LoadOutItem } from "./LoadOutItem-p-f5RdTB.mjs";
6
-
7
- export { LoadOutItem as default };
1
+ import { find } from "./Utils.mjs";
2
+ import ItemConfig from "./ItemConfig.mjs";
3
+ import Polarity from "./Polarity.mjs";
4
+ import { parseDate, toTitleCase } from "warframe-worldstate-data/utilities";
5
+ import { colors } from "@wfcd/items/utilities";
6
+ //#region src/LoadOutItem.ts
7
+ /**
8
+ * An an item in LoadOutInventory
9
+ * @module
10
+ */
11
+ var LoadOutItem = class {
12
+ /**
13
+ * Item ID
14
+ */
15
+ itemId;
16
+ /**
17
+ * Item unique name
18
+ */
19
+ uniqueName;
20
+ /**
21
+ * Item in-game name
22
+ */
23
+ name;
24
+ /**
25
+ * Complete item from @wfcd/items
26
+ */
27
+ item;
28
+ /**
29
+ * The name of the Lich, Sister, or Technocyte
30
+ */
31
+ nemesis;
32
+ /**
33
+ * Configuration for this weapon. Such as colors and skins applied by the player
34
+ */
35
+ configs;
36
+ /**
37
+ * The upgrade that was applied to this weapon
38
+ */
39
+ upgradeType;
40
+ /**
41
+ * Information on the upgradeType that was applied
42
+ * TODO need model for for fingerprint
43
+ */
44
+ upgradeFingerprint;
45
+ features;
46
+ upgradeVer;
47
+ /**
48
+ * XP earned with this weapon
49
+ */
50
+ xp;
51
+ /**
52
+ * How many mod slots are currently polarized.
53
+ */
54
+ polarized;
55
+ /**
56
+ * Which polarity types exist on the weapon
57
+ */
58
+ polarity;
59
+ /**
60
+ * Focus lens applied
61
+ */
62
+ focuseLens;
63
+ customizationSlotPurchases;
64
+ /**
65
+ * Primary colors applied to item if they exist
66
+ */
67
+ primaryColor;
68
+ /**
69
+ * Sigil colors applied to item if they exist
70
+ */
71
+ sigilColor;
72
+ /**
73
+ * Whether prime details are enabled or not
74
+ */
75
+ enablePrime;
76
+ /**
77
+ * Attachment colors applied to item if they exist
78
+ */
79
+ attachmentsColor;
80
+ /**
81
+ * Syandana colors applied to item if they exist
82
+ */
83
+ syandanaColor;
84
+ /**
85
+ * If set will show when the player's warframe was infested.
86
+ */
87
+ infestationDate;
88
+ /**
89
+ *
90
+ * @param {Object} loadOutItem The loadout item from LoadoutInventory
91
+ * @param {string} [locale='en'] The locale to return item in
92
+ */
93
+ constructor(loadOutItem, locale = "en") {
94
+ this.itemId = loadOutItem.ItemId.$oid;
95
+ this.uniqueName = loadOutItem.ItemType;
96
+ const item = find(loadOutItem.ItemType, locale);
97
+ if (item) {
98
+ this.name = item.name;
99
+ this.item = item;
100
+ }
101
+ if (loadOutItem.ItemName) {
102
+ const [, nemesis] = loadOutItem.ItemName.split("|");
103
+ if (nemesis !== void 0) this.nemesis = toTitleCase(nemesis);
104
+ else this.name = loadOutItem.ItemName;
105
+ }
106
+ this.configs = loadOutItem.Configs.map((c) => new ItemConfig(c));
107
+ if (loadOutItem.UpgradeType) this.upgradeType = loadOutItem.UpgradeType;
108
+ this.upgradeFingerprint = loadOutItem.UpgradeFingerprint;
109
+ this.features = loadOutItem.Features;
110
+ this.upgradeVer = loadOutItem.UpgradeVer;
111
+ this.xp = loadOutItem.XP;
112
+ this.polarized = loadOutItem.Polarized;
113
+ this.polarity = loadOutItem.Polarity?.map((p) => new Polarity(p));
114
+ this.focuseLens = loadOutItem.FocusLens;
115
+ this.customizationSlotPurchases = loadOutItem.CustomizationSlotPurchases ?? 0;
116
+ if (loadOutItem.pricol) this.primaryColor = colors.mapColors(loadOutItem.pricol);
117
+ if (loadOutItem.sigcol) this.sigilColor = colors.mapColors(loadOutItem.sigcol);
118
+ this.enablePrime = loadOutItem.ugly ?? false;
119
+ if (loadOutItem.attcol) this.attachmentsColor = colors.mapColors(loadOutItem.attcol);
120
+ if (loadOutItem.syancol) this.syandanaColor = colors.mapColors(loadOutItem.syancol);
121
+ if (loadOutItem.InfestationDate) this.infestationDate = parseDate(loadOutItem.InfestationDate);
122
+ }
123
+ };
124
+ //#endregion
125
+ export { LoadOutItem as default };
@@ -1,2 +1,2 @@
1
- import { n as RawLoadOutPreset, t as LoadOutPreset } from "./LoadOutPreset-m_1RVkf9.mjs";
1
+ import { n as RawLoadOutPreset, t as LoadOutPreset } from "./LoadOutPreset-CUV29lLL.mjs";
2
2
  export { RawLoadOutPreset, LoadOutPreset as default };
@@ -1,4 +1,81 @@
1
- import "./Utils-Bqm2Gg1K.mjs";
2
- import { t as LoadOutPreset } from "./LoadOutPreset-CwbK2VvR.mjs";
3
-
4
- export { LoadOutPreset as default };
1
+ import { numberToLetter } from "./Utils.mjs";
2
+ import { translatePolarity } from "warframe-worldstate-data/utilities";
3
+ //#region src/LoadOutPreset.ts
4
+ var SlotPreset = class {
5
+ id;
6
+ modPreset;
7
+ appearancePreset;
8
+ isHidden;
9
+ constructor(slot) {
10
+ if (slot?.ItemId?.$oid) this.id = slot.ItemId.$oid;
11
+ if (slot?.mod !== void 0) this.modPreset = numberToLetter(slot.mod);
12
+ if (slot?.cus !== void 0) this.appearancePreset = numberToLetter(slot.cus);
13
+ this.isHidden = slot?.hide ?? false;
14
+ }
15
+ };
16
+ var LoadOutPreset = class {
17
+ /**
18
+ * Focus School
19
+ */
20
+ focusSchool;
21
+ /**
22
+ * Preset icon
23
+ *
24
+ * Note:
25
+ * Icon in-game seems to be an image of whatever Warframe is equipped on it
26
+ */
27
+ icon;
28
+ /**
29
+ * Whether this preset is a favorite
30
+ */
31
+ isFavorite;
32
+ /**
33
+ * Preset name
34
+ */
35
+ name;
36
+ /**
37
+ * Warframe equipped in preset
38
+ */
39
+ warframe;
40
+ /**
41
+ * Primary equipped in preset
42
+ */
43
+ primary;
44
+ /**
45
+ * Secondary equipped in preset
46
+ */
47
+ secondary;
48
+ /**
49
+ * Heavy equipped in preset
50
+ */
51
+ heavy;
52
+ /**
53
+ * Melee equiped in preset
54
+ */
55
+ melee;
56
+ /**
57
+ * Exalted ability
58
+ */
59
+ exalted;
60
+ /**
61
+ * Secondary exalted ability
62
+ *
63
+ * i.e Sevagoth has his shadow and his shadow's claws both of which can be modded separately
64
+ */
65
+ exaltedB;
66
+ constructor(preset) {
67
+ this.focusSchool = translatePolarity(preset.FocusSchool);
68
+ this.icon = preset.PresetIcon;
69
+ this.isFavorite = preset.Favorite;
70
+ this.name = preset.n;
71
+ this.warframe = new SlotPreset(preset.s);
72
+ if (preset.l) this.primary = new SlotPreset(preset.l);
73
+ if (preset.p) this.secondary = new SlotPreset(preset.p);
74
+ if (preset.h) this.heavy = new SlotPreset(preset.h);
75
+ if (preset.m) this.melee = new SlotPreset(preset.m);
76
+ if (preset.a) this.exalted = new SlotPreset(preset.a);
77
+ if (preset.b) this.exaltedB = new SlotPreset(preset.b);
78
+ }
79
+ };
80
+ //#endregion
81
+ export { LoadOutPreset as default };
@@ -1,2 +1,2 @@
1
- import { n as RawMission, t as Mission } from "./Mission-CeX2BRp0.mjs";
1
+ import { n as RawMission, t as Mission } from "./Mission-C7zlZ4eq.mjs";
2
2
  export { RawMission, Mission as default };
package/dist/Mission.mjs CHANGED
@@ -1,3 +1,53 @@
1
- import { t as Mission } from "./Mission-DfGQMV7B.mjs";
2
-
3
- export { Mission as default };
1
+ import { node, nodeEnemy, nodeMissionType } from "warframe-worldstate-data/utilities";
2
+ //#region src/Mission.ts
3
+ /**
4
+ * A mission completed by the player
5
+ * @module
6
+ */
7
+ var Mission = class {
8
+ /**
9
+ * Node name
10
+ */
11
+ node;
12
+ /**
13
+ * Node unique name
14
+ */
15
+ nodeKey;
16
+ /**
17
+ * Node mission type
18
+ */
19
+ missionType;
20
+ /**
21
+ * Node faction
22
+ */
23
+ faction;
24
+ /**
25
+ * Highest score earned in this mission
26
+ */
27
+ highScore;
28
+ /**
29
+ * How many times the mission was completed
30
+ */
31
+ completes;
32
+ /**
33
+ * Denotes a steel path node
34
+ */
35
+ tier;
36
+ /**
37
+ *
38
+ * @param mission The mission data
39
+ * @param locale The locale to return in
40
+ */
41
+ constructor(mission, locale = "en") {
42
+ const uniqueName = mission.type || mission.Tag;
43
+ this.node = node(uniqueName, locale);
44
+ this.nodeKey = uniqueName;
45
+ this.missionType = nodeMissionType(uniqueName, locale);
46
+ this.faction = nodeEnemy(uniqueName, locale);
47
+ if (mission.highScore) this.highScore = mission.highScore;
48
+ if (mission.Completes) this.completes = mission.Completes;
49
+ if (mission.Tier) this.tier = mission.Tier;
50
+ }
51
+ };
52
+ //#endregion
53
+ export { Mission as default };