aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/faction.rs2
-rw-r--r--src/shared/player.rs4
-rw-r--r--src/shared/tower.rs6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/shared/faction.rs b/src/shared/faction.rs
index 2f7ac33..d3086d8 100644
--- a/src/shared/faction.rs
+++ b/src/shared/faction.rs
@@ -1,7 +1,7 @@
use crate::shared::*;
use std::str::FromStr;
-#[derive(Component, Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
+#[derive(Message, Component, Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
pub enum Faction {
Purple,
Yellow,
diff --git a/src/shared/player.rs b/src/shared/player.rs
index d166a7d..606a3b2 100644
--- a/src/shared/player.rs
+++ b/src/shared/player.rs
@@ -58,7 +58,7 @@ impl PlayerBundle {
}
}
-#[derive(Component, Message, Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
+#[derive(Component, Message, Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq)]
pub struct PlayerId(pub ClientId);
#[derive(Component, Message, Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
@@ -67,5 +67,5 @@ pub struct PlayerPosition(pub Vec2);
#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct PlayerColor(pub Color);
-#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq, Default)]
+#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Default)]
pub struct Player;
diff --git a/src/shared/tower.rs b/src/shared/tower.rs
index 4601112..28ccc13 100644
--- a/src/shared/tower.rs
+++ b/src/shared/tower.rs
@@ -62,12 +62,14 @@ impl TowerBundle {
}
}
-#[derive(Component, Default)]
+#[derive(
+ Message, Component, Default, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Debug,
+)]
pub struct Tower {
pub last_target: Option<LastTarget>,
}
-#[derive(Component, Clone, Copy)]
+#[derive(Component, Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct LastTarget {
pub entity: Entity,
pub player_id: PlayerId,