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 Summary
Fields -
Method Summary
Modifier 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
-
getCurrentThrust
int getCurrentThrust() -
getCurrentVelocity
int getCurrentVelocity() -
setCurrentVelocity
void setCurrentVelocity(int velocity) -
getNextVelocity
int getNextVelocity() -
setNextVelocity
void setNextVelocity(int velocity) -
getCurrentVelocityActual
int getCurrentVelocityActual() -
isVSTOL
boolean isVSTOL() -
isSTOL
boolean isSTOL() -
isSpheroid
boolean isSpheroid() -
isAirborne
boolean isAirborne() -
isSpaceborne
boolean isSpaceborne() -
isRolled
boolean isRolled() -
setRolled
void setRolled(boolean roll) -
isOutControlTotal
boolean isOutControlTotal() -
isOutControl
boolean isOutControl() -
setOutControl
void setOutControl(boolean outControl) -
isOutControlHeat
boolean isOutControlHeat() -
setOutControlHeat
void setOutControlHeat(boolean outControlHeat) -
isRandomMove
boolean isRandomMove() -
setRandomMove
void setRandomMove(boolean randomMove) -
didAccLast
boolean didAccLast() -
setAccLast
void setAccLast(boolean b) -
didFailManeuver
boolean didFailManeuver() -
setFailedManeuver
void setFailedManeuver(boolean b) -
setAccDecNow
void setAccDecNow(boolean b) -
didAccDecNow
boolean didAccDecNow() -
getStraightMoves
int getStraightMoves() -
setStraightMoves
void setStraightMoves(int straightMoves) -
getAltLoss
int getAltLoss() -
setAltLoss
void setAltLoss(int i) -
resetAltLoss
void resetAltLoss() -
getAltLossThisRound
int getAltLossThisRound() -
setAltLossThisRound
void setAltLossThisRound(int i) -
resetAltLossThisRound
void resetAltLossThisRound() -
getNoseArmor
int getNoseArmor() -
setSI
void setSI(int si) -
getSI
int getSI() -
getOSI
int getOSI() -
getAvionicsHits
int getAvionicsHits() -
getSensorHits
int getSensorHits() -
getFCSHits
int getFCSHits() -
getLandingGearPartialRepairs
int getLandingGearPartialRepairs() -
getAvionicsMisReplaced
int getAvionicsMisReplaced() -
getAvionicsMisrepaired
int getAvionicsMisrepaired() -
getClusterMods
default int getClusterMods() -
hasLifeSupport
boolean hasLifeSupport() -
setGearHit
void setGearHit(boolean hit) -
getLandingGearMod
int getLandingGearMod(boolean vTakeoff) -
getLeftThrustHits
int getLeftThrustHits() -
getRightThrustHits
int getRightThrustHits() -
getThresh
int getThresh(int loc) -
getHighestThresh
int getHighestThresh() -
wasCritThresh
boolean wasCritThresh() -
setCritThresh
void setCritThresh(boolean b) -
getFuel
int getFuel() -
setFuel
void setFuel(int gas) -
getCurrentFuel
int getCurrentFuel() -
setCurrentFuel
void setCurrentFuel(int gas) -
getFuelPointsPerTon
double getFuelPointsPerTon() -
isFlyingOff
boolean isFlyingOff() -
setFlyingOff
-
getFlyingOffDirection
OffBoardDirection getFlyingOffDirection() -
requiresFuel
default 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).
-
getCapArmor
int getCapArmor() -
setCapArmor
void setCapArmor(int i) -
getCap0Armor
int getCap0Armor() -
getFatalThresh
int getFatalThresh() -
getCurrentDamage
int getCurrentDamage() -
setCurrentDamage
void setCurrentDamage(int i) -
getHeatSinks
int getHeatSinks() -
doDisbandDamage
void doDisbandDamage() -
autoSetCapArmor
void autoSetCapArmor() -
autoSetFatalThresh
void autoSetFatalThresh() -
getAltitude
int getAltitude() -
groupWeaponsByLocation
Iterate 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
-
updateWeaponGroups
default void updateWeaponGroups()Refresh the capital fighter weapons groups. -
setFuelTonnage
void setFuelTonnage(double fuelTons) Set number of fuel points based on fuel tonnage.- Parameters:
fuelTons- The number of tons of fuel
-
getFuelTonnage
double getFuelTonnage()Gets the fuel for this Aero in terms of tonnage.- Returns:
- The number of tons of fuel on this Aero.
-
checkThrustSI
-
checkThrustSITotal
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.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 turnoverallMoveType- the overall movement type for this piloting check- Returns:
- a
PilotingRollDataobject with all appropriate modifiers and notes
-
checkVelocityDouble
-
checkDown
-
checkHover
-
checkStall
-
checkRolls
-
checkVerticalTakeOff
-
getLandingControlRoll
Computes 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
-
getLandingControlRoll
default 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 PathlandingPos- 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
-
checkManeuver
Checks if a maneuver requires a control roll -
rollArcs
default int rollArcs(int arc) switches certain arcs due to rolling -
getTakeOffLength
default int getTakeOffLength() -
getLandingLength
default int getLandingLength() -
canTakeOffHorizontally
default boolean canTakeOffHorizontally() -
canLandHorizontally
default boolean canLandHorizontally() -
canTakeOffVertically
default boolean canTakeOffVertically() -
canLandVertically
default boolean canLandVertically() -
hasRoomForHorizontalTakeOff
-
hasRoomForLanding
-
hasRoomForHorizontalLanding
-
hasRoomForLanding
default String hasRoomForLanding(int assumedBoardId, Coords assumedPosition, LandingDirection landingDirection) -
hasRoomForHorizontalLanding
-
hasRoomForVerticalLanding
-
hasRoomForVerticalLanding
-
liftOff
default 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
-
land
default 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. -
getFuelUsed
default int getFuelUsed(int thrust) -
useFuel
default 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
-
updateSensorOptions
default void updateSensorOptions()A method to add/remove sensors that only work in space as we transition in and out of an atmosphere -
getEnginesLostRound
default int getEnginesLostRound()Check which turn engines were destroyed in. -
setEnginesLostRound
void setEnginesLostRound(int round) Set round that engines were completely destroyed; needed for crash-landing check -
taxingAeroProhibitedTerrains
Check 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
-