Class PowerGeneratorType

All Implemented Interfaces:
ITechnology

public class PowerGeneratorType extends MiscType
TO:AR 131-132 Advanced Buildings power generators.
  • Field Details

    • F_POWER_GENERATOR

      public static final MiscTypeFlag F_POWER_GENERATOR
  • Constructor Details

    • PowerGeneratorType

      public PowerGeneratorType(StructureEngine structureEngine)
  • Method Details

    • initializeTypes

      public static void initializeTypes()
    • createPowerGenerator

      public static PowerGeneratorType createPowerGenerator(StructureEngine engineType)
    • getStructureEngine

      public StructureEngine getStructureEngine()
    • getTonnage

      public double getTonnage(Entity entity, int location, double size, RoundWeight defaultRounding)
      Description copied from class: EquipmentType
      Calculates the weight of the equipment, with the option to override the standard rounding based on unit type. This allows for the optional fractional accounting construction rules. If entity is null, equipment without a fixed weight will return EquipmentType.TONNAGE_VARIABLE.
      Overrides:
      getTonnage in class MiscType
      Parameters:
      entity - The unit the equipment is mounted on
      location - The mount location
      size - The size (for variable-sized equipment)
      defaultRounding - The rounding method to use for any variable weight equipment. Any equipment that is normally rounded to either the half ton or kg based on unit type will have this method applied instead.
      Returns:
      The weight of the equipment in tons
    • getCost

      public double getCost(Entity entity, boolean isArmored, int loc, double size)
      Overrides:
      getCost in class MiscType
      Returns:
      The C-Bill cost of the piece of equipment.
    • getBV

      public double getBV(Entity entity)
      Overrides:
      getBV in class MiscType