diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-26 13:15:00 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-26 13:15:00 +0200 |
commit | 9be454fc277d910fe563aac4a792f9a53c32954d (patch) | |
tree | 6ec40f910b81e1923302674a846402ed3502b512 /server/src/state.rs | |
parent | c126d3d3e84fe3b24b42afc7f68f05342988c8c9 (diff) | |
download | hurrycurry-9be454fc277d910fe563aac4a792f9a53c32954d.tar hurrycurry-9be454fc277d910fe563aac4a792f9a53c32954d.tar.bz2 hurrycurry-9be454fc277d910fe563aac4a792f9a53c32954d.tar.zst |
present customers walking through walls
Diffstat (limited to 'server/src/state.rs')
-rw-r--r-- | server/src/state.rs | 13 |
1 files changed, 11 insertions, 2 deletions
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(()) |