summaryrefslogtreecommitdiff
path: root/server/src/state.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-07 23:18:51 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-07 23:18:51 +0200
commit5a7fa266efe6c3a5cb39b173142c0b3a59e68719 (patch)
treefddb2c4e76e1288f2f4885fa0a73794fe300e175 /server/src/state.rs
parent63812b9664a53900fea237823854c1852f7343f4 (diff)
downloadhurrycurry-5a7fa266efe6c3a5cb39b173142c0b3a59e68719.tar
hurrycurry-5a7fa266efe6c3a5cb39b173142c0b3a59e68719.tar.bz2
hurrycurry-5a7fa266efe6c3a5cb39b173142c0b3a59e68719.tar.zst
document commands
Diffstat (limited to 'server/src/state.rs')
-rw-r--r--server/src/state.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/server/src/state.rs b/server/src/state.rs
index e3283c95..d2470983 100644
--- a/server/src/state.rs
+++ b/server/src/state.rs
@@ -19,23 +19,31 @@ pub struct State {
#[derive(Parser)]
#[clap(multicall = true)]
enum Command {
+ /// Start a new game
Start {
+ /// Gamedata specification
#[arg(default_value = "junior")]
spec: String,
+ /// Duration in seconds
#[arg(default_value = "420")]
timer: u64,
},
+ /// Abort the current game
+ End,
+ /// Download recipe/demand/map's source declaration
Download {
+ /// Resource kind
#[arg(value_enum)]
r#type: DownloadType,
+ /// Name
name: String,
},
+ /// List all recipes, demands and maps
List,
- Effect {
- name: String,
- },
+ /// Send an effect
+ Effect { name: String },
+ /// Reload the resource index
Reload,
- End,
}
#[derive(ValueEnum, Clone)]