Class MekWithArms

All Implemented Interfaces:
Serializable, ICarryable, Transporter, InGameObject, CombatRole, ForceAssignable, ITechnology, ITurnOrdered, PhaseUpdated, RoundUpdated, ActiveHeatSinkController, BTObject, Deployable, Fortifiable, RubbleClearer, Targetable
Direct Known Subclasses:
BipedMek, TripodMek

public abstract class MekWithArms extends Mek
This class acts as a superclass to BipedMek and TripodMek to unify code that is shared between them, most of it arm-related as both have two arms while QuadMeks have none.
See Also:
  • Constructor Details

    • MekWithArms

      public MekWithArms(int inGyroType, int inCockpitType)
  • Method Details

    • canFlipArms

      public boolean canFlipArms()
      Description copied from class: Entity
      Returns true if the entity can flip its arms
      Overrides:
      canFlipArms in class Entity
    • getDefaultPickupLocations

      public List<Integer> getDefaultPickupLocations()
      Description copied from class: Entity
      A list of the "default" cargo pick up locations for when none is specified
      Overrides:
      getDefaultPickupLocations in class Entity
    • getValidHalfWeightPickupLocations

      public List<Integer> getValidHalfWeightPickupLocations(ICarryable cargo)
      Description copied from class: Entity
      A list of all the locations that the entity can use to pick up cargo following the TacOps "one-handed" pickup rules
      Overrides:
      getValidHalfWeightPickupLocations in class Entity
    • maxGroundObjectTonnage

      public double maxGroundObjectTonnage()
      Description copied from class: Entity
      The maximum tonnage of ground objects that can be picked up by this unit
      Overrides:
      maxGroundObjectTonnage in class Entity
    • unmodifiedMaxGroundObjectTonnage

      public double unmodifiedMaxGroundObjectTonnage()
      The ground object tonnage this unit can lift, unmodified by TSM or Heavy Lifter
      Returns:
      the tonnage this mek can lift based on its weight and how many arms it has
    • hasShield

      public boolean hasShield()
      Description copied from class: Entity
      Does the Mek have any shields. a Mek can have up to 2 shields.
      Overrides:
      hasShield in class Entity
      Returns:
      true if shieldCount is greater than 0 else false
    • canBrace

      public boolean canBrace()
      Overrides:
      canBrace in class Entity
    • getBraceMPCost

      public int getBraceMPCost()
      Overrides:
      getBraceMPCost in class Entity
    • getValidBraceLocations

      public List<Integer> getValidBraceLocations()
      Overrides:
      getValidBraceLocations in class Entity
    • hasFunctionalArmAES

      public boolean hasFunctionalArmAES(int location)
      Overrides:
      hasFunctionalArmAES in class Entity
    • hasRetractedBlade

      public boolean hasRetractedBlade(int loc)
      Description copied from class: Mek
      Does the entity have a retracted blade in the given location? Only true for biped Meks
      Overrides:
      hasRetractedBlade in class Mek
    • hasVibroblades

      public boolean hasVibroblades()
      Overrides:
      hasVibroblades in class Entity
      Returns:
      True if this unit wields vibroblades
    • hasVibrobladesInLocation

      public boolean hasVibrobladesInLocation(int location)
      Returns true if this Mek has a vibroblade in the given location.
      Parameters:
      location - The location to check
      Returns:
      boolean true if the Mek has a vibroblade in the location, false otherwise
    • getActiveVibrobladeHeat

      public int getActiveVibrobladeHeat(int location)
      Overrides:
      getActiveVibrobladeHeat in class Entity
      Parameters:
      location - The location to check
      Returns:
      The heat generated by active vibroblades in the given location if this unit has any
    • getActiveVibrobladeHeat

      public int getActiveVibrobladeHeat(int location, boolean ignoreMode)
      Overrides:
      getActiveVibrobladeHeat in class Entity
    • getNumberOfShields

      public int getNumberOfShields(MiscTypeFlag shieldSize)
      Description copied from class: Entity
      Check to see how many shields of a certain size a mek has. you can have up to shields per Mek. However, they can be of different size and each size has its own draw backs. So check each size and add modifiers based on the number shields of that size.
      Overrides:
      getNumberOfShields in class Entity
    • hasRaisedShield

      public boolean hasRaisedShield(int location)
      Description copied from class: Entity
      Does the Mek have an active shield This should only be called by hasActiveShield(location, rear)
      Overrides:
      hasRaisedShield in class Entity
    • hasLoweredShield

      public boolean hasLoweredShield(int location, boolean rear)
      Description copied from class: Entity
      Does the Mek have a passive shield This should only be called after hasShield has been called.
      Overrides:
      hasLoweredShield in class Entity
    • hasLoweredShield

      public boolean hasLoweredShield(int location)
      Description copied from class: Entity
      Does the Mek have a passive shield This should only be called by hasPassiveShield(location, rear)
      Overrides:
      hasLoweredShield in class Entity
    • hasNoDefenseShield

      public boolean hasNoDefenseShield(int location)
      Description copied from class: Entity
      Does the Mek have a shield in no defense mode
      Overrides:
      hasNoDefenseShield in class Entity
    • canPickupGroundObject

      public boolean canPickupGroundObject()
      Description copied from class: Entity
      Returns true if the entity can pick up ground objects
      Specified by:
      canPickupGroundObject in interface Transporter
      Overrides:
      canPickupGroundObject in class Entity
    • checkGetUp

      public PilotingRollData checkGetUp(MoveStep step, EntityMovementType moveType)
      Description copied from class: Entity
      Checks if the entity is getting up. If so, returns the target roll for the piloting skill check.
      Overrides:
      checkGetUp in class Entity
    • getRunMP

      public int getRunMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getRunMP in class Mek
    • canPerformGroundSalvageOperations

      public boolean canPerformGroundSalvageOperations()
      Description copied from class: Entity
      Determines whether salvage operations can be performed on the ground.

      The default implementation returns false, indicating that salvage operations are not permitted. Subclasses should override this method to provide specific logic for determining salvage eligibility based on scenario conditions, campaign settings, or other relevant factors.

      Overrides:
      canPerformGroundSalvageOperations in class Entity
      Returns:
      true if salvage operations can be performed, false otherwise. The default implementation always returns false.
    • addIntrinsicTransporters

      public void addIntrinsicTransporters()
      Description copied from class: Mek
      Some entities will always have certain transporters. This method is overloaded to support that.
      Overrides:
      addIntrinsicTransporters in class Mek
    • setMekArms

      public void setMekArms()
      Add transporter for mek's arms for externally carried cargo