diff --git a/MekHQ/src/mekhq/campaign/personnel/autoAwards/MiscAwards.java b/MekHQ/src/mekhq/campaign/personnel/autoAwards/MiscAwards.java index 0fdc54f05c..6dcac12bec 100644 --- a/MekHQ/src/mekhq/campaign/personnel/autoAwards/MiscAwards.java +++ b/MekHQ/src/mekhq/campaign/personnel/autoAwards/MiscAwards.java @@ -19,13 +19,6 @@ package mekhq.campaign.personnel.autoAwards; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.ResourceBundle; -import java.util.UUID; - import megamek.common.annotations.Nullable; import mekhq.MekHQ; import mekhq.campaign.Campaign; @@ -38,14 +31,16 @@ import mekhq.campaign.universe.PlanetarySystem; import mekhq.campaign.universe.RandomFactionGenerator; +import java.time.LocalDate; +import java.util.*; + public class MiscAwards { /** * This function processes miscellaneous awards for a given person in a * campaign. * It checks the eligibility of the person for each type of award and returns a - * map - * of eligible awards grouped by their respective IDs. + * map of eligible awards grouped by their respective IDs. * * @param campaign the current campaign * @param mission the mission just completed (null if no mission @@ -64,9 +59,8 @@ public class MiscAwards { * @return a map of eligible awards grouped by their respective IDs */ public static Map> MiscAwardsProcessor(Campaign campaign, @Nullable Mission mission, - UUID person, List awards, - Boolean missionWasSuccessful, boolean isCivilianHelp, @Nullable Integer killCount, - @Nullable Integer injuryCount, @Nullable UUID supportPersonOfTheYear) { + UUID person, List awards, Boolean missionWasSuccessful, boolean isCivilianHelp, + @Nullable Integer killCount, @Nullable Integer injuryCount, @Nullable UUID supportPersonOfTheYear) { List eligibleAwards = new ArrayList<>(); for (Award award : awards) { @@ -102,7 +96,7 @@ public static Map> MiscAwardsProcessor(Campaign campaign, } } case "prisonerofwar" -> { - if (prisonerOfWar(campaign, award, person)) { + if (mission != null && prisonerOfWar(campaign, award, person)) { eligibleAwards.add(award); } } diff --git a/MekHQ/src/mekhq/campaign/personnel/death/AbstractDeath.java b/MekHQ/src/mekhq/campaign/personnel/death/AbstractDeath.java index 53988dce0b..29ee8487de 100644 --- a/MekHQ/src/mekhq/campaign/personnel/death/AbstractDeath.java +++ b/MekHQ/src/mekhq/campaign/personnel/death/AbstractDeath.java @@ -116,7 +116,7 @@ public Map>> 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 @@ -144,7 +144,7 @@ public Map>> 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