Skip to content

Commit

Permalink
fix: syndicate jobs now have the type
Browse files Browse the repository at this point in the history
fix: added missing faction, cleaned up factions
  • Loading branch information
Mettwasser authored Jun 23, 2024
1 parent 7182107 commit 11b8dcd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 26 deletions.
12 changes: 11 additions & 1 deletion src/worldstate/models/arbitration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@ mod test {

match client.fetch::<Arbitration>().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)
}
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/worldstate/models/faction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ enum_builder! {
Tenno,
Narmer,
Crossfire,
Murmur = "The Murmur"
Murmur = "The Murmur",
ManInTheWall = "FC_MITW"
}
46 changes: 24 additions & 22 deletions src/worldstate/models/mission_type.rs
Original file line number Diff line number Diff line change
@@ -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
}
6 changes: 4 additions & 2 deletions src/worldstate/models/syndicate_mission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ model_builder! {
:"The Reward Pool of the Bounty"
pub reward_pool: Vec<String>,

:"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<i32>,
Expand All @@ -25,11 +27,11 @@ model_builder! {
pub minimum_mr: i32 = "minMR",

:"Expiry when this mission expires/disappears"
expiry: DateTime
pub expiry: DateTime
}

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."
:"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;
Expand Down

0 comments on commit 11b8dcd

Please sign in to comment.