From 4cfa9fde73bcf37e8d6e4e2d16cc2feb63b43c93 Mon Sep 17 00:00:00 2001 From: Mettwasser Date: Sat, 22 Jun 2024 13:05:35 +0200 Subject: [PATCH 1/5] fix: syndicate jobs now have the type --- src/worldstate/models/syndicate_mission.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/worldstate/models/syndicate_mission.rs b/src/worldstate/models/syndicate_mission.rs index b7f3c10..38ca3e1 100644 --- a/src/worldstate/models/syndicate_mission.rs +++ b/src/worldstate/models/syndicate_mission.rs @@ -14,6 +14,8 @@ model_builder! { :"The Reward Pool of the Bounty" pub reward_pool: Vec, + :"The name of the syndicate job" + pub job_name: String = "type", :"The level of the Enemies in this job" pub enemy_levels: Vec, @@ -29,7 +31,7 @@ model_builder! { } model_builder! { - :"Warning: This is extremly janky -- All Syndicate Missions (including Cetus, etc.)\nNote that they *may* be empty, in which case they are not valid." + :"Warning: This is extremely janky -- All Syndicate Missions (including Cetus, etc.)\nNote that they *may* be empty, in which case they are not valid." SyndicateMission: "/syndicateMissions", rt = array, timed = true; From 07d0dca1d487bcdcf90626acd5104e9a616de97b Mon Sep 17 00:00:00 2001 From: Mettwasser Date: Sat, 22 Jun 2024 13:21:06 +0200 Subject: [PATCH 2/5] fix: added missing faction, cleaned up factions --- src/worldstate/models/arbitration.rs | 12 ++++++- src/worldstate/models/faction.rs | 4 ++- src/worldstate/models/mission_type.rs | 46 ++++++++++++++------------- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/worldstate/models/arbitration.rs b/src/worldstate/models/arbitration.rs index fcb82f2..c8f1c6f 100644 --- a/src/worldstate/models/arbitration.rs +++ b/src/worldstate/models/arbitration.rs @@ -45,7 +45,17 @@ mod test { match client.fetch::().await { Ok(_arbitration) => Ok(()), - Err(why) => Err(why), + Err(why) => { + if let ApiError::ApiError(error) = why { + if error.code == 404 { + Ok(()) + } else { + Err(ApiError::ApiError(error)) + } + } else { + Err(why) + } + } } } diff --git a/src/worldstate/models/faction.rs b/src/worldstate/models/faction.rs index 6222bc6..43aeaaf 100644 --- a/src/worldstate/models/faction.rs +++ b/src/worldstate/models/faction.rs @@ -11,5 +11,7 @@ enum_builder! { Tenno, Narmer, Crossfire, - Murmur = "The Murmur" + Murmur = "The Murmur", + :"Honestly, no idea what this is" + FcMitw = "FC_MITW" } diff --git a/src/worldstate/models/mission_type.rs b/src/worldstate/models/mission_type.rs index 9a45cad..676647f 100644 --- a/src/worldstate/models/mission_type.rs +++ b/src/worldstate/models/mission_type.rs @@ -1,44 +1,46 @@ use super::macros::enum_builder; enum_builder! { + :"A Mission Type in Warframe" MissionType; AncientRetribution = "Ancient Retribution", - Arena = "Arena", - Assassination = "Assassination", - Assault = "Assault", - Capture = "Capture", - Conclave = "Conclave", + Arena, + Assassination, + Assault, + Capture, + Conclave, DarkSectorDefection = "Dark Sector Defection", DarkSectorDefense = "Dark Sector Defense", DarkSectorDisruption = "Dark Sector Disruption", DarkSectorExcavation = "Dark Sector Excavation", DarkSectorSabotage = "Dark Sector Sabotage", DarkSectorSurvival = "Dark Sector Survival", - Defense = "Defense", - Disruption = "Disruption", - Excavation = "Excavation", + Defense, + Disruption, + Excavation, ExterminationArchwing = "Extermination (Archwing)", - Extermination = "Extermination", + Extermination, FreeRoam = "Free Roam", - Hijack = "Hijack", - Hive = "Hive", + Hijack, + Hive, HiveSabotage = "Hive Sabotage", - Interception = "Interception", + Interception, InterceptionArchwing = "Interception (Archwing)", MobileDefense = "Mobile Defense", MobileDefenseArchwing = "Mobile Defense (Archwing)", OrokinSabotage = "Orokin Sabotage", - Orphix = "Orphix", + Orphix, PursuitArchwing = "Pursuit (Archwing)", - Relay = "Relay", - Rescue = "Rescue", + Relay, + Rescue, RushArchwing = "Rush (Archwing)", - Sabotage = "Sabotage", + Sabotage, SabotageArchwing = "Sabotage (Archwing)", - Skirmish = "Skirmish", - Spy = "Spy", - Survival = "Survival", - Volatile = "Volatile", - Alchemy = "Alchemy", - Corruption = "Corruption", + Skirmish, + Spy, + Survival, + Volatile, + Alchemy, + Corruption, VoidCascade = "Void Cascade", + Defection } From 3a8149477409c98eba97e2f065d94b3f5179b9ed Mon Sep 17 00:00:00 2001 From: Mettwasser Date: Sat, 22 Jun 2024 23:22:27 +0200 Subject: [PATCH 3/5] docs: renamed mitw variant to maninthewall --- src/worldstate/models/faction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worldstate/models/faction.rs b/src/worldstate/models/faction.rs index 43aeaaf..9032473 100644 --- a/src/worldstate/models/faction.rs +++ b/src/worldstate/models/faction.rs @@ -13,5 +13,5 @@ enum_builder! { Crossfire, Murmur = "The Murmur", :"Honestly, no idea what this is" - FcMitw = "FC_MITW" + ManInTheWall = "FC_MITW" } From 275a938e431de7e9f574c429b15c85a1f81abe1f Mon Sep 17 00:00:00 2001 From: Mettwasser Date: Sun, 23 Jun 2024 11:47:06 +0200 Subject: [PATCH 4/5] fix: corrected the field name --- src/worldstate/models/faction.rs | 1 - src/worldstate/models/syndicate_mission.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/worldstate/models/faction.rs b/src/worldstate/models/faction.rs index 9032473..c162d58 100644 --- a/src/worldstate/models/faction.rs +++ b/src/worldstate/models/faction.rs @@ -12,6 +12,5 @@ enum_builder! { Narmer, Crossfire, Murmur = "The Murmur", - :"Honestly, no idea what this is" ManInTheWall = "FC_MITW" } diff --git a/src/worldstate/models/syndicate_mission.rs b/src/worldstate/models/syndicate_mission.rs index 38ca3e1..a0b26b6 100644 --- a/src/worldstate/models/syndicate_mission.rs +++ b/src/worldstate/models/syndicate_mission.rs @@ -14,8 +14,8 @@ model_builder! { :"The Reward Pool of the Bounty" pub reward_pool: Vec, - :"The name of the syndicate job" - pub job_name: String = "type", + :"The type (or name) of the syndicate job" + pub job_type: String = "type", :"The level of the Enemies in this job" pub enemy_levels: Vec, @@ -31,7 +31,7 @@ model_builder! { } model_builder! { - :"Warning: This is extremely janky -- All Syndicate Missions (including Cetus, etc.)\nNote that they *may* be empty, in which case they are not valid." + :"All Syndicate Missions (including Cetus, etc.)\nNote that they *may* be empty, in which case they are not valid." SyndicateMission: "/syndicateMissions", rt = array, timed = true; From 32e970179b7a8d5e1b1c631477203dad0897b57d Mon Sep 17 00:00:00 2001 From: Mettwasser Date: Sun, 23 Jun 2024 11:48:58 +0200 Subject: [PATCH 5/5] fix: changed the expiry field's visibility to public --- src/worldstate/models/syndicate_mission.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worldstate/models/syndicate_mission.rs b/src/worldstate/models/syndicate_mission.rs index a0b26b6..384c456 100644 --- a/src/worldstate/models/syndicate_mission.rs +++ b/src/worldstate/models/syndicate_mission.rs @@ -27,7 +27,7 @@ model_builder! { pub minimum_mr: i32 = "minMR", :"Expiry when this mission expires/disappears" - expiry: DateTime + pub expiry: DateTime } model_builder! {