Package megamek.common.battleArmor
Class ProtoMekClampMount
java.lang.Object
megamek.common.battleArmor.BattleArmorHandles
megamek.common.battleArmor.ProtoMekClampMount
- All Implemented Interfaces:
Serializable,Transporter
Represents a section of a Mek torso where a protomek equipped with the magnetic clamp system can attach itself for
transport. A mek has two of these, one front and one rear. An ultraheavy protomek can only be carried on the front
mount, and if carried this way the rear cannot be used. The two mounts are not aware of each other, and it is the
responsibility of the code that handles loading to enforce this limitation.
- See Also:
-
Field Summary
Fields inherited from class megamek.common.battleArmor.BattleArmorHandles
carriedUnit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this object can accept the given unit.intgetCargoMpReduction(Entity carrier) Return a string that identifies the unused capacity of this transporter.booleanisRear()booleanisWeaponBlockedAt(int loc, boolean isRear) Determine if transported units prevent a weapon in the given location from firing.toString()Methods inherited from class megamek.common.battleArmor.BattleArmorHandles
getExteriorUnitAt, getExternalUnits, getLoadedUnits, getUnused, hasActiveTrooper, load, resetTransporter, setGame, unloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.equipment.Transporter
alwaysDamageCargoIfTransportHit, canPickupGroundObject, canTow, getCarryables, getNameForRecordSheets, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, getTransporterType, hardpointCost, setEntity
-
Constructor Details
-
ProtoMekClampMount
public ProtoMekClampMount(boolean rear)
-
-
Method Details
-
isRear
public boolean isRear() -
getUnusedString
Description copied from interface:TransporterReturn a string that identifies the unused capacity of this transporter.- Specified by:
getUnusedStringin interfaceTransporter- Overrides:
getUnusedStringin classBattleArmorHandles- Returns:
- A
Stringmeant for a human.
-
canLoad
Description copied from interface:TransporterDetermines if this object can accept the given unit. The unit may not be of the appropriate type or there may be no room for the unit.- Specified by:
canLoadin interfaceTransporter- Overrides:
canLoadin classBattleArmorHandles- Parameters:
unit- - theEntityto be loaded.- Returns:
trueif the unit can be loaded,falseotherwise.
-
isWeaponBlockedAt
public boolean isWeaponBlockedAt(int loc, boolean isRear) Description copied from interface:TransporterDetermine if transported units prevent a weapon in the given location from firing.- Specified by:
isWeaponBlockedAtin interfaceTransporter- Overrides:
isWeaponBlockedAtin classBattleArmorHandles- Parameters:
loc- the location attempting to fire.isRear- true if the weapon is rear-facing- Returns:
- True if a transported unit is in the way, false if the weapon can fire.
-
getCargoMpReduction
- Specified by:
getCargoMpReductionin interfaceTransporter- Overrides:
getCargoMpReductionin classBattleArmorHandles- Returns:
- the MP reduction due to cargo carried by this transporter
-
toString
- Overrides:
toStringin classBattleArmorHandles
-