Skip to content

Commit 85d4ba1

Browse files
committed
Fix: Stopped New Personnel Market from Thinking Nearly Every Role was Extinct
1 parent b464db8 commit 85d4ba1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

MekHQ/src/mekhq/campaign/market/personnelMarket/markets/NewPersonnelMarket.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class NewPersonnelMarket {
8484
private static int LOW_POPULATION_RECRUITMENT_DIVIDER = 1;
8585
private static int UNIT_REPUTATION_RECRUITMENT_CUTOFF = Integer.MIN_VALUE;
8686
@SuppressWarnings(value = "FieldCanBeLocal")
87-
private static int PROFESSION_EXTINCTION_IGNORE_VALUE = -1;
87+
private static final int PROFESSION_EXTINCTION_IGNORE_VALUE = -1;
8888

8989
final private Campaign campaign;
9090
private PersonnelMarketStyle associatedPersonnelMarketStyle = PERSONNEL_MARKET_DISABLED;
@@ -868,6 +868,11 @@ PersonnelMarketEntry vetEntryForIntroductionAndExtinctionYears(
868868

869869
int introductionYear = entry.introductionYear();
870870
int extinctionYear = entry.extinctionYear();
871+
872+
if (extinctionYear == PROFESSION_EXTINCTION_IGNORE_VALUE) {
873+
extinctionYear = Integer.MAX_VALUE;
874+
}
875+
871876
while (gameYear < introductionYear || (gameYear >= extinctionYear)) {
872877
PersonnelRole fallbackProfession = entry.fallbackProfession();
873878
entry = unorderedMarketEntries.get(fallbackProfession);

0 commit comments

Comments
 (0)