Fix collection of jobs to warehouses#1882
Merged
Flow86 merged 9 commits intoReturn-To-The-Roots:masterfrom Feb 7, 2026
Merged
Conversation
86416e1 to
2a244b4
Compare
Flow86
reviewed
Feb 2, 2026
7c9297e to
c422179
Compare
Unify uses of soldier checks in one place.
It is never used and can cause confusion. `nofPassiveWorker` should be used for transfers to a warehouse.
…ove not used code where goal is nullptr because this can never happen
When the "Collect" option in a warehouse for a job is set the actual job subclass will be created which expects its workplace as the goal, i.e. a `nobUsual` for most. In this situtation the goal is the warehouse to which the figure should go. So check that in `OrderJob` and create a `nofPassiveWorker` instead similar to the `Send` option handler.
c422179 to
05dbd38
Compare
1 task
Flow86
approved these changes
Feb 7, 2026
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.
When the "Collect" option in a warehouse for a job is set the actual job subclass will be created which expects its workplace as the goal, i.e. a
nobUsualfor most.In this situtation the goal is the warehouse to which the figure should go which triggers an assertion.
So check that in
OrderJoband create anofPassiveWorkerinstead similar to theSendoption handler.Contains a bit of #1720 to reduce conflicts
A major role in the misunderstanding was likely the
nofBuildingWorker(const Job job, const MapPoint pos, const unsigned char player, nobBaseWarehouse* goalWh)overload (warehouse last) which was never used but looks intended for this case.nofPassiveWorkerhandles this case already without having to maintain a ctor through the whole hierarchy