From 276e31ee6793aadf6cde3d021803b78410012ecb Mon Sep 17 00:00:00 2001 From: troido Date: Wed, 23 Sep 2020 13:54:36 +0200 Subject: made step duration, save interval and unloading age configurable arguments --- src/config.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/config.rs') 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, + #[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, + } -- cgit