Add all deployment variables to BotForce #3991
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.
Currently,
BotForce
only tracks the starting edge with the variablestart
despite the fact that we now have several more variables that can be used to basically set up any deployment zone on a map. This PR brings in the additional deployment variables fromPlayer
in MegaMek toBotForce
and assigns them in theGameThread
andAtBGameThread
. Given that the only place to currently set these parameters is story arcs, it doesn't have any practical use at the moment, but will be very useful to story arcs. Furthermore PR #3931 will be able to allow users to set these new variables in an updatedCustomizeScenarioDialog
. So, this is preparatory work.I did decide to change the name of the starting edge variable from
start
tostartingPos
to make it consistent with the variable names used inPlayer
and to reduce variable name ambiguity. I refactored the get/set methods appropriately and I added a legacy check to to the XML reader for reverse compatability.I also added a
deployRound
variable toBotForce
that allows for setting the entireBotForce
to deploy on a later round. This is not technically part of the deployment variables inPlayer
but it is a nice convenience function. Otherwise, each individual entity inBotForce
has to be edited for deployment round. I actually already implemented this as part of the Story Arcs PR #2997, but it made more sense to include it here for record keeping and thematically. This deployRound variable is ignored inAtBGameThread
because there are other ways that deployment round is determined there.