Package megamek.common.bays
Class SecondClassQuartersCargoBay
java.lang.Object
megamek.common.bays.Bay
megamek.common.bays.SecondClassQuartersCargoBay
- All Implemented Interfaces:
- Serializable,- Transporter,- ITechnology
Represents a volume of space set aside for carrying second class passengers
- See Also:
- 
Field SummaryFields inherited from class megamek.common.bays.BaybayNumber, currentDoors, currentSpace, damage, doors, doorsNext, FACING_PREFIX, FIELD_SEPARATOR, game, loadedThisTurn, minDoors, recoverySlots, totalSpace, troops, unloadedThisTurnFields inherited from interface megamek.common.interfaces.ITechnologyDATE_ES, DATE_NONE, DATE_PS
- 
Constructor SummaryConstructorsConstructorDescriptionSecondClassQuartersCargoBay(double weight, int doors) Create a space for the given tonnage of troops.SecondClassQuartersCargoBay(int space) Create space for certain number of crew/passengers
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDetermines if this object can accept the given unit.longgetCost()getType()getUnusedString(boolean showRecovery) Return a string that identifies the unused capacity of this transporter.doublebooleantoString()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.BayartsTechAdvancement, 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, unloadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.interfaces.ITechnologycalcEraAvailability, 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.TransportercanTow, getNameForRecordSheets, hardpointCost
- 
Constructor Details- 
SecondClassQuartersCargoBaypublic SecondClassQuartersCargoBay(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.
 
- 
SecondClassQuartersCargoBaypublic SecondClassQuartersCargoBay(int space) Create space for certain number of crew/passengers- Parameters:
- space- The number of crew or passengers to accommodate
 
 
- 
- 
Method Details- 
canLoadDetermines 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 interface- Transporter
- Overrides:
- canLoadin class- Bay
- Parameters:
- unit- the- Entityto be loaded.
- Returns:
- trueif the unit can be loaded,- falseotherwise.
 
- 
getUnusedStringDescription copied from class:BayReturn a string that identifies the unused capacity of this transporter.- Overrides:
- getUnusedStringin class- Bay
- Returns:
- A Stringmeant for a human.
 
- 
getType
- 
getWeightpublic double getWeight()
- 
isQuarterspublic boolean isQuarters()- Overrides:
- isQuartersin class- Bay
- Returns:
- true if this bay represents crew quarters or seating rather than a unit transport bay.
 
- 
toStringDescription 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
- 
getCostpublic long getCost()
 
-