Package megamek.common.units
Interface IAero
- All Known Implementing Classes:
- Aero,- AeroSpaceFighter,- ConvFighter,- Dropship,- EscapePods,- FighterSquadron,- FixedWingSupport,- Jumpship,- LandAirMek,- SmallCraft,- SpaceStation,- TeleMissile,- Warship
public interface IAero
Methods shared by Aero and LandAirMek
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoiddefault booleandefault booleandefault booleandefault booleandefault PilotingRollDatacheckDown(int drop, EntityMovementType overallMoveType) default PilotingRollDatacheckHover(MovePath md) default PilotingRollDatacheckManeuver(MoveStep step, EntityMovementType overallMoveType) Checks if a maneuver requires a control rolldefault PilotingRollDatacheckRolls(MoveStep step, EntityMovementType overallMoveType) default PilotingRollDatacheckStall(MovePath md) default PilotingRollDatacheckThrustSI(int thrust, EntityMovementType overallMoveType) default PilotingRollDatacheckThrustSITotal(int thrust, EntityMovementType overallMoveType) Checks if the specified thrust value exceeds the current structural integrity (SI) of the entity and computes any necessary modifiers or notes for the resulting piloting roll.default PilotingRollDatacheckVelocityDouble(int velocity, EntityMovementType overallMoveType) default PilotingRollDatabooleanbooleanbooleanvoidintintintintintintintintdefault intintintintintintdefault intCheck which turn engines were destroyed in.intintintgetFuel()doubledoubleGets the fuel for this Aero in terms of tonnage.default intgetFuelUsed(int thrust) intintdefault PilotingRollDatagetLandingControlRoll(int velocity, Coords landingPos, int face, boolean isVertical) Computes the PilotingRollData for a landing control roll (see TW pg 86).default PilotingRollDataComputes the PilotingRollData for a landing control roll (see TW pg 86).getLandingCoords(boolean isVertical, Coords landingPos, int facing) intgetLandingGearMod(boolean vTakeoff) intdefault intintintintintgetOSI()intintintgetSI()intdefault intintgetThresh(int loc) Iterate through current weapons and count the number in each capital fighter location.booleandefault Stringdefault StringhasRoomForHorizontalLanding(int assumedBoardId, Coords assumedPosition) default Stringdefault StringhasRoomForLanding(int assumedBoardId, Coords assumedPosition, LandingDirection landingDirection) default StringhasRoomForLanding(LandingDirection landingDirection) default Stringdefault StringhasRoomForVerticalLanding(int assumedBoardId, Coords assumedPosition) booleanbooleanbooleanbooleanbooleanbooleanbooleanisRolled()booleanbooleanbooleanisSTOL()booleanisVSTOL()default voidland()Performs necessary changes to this aero unit to place it in grounded mode.default voidliftOff(int altitude) Performs necessary changes to this aero unit to place it in airborne mode.default booleanvoidvoiddefault introllArcs(int arc) switches certain arcs due to rollingvoidsetAccDecNow(boolean b) voidsetAccLast(boolean b) voidsetAltLoss(int i) voidsetAltLossThisRound(int i) voidsetCapArmor(int i) voidsetCritThresh(boolean b) voidsetCurrentDamage(int i) voidsetCurrentFuel(int gas) voidsetCurrentVelocity(int velocity) voidsetEnginesLostRound(int round) Set round that engines were completely destroyed; needed for crash-landing checkvoidsetFailedManeuver(boolean b) voidvoidsetFuel(int gas) voidsetFuelTonnage(double fuelTons) Set number of fuel points based on fuel tonnage.voidsetGearHit(boolean hit) voidsetNextVelocity(int velocity) voidsetOutControl(boolean outControl) voidsetOutControlHeat(boolean outControlHeat) voidsetRandomMove(boolean randomMove) voidsetRolled(boolean roll) voidsetSI(int si) voidsetStraightMoves(int straightMoves) default booleanCheck if the specified hex is a prohibited terrain for Aero units to taxi intodefault voidA method to add/remove sensors that only work in space as we transition in and out of an atmospheredefault voidRefresh the capital fighter weapons groups.default voiduseFuel(int fuelUsed) use the specified amount of fuel for this Aero.boolean
- 
Field Details- 
LOGGER
 
