Skip to content

Commit

Permalink
Merge pull request #4911 from IllianiCBT/personnel_techEligibility
Browse files Browse the repository at this point in the history
Simplified Tech Personnel Checks
  • Loading branch information
HammerGS authored Sep 26, 2024
2 parents 448768d + 4103d14 commit 90d45f2
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions MekHQ/src/mekhq/campaign/personnel/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -3866,30 +3866,22 @@ public boolean isTech() {
}

public boolean isTechMek() {
boolean hasSkill = hasSkill(SkillType.S_TECH_MEK)
&& getSkill(SkillType.S_TECH_MEK).getExperienceLevel() > SkillType.EXP_ULTRA_GREEN;

boolean hasSkill = hasSkill(SkillType.S_TECH_MEK);
return hasSkill && (getPrimaryRole().isMekTech() || getSecondaryRole().isMekTech());
}

public boolean isTechAero() {
boolean hasSkill = hasSkill(SkillType.S_TECH_AERO)
&& getSkill(SkillType.S_TECH_AERO).getExperienceLevel() > SkillType.EXP_ULTRA_GREEN;

boolean hasSkill = hasSkill(SkillType.S_TECH_AERO);
return hasSkill && (getPrimaryRole().isAeroTek() || getSecondaryRole().isAeroTek());
}

public boolean isTechMechanic() {
boolean hasSkill = hasSkill(SkillType.S_TECH_MECHANIC)
&& getSkill(SkillType.S_TECH_MECHANIC).getExperienceLevel() > SkillType.EXP_ULTRA_GREEN;

boolean hasSkill = hasSkill(SkillType.S_TECH_MECHANIC);
return hasSkill && (getPrimaryRole().isMechanic() || getSecondaryRole().isMechanic());
}

public boolean isTechBA() {
boolean hasSkill = hasSkill(SkillType.S_TECH_BA)
&& getSkill(SkillType.S_TECH_BA).getExperienceLevel() > SkillType.EXP_ULTRA_GREEN;

boolean hasSkill = hasSkill(SkillType.S_TECH_BA);
return hasSkill && (getPrimaryRole().isBATech() || getSecondaryRole().isBATech());
}

Expand Down

0 comments on commit 90d45f2

Please sign in to comment.