diff --git a/MekHQ/src/mekhq/campaign/personnel/education/EducationController.java b/MekHQ/src/mekhq/campaign/personnel/education/EducationController.java index 7e61e2ce66..b84a87eaf2 100644 --- a/MekHQ/src/mekhq/campaign/personnel/education/EducationController.java +++ b/MekHQ/src/mekhq/campaign/personnel/education/EducationController.java @@ -492,6 +492,13 @@ private static void processNewWeekChecks(Campaign campaign, Academy academy, Per } } + // has the system been depopulated? Nominally similar to the above, but here we use actual system data, so it's more dynamic. + if (campaign.getSystemById(person.getEduAcademySystem()).getPopulation(campaign.getLocalDate()) == 0) { + if (checkForAcademyDestruction(campaign, academy, person, resources)) { + return; + } + } + // is the academy faction at war with person faction, or the campaign faction? if (checkForAcademyFactionConflict(campaign, academy, person, resources)) { return; @@ -658,7 +665,9 @@ private static boolean checkForAcademyClosure(Campaign campaign, Academy academy * @return true if the academy has been destroyed, false otherwise */ private static boolean checkForAcademyDestruction(Campaign campaign, Academy academy, Person person, ResourceBundle resources) { - if (campaign.getLocalDate().getYear() >= academy.getDestructionYear()) { + // we assume that if the system's population has been depleted, the academy has been destroyed too. + if ((campaign.getLocalDate().getYear() >= academy.getDestructionYear()) + || (campaign.getSystemById(person.getEduAcademySystem()).getPopulation(campaign.getLocalDate()) == 0)) { if ((!person.isChild(campaign.getLocalDate())) || (campaign.getCampaignOptions().isAllAges())) { if (Compute.d6(2) >= 5) { campaign.addReport(person.getHyperlinkedName() + ' ' + resources.getString("eventDestruction.text"));