Package megamek.common
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 TypeMethodDescriptionvoid
void
default boolean
default boolean
default boolean
default boolean
default PilotingRollData
checkDown
(int drop, EntityMovementType overallMoveType) default PilotingRollData
checkHover
(MovePath md) default PilotingRollData
checkManeuver
(MoveStep step, EntityMovementType overallMoveType) Checks if a maneuver requires a control rolldefault PilotingRollData
checkRolls
(MoveStep step, EntityMovementType overallMoveType) default PilotingRollData
checkStall
(MovePath md) default PilotingRollData
checkThrustSI
(int thrust, EntityMovementType overallMoveType) default PilotingRollData
checkThrustSITotal
(int thrust, EntityMovementType overallMoveType) default PilotingRollData
checkVelocityDouble
(int velocity, EntityMovementType overallMoveType) default PilotingRollData
boolean
boolean
boolean
void
int
int
int
int
int
int
int
int
default int
int
int
int
int
int
default int
Check which turn engines were destroyed in.int
int
int
getFuel()
double
double
Gets the fuel for this Aero in terms of tonnage.default int
getFuelUsed
(int thrust) int
int
default PilotingRollData
getLandingControlRoll
(int velocity, Coords landingPos, int face, boolean isVertical) Computes the PilotingRollData for a landing control roll (see TW pg 86).default PilotingRollData
Computes the PilotingRollData for a landing control roll (see TW pg 86).getLandingCoords
(boolean isVertical, Coords landingPos, int facing) int
getLandingGearMod
(boolean vTakeoff) int
default int
int
int
int
int
getOSI()
int
int
int
getSI()
int
default int
int
getThresh
(int loc) Iterate through current weapons and count the number in each capital fighter location.boolean
default String
default String
hasRoomForHorizontalLanding
(int assumedBoardId, Coords assumedPosition) default String
default String
hasRoomForLanding
(int assumedBoardId, Coords assumedPosition, LandingDirection landingDirection) default String
hasRoomForLanding
(LandingDirection landingDirection) default String
default String
hasRoomForVerticalLanding
(int assumedBoardId, Coords assumedPosition) boolean
boolean
boolean
boolean
boolean
boolean
boolean
isRolled()
boolean
boolean
boolean
isSTOL()
boolean
isVSTOL()
default void
land()
Performs necessary changes to this aero unit to place it in grounded mode.default void
liftOff
(int altitude) Performs necessary changes to this aero unit to place it in airborne mode.default boolean
void
void
default int
rollArcs
(int arc) switches certain arcs due to rollingvoid
setAccDecNow
(boolean b) void
setAccLast
(boolean b) void
setAltLoss
(int i) void
setAltLossThisRound
(int i) void
setCapArmor
(int i) void
setCritThresh
(boolean b) void
setCurrentDamage
(int i) void
setCurrentFuel
(int gas) void
setCurrentVelocity
(int velocity) void
setEnginesLostRound
(int round) Set round that engines were completely destroyed; needed for crash-landing checkvoid
setFailedManeuver
(boolean b) void
void
setFuel
(int gas) void
setFuelTonnage
(double fuelTons) Set number of fuel points based on fuel tonnage.void
setGearHit
(boolean hit) void
setNextVelocity
(int velocity) void
setOutControl
(boolean ocontrol) void
setOutCtrlHeat
(boolean octrlheat) void
setRandomMove
(boolean randmove) void
setRolled
(boolean roll) void
setSI
(int si) void
setStraightMoves
(int straightMoves) default boolean
Check if the specified hex is a prohibited terrain for Aero units to taxi intodefault void
A method to add/remove sensors that only work in space as we transition in and out of an atmospheredefault void
Refresh the capital fighter weapons groups.default void
useFuel
(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 ocontrol) -
isOutCtrlHeat
boolean isOutCtrlHeat() -
setOutCtrlHeat
void setOutCtrlHeat(boolean octrlheat) -
isRandomMove
boolean isRandomMove() -
setRandomMove
void setRandomMove(boolean randmove) -
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
-
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 VLAND 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- Parameters:
round
-
-
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
-