- 
- 
Method Details- 
getCurrentThrustint getCurrentThrust()
- 
getCurrentVelocityint getCurrentVelocity()
- 
setCurrentVelocityvoid setCurrentVelocity(int velocity) 
- 
getNextVelocityint getNextVelocity()
- 
setNextVelocityvoid setNextVelocity(int velocity) 
- 
getCurrentVelocityActualint getCurrentVelocityActual()
- 
isVSTOLboolean isVSTOL()
- 
isSTOLboolean isSTOL()
- 
isSpheroidboolean isSpheroid()
- 
isAirborneboolean isAirborne()
- 
isSpaceborneboolean isSpaceborne()
- 
isRolledboolean isRolled()
- 
setRolledvoid setRolled(boolean roll) 
- 
isOutControlTotalboolean isOutControlTotal()
- 
isOutControlboolean isOutControl()
- 
setOutControlvoid setOutControl(boolean outControl) 
- 
isOutControlHeatboolean isOutControlHeat()
- 
setOutControlHeatvoid setOutControlHeat(boolean outControlHeat) 
- 
isRandomMoveboolean isRandomMove()
- 
setRandomMovevoid setRandomMove(boolean randomMove) 
- 
didAccLastboolean didAccLast()
- 
setAccLastvoid setAccLast(boolean b) 
- 
didFailManeuverboolean didFailManeuver()
- 
setFailedManeuvervoid setFailedManeuver(boolean b) 
- 
setAccDecNowvoid setAccDecNow(boolean b) 
- 
didAccDecNowboolean didAccDecNow()
- 
getStraightMovesint getStraightMoves()
- 
setStraightMovesvoid setStraightMoves(int straightMoves) 
- 
getAltLossint getAltLoss()
- 
setAltLossvoid setAltLoss(int i) 
- 
resetAltLossvoid resetAltLoss()
- 
getAltLossThisRoundint getAltLossThisRound()
- 
setAltLossThisRoundvoid setAltLossThisRound(int i) 
- 
resetAltLossThisRoundvoid resetAltLossThisRound()
- 
getNoseArmorint getNoseArmor()
- 
setSIvoid setSI(int si) 
- 
getSIint getSI()
- 
getOSIint getOSI()
- 
getAvionicsHitsint getAvionicsHits()
- 
getSensorHitsint getSensorHits()
- 
getFCSHitsint getFCSHits()
- 
getLandingGearPartialRepairsint getLandingGearPartialRepairs()
- 
getAvionicsMisReplacedint getAvionicsMisReplaced()
- 
getAvionicsMisrepairedint getAvionicsMisrepaired()
- 
getClusterModsdefault int getClusterMods()
- 
hasLifeSupportboolean hasLifeSupport()
- 
setGearHitvoid setGearHit(boolean hit) 
- 
getLandingGearModint getLandingGearMod(boolean vTakeoff) 
- 
getLeftThrustHitsint getLeftThrustHits()
- 
getRightThrustHitsint getRightThrustHits()
- 
getThreshint getThresh(int loc) 
- 
getHighestThreshint getHighestThresh()
- 
wasCritThreshboolean wasCritThresh()
- 
setCritThreshvoid setCritThresh(boolean b) 
- 
getFuelint getFuel()
- 
setFuelvoid setFuel(int gas) 
- 
getCurrentFuelint getCurrentFuel()
- 
setCurrentFuelvoid setCurrentFuel(int gas) 
- 
getFuelPointsPerTondouble getFuelPointsPerTon()
- 
isFlyingOffboolean isFlyingOff()
- 
setFlyingOff
- 
getFlyingOffDirectionOffBoardDirection getFlyingOffDirection()
- 
requiresFueldefault boolean requiresFuel()- Returns:
- True when this aero requires fuel to move. Note that the result is undefined when the unit has no engine. Callers should consider this case themselves. Also note that this method does not check whether fuel use as a game option is active, only if the unit technically requires fuel to move. For example, returns false for solar-powered prop-driven fixed wing support (TM p129).
 
- 
getCapArmorint getCapArmor()
- 
setCapArmorvoid setCapArmor(int i) 
- 
getCap0Armorint getCap0Armor()
- 
getFatalThreshint getFatalThresh()
- 
getCurrentDamageint getCurrentDamage()
- 
setCurrentDamagevoid setCurrentDamage(int i) 
- 
getHeatSinksint getHeatSinks()
- 
doDisbandDamagevoid doDisbandDamage()
- 
autoSetCapArmorvoid autoSetCapArmor()
- 
autoSetFatalThreshvoid autoSetFatalThresh()
- 
getAltitudeint getAltitude()
- 
groupWeaponsByLocationIterate through current weapons and count the number in each capital fighter location.- Returns:
- A map with keys in the format "weaponName:loc", with the number of weapons of that type in that location as the value.
 
