Package megamek.common.units
Class NavalRepairFacility
java.lang.Object
megamek.common.bays.Bay
megamek.common.bays.UnitBay
megamek.common.units.NavalRepairFacility
- All Implemented Interfaces:
Serializable,Transporter,ITechnology
- Direct Known Subclasses:
ReinforcedRepairFacility
Standard naval repair facilities for space stations (jumpships and warships can also carry a single facility). See
TacOps 334-5 for rules.
- 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
ConstructorsModifierConstructorDescriptionprotectedThe default constructor is only for serialization.NavalRepairFacility(double size, int doors, int bayNumber, int facing, boolean pressurized) Create a new repair facilityNavalRepairFacility(double size, int doors, int bayNumber, int facing, boolean pressurized, boolean arts) Create a new repair facility -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this object can accept the given unit.longgetCost()intSome bays (drop-shuttle and repair facility) have a maximum number per armor facing.getUnusedString(boolean showRecovery) Return a string that identifies the unused capacity of this transporter.doubleintReturns the number of Docking Collars (hardpoints) this transporter counts as toward the maximum that a JumpShip (or WS, SS) may carry.booleanhasARTS()Advanced Robotic Transport System (ARTS).booleanPressurized facility allows crew to work without encumbrance of life support gear.voidsetFacing(int facing) Sets the bay locationvoidsetPressurized(boolean pressurized) Deprecated, for removal: This API element is subject to removal in a future version.doublespaceForUnit(Entity unit) Most bay types track space by individual units.static 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.Bay
artsTechAdvancement, bayString, bayString, bayString, canUnloadUnits, destroyDoor, destroyDoorNext, getBaseAvailability, getBayDamage, getBayNumber, getCapacity, getCargoMpReduction, getCommonDate, getCurrentDoors, getDefaultSlotDescription, getDoors, getDoorsNext, getDroppableUnits, getExteriorUnitAt, getExternalUnits, getExtinctionDate, getExtinctionDate, getIntroductionDate, getIntroductionDate, getLaunchableUnits, getLoadedUnitIds, getLoadedUnits, getMinDoors, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, getPersonnel, getProductionDate, getProductionDate, getPrototypeDate, getPrototypeDate, getReintroductionDate, getReintroductionDate, getSafeLaunchRate, getStaticTechLevel, getTechBase, getTechRating, getTroops, getUnloadableUnits, getUnused, getUnusedSlots, getUnusedString, isCargo, isClan, isMixedTech, isQuarters, isWeaponBlockedAt, load, numDoorsString, resetCounts, resetDoors, resetTransporter, restoreAllDoors, restoreDoor, setBayDamage, setCurrentDoors, setCurrentSpace, setDoors, setDoorsNext, 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, setEntity
-
Constructor Details
-
NavalRepairFacility
protected NavalRepairFacility()The default constructor is only for serialization. -
NavalRepairFacility
public NavalRepairFacility(double size, int doors, int bayNumber, int facing, boolean pressurized) Create a new repair facility- Parameters:
size- Maximum capacity in tonsdoors- The number of bay doorsbayNumber- The id number for the bayfacing- The armor facing of the facilitypressurized- Whether the bay is pressurized
-
NavalRepairFacility
public NavalRepairFacility(double size, int doors, int bayNumber, int facing, boolean pressurized, boolean arts) Create a new repair facility- Parameters:
size- Maximum capacity in tonsdoors- The number of bay doorsbayNumber- The id number for the bayfacing- The armor facing of the facilitypressurized- Whether the bay is pressurizedarts- Whether the bay has the advanced robotic transport system
-
-
Method Details
-
isPressurized
public boolean isPressurized()Pressurized facility allows crew to work without encumbrance of life support gear. No game effect that I could find.- Returns:
- Whether the facility is pressurized.
-
hasARTS
public boolean hasARTS()Advanced Robotic Transport System (ARTS). See IO, p. 147- Returns:
- Whether the bay has the ARTS automated system
-
setPressurized
Deprecated, for removal: This API element is subject to removal in a future version. -
getTransporterType
-
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.
-
getWeight
public double getWeight() -
getFacing
public int getFacing()Description copied from class:BaySome bays (drop-shuttle and repair facility) have a maximum number per armor facing. -
setFacing
public void setFacing(int facing) Sets the bay location -
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 -
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.
-
hardpointCost
public int hardpointCost()Description copied from interface:TransporterReturns the number of Docking Collars (hardpoints) this transporter counts as toward the maximum that a JumpShip (or WS, SS) may carry. TO:AUE p.146- Returns:
- The number of docking hardpoints this transporter counts as toward the limit.
-
techAdvancement
-
getTechAdvancement
- Overrides:
getTechAdvancementin classBay
-
getCost
public long getCost() -
spaceForUnit
Most 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.
-