Skip to content
Merged
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
18 changes: 9 additions & 9 deletions MekHQ/src/mekhq/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -5422,9 +5422,10 @@ public void writeToXML(final PrintWriter writer, boolean isBugReportPrep) {
CampaignOptionsMarshaller.writeCampaignOptionsToXML(getCampaignOptions(), writer, indent);
}

// We've had instances where game options isn't loaded correctly from player campaigns, potentially due to
// age. This safeguards.
if (true) {
// We've had instances where game options aren't loaded correctly from player campaigns, potentially due to
// age. This safeguards against that occurance, preventing players entering a state where they cannot
// continue their campaigns.
if (gameOptions == null) {
gameOptions = new GameOptions();
LOGGER.errorDialog(new NullPointerException(),
getTextAt(RESOURCE_BUNDLE, "gameOptions.save.failure.body"),
Expand Down Expand Up @@ -7114,16 +7115,16 @@ public void resetTempCrewPoolForRole(PersonnelRole role) {


/**
* Releases surplus AsTechs from the pool, keeping only what is currently needed.
* If the pool already has fewer than needed, no change is made.
* Releases surplus AsTechs from the pool, keeping only what is currently needed. If the pool already has fewer than
* needed, no change is made.
*/
public void releaseSurplusAsTechPool() {
humanResources.releaseSurplusAsTechPool(this);
}

/**
* Releases surplus Medics from the pool, keeping only what is currently needed.
* If the pool already has fewer than needed, no change is made.
* Releases surplus Medics from the pool, keeping only what is currently needed. If the pool already has fewer than
* needed, no change is made.
*/
public void releaseSurplusMedicPool() {
humanResources.releaseSurplusMedicPool(this);
Expand All @@ -7133,8 +7134,7 @@ public void releaseSurplusMedicPool() {
* Releases surplus temp crew for a specific blob crew role.
*
* <p>For each unit, any assigned temp crew beyond what the unit needs (i.e., where real crew
* already fills or exceeds {@code fullCrewSize}) is removed. The unassigned pool is then
* emptied.</p>
* already fills or exceeds {@code fullCrewSize}) is removed. The unassigned pool is then emptied.</p>
*
* @param role the personnel role to trim
*/
Expand Down