basecamps: add an emergency recall option #34560
Merged
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
SUMMARY: Features "basecamps: add an emergency recall option"
Purpose of change
Fixes #31872
Some basecamps are getting stuck in extremely weird states, where an NPC is shown as having completed a mission but can't be selected for recall.
Add the option to recall any NPC that has been on a mission for more than 24 hours. This cancels the mission without refunding any resources, but can be used to recover NPCs that are otherwise
stuck.
Describe the solution
Add a new parameter to
mission_companion_choose_return()
calledby_mission
that defaults totrue
. Ifby_mission
isfalse
, themission_id
check to determine whether a companion is valid to return is skipped.Added an emergency recall mission that works with all camp workers, has a variable deadline of more than 24 hours, and uses a special return function that directly calls
mission_companion_choose_return()
withby_mission = false
.Alternate Solutions
I need to look at the timed events code so that NPCs return automatically when their missions are complete.
Additional context
Tested by retrieving the 3 companions who could not be recalled normally from the save game in #31872. Also sent out a companion and verified that the emergency recall option didn't happen until 24 hours had passed.