|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.EquipmentType
public class EquipmentType
Represents any type of equipment mounted on a mechs, excluding systems and actuators.
| Field Summary | |
|---|---|
protected static java.util.Vector<EquipmentType> |
allTypes
|
static double[] |
armorCosts
|
static java.lang.String[] |
armorNames
|
static double[] |
armorPointMultipliers
|
protected int[] |
availRating
|
protected double |
bv
|
static int |
BV_VARIABLE
|
protected double |
cost
|
static int |
COST_VARIABLE
|
protected int |
criticals
|
static int |
CRITICALS_VARIABLE
|
static int |
DATE_NONE
|
java.util.Vector<java.lang.String> |
endTurnModes
sometimes some modes can be switched at the end of turn and some instantly In that case, the specific end of turn mode names can be added here |
static int |
ERA_CLAN
|
static int |
ERA_SL
|
static int |
ERA_SW
|
protected boolean |
explosive
|
protected int |
extinctDate
|
protected java.math.BigInteger |
flags
|
protected boolean |
hittable
|
protected boolean |
instantModeSwitch
can modes be switched instantly, or at end of turn? |
protected java.lang.String |
internalName
|
protected int |
introDate
|
protected static java.util.Hashtable<java.lang.String,EquipmentType> |
lookupHash
|
protected java.util.Vector<EquipmentMode> |
modes
what modes can this equipment be in? |
protected java.lang.String |
name
|
static double |
POINT_MULTIPLIER_CLAN_FF
|
static double |
POINT_MULTIPLIER_UNKNOWN
|
static int |
RATING_A
|
static int |
RATING_B
|
static int |
RATING_C
|
static int |
RATING_D
|
static int |
RATING_E
|
static int |
RATING_F
|
static int |
RATING_X
|
static java.lang.String[] |
ratingNames
|
protected int |
reintroDate
|
protected boolean |
spreadable
can the crits for this be spread over locations? |
static double[] |
structureCosts
|
static java.lang.String[] |
structureNames
|
protected long |
subType
|
static int |
T_ARMOR_COMMERCIAL
|
static int |
T_ARMOR_FERRO_CARBIDE
|
static int |
T_ARMOR_FERRO_FIBROUS
|
static int |
T_ARMOR_FERRO_FIBROUS_PROTO
|
static int |
T_ARMOR_FERRO_IMP
|
static int |
T_ARMOR_FERRO_LAMELLOR
|
static int |
T_ARMOR_HARDENED
|
static int |
T_ARMOR_HEAVY_FERRO
|
static int |
T_ARMOR_HEAVY_INDUSTRIAL
|
static int |
T_ARMOR_INDUSTRIAL
|
static int |
T_ARMOR_LAMELLOR_FERRO_CARBIDE
|
static int |
T_ARMOR_LIGHT_FERRO
|
static int |
T_ARMOR_PATCHWORK
|
static int |
T_ARMOR_REACTIVE
|
static int |
T_ARMOR_REFLECTIVE
|
static int |
T_ARMOR_STANDARD
|
static int |
T_ARMOR_STEALTH
|
static int |
T_ARMOR_UNKNOWN
|
static int |
T_STRUCTURE_COMPOSITE
|
static int |
T_STRUCTURE_ENDO_COMPOSITE
|
static int |
T_STRUCTURE_ENDO_PROTOTYPE
|
static int |
T_STRUCTURE_ENDO_STEEL
|
static int |
T_STRUCTURE_INDUSTRIAL
|
static int |
T_STRUCTURE_REINFORCED
|
static int |
T_STRUCTURE_STANDARD
|
static int |
T_STRUCTURE_UNKNOWN
|
protected int |
techLevel
|
protected int |
techRating
|
protected int |
toHitModifier
|
protected float |
tonnage
|
static float |
TONNAGE_VARIABLE
|
| Constructor Summary | |
|---|---|
EquipmentType()
Creates new EquipmentType |
|
| Method Summary | |
|---|---|
void |
addEndTurnMode(java.lang.String mode)
|
void |
addLookupName(java.lang.String s)
|
void |
addSubType(int newFlag)
|
protected static void |
addType(EquipmentType type)
|
boolean |
equals(EquipmentType e)
|
static EquipmentType |
get(java.lang.String key)
|
static java.util.Enumeration<EquipmentType> |
getAllTypes()
|
static double |
getArmorCost(int inArmor)
|
static double |
getArmorPointMultiplier(int inArmor)
|
static double |
getArmorPointMultiplier(int inArmor,
boolean clanArmor)
|
static double |
getArmorPointMultiplier(int inArmor,
int inTechLevel)
|
static int |
getArmorType(java.lang.String inType)
|
static java.lang.String |
getArmorTypeName(int armorType)
|
int |
getAvailability(int era)
|
java.lang.String |
getAvailabilityName(int era)
|
double |
getBV(Entity entity)
|
double |
getCost(Entity entity,
boolean isArmored)
|
int |
getCriticals(Entity entity)
|
java.lang.String |
getDesc()
|
int |
getExtinctionDate()
|
java.math.BigInteger |
getFlags()
|
java.lang.String |
getInternalName()
|
int |
getIntroductionDate()
|
EquipmentMode |
getMode(int modeNum)
Returns the mode number modeNum from the list of modes
available for this type of equipment. |
java.util.Enumeration<EquipmentMode> |
getModes()
|
int |
getModesCount()
|
java.lang.String |
getName()
|
java.util.Enumeration<java.lang.String> |
getNames()
|
static java.lang.String |
getRatingName(int rating)
|
int |
getReintruductionDate()
|
static double |
getStructureCost(int inStructure)
|
static int |
getStructureType(java.lang.String inType)
|
static java.lang.String |
getStructureTypeName(int structureType)
|
int |
getTechLevel()
|
int |
getTechRating()
|
java.lang.String |
getTechRatingName()
|
int |
getToHitModifier()
|
float |
getTonnage(Entity entity)
|
boolean |
hasFlag(java.math.BigInteger flag)
|
boolean |
hasInstantModeSwitch()
|
boolean |
hasModes()
|
boolean |
hasSubType(long testFlag)
|
static void |
initializeTypes()
|
boolean |
isAvailableIn(int year)
|
boolean |
isExplosive()
|
boolean |
isHittable()
|
boolean |
isNextTurnModeSwitch(java.lang.String mode)
Some equipment types might have both instant and next turn mode switching. |
boolean |
isSpreadable()
|
int |
resolveVariableCost(Entity entity,
boolean isArmored)
stuff like hatchets, which depend on an unknown quality (usually tonnage of the unit.) entity is whatever has this item |
void |
setFlags(java.math.BigInteger inF)
|
void |
setInstantModeSwitch(boolean b)
|
void |
setInternalName(java.lang.String s)
|
protected void |
setModes(java.lang.String[] modes)
Sets the modes that this type of equipment can be in. |
void |
setSubType(int newFlags)
|
void |
setTonnage(float tonnage)
|
java.lang.String |
toString()
|
static void |
writeEquipmentDatabase(java.io.File f)
|
static void |
writeEquipmentExtendedDatabase(java.io.File f)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final float TONNAGE_VARIABLE
public static final int CRITICALS_VARIABLE
public static final int BV_VARIABLE
public static final int COST_VARIABLE
public static final int T_ARMOR_UNKNOWN
public static final int T_ARMOR_STANDARD
public static final int T_ARMOR_FERRO_FIBROUS
public static final int T_ARMOR_REACTIVE
public static final int T_ARMOR_REFLECTIVE
public static final int T_ARMOR_HARDENED
public static final int T_ARMOR_LIGHT_FERRO
public static final int T_ARMOR_HEAVY_FERRO
public static final int T_ARMOR_PATCHWORK
public static final int T_ARMOR_STEALTH
public static final int T_ARMOR_FERRO_FIBROUS_PROTO
public static final int T_ARMOR_COMMERCIAL
public static final int T_ARMOR_FERRO_CARBIDE
public static final int T_ARMOR_LAMELLOR_FERRO_CARBIDE
public static final int T_ARMOR_FERRO_IMP
public static final int T_ARMOR_INDUSTRIAL
public static final int T_ARMOR_HEAVY_INDUSTRIAL
public static final int T_ARMOR_FERRO_LAMELLOR
public static final int T_STRUCTURE_UNKNOWN
public static final int T_STRUCTURE_STANDARD
public static final int T_STRUCTURE_INDUSTRIAL
public static final int T_STRUCTURE_ENDO_STEEL
public static final int T_STRUCTURE_ENDO_PROTOTYPE
public static final int T_STRUCTURE_REINFORCED
public static final int T_STRUCTURE_COMPOSITE
public static final int T_STRUCTURE_ENDO_COMPOSITE
public static final java.lang.String[] armorNames
public static final java.lang.String[] structureNames
public static final double[] structureCosts
public static final double[] armorCosts
public static final double[] armorPointMultipliers
public static final double POINT_MULTIPLIER_UNKNOWN
public static final double POINT_MULTIPLIER_CLAN_FF
public static final int RATING_A
public static final int RATING_B
public static final int RATING_C
public static final int RATING_D
public static final int RATING_E
public static final int RATING_F
public static final int RATING_X
public static final int ERA_SL
public static final int ERA_SW
public static final int ERA_CLAN
public static final int DATE_NONE
public static final java.lang.String[] ratingNames
protected java.lang.String name
protected java.lang.String internalName
protected float tonnage
protected int criticals
protected boolean explosive
protected boolean hittable
protected boolean spreadable
protected int toHitModifier
protected int techLevel
protected java.math.BigInteger flags
protected long subType
protected double bv
protected double cost
protected int techRating
protected int[] availRating
protected int introDate
protected int extinctDate
protected int reintroDate
protected java.util.Vector<EquipmentMode> modes
protected boolean instantModeSwitch
public java.util.Vector<java.lang.String> endTurnModes
protected static java.util.Vector<EquipmentType> allTypes
protected static java.util.Hashtable<java.lang.String,EquipmentType> lookupHash
| Constructor Detail |
|---|
public EquipmentType()
| Method Detail |
|---|
public void setFlags(java.math.BigInteger inF)
public void setSubType(int newFlags)
public void addSubType(int newFlag)
public boolean hasSubType(long testFlag)
public java.lang.String getName()
public java.lang.String getDesc()
public java.lang.String getInternalName()
public int getTechLevel()
public float getTonnage(Entity entity)
public void setTonnage(float tonnage)
public int getCriticals(Entity entity)
public boolean isExplosive()
public boolean isHittable()
public boolean isSpreadable()
public int getToHitModifier()
public java.math.BigInteger getFlags()
public boolean hasFlag(java.math.BigInteger flag)
public double getBV(Entity entity)
public boolean hasModes()
true if this type of equipment has set of modes that
it can be in.public int getModesCount()
0 if it doesn't have modes.public java.util.Enumeration<EquipmentMode> getModes()
Enumeration of the EquipmentMode that
this type of equipment can be inprotected void setModes(java.lang.String[] modes)
modes - non null, non empty list of available mode names.public void addEndTurnMode(java.lang.String mode)
public boolean isNextTurnModeSwitch(java.lang.String mode)
Mounted.setMode(int) method to
distinguish instant and end of turn switching.
mode - - the String of the mode name involved in the
switch
public EquipmentMode getMode(int modeNum)
Returns the mode number
Fails if this type of the equipment doesn't have modes, or given mode is
out of the valid range.
modeNum from the list of modes
available for this type of equipment. Modes are numbered from
0 to
getModesCount()-1
modeNum -
modeNum from the list of modes available
for this type of equipment.hasModes()
public void setInstantModeSwitch(boolean b)
public boolean hasInstantModeSwitch()
public void setInternalName(java.lang.String s)
public void addLookupName(java.lang.String s)
public static EquipmentType get(java.lang.String key)
public java.util.Enumeration<java.lang.String> getNames()
public static void initializeTypes()
public static java.util.Enumeration<EquipmentType> getAllTypes()
protected static void addType(EquipmentType type)
public static int getArmorType(java.lang.String inType)
public static java.lang.String getArmorTypeName(int armorType)
public static int getStructureType(java.lang.String inType)
public static java.lang.String getStructureTypeName(int structureType)
public double getCost(Entity entity,
boolean isArmored)
public static java.lang.String getRatingName(int rating)
public int getTechRating()
public java.lang.String getTechRatingName()
public int getAvailability(int era)
public java.lang.String getAvailabilityName(int era)
public int getIntroductionDate()
public int getExtinctionDate()
public int getReintruductionDate()
public boolean isAvailableIn(int year)
public static double getArmorCost(int inArmor)
public static double getStructureCost(int inStructure)
public static double getArmorPointMultiplier(int inArmor)
public static double getArmorPointMultiplier(int inArmor,
int inTechLevel)
public static double getArmorPointMultiplier(int inArmor,
boolean clanArmor)
public int resolveVariableCost(Entity entity,
boolean isArmored)
public boolean equals(EquipmentType e)
public static void writeEquipmentDatabase(java.io.File f)
public static void writeEquipmentExtendedDatabase(java.io.File f)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||