-
Notifications
You must be signed in to change notification settings - Fork 176
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
fixes for multiple stratcon issues; objective display improvement #2756
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2756 +/- ##
============================================
- Coverage 10.60% 10.59% -0.02%
+ Complexity 3853 3845 -8
============================================
Files 717 717
Lines 99774 99804 +30
Branches 16404 16413 +9
============================================
- Hits 10585 10573 -12
- Misses 87812 87844 +32
- Partials 1377 1387 +10
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things first
case AnyScenarioVictory: | ||
case SpecificScenarioVictory: | ||
// you can fail this if the scenario goes away somehow | ||
return getCurrentObjectiveCount() == OBJECTIVE_FAILED; | ||
case AlliedFacilityControl: | ||
// you can fail this by having the facility destroyed | ||
StratconFacility alliedFacility = trackState.getFacility(getObjectiveCoords()); | ||
return alliedFacility == null; | ||
case HostileFacilityControl: | ||
// you can fail this by having the facility destroyed | ||
StratconFacility hostileFacility = trackState.getFacility(getObjectiveCoords()); | ||
return hostileFacility == null; | ||
case FacilityDestruction: | ||
// you can't really permanently fail this | ||
return false; | ||
default: | ||
// we shouldn't be here, but just in case | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent switch
default: | ||
// we shouldn't be here, but just in case | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also... this shouldn't line up with the method end
MekHQ/src/mekhq/gui/StratconTab.java
Outdated
@@ -291,6 +295,8 @@ private String buildShortStrategicObjectiveText(StratconCampaignState campaignSt | |||
private String buildStrategicObjectiveText(StratconCampaignState campaignState) { | |||
StringBuilder sb = new StringBuilder(); | |||
|
|||
boolean contractIsActive = campaignState.getContract().isActiveOn(getCampaignGui().getCampaign().getLocalDate()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable is useless given it is used a grand total of once, and isn't required at all times.
Changes made, plus a data fix for an annoying issue where hostile off-board artillery would count towards primary scenario objectives. |
o indicates an in-progress objective (not complete, not failed, colored orange)
x indicates a failed objective (no way to complete, red colored)
checkmark indicates a completed objective (green colored)