Add replay system
This commit is contained in:
+10
@@ -1,5 +1,6 @@
|
||||
use bevy::prelude::*;
|
||||
use clap::Parser;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Parser, Debug, Clone, Resource)]
|
||||
#[command(version, about, long_about = None)]
|
||||
@@ -12,4 +13,13 @@ pub struct Args {
|
||||
pub check_distance: usize,
|
||||
#[clap(long, default_value_t = 1)]
|
||||
pub players: usize,
|
||||
/// Record a replay to this path.
|
||||
#[clap(long, conflicts_with = "play_replay")]
|
||||
pub record_replay: Option<PathBuf>,
|
||||
/// Play a replay from this path.
|
||||
#[clap(long, conflicts_with = "record_replay")]
|
||||
pub play_replay: Option<PathBuf>,
|
||||
/// Replay output format. JSON is useful for inspection; binary is compact.
|
||||
#[clap(long, value_enum, default_value_t = crate::replay::ReplayFormat::Binary)]
|
||||
pub replay_format: crate::replay::ReplayFormat,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user