Class EntityWeightClass

java.lang.Object
megamek.common.units.EntityWeightClass

public class EntityWeightClass extends Object
weight class limits and names
  • Field Details

  • Constructor Details

    • EntityWeightClass

      public EntityWeightClass()
  • Method Details

    • getWeightLimitByType

      public static double[] getWeightLimitByType(String type)
    • getWeightClass

      public static int getWeightClass(double tonnage, String type)
      Retrieves the weight class based on the type string in the unit file.
      Parameters:
      tonnage - The entity weight
      type - The type string
      Returns:
      The weight class
    • getSupportWeightClass

      public static int getSupportWeightClass(double tonnage, String type)
      Retrieves the weight class for support vehicles based on the subtype string from the unit file
      Parameters:
      tonnage - The entity weight
      type - The subtype string
      Returns:
      The weight class
    • getWeightClass

      public static int getWeightClass(double tonnage, Entity en)
    • getClassLimit

      public static double getClassLimit(int wClass, Entity en)
    • getClassName

      public static String getClassName(int wClass, String unitType, boolean isSupport)
      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

      public static String getClassName(int wClass, Entity en)
    • getClassName

      public static String getClassName(int nameVal)