fix handling of ticks parameter

develop
Myk Taylor 2023-09-02 02:03:03 -07:00
parent 946e68ae30
commit 6096165eee
No known key found for this signature in database
2 changed files with 5 additions and 4 deletions

@ -29,8 +29,6 @@ Template for new versions:
## New Features
## Fixes
- `tailor`: remove crash caused by clothing items with an invalid ``maker_race``
- `seedwatch`: seedwatch will now ignore (unplantable) tree seeds entirely
## Misc Improvements
@ -64,6 +62,9 @@ Template for new versions:
- Core: fix text getting added to DFHack text entry widgets when Alt- or Ctrl- keys are hit
- `orders`: prevent import/export overlay from appearing on the create workorder screen
- `caravan`: corrected prices for cages that have units inside of them
- `tailor`: remove crash caused by clothing items with an invalid ``maker_race``
- `seedwatch`: seedwatch will now ignore (unplantable) tree seeds entirely
- `autobutcher`: fix ``ticks`` commandline option incorrectly rejecting positive integers as valid values
## Misc Improvements
- Surround DFHack-specific UI elements with square brackets instead of red-yellow blocks for better readability

@ -19,7 +19,7 @@ end
local function process_args(opts, args)
if args[1] == 'help' then
opts.help = true
return
return {}
end
return argparse.processArgsGetopt(args, {
@ -67,7 +67,7 @@ function parse_commandline(opts, ...)
process_races(opts, positionals, 6)
elseif command == 'ticks' then
local ticks = tonumber(positionals[2])
if not is_positive_int(arg) then
if not is_positive_int(ticks) then
qerror('number of ticks must be a positive integer: ' .. ticks)
else
opts.ticks = ticks