Clarify speed option help text (#2082)
Some checks are pending
Enforce issue references for TODOs / Enforce issue references (push) Waiting to run
Haskell-CI-Windows / Haskell-CI - ${{ matrix.os }} - ghc-${{ matrix.ghc }} (3.10.1.0, 9.8.2, windows-latest) (push) Waiting to run
Haskell-CI / Haskell-CI - Linux - ${{ matrix.compiler }} (false, ghc-9.2.8, ghc, 9.2.8, ghcup) (push) Waiting to run
Haskell-CI / Haskell-CI - Linux - ${{ matrix.compiler }} (false, ghc-9.4.8, ghc, 9.4.8, ghcup) (push) Waiting to run
Haskell-CI / Haskell-CI - Linux - ${{ matrix.compiler }} (false, ghc-9.6.5, ghc, 9.6.5, ghcup) (push) Waiting to run
Haskell-CI / Haskell-CI - Linux - ${{ matrix.compiler }} (false, ghc-9.8.2, ghc, 9.8.2, ghcup) (push) Waiting to run
HLint / HLint (push) Waiting to run
Normalize cabal file formatting / Normalize cabal (push) Waiting to run

* 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
This commit is contained in:
Ondřej Šebek 2024-07-29 22:41:42 +02:00 committed by GitHub
parent e98660b0e4
commit 603d7cbb70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)