mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
track cart
This commit is contained in:
parent
331a9fe593
commit
1348384ca3
4 changed files with 48 additions and 3 deletions
|
|
@ -451,6 +451,24 @@ impl Kill {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub struct Cart {
|
||||
pub position: Vector,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub enum Objective {
|
||||
Cart(Cart),
|
||||
}
|
||||
|
||||
impl Objective {
|
||||
pub fn as_cart(&self) -> Option<&Cart> {
|
||||
match self {
|
||||
Objective::Cart(cart) => Some(cart),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub struct GameState {
|
||||
|
|
@ -465,6 +483,7 @@ pub struct GameState {
|
|||
pub interval_per_tick: f32,
|
||||
pub outer_map: HashMap<Handle, EntityId>,
|
||||
pub events: Vec<(DemoTick, GameEvent)>,
|
||||
pub objectives: BTreeMap<EntityId, Objective>,
|
||||
}
|
||||
|
||||
impl GameState {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue