Class ArmorType

All Implemented Interfaces:
ITechnology

public class ArmorType extends MiscType
  • Field Details

  • Constructor Details

    • ArmorType

      public ArmorType()
  • Method Details

    • of

      public static ArmorType of(int type, boolean clan)
    • addLookupName

      public void addLookupName(String s, boolean includeInNames)
      Overrides:
      addLookupName in class EquipmentType
    • svArmor

      public static ArmorType svArmor(int bar)
    • forEntity

      public static ArmorType forEntity(Entity entity, int loc)
    • forEntity

      public static ArmorType forEntity(Entity entity)
    • allArmorTypes

      public static List<ArmorType> allArmorTypes()
    • allArmorNames

      public static List<String> allArmorNames()
    • getAllArmorCodeName

      public static Map<Integer,String> getAllArmorCodeName()
    • initializeTypes

      public static void initializeTypes()
    • getCost

      public double getCost()
      Returns:
      The cost of this armor per ton, or per point for BA and protomek armor.
    • getArmorType

      public int getArmorType()
      Returns:
      The EquipmentType.T_ARMOR_* constant for this armor.
    • getFighterSlots

      public int getFighterSlots()
      Returns:
      The number of weapon slots taken by the armor on an aerospace fighter.
    • getPatchworkSlotsMekSV

      public int getPatchworkSlotsMekSV()
      Space required by patchwork armor for Meks and support vehicles
      Returns:
      The number of critical/item slots taken by the armor per location as patchwork armor.
    • getPatchworkSlotsCVFtr

      public int getPatchworkSlotsCVFtr()
      Space required by patchwork armor for combat vehicles and conventional/aerospace fighters
      Returns:
      The number of item/weapon slots taken by the armor per location as patchwork armor.
    • getSupportVeeSlots

      public int getSupportVeeSlots(Entity entity)
      Overrides:
      getSupportVeeSlots in class EquipmentType
    • getPointsPerTon

      public double getPointsPerTon()
      Used for entities that do not vary the coverage by tonnage. For large craft, use getPointsPerTon(Entity).
      Returns:
      The number of armor points per ton of armor.
    • getPointsPerTon

      public double getPointsPerTon(Entity entity)
      Calculates the armor coverage per ton of armor. For large craft, this takes tonnage of the craft into account.
      Parameters:
      entity - The Entity the armor is mounted on
      Returns:
      The number of armor points per ton of armor.
    • getArmorPointsMultiplier

      public double getArmorPointsMultiplier()
    • getWeightPerPoint

      public double getWeightPerPoint()
    • getSVWeightPerPoint

      public double getSVWeightPerPoint(TechRating techRating)
      Parameters:
      techRating - The support vehicle's armor tech rating
      Returns:
      The weight in tons of each point of armor. A value of 0.0 means that the armor does not exist at that tech level (or it is not SV BAR armor).
    • getBAR

      public int getBAR()
    • toString

      public String toString()
      Overrides:
      toString in class MiscType
    • getYamlTypeName

      protected String getYamlTypeName()
      Description copied from class: EquipmentType
      Returns the YAML type name for this equipment type. Subclasses should override this to return their specific type name.
      Overrides:
      getYamlTypeName in class MiscType
      Returns:
      The YAML type name (e.g., "weapon", "ammo", "misc", "armor")
    • getYamlData

      public Map<String,Object> getYamlData()
      Description copied from class: EquipmentType
      Constructs a map containing the YAML-serializable data for this equipment type. Subclasses should override this method to add type-specific data.
      Overrides:
      getYamlData in class MiscType
      Returns:
      A map containing the YAML-serializable data for this equipment type.