Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all deployment variables to BotForce #3991

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

AaronGullickson
Copy link
Member

Currently, BotForce only tracks the starting edge with the variable start 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 from Player in MegaMek to BotForce and assigns them in the GameThread and AtBGameThread. 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 updated CustomizeScenarioDialog. So, this is preparatory work.

I did decide to change the name of the starting edge variable from start to startingPos to make it consistent with the variable names used in Player 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 to BotForce that allows for setting the entire BotForce to deploy on a later round. This is not technically part of the deployment variables in Player but it is a nice convenience function. Otherwise, each individual entity in BotForce 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 in AtBGameThread because there are other ways that deployment round is determined there.

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HammerGS HammerGS merged commit df13e14 into MegaMek:master Apr 14, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants