aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-24 05:46:03 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-24 05:46:03 +0100
commit9572af0b8173ada042e654dc0c7c342d58eefc92 (patch)
treea33837263a6985e9b0e9b94f5aaab907d7aa1612
parent3bfcf00baeb7c0a2e1b45aa9038c80dc24e37214 (diff)
chore: change factions to purple/yellow
-rw-r--r--src/main.rs2
-rw-r--r--src/server.rs8
-rw-r--r--src/shared/faction.rs14
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<EntityMap>) {
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<EntityMap>) {
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<EntityMap>) {
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<EntityMap>) {
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<Faction, String> {
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
}
}