Skip to content

Commit feda6ed

Browse files
authored
Merge pull request #7279 from IllianiBird/factionLeaderDataUpdate
Improvement: Added Faction Leadership Tracking to Faction Overhaul
2 parents 66390e1 + 790bd97 commit feda6ed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

MekHQ/src/mekhq/campaign/universe/Faction.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import megamek.client.ratgenerator.FactionRecord;
4646
import megamek.common.annotations.Nullable;
4747
import megamek.common.universe.Faction2;
48+
import megamek.common.universe.FactionLeaderData;
4849
import megamek.common.universe.FactionTag;
4950
import megamek.common.universe.HonorRating;
5051
import mekhq.Utilities;
@@ -566,4 +567,18 @@ public boolean performsBatchalls() {
566567
public boolean isAggregate() {
567568
return faction2.isAggregate();
568569
}
570+
571+
/**
572+
* Retrieves the faction leader in power during the specified year.
573+
*
574+
* @param year the year to check for a valid leader
575+
*
576+
* @return the {@link FactionLeaderData} for the leader valid in the given year, or {@code null} if none found
577+
*
578+
* @author Illiani
579+
* @since 0.50.07
580+
*/
581+
public @Nullable FactionLeaderData getLeaderForYear(final int year) {
582+
return faction2.getFactionLeaderForYear(year);
583+
}
569584
}

0 commit comments

Comments
 (0)