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
Bugfixes "NPC not automatically picking up items from their filter list"
Purpose of change
Fix #76377
Describe the solution
Tweak
npc::is_stationary
condition to exclude NPCs that have active missionNPC_MISSION_SHELTER
and are actively following player.Describe alternatives you've considered
Arguably
!is_following
can be used as a separate condition instead, in addition to three existing ones separated by ORs, but I don't have clear understanding on whethermission == NPC_MISSION_SHOPKEEP
andhas_effect( effect_infection )
should also be affected by it. For the first one it would probably be excessive, for the second one I'm not certain, so I decided to not touch the other two.Testing
Tested on experimental abbb6ce and on 0.H c6ba9a2.
Additional context
NPC item pick up can still be quite inconsistent and not work immediately after updating the list due to npc's caching the tiles they already looked at introduced in #33885, but this seems like a problem outside of scope of this issue.