use serde::Serialize;
use crate::analyzer::decoder::{ArtillerySalvo, Consumable, DeathCause, TorpedoData};
use crate::types::{EntityId, GameClock, GameParamId, NormalizedPos, PlaneId, WorldPos};
#[derive(Debug, Clone, Serialize)]
pub struct ShipPosition {
pub entity_id: EntityId,
pub position: WorldPos,
pub yaw: f32,
pub pitch: f32,
pub roll: f32,
pub last_updated: GameClock,
}
#[derive(Debug, Clone, Serialize)]
pub struct MinimapPosition {
pub entity_id: EntityId,
pub position: NormalizedPos,
pub heading: f32,
pub visible: bool,
pub last_updated: GameClock,
}
#[derive(Debug, Clone, Default, Serialize)]
pub struct CapturePointState {
pub index: usize,
pub position: Option<WorldPos>,
pub radius: f32,
pub control_point_type: i32,
pub team_id: i64,
pub invader_team: i64,
pub progress: (f64, f64),
pub has_invaders: bool,
pub both_inside: bool,
pub is_enabled: bool,
}
#[derive(Debug, Clone, Serialize)]
pub struct BuffZoneState {
pub entity_id: EntityId,
pub position: WorldPos,
pub radius: f32,
pub team_id: i64,
pub is_active: bool,
pub drop_params_id: Option<GameParamId>,
}
#[derive(Debug, Clone, Serialize)]
pub struct CapturedBuff {
pub params_id: GameParamId,
pub team_id: i64,
pub clock: GameClock,
}
#[derive(Debug, Clone, Default, Serialize)]
pub struct TeamScore {
pub team_index: usize,
pub score: i64,
}
#[derive(Debug, Clone, Serialize)]
pub struct ActiveConsumable {
pub consumable: Consumable,
pub activated_at: GameClock,
pub duration: f32,
}
#[derive(Debug, Clone, Default, Serialize)]
pub struct BuildingEntity {
pub id: EntityId,
pub position: WorldPos,
pub is_alive: bool,
pub is_hidden: bool,
pub is_suppressed: bool,
pub team_id: i8,
pub params_id: GameParamId,
}
#[derive(Debug, Clone, Default, Serialize)]
pub struct SmokeScreenEntity {
pub id: EntityId,
pub radius: f32,
pub position: WorldPos,
pub points: Vec<WorldPos>,
}
#[derive(Debug, Clone, Serialize)]
pub struct ActiveShot {
pub entity_id: EntityId,
pub salvo: ArtillerySalvo,
pub fired_at: GameClock,
}
#[derive(Debug, Clone, Serialize)]
pub struct ActiveTorpedo {
pub entity_id: EntityId,
pub torpedo: TorpedoData,
pub launched_at: GameClock,
}
#[derive(Debug, Clone, Serialize)]
pub struct ActivePlane {
pub plane_id: PlaneId,
pub owner_id: EntityId,
pub team_id: u32,
pub params_id: GameParamId,
pub x: f32,
pub y: f32,
pub last_updated: GameClock,
}
#[derive(Debug, Clone, Serialize)]
pub struct KillRecord {
pub clock: GameClock,
pub killer: EntityId,
pub victim: EntityId,
pub cause: DeathCause,
}
#[derive(Debug, Clone, Serialize)]
pub struct DeadShip {
pub clock: GameClock,
pub position: WorldPos,
}