-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remaining parts of profile parsing
- Loading branch information
Showing
11 changed files
with
810 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
/// base10 i32 color loadout, [None] if color is not set | ||
pub struct ColorLoadOut { | ||
#[serde(rename = "t0")] | ||
/// primary | ||
pub t0: Option<i32>, | ||
|
||
#[serde(rename = "t1")] | ||
/// secondary | ||
pub t1: Option<i32>, | ||
|
||
#[serde(rename = "t2")] | ||
/// tertiary | ||
pub t2: Option<i32>, | ||
|
||
#[serde(rename = "t3")] | ||
/// accents | ||
pub t3: Option<i32>, | ||
|
||
#[serde(rename = "m0")] | ||
/// emissive_primary | ||
pub m0: Option<i32>, | ||
|
||
#[serde(rename = "m1")] | ||
/// emissive_secondary | ||
pub m1: Option<i32>, | ||
|
||
#[serde(rename = "en")] | ||
/// energy_primary | ||
pub en: Option<i32>, | ||
|
||
#[serde(rename = "e1")] | ||
/// energy_secondary | ||
pub e1: Option<i32>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use serde_repr::{Deserialize_repr, Serialize_repr}; | ||
|
||
#[derive(Serialize_repr, Deserialize_repr, Debug, Clone, PartialEq)] | ||
#[repr(u8)] | ||
pub enum GuildTier { | ||
Ghost = 1, | ||
Shadow = 2, | ||
Storm = 3, | ||
Mountain = 4, | ||
Moon = 5, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use super::color_load_out::ColorLoadOut; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct LoadOutInventory { | ||
/// weapon_skins | ||
pub weapon_skins: Vec<LoadOutInventoryItemType>, | ||
|
||
#[serde(rename = "Suits")] | ||
/// warframes | ||
pub warframe: Vec<LoadOutInventoryItem<WarframeLoadOutInventoryItemConfig>>, | ||
|
||
#[serde(rename = "LongGuns")] | ||
/// primaries | ||
pub primaries: Vec<LoadOutInventoryItem>, | ||
|
||
#[serde(rename = "Pistols")] | ||
/// secondaries | ||
pub secondaries: Vec<LoadOutInventoryItem>, | ||
|
||
/// melee | ||
pub melee: Vec<LoadOutInventoryItem>, | ||
|
||
#[serde(rename = "XPInfo")] | ||
/// xp_info | ||
pub xp_info: Vec<XPInfo>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct LoadOutInventoryItemType { | ||
/// item_type | ||
pub item_type: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct LoadOutInventoryItem<Config = LoadOutInventoryItemConfig> { | ||
/// item_type | ||
pub item_type: String, | ||
|
||
/// configs | ||
pub configs: Vec<Config>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct LoadOutInventoryItemConfig { | ||
/// name | ||
pub name: Option<String>, | ||
|
||
/// skins | ||
pub skins: Vec<String>, | ||
|
||
#[serde(rename = "pricol")] | ||
/// primary_colors | ||
pub primary_colors: Option<ColorLoadOut>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct WarframeLoadOutInventoryItemConfig { | ||
#[serde(flatten)] | ||
pub base: LoadOutInventoryItemConfig, | ||
|
||
#[serde(rename = "attcol")] | ||
/// attachment_colors | ||
pub attachment_colors: Option<ColorLoadOut>, | ||
|
||
#[serde(rename = "sigcol")] | ||
/// sigil_colors | ||
pub sigil_colors: Option<ColorLoadOut>, | ||
|
||
#[serde(rename = "syancol")] | ||
/// syandana_colors | ||
pub syandana_colors: Option<ColorLoadOut>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct XPInfo { | ||
/// item_type | ||
pub item_type: String, | ||
|
||
#[serde(rename = "XP")] | ||
/// xp | ||
pub xp: u32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
pub mod focus_school; | ||
pub mod guild_tier; | ||
pub mod player_skill; | ||
pub mod load_out_preset; | ||
pub mod load_out_inventory; | ||
pub mod operator_load_out; | ||
pub mod color_load_out; | ||
pub mod affiliation; | ||
pub mod stats; | ||
pub mod platform; | ||
pub(crate) mod profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use serde::Deserialize; | ||
use super::color_load_out::ColorLoadOut; | ||
|
||
#[derive(Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct OperatorLoadOut { | ||
/// skins | ||
pub skins: Vec<String>, | ||
|
||
/// upgrades | ||
pub upgrades: Option<Vec<String>>, | ||
|
||
/// ability_override | ||
pub ability_override: Option<AbilityOverride>, | ||
|
||
#[serde(rename = "pricol")] | ||
/// primary_colors | ||
pub primary_colors: Option<ColorLoadOut>, | ||
|
||
#[serde(rename = "eyecol")] | ||
/// eye_colors | ||
pub eye_colors: Option<ColorLoadOut>, | ||
|
||
#[serde(rename = "sigcol")] | ||
/// sigil_colors | ||
pub sigil_colors: Option<ColorLoadOut>, | ||
|
||
#[serde(rename = "cloth")] | ||
/// cloth_colors | ||
pub cloth_colors: Option<ColorLoadOut>, | ||
} | ||
|
||
#[derive(Deserialize, Debug, Clone)] | ||
#[serde(rename_all = "PascalCase")] | ||
pub struct AbilityOverride { | ||
/// ability | ||
pub ability: String, | ||
|
||
/// index | ||
pub index: i32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash)] | ||
pub enum PlayerSkill { | ||
#[serde(rename = "LPP_SPACE")] | ||
Railjack, | ||
#[serde(rename = "LPS_GUNNERY")] | ||
RailjackGunnery, | ||
#[serde(rename = "LPS_TACTICAL")] | ||
RailjackTactical, | ||
#[serde(rename = "LPS_PILOTING")] | ||
RailjackPiloting, | ||
#[serde(rename = "LPS_ENGINEERING")] | ||
RailjackEngineering, | ||
#[serde(rename = "LPS_COMMAND")] | ||
RailjackCommand, | ||
#[serde(rename = "LPP_DRIFTER")] | ||
Drifter, | ||
#[serde(rename = "LPS_DRIFT_RIDING")] | ||
DrifterRiding, | ||
#[serde(rename = "LPS_DRIFT_COMBAT")] | ||
DrifterCombat, | ||
#[serde(rename = "LPS_DRIFT_OPPORTUNITY")] | ||
DrifterOpportunity, | ||
#[serde(rename = "LPS_DRIFT_ENDURANCE")] | ||
DrifterEndurance, | ||
} |
Oops, something went wrong.