Package megamek.common.bays
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
This is a base class for the very similar ASFBay and SmallCraftBay.
- See Also:
-
Field Summary
Fields inherited from class megamek.common.bays.Bay
bayNumber, currentDoors, currentSpace, damage, doors, doorsNext, FACING_PREFIX, FIELD_SEPARATOR, game, loadedThisTurn, minDoors, recoverySlots, totalSpace, troops, unloadedThisTurn, UNSET_BAYFields inherited from interface megamek.common.interfaces.ITechnology
DATE_ES, DATE_NONE, DATE_PS -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected voidvoidvoidDestroys a door for next turn.protected voiddoublebooleanhasARTS()voidSets the recovery slots to two unused slots per currently available door.voidLoad the given unit.voidRecovery is different from loading in that it uses up a recovery slot load is only used in deployment phasedoublespaceForUnit(Entity unit) Most bay types track space by individual units.voidMethods inherited from class megamek.common.bays.Bay
artsTechAdvancement, bayString, bayString, bayString, canLoad, canUnloadUnits, getBaseAvailability, getBayDamage, getBayNumber, getCapacity, getCargoMpReduction, getCommonDate, getCost, getCurrentDoors, getDefaultSlotDescription, getDoors, getDoorsNext, getDroppableUnits, getExteriorUnitAt, getExternalUnits, getExtinctionDate, getExtinctionDate, getFacing, getIntroductionDate, getIntroductionDate, getLaunchableUnits, getLoadedUnitIds, getLoadedUnits, getMinDoors, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, getPersonnel, getProductionDate, getProductionDate, getPrototypeDate, getPrototypeDate, getReintroductionDate, getReintroductionDate, getSafeLaunchRate, getStaticTechLevel, getTechAdvancement, getTechBase, getTechRating, getTroops, getUnloadableUnits, getUnusedSlots, getUnusedString, getUnusedString, getWeight, isCargo, isClan, isMixedTech, isQuarters, isWeaponBlockedAt, numDoorsString, resetCounts, resetDoors, resetTransporter, restoreAllDoors, restoreDoor, setBayDamage, setCurrentDoors, setCurrentSpace, setDoors, setDoorsNext, setFacing, setGame, techAdvancement, toString, unloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.interfaces.ITechnology
calcEraAvailability, calcEraAvailability, calcYearAvailability, calcYearAvailability, calcYearAvailability, findMinimumRulesLevel, findMinimumRulesLevel, getAdvancedRange, getAdvancedRange, getCodeFromIOAbbr, getCodeFromMMAbbr, getCommonDate, getEraAvailabilityName, getEraAvailabilityName, getExperimentalRange, getExperimentalRange, getExtinctionDate, getExtinctionRange, getExtinctionRange, getFullRatingName, getFullRatingName, getIntroductionDate, getProductionDate, getPrototypeDate, getReintroductionDate, getSimpleLevel, getSimpleLevel, getSimpleLevel, getStandardRange, getStandardRange, getTechLevel, getTechLevel, getTechRatingName, isAvailableIn, isAvailableIn, isAvailableIn, isExtinct, isExtinct, isExtinct, isIntroLevel, isLegal, isLegal, isUnofficialMethods inherited from interface megamek.common.equipment.Transporter
alwaysDamageCargoIfTransportHit, canPickupGroundObject, canTow, getCarryables, getNameForRecordSheets, getTransporterType, hardpointCost, setEntity
-
Method Details
-
hasARTS
public boolean hasARTS()- Returns:
- True if this bay has ARTS (Advanced Robotic Transport System, IO p.147).
-
load
Description copied from interface:TransporterLoad the given unit.- Specified by:
loadin interfaceTransporter- Overrides:
loadin classBay- Parameters:
unit- theEntityto be loaded.- Throws:
IllegalArgumentException- If the unit can't be loaded
-
spaceForUnit
Description copied from class:BayMost bay types track space by individual units. Infantry bays have variable space requirements and must track by cubicle tonnage.- Overrides:
spaceForUnitin classBay- Parameters:
unit- The unit to load/unload.- Returns:
- The amount of bay space taken up by the unit.
-
getUnused
public double getUnused()- Specified by:
getUnusedin interfaceTransporter- Overrides:
getUnusedin classBay- Returns:
- the number of unused spaces in this transporter.
-
recover
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:BayDestroys a door for next turn.- Overrides:
destroyDoorNextin classBay
-
destroyDoor
public void destroyDoor()- Overrides:
destroyDoorin classBay
-
closeSingleRecoverySlot
protected void closeSingleRecoverySlot() -
destroyEmptyRecoverySlot
protected void destroyEmptyRecoverySlot() -
availableRecoverySlots
protected int availableRecoverySlots()
-