idle-crafting: add cloth, silk, and yarn crafts - #1618
Open
Alistair-Afton wants to merge 1 commit into
Open
Alistair-Afton wants to merge 1 commit into
Alistair-Afton wants to merge 1 commit into
Conversation
The tool only supported bone, horn, shell, rock, and totem crafting. Cloth crafts require clothesmaking labor and come in three material categories the game distinguishes via job.material_category plus a job_item flags2 bit: plant-fiber cloth (flags2.plant), silk (flags2.silk), and yarn (flags2.yarn), matching the pattern strangemood uses for mood cloth requirements. For workshops with input stockpile links, cloth in linked piles is counted by category and folded into the weighted random job choice. For workshops without links, clothesmaking is tried after stonecrafting and bone carving when usable cloth exists on the map. Workshop profiles that block clothesmaking now correctly report invalid only when all three supported labors are blocked, and the overlay toggle enables workshops where clothesmaking is the only permitted craft labor.
Alistair-Afton
force-pushed
the
idle-crafting-cloth
branch
from
September 15, 2026 03:16
f747ecc to
5bd2bc1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds clothesmaking support to
idle-crafting(DFHack/dfhack#5851). Plant-fiber cloth, silk, and yarn are distinguished via material flags and becomeMakeCraftsjobs with the matchingmaterial_categoryandjob_itemflags2bit — the same patternstrangemooduses for mood cloth requirements.CLOTHESMAKERlabor is respected in job selection and profile validation, so workshops where clothesmaking is the only permitted craft labor now work correctlyNew
test/idle-crafting.luasuite (7 tests); docs and changelog updated.Testing
test -t cloth: 7/7 tests pass in-gameci/lint.pyclean