Repository navigation
Let a crafter store a bill's product in uniform inside a radius or area (v1.5.5) - #29
Merged
Merged
Conversation
…'s radius or area Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
At a radius or area stand, a crafter on shift changed out of uniform to store each finished bill's product, even with the stockpile inside the ring or the area. A player reported it on the Workshop page. This branch judges that haul at the stockpile: inside the ring or the area they carry the stack there in uniform, and past the edge they still change back first. It also carries the draft change note and Workshop comment for v1.5.5 (
media/changelog-v1.5.5.bbcode,media/comment-v1.5.5.txt).The bug
When a bill finishes,
Toils_Recipe.FinishRecipeAndStartStoringProductputs the product in the crafter's hands and starts a newHaulToCellwith noworkGiverDef. With no giver the job has no work type, soStaysDressedfound nothing the stand served, and the return trip inserted a swap ahead of the haul. The swap's drop put the stack down at the bench. The crafter walked to the stand, came back for the stack in their own clothes, stored it, and walked back to the stand to dress for the next bill.Room stands never did this. A room stand asks only whether the job's target is in the room, and this haul's target is the stack in the crafter's hands, so at a bench in the room the answer is yes wherever the stockpile is.
The fix
StoresServedBillProductpicks this haul out, andStaysDressedanswers it withPlaceCovered(job.targetB, ...), which tests the storage cell against the ring or the area. It needs all of these:HaulToCellwith no giverJobDriver_DoBillas the current driver, which it still is when the prefix onStartJobrunsThe rule follows the bill's work type, so Hauling does not have to be ticked. A haul that fails any of the four takes the path it took before.
What players see
With the stockpile inside the ring or the area, the crafter stores the stack in uniform and goes straight to the next bill. With it past the edge, nothing changes: they put the stack down at the bench, change back, haul it in their own clothes and dress again. Bills set to drop on the floor start no haul, and room stands behave as they did.
Testing
HarnessCatchments.BillProduct.csadds 13 cases. Each runs a realDoBillat a stonecutter's table to its last toil, with the crafter already standing at the bench, and reads what the stand does when the haul starts.Results on
1f20ef0, RimWorld 1.7.4998 rev1299. The mod list for every row is Harmony, Core, Odyssey, Shift Change and the lab's console agent:JobDriver_DoBillcheckThe room cases pass with the rule on or off. Every row below the first ran on a throwaway copy of this head with that one change. An earlier run of the "every place" change also failed
and the first cell past the ring is not, a check on the ring's own cells that starts no job. The run in the table did not.The 7 known gaps are Outfit Stands Plus, Complex Jobs, Common Sense, Pick Up And Haul, the Ideology recolor case and two Rimatomics cases, none of them on this mod list.
The cases stop when the haul starts, so a one-off trace followed two bills to the end with the clock moved by hand. It ran on a scratch copy with the same
Patch_JobInterception.csas this head and a temporary case that is not on the branch. The first row is the same trace on the code before the fix:check-invariants.pypasses, andcheck-shipped-dll.pypasses on the Release build the runner leaves behind.Not covered
Nobody has played this in a real game yet: the evidence is the harness and the trace, on a test map with one crafter. Mods that add their own bill drivers or their own product hauls were not run. A driver that does not derive from
JobDriver_DoBillfalls outside the rule and takes the old path.Left out on purpose
An ordinary haul at a stand with Hauling ticked is still judged at the stack alone, not at the stockpile. That comes from reading the code, not a run, and changing it means changing the arm that dresses for hauling as well, so it stays out of this fix.
Room stands keep their rule, so a crafter at one still carries a product past the door in uniform, as they always have.
The dll is not in this branch; it is built and committed at the release merge.
🤖 Generated with Claude Code