Class AbstractSmallCraftASFBay

java.lang.Object
megamek.common.bays.Bay
megamek.common.bays.UnitBay
megamek.common.bays.AbstractSmallCraftASFBay
All Implemented Interfaces:
Serializable, Transporter, ITechnology
Direct Known Subclasses:
ASFBay, SmallCraftBay

public abstract class AbstractSmallCraftASFBay extends UnitBay
This is a base class for the very similar ASFBay and SmallCraftBay.
See Also:
  • Method Details

    • hasARTS

      public boolean hasARTS()
      Returns:
      True if this bay has ARTS (Advanced Robotic Transport System, IO p.147).
    • load

      public void load(Entity unit) throws IllegalArgumentException
      Description copied from interface: Transporter
      Load the given unit.
      Specified by:
      load in interface Transporter
      Overrides:
      load in class Bay
      Parameters:
      unit - the Entity to be loaded.
      Throws:
      IllegalArgumentException - If the unit can't be loaded
    • 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.
    • getUnused

      public double getUnused()
      Specified by:
      getUnused in interface Transporter
      Overrides:
      getUnused in class Bay
      Returns:
      the number of unused spaces in this transporter.
    • recover

      public void recover(Entity unit) throws IllegalArgumentException
      Recovery is different from loading in that it uses up a recovery slot load is only used in deployment phase
      Throws:
      IllegalArgumentException
    • updateSlots

      public void updateSlots()
    • initializeRecoverySlots

      public void initializeRecoverySlots()
      Sets the recovery slots to two unused slots per currently available door.
    • destroyDoorNext

      public void destroyDoorNext()
      Description copied from class: Bay
      Destroys a door for next turn.
      Overrides:
      destroyDoorNext in class Bay
    • destroyDoor

      public void destroyDoor()
      Overrides:
      destroyDoor in class Bay
    • closeSingleRecoverySlot

      protected void closeSingleRecoverySlot()
    • destroyEmptyRecoverySlot

      protected void destroyEmptyRecoverySlot()
    • availableRecoverySlots

      protected int availableRecoverySlots()