Merge pull request #4117 from myk002/myk_misery

[misery] fix handing of misery factor setting
develop
Myk 2023-12-31 11:34:05 -08:00 committed by GitHub
commit 2644f928b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

@ -59,6 +59,7 @@ Template for new versions:
## Fixes
- `sort`: fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
- `sort`: fix potential crash when removing jobs directly from the Tasks info screen
- `misery`: fix error when changing the misery factor
## Misc Improvements
- wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown

@ -22,17 +22,17 @@ function parse_commandline(...)
local args, opts = {...}, {}
local positionals = process_args(opts, args)
if opts.help then
if opts.help or not positionals then
return false
end
local command = table.remove(positionals, 1)
if not command or command == 'status' then
status()
elseif command == 'factor' then
misery_setFactor(positionals[1])
elseif command == 'clear' then
misery_clear()
elseif tonumber(command) then
misery_setFactor(tonumber(command))
else
return false
end