-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unforbid: ignore tattered items by default #890
Conversation
also adds option to disable ignoring tattered items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks great! Don't forget docs and the changelog
unforbid.lua
Outdated
@@ -22,6 +22,11 @@ local function unforbid_all(include_unreachable, quiet) | |||
if not quiet then print((' unreachable: %s (skipping)'):format(item)) end | |||
goto skipitem | |||
end | |||
|
|||
if ((not options.include_tattered) and item.wear >= 3) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threshold is debatable. Should it be configurable? I can see the player wanting it to match whatever cleanowned
is set to. What should be the default? We should probably match the default cleanowned
command in the control panel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point, the original request was to ignore X
and XX
, which is worn, not tattered, as that is where dwarves start being upset about it
Need to make sure that i fix the function signature so its backwards compatible as well, that change shouldn't be there either, in case something calls externally and expects the old signature. |
reorganize main function parameters for backwards compat
also adds option to disable ignoring tattered items.
this is very much a first pass with minimal testing :)
Fixes DFHack/dfhack#3967