mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
todos
This commit is contained in:
parent
1348384ca3
commit
149c4e2339
4 changed files with 38 additions and 2 deletions
|
|
@ -456,15 +456,23 @@ pub struct Cart {
|
|||
pub position: Vector,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub struct ControlPoint {
|
||||
pub owner: Team,
|
||||
pub cap_percentage: f32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub enum Objective {
|
||||
Cart(Cart),
|
||||
ControlPoint(ControlPoint),
|
||||
}
|
||||
|
||||
impl Objective {
|
||||
pub fn as_cart(&self) -> Option<&Cart> {
|
||||
match self {
|
||||
Objective::Cart(cart) => Some(cart),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue