Make scripted unique NPC spawns unavailable as random spawns #75681
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 "Make scripted unique NPC spawns unavailable as random spawns"
Purpose of change
More fixes from just trying to fix one bug. When randomly spawning NPCs, I found some that would not move. Why? Because they were unique NPCs, and had the RETURN_TO_START_POS trait. That's fine, but then they shouldn't be available as random spawns.
Describe the solution
Make them not
common
(disable them from random spawning, their scripted spawns still function as before)The camper spawn by @MNG-cataclysm appears to be seriously bugged. The class introduced in that PR was unused, and the mapgen removal aims at
FM_caravan_merchant_random
, not the NPC that actually spawns with the camper van.I was unable to get the camper to spawn at all, so I'm unsure if there are further problems, but I am confident in my changes to it regardless.
Describe alternatives you've considered
Auditing all the NPC classes. Not today, that's for sure
Testing
Additional context