From 603d7cbb70cbc6f55f5ce47102d60a3dfcf15d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0ebek?= <44544735+xsebek@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:41:42 +0200 Subject: [PATCH] Clarify speed option help text (#2082) * update CLI option help: ``` -m,--speed N Initial game speed. Counted as 2^N ticks per second, default is 4 meaning 16.0 t/s. ``` * closes #2078 --- app/game/Main.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/game/Main.hs b/app/game/Main.hs index c59a16b1..e260f1eb 100644 --- a/app/game/Main.hs +++ b/app/game/Main.hs @@ -119,7 +119,17 @@ cliParser = autoplay :: Parser Bool autoplay = switch (long "autoplay" <> short 'a' <> help "Automatically run the solution defined in the scenario, if there is one. Mutually exclusive with --run.") speedFactor :: Parser Int - speedFactor = option auto (long "speed" <> short 'm' <> value defaultInitLgTicksPerSecond <> help "Initial game speed multiplier") + speedFactor = option auto (long "speed" <> short 'm' <> metavar "N" <> value defaultInitLgTicksPerSecond <> help speedFactorHelp) + speedFactorHelp = + unwords + [ "Initial game speed." + , "Counted as 2^N ticks per second, default is" + , show defaultInitLgTicksPerSecond + , "meaning" + , show $ 2 ** fromIntegral @Int @Double defaultInitLgTicksPerSecond + , "t/s." + , "(Negative values are allowed, e.g. -3 means 1 tick per 8 sec.)" + ] cheat :: Parser Bool cheat = switch (long "cheat" <> short 'x' <> help "Enable cheat mode. This allows toggling Creative Mode with Ctrl+v and unlocks \"Testing\" scenarios in the menu.") color :: Parser (Maybe ColorMode)