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

Issue 5979: Force players to use commit when deploying forces #6003

Conversation

psikomonkie
Copy link
Collaborator

Fixes #5979

When deploying forces in Stratcon, the player should be required to hit "commit" on the 2nd deployment window before their primary forces are comitted. This ensures the objective is properly updated.

I also added another message to the 2nd deployment window to make it more clear, and a cancel button per Illiani's request:
image

(displaying this even if there's no leadership units is intentional - it's a chance for the player to realize they don't get any free leadership units and opt to deploy a different force).

@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.35%. Comparing base (fff3c87) to head (51cc8cf).
Report is 23 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6003      +/-   ##
============================================
+ Coverage     10.32%   10.35%   +0.02%     
- Complexity     6118     6141      +23     
============================================
  Files          1038     1038              
  Lines        139295   139326      +31     
  Branches      20662    20668       +6     
============================================
+ Hits          14389    14428      +39     
+ Misses       123466   123456      -10     
- Partials       1440     1442       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

scenarioWizard.setVisible(true);
}
if (selectedScenario != null && !isCommitForces()) {
selectedScenario.resetScenario(campaign);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In particular @IllianiCBT I wanted your thoughts on this line:

I haven't seen any issues with this in my testing. This should only be reachable during the initial deployment. isCommitForces should only return true if the user hit "Commit" on the 2nd deployment popup. So, if the user doesn't hit "commit" we're back where we started - nothing's deployed. It gets... Complicated if we instead try to delay deploying the initial force until after the 2nd deployment popup - a lot of the 2nd popup relies on a force already being deployed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This all looks good to me. I'm going to approve and merge if but I'd like you to see if you can grab a volunteer or two to test it in tonight's nightly.

@IllianiCBT IllianiCBT merged commit 2b3e932 into MegaMek:master Feb 8, 2025
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
None yet
Development

Successfully merging this pull request may close these issues.

[Issue]50.03 Preserve Victory Condition Does Not List Units Correctly
3 participants