Tacoma Commune: fix caravans splitting #50702
Closed
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 "Tacoma Commune: fix caravans splitting"
Purpose of change
By talking to the crop overseer at the Tacoma Commune you can send
followers on a caravan to the refugee center. The caravans are sometimes
attacked by raiders. It is supposed to be possible to send multiple
followers in one caravan to make it better defended. The issue is that
when you recover followers from the caravan the game behaves as if each
follower went on a separate caravan and if one of the caravans is
attacked the rest don't help.
To reproduce:
Version:
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Bionic Professions [package_bionic_professions]
]
This code looks suspect:
Cataclysm-DDA/src/mission_companion.cpp
Lines 763 to 768 in 998d767
Cataclysm-DDA/src/mission_companion.cpp
Lines 792 to 807 in 998d767
Describe the solution
Randomize the time once per caravan instead of once for each follower
Describe alternatives you've considered
None
Testing
Additional context