Fixes overmap vehicle tracking/remembering with bike rack #37467
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 "Fixes overmap vehicle tracking/remembering with bike rack"
Purpose of change
Closes #37311
When the player chooses to 'Remember Vehicle Position', the overmap tracking is lost when the vehicle is loaded and unloaded on a bike rack. This leads to annoying situations where a tracked shopping cart gets lost after unloading, without the player ever having chosen to forget it.
Describe the solution
This PR incorporates a new vehicle part integer flag called 'tracked_flag' that is assigned when a vehicle with tracking turned on is carried on a bike rack. When the bike rack is unloaded, the vehicle is added back to the overmap for tracking.
The way it works is that a tracked-vehicle loaded on a bike rack stops being tracked until it's unloaded, and then tracking is automatically enabled.
Describe alternatives you've considered
I considered adding functionality to track an individual vehicle part on the overmap - to allow racked vehicles to be tracked on the map while being carried. That seemed extraneous for just one bugfix.
Testing
I built CDDA in Visual Studio 2019 and tested various combinations of racking one or multiple vehicles with/without tracking them. My changes seem to work as expected.
Note that unloading a tracked vehicle sends the same message to the player as turning on tracking normally. "You start keeping track of this vehicle's position". I don't consider this a problem.
Additional context
None