- 
getWeaponGroups
- 
updateWeaponGroupsdefault void updateWeaponGroups()Refresh the capital fighter weapons groups.
- 
setFuelTonnagevoid setFuelTonnage(double fuelTons) Set number of fuel points based on fuel tonnage.- Parameters:
- fuelTons- The number of tons of fuel
 
- 
getFuelTonnagedouble getFuelTonnage()Gets the fuel for this Aero in terms of tonnage.- Returns:
- The number of tons of fuel on this Aero.
 
- 
checkThrustSI
- 
checkThrustSITotalChecks if the specified thrust value exceeds the current structural integrity (SI) of the entity and computes any necessary modifiers or notes for the resulting piloting roll.If the entity has the "G Tolerance" ability, a bonus modifier is applied. - If the thrust used is greater than the entity's SI, a modifier indicating "Thrust spent this turn exceeds current SI" is appended to the result.
- Otherwise, an indicator is added to show the SI was not exceeded.
 - Parameters:
- thrust- the thrust value used this turn
- overallMoveType- the overall movement type for this piloting check
- Returns:
- a PilotingRollDataobject with all appropriate modifiers and notes
 
- 
checkVelocityDouble
- 
checkDown
- 
checkHover
- 
checkStall
- 
checkRolls
- 
checkVerticalTakeOff
- 
getLandingControlRollComputes the PilotingRollData for a landing control roll (see TW pg 86).- Parameters:
- path- The landing move path to process (must contain a LAND or VERTICAL_LAND move step)
- Returns:
- A PilotingRollData tha represents the landing control roll that must be passed
 
- 
getLandingControlRolldefault PilotingRollData getLandingControlRoll(int velocity, Coords landingPos, int face, boolean isVertical) Computes the PilotingRollData for a landing control roll (see TW pg 86).- Parameters:
- velocity- Velocity when the check is to be made, this needs to be passed as the check could happen as part of a Move Path
- landingPos- The touch-down position (for a horizontal landing, that is not the final position)
- isVertical- If this a vertical or horizontal landing
- Returns:
- A PilotingRollData tha represents the landing control roll that must be passed
 
- 
getLandingCoords
- 
checkManeuverChecks if a maneuver requires a control roll
- 
rollArcsdefault int rollArcs(int arc) switches certain arcs due to rolling
- 
getTakeOffLengthdefault int getTakeOffLength()
- 
getLandingLengthdefault int getLandingLength()
- 
canTakeOffHorizontallydefault boolean canTakeOffHorizontally()
- 
canLandHorizontallydefault boolean canLandHorizontally()
- 
canTakeOffVerticallydefault boolean canTakeOffVertically()
- 
canLandVerticallydefault boolean canLandVertically()
- 
hasRoomForHorizontalTakeOff
- 
hasRoomForLanding
- 
hasRoomForHorizontalLanding
- 
hasRoomForLandingdefault String hasRoomForLanding(int assumedBoardId, Coords assumedPosition, LandingDirection landingDirection) 
- 
hasRoomForHorizontalLanding
- 
hasRoomForVerticalLanding
- 
hasRoomForVerticalLanding
- 
liftOffdefault void liftOff(int altitude) Performs necessary changes to this aero unit to place it in airborne mode. Sets the altitude to the given altitude, changes the movement mode to aerodyne/spheroid movement and clears secondary positions for DS. Note that altitude should not be 0 but this is not checked.- Parameters:
- altitude- The altitude to lift off to
 
- 
landdefault void land()Performs necessary changes to this aero unit to place it in grounded mode. Sets altitude and elevation, velocity and next velocity to 0, OOC and related effects to false and the movement mode to WHEELED.
- 
getFuelUseddefault int getFuelUsed(int thrust) 
- 
useFueldefault void useFuel(int fuelUsed) use the specified amount of fuel for this Aero. The amount may be adjusted by certain game options- Parameters:
- fuelUsed- The number of fuel points to use
 
- 
updateSensorOptionsdefault void updateSensorOptions()A method to add/remove sensors that only work in space as we transition in and out of an atmosphere
- 
getEnginesLostRounddefault int getEnginesLostRound()Check which turn engines were destroyed in.
- 
setEnginesLostRoundvoid setEnginesLostRound(int round) Set round that engines were completely destroyed; needed for crash-landing check
- 
taxingAeroProhibitedTerrainsCheck if the specified hex is a prohibited terrain for Aero units to taxi into- Parameters:
- hex- the hex to check
- Returns:
- true if the hex is a prohibited terrain for Aero units to taxi into
 
 
-