|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.Engine
public class Engine
This class represents an engine, such as those driving mechs.
| Field Summary | |
|---|---|
static int |
CLAN_ENGINE
|
static int |
COMBUSTION_ENGINE
|
static int |
COMPACT_ENGINE
|
static float[] |
ENGINE_RATINGS
|
boolean |
engineValid
|
static int |
FISSION
|
static int |
FUEL_CELL
|
static int |
LARGE_ENGINE
|
static int |
LIGHT_ENGINE
|
static int |
NORMAL_ENGINE
|
java.lang.StringBuffer |
problem
|
static int |
TANK_ENGINE
|
static int |
XL_ENGINE
|
static int |
XXL_ENGINE
|
| Constructor Summary | |
|---|---|
Engine(int engineRating,
int engineType,
int engineFlags)
The constructor takes the rating of the engine, the type of engine and any flags. |
|
| Method Summary | |
|---|---|
int |
getBaseChassisHeatSinks()
Return the Base Chassies Engine heat Sinks or intergalHeatSinkCapacity which ever is less. |
int |
getBaseCost()
|
double |
getBVMultiplier()
|
int[] |
getCenterTorsoCriticalSlots(int gyroType)
returns the slots taken up by the engine in the center torso. |
java.lang.String |
getEngineName()
This returns a non-localized name of the engine, it's mostly used to generate files. |
int |
getEngineType()
|
static int |
getEngineTypeByString(java.lang.String type)
Parses a string to find the engine type. |
int |
getJumpHeat(int movedMP)
|
int |
getRating()
Returns the rating of the engine. |
int |
getRunHeat()
|
java.lang.String |
getShortEngineName()
Get the name of this engine, this is the localized name used in displays. |
int[] |
getSideTorsoCriticalSlots()
Returns the engine criticals in the side torsos. |
int |
getSprintHeat()
|
int |
getStandingHeat()
Return the heat generated while the mech is standing still. |
int |
getTechType()
|
int |
getWalkHeat()
|
float |
getWeightEngine(Entity entity)
Returns the weight of the engine in tons, rounded to the next highest half ton. |
float |
getWeightEngine(Entity entity,
float roundWeight)
Returns the weight of the engine, rounded by roundWeight. |
int |
getWeightFreeEngineHeatSinks()
return the number of heatsinks that fit weight-free into the engine |
boolean |
hasFlag(int flag)
returns true if the engine has the flag set, false otherwise |
int |
integralHeatSinkCapacity()
Returns the number of heat sinks which can be built into the engine and therefore don't require a critical slot. |
boolean |
isFusion()
returns true if and only if this engine is a fusion engine |
void |
setBaseChassisHeatSinks(int amount)
For omnis set the base Chassies HS any variants will only use this and the reset will have to be added. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float[] ENGINE_RATINGS
public static final int CLAN_ENGINE
public static final int TANK_ENGINE
public static final int LARGE_ENGINE
public static final int COMBUSTION_ENGINE
public static final int NORMAL_ENGINE
public static final int XL_ENGINE
public static final int XXL_ENGINE
public static final int FUEL_CELL
public static final int LIGHT_ENGINE
public static final int COMPACT_ENGINE
public static final int FISSION
public boolean engineValid
public java.lang.StringBuffer problem
| Constructor Detail |
|---|
public Engine(int engineRating,
int engineType,
int engineFlags)
engineRating - the rating of the engineengineType - the type of the engine, either combustion or a type of
fusion engine.engineFlags - Wether the engine is a tank engine, a clan engine, or
large engine, or any combination of those.| Method Detail |
|---|
public boolean hasFlag(int flag)
flag - the flag to check for.
public static int getEngineTypeByString(java.lang.String type)
type - the string to parse
public boolean isFusion()
public float getWeightEngine(Entity entity)
public float getWeightEngine(Entity entity,
float roundWeight)
roundWeight - One of the rounding factors given in
TestEntity.
public int getWeightFreeEngineHeatSinks()
public int integralHeatSinkCapacity()
public java.lang.String getShortEngineName()
public java.lang.String getEngineName()
public int getRating()
public int[] getCenterTorsoCriticalSlots(int gyroType)
public int[] getSideTorsoCriticalSlots()
public int getStandingHeat()
public int getWalkHeat()
public int getRunHeat()
public int getSprintHeat()
public int getJumpHeat(int movedMP)
public double getBVMultiplier()
public int getBaseCost()
public int getTechType()
public int getEngineType()
public void setBaseChassisHeatSinks(int amount)
amount - public int getBaseChassisHeatSinks()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||