diff options
| author | troido <troido@protonmail.com> | 2020-09-23 13:54:36 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-09-23 13:54:36 +0200 |
| commit | 276e31ee6793aadf6cde3d021803b78410012ecb (patch) | |
| tree | 069b5274f2a33e4d65b1d3e418fd24a63c12a763 /src/config.rs | |
| parent | 00a590a42edd7538c61dacbc4224c1adfc1e6414 (diff) | |
made step duration, save interval and unloading age configurable arguments
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 0adeb9e..ea1cab1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -20,7 +20,17 @@ pub struct Config { pub user_dir: Option<PathBuf>, + #[structopt(long, env="USER", help="The name(s) of the server admin(s)")] pub admins: String, + #[structopt(long, default_value="100", help="The time (in milliseconds) between two steps")] + pub step_duration: u64, + + #[structopt(long, default_value="300", help="The time (in steps) between two saves")] + pub save_interval: i64, + + #[structopt(long, default_value="300", help="The time (in steps) between the last player leaving a room and the room getting unloaded. Unloading is only done when the rooms are saved, so it could actually take up to save_interval more steps")] + pub unload_age: i64, + } |
