From 9572af0b8173ada042e654dc0c7c342d58eefc92 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sun, 24 Mar 2024 05:46:03 +0100 Subject: chore: change factions to purple/yellow --- src/main.rs | 2 +- src/server.rs | 8 ++++---- src/shared/faction.rs | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5b6a857..4ee5e14 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ struct Cli { server: bool, #[arg(long, default_value = "meele")] champion: Champion, - #[arg(long, default_value = "blue")] + #[arg(long, default_value = "yellow")] faction: Faction, } diff --git a/src/server.rs b/src/server.rs index 6f8bce9..01dfe93 100644 --- a/src/server.rs +++ b/src/server.rs @@ -123,7 +123,7 @@ fn setup(mut commands: Commands, mut entity_map: ResMut) { let entity = commands.spawn(TowerBundle::new( *client_id, Vec2::new(0., TOWER_DISTANCE / 2. + *n as f32 * TOWER_DISTANCE), - Faction::Blue, + Faction::Yellow, )); entity_map.0.insert(*client_id, entity.id()); } @@ -132,7 +132,7 @@ fn setup(mut commands: Commands, mut entity_map: ResMut) { let entity = commands.spawn(NexusBundle::new( client_id, Vec2::new(0., TOWER_DISTANCE / 2. + 3. * TOWER_DISTANCE), - Faction::Blue, + Faction::Yellow, )); entity_map.0.insert(client_id, entity.id()); } @@ -141,7 +141,7 @@ fn setup(mut commands: Commands, mut entity_map: ResMut) { let entity = commands.spawn(TowerBundle::new( *client_id, Vec2::new(0., -TOWER_DISTANCE / 2. - *n as f32 * TOWER_DISTANCE), - Faction::Red, + Faction::Purple, )); entity_map.0.insert(*client_id, entity.id()); } @@ -150,7 +150,7 @@ fn setup(mut commands: Commands, mut entity_map: ResMut) { let entity = commands.spawn(NexusBundle::new( client_id, Vec2::new(0., -TOWER_DISTANCE / 2. - 3. * TOWER_DISTANCE), - Faction::Red, + Faction::Purple, )); entity_map.0.insert(client_id, entity.id()); } diff --git a/src/shared/faction.rs b/src/shared/faction.rs index 7719a0f..2f7ac33 100644 --- a/src/shared/faction.rs +++ b/src/shared/faction.rs @@ -3,15 +3,15 @@ use std::str::FromStr; #[derive(Component, Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)] pub enum Faction { - Red, - Blue, + Purple, + Yellow, } impl Faction { pub fn to_color(self) -> Color { match self { - Faction::Red => Color::RED, - Faction::Blue => Color::BLUE, + Faction::Purple => Color::PURPLE, + Faction::Yellow => Color::YELLOW, } } } @@ -21,8 +21,8 @@ impl FromStr for Faction { fn from_str(s: &str) -> Result { match s { - "red" => Ok(Faction::Red), - "blue" => Ok(Faction::Blue), + "purple" => Ok(Faction::Purple), + "yellow" => Ok(Faction::Yellow), _ => Err(format!("unknown faction: {}", s)), } } @@ -30,6 +30,6 @@ impl FromStr for Faction { impl Default for Faction { fn default() -> Self { - Faction::Blue + Faction::Yellow } } -- cgit v1.2.3