@@ 6,6 6,7 @@
* See LICENSE for licensing information.
*/
+use bevy::prelude::*;
use std::collections::HashMap;
use serde::{Deserialize, Serialize};
@@ 70,15 71,18 @@ pub struct PlayerStatus {
}
/// constructed from a vector of [`Action`]s
-#[derive(Clone)]
+#[derive(Clone, Reflect, FromReflect)]
pub struct GameStatus {
/// log entries, filled in one at a time when parsing actions
pub log: Vec<LogEntry>,
/// a modifiable Actions Vector, will be modified when parsing actions,
/// used for showing the log
+ #[reflect(ignore)]
pub actions: Vec<Action>,
+ #[reflect(ignore)]
pub supply_piles: Vec<SupplyPile>,
/// player ids mapped to statuses
+ #[reflect(ignore)]
pub players: HashMap<String, PlayerStatus>,
}
@@ 91,7 95,7 @@ impl GameStatus {
}
}
-#[derive(Clone)]
+#[derive(Clone, Reflect, FromReflect)]
pub struct LogEntry {
pub sections: Vec<LogSection>,
}
@@ 104,7 108,7 @@ impl LogEntry {
}
}
-#[derive(Clone)]
+#[derive(Clone, Reflect, FromReflect)]
pub enum LogSection {
Normal(String),
Bold(String),
@@ 50,7 50,6 @@ impl Plugin for GamePlugin {
#[reflect(Resource)]
pub struct GameData {
pub game: Option<Game>,
- #[reflect(ignore)]
pub game_status: Option<GameStatus>,
pub locked: bool,