Class ProtoMekBay

All Implemented Interfaces:
Serializable, Transporter, ITechnology

public final class ProtoMekBay extends UnitBay
Represents a volume of space set aside for carrying ProtoMek points aboard large spacecraft and mobile structures.
See Also:
  • Constructor Details

    • ProtoMekBay

      public ProtoMekBay(double space, int doors, int bayNumber)
      Create a space for the given tonnage of troops. For this class, only the weight of the troops (and their equipment) are considered; if you'd like to think that they are stacked like lumber, be my guest.
      Parameters:
      space - The number of ProtoMek points (5 PM) that can fit in this bay.
  • Method Details

    • canLoad

      public boolean canLoad(Entity unit)
      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.
    • getTransporterType

      public String getTransporterType()
    • 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
    • spaceForUnit

      public double spaceForUnit(Entity unit)
      Description copied from class: Bay
      Most bay types track space by individual units. Infantry bays have variable space requirements and must track by cubicle tonnage.
      Overrides:
      spaceForUnit in class Bay
      Parameters:
      unit - The unit to load/unload.
      Returns:
      The amount of bay space taken up by the unit.
    • getNameForRecordSheets

      public String getNameForRecordSheets()