Fix: #7007 Fixed Cancel Deployment Producing Scenario with 0 BV Budget #7009
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.
Fix #7007
When a player deploys to a hidden scenario we generate the scenario, including the BV budget of forces assigned to that scenario. However, if the player cancels deployment - at that moment - the budget was getting set to 0 because we were not correctly resetting the scenario. This was due to the conditional that checked for the deployment being canceled was not functioning fully. However, as the force didn't get deployed it gave the impression that it was fully functional.
We fixed this by added a new variable to the deployment wizard that explicitly states whether the deployment was canceled. If that event comes to pass the scenario is reset fully. However, the originally generated force is not, preventing the 0 BV bug.
Design Notes
The cancel deployment bug is a hacky solution to a UX problem and one we should really rethink. However, such a task isn't on my schedule so would need to be picked up by another developer. Basically the problem we have to solve is that players sometimes want to backtrack out of deployment. However, if the player force is 'ambushed' (i.e. the scenario is populated at point of deployment) the player should - at that point - be barred from canceling the deployment as their force has been ambushed.