Package megamek.common.units
Class MekConstructionUtil
java.lang.Object
megamek.common.units.MekConstructionUtil
Helper methods for constructing/changing Mek units. This happens mostly in MML but some units have modular equipment
which MM must be able to switch out and the code for this is involved and should be unified as much as possible.
This is the MM extension of MekUtil.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds Clan CASE to all locations on the Mek that have explosive equipment and don't already have CASE or CASE II.static voidremoveAllMounted(Entity unit, EquipmentType et) static booleanremovesHandAndLowerArmSlotsOnOmni(EquipmentType equipmentType) static voidFor the given Mek, removes all existing Clan CASE and then re-adds it to every location that has potentially explosive equipment (this includes PPC Capacitors).
-
Constructor Details
-
MekConstructionUtil
public MekConstructionUtil()
-
-
Method Details
-
updateClanCasePlacement
For the given Mek, removes all existing Clan CASE and then re-adds it to every location that has potentially explosive equipment (this includes PPC Capacitors). Skips locations that already have (IS) CASE or CASE II. Respects per-location opt-out.- Parameters:
mek- the mek to update
-
removeAllMounted
-
addClanCaseToExplosiveLocations
Adds Clan CASE to all locations on the Mek that have explosive equipment and don't already have CASE or CASE II. UnlikeMek.addClanCase(), this does not check tech base or existing Clan CASE presence. Respects per-location opt-out viaMek.isClanCaseOptedOut(int).- Parameters:
mek- the mek to add Clan CASE to
-
removesHandAndLowerArmSlotsOnOmni
- Parameters:
equipmentType- The equipment type to check- Returns:
- True when given type of equipment is one that forbids lower arm and hand actuators on an omni mek, see TM p.57
-