Skip to content

Commit

Permalink
Merge pull request #6097 from SJuliez/revert-tech-legal-change
Browse files Browse the repository at this point in the history
#6006, #6050: Revert tech legality change
  • Loading branch information
HammerGS authored Oct 13, 2024
2 parents e37b312 + 7ccc0be commit 300358a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions megamek/src/megamek/common/ITechnology.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,6 @@ && getExtinctionDate() < year
}

default boolean isAvailableIn(int year, boolean clan, boolean ignoreExtinction) {
// For technology created in the IS after the Clan Invasion, Clan availability
// matches IS (TO pg 33)
clan = clan && ITechnology.getTechEra(year) < ITechnology.ERA_CLAN;
return year >= getIntroductionDate(clan) && (getIntroductionDate(clan) != DATE_NONE)
&& (ignoreExtinction || !isExtinct(year, clan));
}
Expand All @@ -297,9 +294,6 @@ default boolean isAvailableIn(int year, boolean ignoreExtinction) {
}

default boolean isAvailableIn(int year, boolean clan, int faction) {
// For technology created in the IS after the Clan Invasion, Clan availability
// matches IS (TO pg 33)
clan = clan && ITechnology.getTechEra(year) < ITechnology.ERA_CLAN;
return year >= getIntroductionDate(clan, faction)
&& getIntroductionDate(clan, faction) != DATE_NONE && !isExtinct(year, clan, faction);
}
Expand All @@ -310,9 +304,6 @@ default boolean isLegal(int year, int techLevel, boolean mixedTech) {
}

default boolean isLegal(int year, SimpleTechLevel simpleRulesLevel, boolean clanBase, boolean mixedTech, boolean ignoreExtinct) {
// For technology created in the IS after the Clan Invasion, Clan availability
// matches IS (TO pg 33)
clanBase = clanBase && ITechnology.getTechEra(year) < ITechnology.ERA_CLAN;
if (mixedTech) {
if (!isAvailableIn(year, ignoreExtinct)) {
return false;
Expand Down

0 comments on commit 300358a

Please sign in to comment.