Skip to content

Commit

Permalink
Merge pull request #5199 from Sleet01/Fix_3775_unable_to_assign_nonsu…
Browse files Browse the repository at this point in the history
…perheavy_crew_mm_addendum

Fix SH and Tripod crew total calculation (for MHQ Hangar model)
  • Loading branch information
SJuliez authored Feb 27, 2024
2 parents 78bf7ae + cdee7e2 commit c9242e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions megamek/src/megamek/common/Compute.java
Original file line number Diff line number Diff line change
Expand Up @@ -7296,6 +7296,10 @@ public static int getAdditionalNonGunner(Entity entity) {
crew += 5 * (int) m.getSize();
}
}
if (entity.isSuperHeavy()) {
// Tactical Officer
return 1;
}
return crew;
}

Expand Down Expand Up @@ -7336,6 +7340,8 @@ public static int getFullCrewSize(Entity entity) {
return ((Infantry) entity).getSquadCount() * ((Infantry) entity).getSquadSize();
} else if (entity instanceof Jumpship || entity instanceof SmallCraft) {
return getAeroCrewNeeds(entity) + getTotalGunnerNeeds(entity);
} else if (entity.isSuperHeavy() || entity.isTripodMek()) {
return getTotalDriverNeeds(entity) + getTotalGunnerNeeds(entity) + getAdditionalNonGunner(entity);
} else {
return 1;
}
Expand Down

0 comments on commit c9242e4

Please sign in to comment.