Skip to content
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

Merged
merged 10 commits into from
Nov 12, 2023
Merged

Conversation

AndrielChaoti
Copy link
Contributor

@AndrielChaoti AndrielChaoti commented Nov 10, 2023

also adds option to disable ignoring tattered items.
this is very much a first pass with minimal testing :)

Fixes DFHack/dfhack#3967

Copy link
Member

@myk002 myk002 left a 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 Show resolved Hide resolved
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
Copy link
Member

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.

Copy link
Contributor Author

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

@AndrielChaoti
Copy link
Contributor Author

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.

docs/unforbid.rst Outdated Show resolved Hide resolved
changelog.txt Outdated Show resolved Hide resolved
@myk002 myk002 merged commit 46d4ea8 into DFHack:master Nov 12, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

option for unforbid to ignore tattered clothes
2 participants