Repository navigation
Let a colonist in uniform recolor apparel when ordered to (v1.5.3) - #27
Merged
Merged
Conversation
…ft, as the direct-order rule promises, and cover the optimizer pause and the recolor guard in the harness Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
beverage
force-pushed
the
fix/recolor-order-on-shift
branch
from
October 21, 2026 11:28
71e51d8 to
ebda377
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
beverage
force-pushed
the
fix/recolor-order-on-shift
branch
from
October 21, 2026 11:38
ebda377 to
f7c6513
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.
With Ideology, the styling station's Recolor apparel order was refused for a colonist on shift.
Pawn_JobTracker.TryTakeOrderedJobloggedTryMakePreToilReservations() returned false right after TryTakeOrderedJob(), and nothing happened. This branch lets the order through, as the README's rules promise ("Right-click orders execute immediately"), and adds a harness case for it. It also carries the draft change note and Workshop comment for v1.5.3 (media/changelog-v1.5.3.bbcode,media/comment-v1.5.3.txt).The bug
Patch_RecolorExecutionGuardprefixesJobDriver_RecolorApparel.TryMakePreToilReservationsand failed it for every pawn on shift. The guard exists for recolor jobs the wardrobe optimizer queued before a colonist went on shift, which survive in the job queue across a load: the driver dyes whatever its apparel queue names, so such a job would dye the stand's uniform, or the colonist's own clothes after a swap had parked them in the stand. The station's order passes through the same method, becauseTryTakeOrderedJobasks for reservations before it queues a job, so it was refused as well.The fix
The on-shift refusal now skips a job with
playerForcedset.TryTakeOrderedJobsets the flag before it asks for reservations, andJob.ExposeDatasaves it, so a queued order keeps it across a load.The other refusal is unchanged and applies to orders too: a job whose apparel queue names a garment parked in an outfit stand still fails, since the colonist no longer wears it. The optimizer pause (
Patch_OptimizeApparelOnShift) is untouched, so a colonist on shift never starts a recolor of their own.What players see
On shift, the order dyes what the colonist wears in the colours set for it in Change style. When that includes the stand's outfit, the outfit goes back to the stand in its new colours, and the next colonist to borrow it wears them.
Testing
HarnessRecolor.RecolorOrderGoesThroughOnShiftuses the default fixture (a colonist on shift, their own garment parked in the stand) and puts a styling station and dye on the pad.Building_StylingStationdoes it, is taken and started, with the colonist still in uniform. An order naming the parked garment fails.The job and the station are Ideology's, so the case is a known gap on a mod list without it.
Results on
270018b, RimWorld 1.7.4984 rev1242:playerForcedexemptionThe last row ran on an earlier draft of the same change, with only that line reverted. The branch was then rebased onto main's rewrite of the harness comments. Built with the commit stamp off (
-p:IncludeSourceRevisionInInformationalVersion=false), the rebased head and270018bgive byte-identical dlls, the shipping build and the harness build alike, so the results above carry over. One run of the second row also failedVacsuitStandStillDresses, a vacuum case that runs long before this one, and passed when run again.check-invariants.pypasses, andcheck-shipped-dll.pypasses on the Release build the runner leaves behind.Not covered
The case stops the order once it has started. Pawns do not walk under the harness, so it never shows the uniform being dyed. A recolor job that was already running when the game saved resumes without asking for reservations, so neither the old guard nor this one reaches it.
Left out on purpose
The dll is not in this branch; it is built and committed at the release merge.
🤖 Generated with Claude Code