Add the AirDef tablet web panel and battle archive (#153)
This commit is contained in:
@@ -162,6 +162,7 @@ impl Recording {
|
||||
pub fn blank(len: u32) -> Self {
|
||||
Recording {
|
||||
number: 1,
|
||||
started_at: 0,
|
||||
origin: DVec3::ZERO,
|
||||
len,
|
||||
tracks: Vec::new(),
|
||||
@@ -416,6 +417,10 @@ pub struct SceneJournal {
|
||||
}
|
||||
|
||||
impl SceneJournal {
|
||||
pub fn track_limit_reached(&self) -> bool {
|
||||
self.track_events >= MAX_SCENE_TRACK_EVENTS
|
||||
}
|
||||
|
||||
/// Read-only transitions in chronological order.
|
||||
pub fn events(&self) -> &[SceneEvent] { &self.events }
|
||||
|
||||
@@ -577,6 +582,7 @@ impl Tally {
|
||||
pub struct Recording {
|
||||
/// Which raid of the session (1, 2, …).
|
||||
pub number: u32,
|
||||
pub started_at: u64,
|
||||
pub origin: DVec3,
|
||||
/// Its length in ticks.
|
||||
pub len: u32,
|
||||
@@ -830,6 +836,7 @@ impl Recording {
|
||||
let origin = sim.targets.first().copied().or_else(|| sim.sams.first().map(|s| s.pos)).unwrap_or(DVec3::ZERO);
|
||||
Recording {
|
||||
number,
|
||||
started_at: sim.tick,
|
||||
origin: origin.floor(),
|
||||
len: 0,
|
||||
tracks: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user