1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 10:34:11 +02:00

game event writing

This commit is contained in:
Robin Appelman 2021-07-18 15:03:26 +02:00
commit a55217cc55
11 changed files with 1021 additions and 844 deletions

View file

@ -12,7 +12,6 @@ use std::cmp::Ordering;
pub struct GameEventDefinition {
pub id: GameEventTypeId,
pub event_type: GameEventType,
pub name: String,
pub entries: Vec<GameEventEntry>,
}
@ -36,7 +35,7 @@ impl Ord for GameEventDefinition {
}
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub struct GameEventEntry {
pub name: String,
pub kind: GameEventValueType,
@ -55,7 +54,7 @@ pub enum GameEventValueType {
Local = 7,
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub enum GameEventValue {
String(String),
Float(f32),
@ -155,7 +154,7 @@ impl EventValue for () {
}
}
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub struct RawGameEvent {
pub event_type: GameEventType,
pub values: Vec<GameEventValue>,