Package megamek.common.bays
Class CrewQuartersCargoBay
java.lang.Object
megamek.common.bays.Bay
megamek.common.bays.CrewQuartersCargoBay
- All Implemented Interfaces:
Serializable
,Transporter
,ITechnology
Represents a volume of space set aside for carrying a mobile structure or spacecraft's crew
- 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
Fields inherited from interface megamek.common.interfaces.ITechnology
DATE_ES, DATE_NONE, DATE_PS
-
Constructor Summary
ConstructorsConstructorDescriptionCrewQuartersCargoBay
(double weight, int doors) Create a space for the given tonnage of troops.CrewQuartersCargoBay
(int space) Create space for certain number of crew/passengers -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines if this object can accept the given unit.long
getCost()
getType()
getUnusedString
(boolean showRecovery) Return a string that identifies the unused capacity of this transporter.double
boolean
toString()
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.Bay
artsTechAdvancement, bayString, bayString, bayString, canUnloadUnits, destroyDoor, destroyDoorNext, getBaseAvailability, getBayDamage, getBayNumber, getCapacity, getCargoMpReduction, getCommonDate, 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, getUnused, getUnusedSlots, getUnusedString, isCargo, isClan, isMixedTech, isWeaponBlockedAt, load, numDoorsString, resetCounts, resetDoors, resetTransporter, restoreAllDoors, restoreDoor, setBayDamage, setCurrentDoors, setCurrentSpace, setDoors, setDoorsNext, setFacing, setGame, spaceForUnit, techAdvancement, unload
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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, isUnofficial
Methods inherited from interface megamek.common.equipment.Transporter
canTow, getNameForRecordSheets, hardpointCost
-
Constructor Details
-
CrewQuartersCargoBay
public CrewQuartersCargoBay(double weight, int doors) 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:
weight
- The weight of troops (in tons) this space can carry.
-
CrewQuartersCargoBay
public CrewQuartersCargoBay(int space) Create space for certain number of crew/passengers- Parameters:
space
- The number of crew or passengers to accommodate
-
-
Method Details
-
canLoad
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 interfaceTransporter
- Overrides:
canLoad
in classBay
- Parameters:
unit
- - theEntity
to be loaded.- Returns:
true
if the unit can be loaded,false
otherwise.
-
getUnusedString
Description copied from class:Bay
Return a string that identifies the unused capacity of this transporter.- Overrides:
getUnusedString
in classBay
- Returns:
- A
String
meant for a human.
-
isQuarters
public boolean isQuarters()- Overrides:
isQuarters
in classBay
- Returns:
- true if this bay represents crew quarters or seating rather than a unit transport bay.
-
getType
-
getWeight
public double getWeight() -
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 -
getCost
public long getCost()
-