From 9be454fc277d910fe563aac4a792f9a53c32954d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 26 Jun 2024 13:15:00 +0200 Subject: present customers walking through walls --- server/src/state.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'server/src/state.rs') diff --git a/server/src/state.rs b/server/src/state.rs index 98f92a24..08d8516a 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -17,7 +17,11 @@ pub struct State { #[derive(Parser)] #[clap(multicall = true)] enum Command { - Start { spec: String }, + Start { + #[arg(default_value = "default-small-default")] + spec: String, + }, + End, } impl State { @@ -60,7 +64,12 @@ impl State { async fn handle_command(&mut self, command: Command) -> Result<()> { match command { Command::Start { spec } => { - self.game.load(self.index.generate(spec)?); + let data = self.index.generate(spec)?; + self.game.load(data); + } + Command::End => { + self.game + .load(self.index.generate("none-lobby-none".to_string())?); } } Ok(()) -- cgit v1.2.3-70-g09d2