Class NavalRepairFacility

java.lang.Object
megamek.common.bays.Bay
megamek.common.bays.UnitBay
megamek.common.units.NavalRepairFacility
All Implemented Interfaces:
Serializable, Transporter, ITechnology
Direct Known Subclasses:
ReinforcedRepairFacility

public class NavalRepairFacility extends UnitBay
Standard naval repair facilities for space stations (jumpships and warships can also carry a single facility). See TacOps 334-5 for rules.
See Also:
  • Constructor Details

    • NavalRepairFacility

      protected NavalRepairFacility()
      The default constructor is only for serialization.
    • NavalRepairFacility

      public NavalRepairFacility(double size, int doors, int bayNumber, int facing, boolean pressurized)
      Create a new repair facility
      Parameters:
      size - Maximum capacity in tons
      doors - The number of bay doors
      bayNumber - The id number for the bay
      facing - The armor facing of the facility
      pressurized - Whether the bay is pressurized
    • NavalRepairFacility

      public NavalRepairFacility(double size, int doors, int bayNumber, int facing, boolean pressurized, boolean arts)
      Create a new repair facility
      Parameters:
      size - Maximum capacity in tons
      doors - The number of bay doors
      bayNumber - The id number for the bay
      facing - The armor facing of the facility
      pressurized - Whether the bay is pressurized
      arts - Whether the bay has the advanced robotic transport system
  • Method Details

    • isPressurized

      public boolean isPressurized()
      Pressurized facility allows crew to work without encumbrance of life support gear. No game effect that I could find.
      Returns:
      Whether the facility is pressurized.
    • hasARTS

      public boolean hasARTS()
      Advanced Robotic Transport System (ARTS). See IO, p. 147
      Returns:
      Whether the bay has the ARTS automated system
    • setPressurized

      @Deprecated(since="0.51.0", forRemoval=true) public void setPressurized(boolean pressurized)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTransporterType

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

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

      public int getFacing()
      Description copied from class: Bay
      Some bays (drop-shuttle and repair facility) have a maximum number per armor facing.
      Overrides:
      getFacing in class Bay
      Returns:
      The facing of the bay, or Entity.LOC_NONE if the bay does not require a facing.
    • setFacing

      public void setFacing(int facing)
      Sets the bay location
      Overrides:
      setFacing in class Bay
      Parameters:
      facing - The armor facing (location) of the bay
    • 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
    • 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.
    • hardpointCost

      public int hardpointCost()
      Description copied from interface: Transporter
      Returns the number of Docking Collars (hardpoints) this transporter counts as toward the maximum that a JumpShip (or WS, SS) may carry. TO:AUE p.146
      Returns:
      The number of docking hardpoints this transporter counts as toward the limit.
    • 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)
      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.