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

manually set TO&E force commander #3772

Merged

Conversation

NickAragua
Copy link
Member

Implements #3540 by allowing the manual selection of a force commander from the TO&E menu if there's more than one "highest rank". Automatically updates the force commander if a unit/person is added/removed from the force/campaign.

@MegaMek MegaMek deleted a comment from codecov bot Oct 25, 2023
Copy link
Contributor

@Windchild292 Windchild292 left a comment

Choose a reason for hiding this comment

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

One improvement, otherwise this looks god

MekHQ/src/mekhq/gui/adapter/TOEMouseAdapter.java Outdated Show resolved Hide resolved
Co-authored-by: Justin Bowen <39067288+Windchild292@users.noreply.github.com>
@SJuliez
Copy link
Member

SJuliez commented Dec 19, 2023

I've committed the suggestion which seemed valid. Hope I didnt destroy anything.

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 59 lines in your changes are missing coverage. Please review.

Comparison is base (e272aa6) 10.63% compared to head (3997226) 10.62%.
Report is 64 commits behind head on master.

Files Patch % Lines
MekHQ/src/mekhq/campaign/force/Force.java 0.00% 33 Missing ⚠️
MekHQ/src/mekhq/gui/adapter/TOEMouseAdapter.java 0.00% 15 Missing ⚠️
MekHQ/src/mekhq/campaign/Campaign.java 0.00% 6 Missing ⚠️
MekHQ/src/mekhq/gui/TOETab.java 0.00% 2 Missing ⚠️
MekHQ/src/mekhq/gui/view/ForceViewPanel.java 0.00% 2 Missing ⚠️
MekHQ/src/mekhq/campaign/force/Lance.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3772      +/-   ##
============================================
- Coverage     10.63%   10.62%   -0.01%     
+ Complexity     5473     5472       -1     
============================================
  Files           834      834              
  Lines        113770   113854      +84     
  Branches      17196    17203       +7     
============================================
+ Hits          12099    12101       +2     
- Misses       100465   100546      +81     
- Partials       1206     1207       +1     

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

@NickAragua
Copy link
Member Author

Still waiting on uploaded save from bug report

@Thom293
Copy link
Contributor

Thom293 commented Jan 7, 2024

Still waiting on uploaded save from bug report

Did you mean mine? Sorry did you need something else?

#3781

@HammerGS
Copy link
Member

HammerGS commented Jan 9, 2024

Going to hold of merging until @NickAragua confirms its good to go.

@Thom293
Copy link
Contributor

Thom293 commented Feb 13, 2024

Sorry I missed the fix posted earlier. Tested it just now.

Seems to work great. If someone set as commander is moved from a lance, their command flag is wiped and the next highest rank is then listed as commander. Can select any equals as commander, move them, and it causes no more issues. Looks good to me.

You or anyone is welcome to ping me on discord. wont bother me at all. Sorry I missed.

@NickAragua NickAragua merged commit 105e37f into MegaMek:master Feb 13, 2024
5 of 6 checks passed
@NickAragua NickAragua deleted the manual_force_commander_assignment branch February 13, 2024 03:44
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.

5 participants