Skip to content

Commit

Permalink
Clarify speed option help text (#2082)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
xsebek authored Jul 29, 2024
1 parent e98660b commit 603d7cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/game/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 603d7cb

Please sign in to comment.