Class SuperHeavyVehicleBay

java.lang.Object
megamek.common.Bay
megamek.common.UnitBay
megamek.common.SuperHeavyVehicleBay
All Implemented Interfaces:
Serializable, ITechnology, Transporter

public final class SuperHeavyVehicleBay extends UnitBay
Represents a Transport Bay (TM p.239) for carrying superheavy vehicles (not heavier than 200t) aboard large spacecraft or other units.
See Also:
  • Constructor Details

    • SuperHeavyVehicleBay

      public SuperHeavyVehicleBay(double space, int doors, int bayNumber)
      Create a space for the given number of vehicles.
      Parameters:
      space - The number of vehicles that can be carried
      bayNumber - The id number for the bay
  • Method Details

    • canLoad

      public boolean canLoad(Entity unit)
      Description copied from interface: Transporter
      Determines 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:
      canLoad in interface Transporter
      Overrides:
      canLoad in class Bay
      Parameters:
      unit - - the Entity to be loaded.
      Returns:
      true if the unit can be loaded, false otherwise.
    • getUnusedString

      public String getUnusedString(boolean showRecovery)
      Description copied from class: Bay
      Return a string that identifies the unused capacity of this transporter.
      Overrides:
      getUnusedString in class Bay
      Returns:
      A String meant for a human.
    • getType

      public String getType()
    • getWeight

      public double getWeight()
      Overrides:
      getWeight in class Bay
      Returns:
      the tonnage of the bay, not the actual mass or weight
    • getPersonnel

      public int getPersonnel(boolean clan)
      Overrides:
      getPersonnel in class Bay
      Parameters:
      clan - Whether the bay is installed in a Clan unit. Needed for infantry bays.
      Returns:
      The number of additional crew provided by the bay. This includes transport bays only; crew quarters are already accounted for in the crew total.
    • toString

      public String toString()
      Description copied from class: Bay
      Updated toString() and helpers to normalize bay string output To match new 6-field format: type:space(current or total):doors:bayNumber:infantryType:facing:status bitmap See BLKFile.java:BLKFile constants
      Overrides:
      toString in class Bay
    • techAdvancement

      public static TechAdvancement techAdvancement()
    • getTechAdvancement

      public TechAdvancement getTechAdvancement()
      Overrides:
      getTechAdvancement in class Bay
    • getCost

      public long getCost()
      Overrides:
      getCost in class Bay
      Returns:
      The cost of the bay in C-bills