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

Updated StratCon Status Message for Inactive Contracts #4880

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MekHQ/src/mekhq/campaign/personnel/death/AbstractDeath.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public Map<Gender, Map<TenYearAgeRange, WeightedDoubleMap<PersonnelStatus>>> get

/**
* This is used to determine if a person can die.
*
*
* @param person the person to determine for
* @param ageGroup the age group of the person in question
* @param randomDeath if this is for random death or manual death
Expand Down Expand Up @@ -144,7 +144,7 @@ public Map<Gender, Map<TenYearAgeRange, WeightedDoubleMap<PersonnelStatus>>> get
// region New Day
/**
* Processes new day random death for an individual.
*
*
* @param campaign the campaign to process
* @param today the current day
* @param person the person to process
Expand Down
9 changes: 4 additions & 5 deletions MekHQ/src/mekhq/gui/StratconTab.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MegaMek - Copyright (C) 2020 - The MegaMek Team
* MegaMek - Copyright (C) 2020-2024 - The MegaMek Team
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -194,7 +194,7 @@ public void updateCampaignState() {
// current support points
TrackDropdownItem currentTDI = (TrackDropdownItem) cboCurrentTrack.getSelectedItem();
if (currentTDI == null) {
campaignStatusText.setText("No active contract selected.");
campaignStatusText.setText("No active contract selected, or contract has not started.");
expandedObjectivePanel.setVisible(false);
return;
}
Expand Down Expand Up @@ -347,7 +347,7 @@ private String buildStrategicObjectiveText(StratconCampaignState campaignState)
break;
case AnyScenarioVictory:
sb.append("Engage and defeat hostile forces in ")
.append(objective.getCurrentObjectiveCount()).append("/")
.append(objective.getCurrentObjectiveCount()).append('/')
.append(objective.getDesiredObjectiveCount())
.append(" scenarios on ").append(track.getDisplayableName());
break;
Expand Down Expand Up @@ -471,10 +471,9 @@ public String toString() {

@Override
public boolean equals(Object other) {
if (!(other instanceof TrackDropdownItem)) {
if (!(other instanceof TrackDropdownItem otherTDI)) {
return false;
} else {
TrackDropdownItem otherTDI = (TrackDropdownItem) other;
return otherTDI.contract.equals(this.contract) && otherTDI.track.equals(this.track);
}
}
Expand Down