Skip to content

Autoclothing fix#5840

Closed
LightHardt wants to merge 2 commits into
DFHack:developfrom
LightHardt:autoclothing-fix
Closed

Autoclothing fix#5840
LightHardt wants to merge 2 commits into
DFHack:developfrom
LightHardt:autoclothing-fix

Conversation

@LightHardt

Copy link
Copy Markdown
Contributor

When printing out the values of variables along the path for validating the material type I saw that requirement.material_category.whole was 0. So in the armorFlagsMatch function it was trying to check bits that weren't set. From a quick look over it seemed the purpose is just to check that the user specified a material that is valid for the armor wanted. With this in mind I passed in the material_category that the user wants and in game was able to get the desired behavior of creating orders of cloth gloves. I also saw the desired behavior of invalid material type when i tried ordering wood gloves.

This tries to fix #5837, please let me know if any issues

@ab9rf

ab9rf commented Jul 10, 2026

Copy link
Copy Markdown
Member

There is a material_requirement variable inside of a ClothingRequest which should be used here instead of passing it separately. If the material_requirement inside the request isn't being set correctly, the fix is to correct the constructor, not to pass that information along separately

@LightHardt

Copy link
Copy Markdown
Contributor Author

@ab9rf Understood. See you put a fix up will close this one.

@LightHardt LightHardt closed this Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autoclothing order parsing: material not matching

2 participants