Package megamek.common.bays
Class SmallCraftBay
java.lang.Object
megamek.common.bays.Bay
megamek.common.bays.UnitBay
megamek.common.bays.AbstractSmallCraftASFBay
megamek.common.bays.SmallCraftBay
- All Implemented Interfaces:
Serializable,Transporter,ITechnology
Represents a Transport Bay (TM p.239) for carrying SmallCraft or Fighters/LAMs aboard large spacecraft or other
units.
- 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 -
Constructor Summary
ConstructorsConstructorDescriptionSmallCraftBay(double space, int doors, int bayNumber) Create a space for the given number of small craft or fighters.SmallCraftBay(double space, int doors, int bayNumber, boolean arts) Create a space for the given number of small craft or fighters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this object can accept the given unit.longgetCost()intgetPersonnel(boolean clan) getUnusedString(boolean showRecovery) Return a string that identifies the unused capacity of this transporter.doublestatic TechAdvancementtoString()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 constantsMethods inherited from class megamek.common.bays.AbstractSmallCraftASFBay
availableRecoverySlots, closeSingleRecoverySlot, destroyDoor, destroyDoorNext, destroyEmptyRecoverySlot, getUnused, hasARTS, initializeRecoverySlots, load, recover, spaceForUnit, updateSlotsMethods inherited from class megamek.common.bays.Bay
artsTechAdvancement, bayString, bayString, bayString, canUnloadUnits, getBaseAvailability, getBayDamage, getBayNumber, getCapacity, getCargoMpReduction, getCommonDate, getCurrentDoors, getDefaultSlotDescription, getDoors, getDoorsNext, getDroppableUnits, getExteriorUnitAt, getExternalUnits, getExtinctionDate, getExtinctionDate, getFacing, getIntroductionDate, getIntroductionDate, getLaunchableUnits, getLoadedUnitIds, getLoadedUnits, getMinDoors, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, getProductionDate, getProductionDate, getPrototypeDate, getPrototypeDate, getReintroductionDate, getReintroductionDate, getSafeLaunchRate, getStaticTechLevel, getTechBase, getTechRating, getTroops, getUnloadableUnits, getUnusedSlots, getUnusedString, isCargo, isClan, isMixedTech, isQuarters, isWeaponBlockedAt, numDoorsString, resetCounts, resetDoors, resetTransporter, restoreAllDoors, restoreDoor, setBayDamage, setCurrentDoors, setCurrentSpace, setDoors, setDoorsNext, setFacing, setGame, 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, hardpointCost, setEntity
-
Constructor Details
-
SmallCraftBay
public SmallCraftBay(double space, int doors, int bayNumber) Create a space for the given number of small craft or fighters.- Parameters:
space- The number of cubiclesdoors- The number of bay doorsbayNumber- The id number for the bay
-
SmallCraftBay
public SmallCraftBay(double space, int doors, int bayNumber, boolean arts) Create a space for the given number of small craft or fighters.- Parameters:
space- The number of cubiclesdoors- The number of bay doorsbayNumber- The id number for the bayarts- Whether the bay has the advanced robotic transport system
-
-
Method Details
-
canLoad
Description copied from interface:TransporterDetermines 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:
canLoadin interfaceTransporter- Overrides:
canLoadin classBay- Parameters:
unit- - theEntityto be loaded.- Returns:
trueif the unit can be loaded,falseotherwise.
-
getUnusedString
Description copied from class:BayReturn a string that identifies the unused capacity of this transporter.- Overrides:
getUnusedStringin classBay- Returns:
- A
Stringmeant for a human.
-
getTransporterType
-
getWeight
public double getWeight() -
getPersonnel
public int getPersonnel(boolean clan) - Overrides:
getPersonnelin classBay- 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
Description copied from class:BayUpdated 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 -
techAdvancement
-
getTechAdvancement
- Overrides:
getTechAdvancementin classBay
-
getCost
public long getCost()
-