Package megamek.common.units
Class EntityWeightClass
java.lang.Object
megamek.common.units.EntityWeightClass
weight class limits and names
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetClassLimit(int wClass, Entity en) static StringgetClassName(int nameVal) static StringgetClassName(int wClass, String unitType, boolean isSupport) Get the weight class name given a weight class define and a unitType.static StringgetClassName(int wClass, Entity en) static intgetSupportWeightClass(double tonnage, String type) Retrieves the weight class for support vehicles based on the subtype string from the unit filestatic intgetWeightClass(double tonnage, String type) Retrieves the weight class based on the type string in the unit file.static intgetWeightClass(double tonnage, Entity en) static double[]getWeightLimitByType(String type)
-
Field Details
-
WEIGHT_ULTRA_LIGHT
public static final int WEIGHT_ULTRA_LIGHT- See Also:
-
WEIGHT_LIGHT
public static final int WEIGHT_LIGHT- See Also:
-
WEIGHT_MEDIUM
public static final int WEIGHT_MEDIUM- See Also:
-
WEIGHT_HEAVY
public static final int WEIGHT_HEAVY- See Also:
-
WEIGHT_ASSAULT
public static final int WEIGHT_ASSAULT- See Also:
-
WEIGHT_COLOSSAL
public static final int WEIGHT_COLOSSAL- See Also:
-
WEIGHT_SUPER_HEAVY
public static final int WEIGHT_SUPER_HEAVY- See Also:
-
WEIGHT_SMALL_CRAFT
public static final int WEIGHT_SMALL_CRAFT- See Also:
-
WEIGHT_SMALL_DROP
public static final int WEIGHT_SMALL_DROP- See Also:
-
WEIGHT_MEDIUM_DROP
public static final int WEIGHT_MEDIUM_DROP- See Also:
-
WEIGHT_LARGE_DROP
public static final int WEIGHT_LARGE_DROP- See Also:
-
WEIGHT_SMALL_WAR
public static final int WEIGHT_SMALL_WAR- See Also:
-
WEIGHT_LARGE_WAR
public static final int WEIGHT_LARGE_WAR- See Also:
-
WEIGHT_SMALL_SUPPORT
public static final int WEIGHT_SMALL_SUPPORT- See Also:
-
WEIGHT_MEDIUM_SUPPORT
public static final int WEIGHT_MEDIUM_SUPPORT- See Also:
-
WEIGHT_LARGE_SUPPORT
public static final int WEIGHT_LARGE_SUPPORT- See Also:
-
SIZE
public static final int SIZE- See Also:
-
-
Constructor Details
-
EntityWeightClass
public EntityWeightClass()
-
-
Method Details
-
getWeightLimitByType
-
getWeightClass
Retrieves the weight class based on the type string in the unit file.- Parameters:
tonnage- The entity weighttype- The type string- Returns:
- The weight class
-
getSupportWeightClass
Retrieves the weight class for support vehicles based on the subtype string from the unit file- Parameters:
tonnage- The entity weighttype- The subtype string- Returns:
- The weight class
-
getWeightClass
-
getClassLimit
-
getClassName
Get the weight class name given a weight class define and a unitType. The unitType is a string that matches the unit type returned from a MekSummary. -
getClassName
-
getClassName
-