Package megamek.common.equipment
Class LiftHoist
java.lang.Object
megamek.common.equipment.ExternalCargo
megamek.common.equipment.LiftHoist
- All Implemented Interfaces:
Serializable,Transporter
Transporter for Lift Hoists as described TW p. 136
- See Also:
-
Field Summary
Fields inherited from class megamek.common.equipment.ExternalCargo
entity, entityId, game, totalSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the transporter damages its cargo if the transport is hit, otherwise false.protected booleancanLoad()If this specific transporter is capable of loading regardless of what the object is.booleanDetermines if this object can accept the given unit.booleancanLoadCarryable(ICarryable carryable) Determines if this object can accept the givenICarryable.booleanReturns true if the transporter can pick up ground objectsdoubleMethods inherited from class megamek.common.equipment.ExternalCargo
getCargoMpReduction, getCarriedTonnage, getCarryables, getCarryables, getExteriorUnitAt, getExternalUnits, getLoadedUnits, getLocations, getUnusedString, isWeaponBlockedAt, load, loadCarryable, loadCarryable, maxObjects, resetTransporter, setEntity, setGame, unload, unloadCarryableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface megamek.common.equipment.Transporter
canTow, getNameForRecordSheets, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, hardpointCost
-
Constructor Details
-
LiftHoist
-
-
Method Details
-
getUnused
public double getUnused()- Specified by:
getUnusedin interfaceTransporter- Overrides:
getUnusedin classExternalCargo- Returns:
- the number of unused spaces in this transporter.
-
canLoad
protected boolean canLoad()If this specific transporter is capable of loading regardless of what the object is. LiftHoists are only able to load if they are operable and not carrying anything else.- Overrides:
canLoadin classExternalCargo- Returns:
trueif the transporter is capable of loading,falseotherwise.
-
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:
canLoadin interfaceTransporter- Overrides:
canLoadin classExternalCargo- Parameters:
unit- - theEntityto be loaded.- Returns:
trueif the unit can be loaded,falseotherwise.
-
canLoadCarryable
Determines if this object can accept the givenICarryable. The carryable may not be of the appropriate type or there may be no room for the unit.- Overrides:
canLoadCarryablein classExternalCargo- Parameters:
carryable- theICarryableto be loaded- Returns:
trueif the carryable can be loaded,falseotherwise.
-
getTransporterType
-
canPickupGroundObject
public boolean canPickupGroundObject()Returns true if the transporter can pick up ground objects -
alwaysDamageCargoIfTransportHit
public boolean alwaysDamageCargoIfTransportHit()Returns true if the transporter damages its cargo if the transport is hit, otherwise false.
-