Class ChassisRecord

java.lang.Object
megamek.client.ratgenerator.AbstractUnitRecord
megamek.client.ratgenerator.ChassisRecord

public class ChassisRecord extends AbstractUnitRecord
The ChassisRecord tracks all available variants and determines how much total weight is to be distributed among the various models.
  • Field Details

  • Constructor Details

    • ChassisRecord

      public ChassisRecord(String chassis)
  • Method Details

    • addModel

      public void addModel(ModelRecord model)
    • getModels

      public HashSet<ModelRecord> getModels()
    • getSortedModels

      public List<ModelRecord> getSortedModels()
    • getFilteredModels

      public HashSet<ModelRecord> getFilteredModels(int exactYear, Collection<Integer> validWeightClasses, Collection<EntityMovementMode> movementModes, int networkMask)
      Generate a list of models for this chassis based on certain criteria. Early prototypes may be available one year before official introduction.
      Parameters:
      exactYear - game year
      validWeightClasses - restrict weight class to one or more classes
      movementModes - movement mode types, may be null or empty
      networkMask - specific C3 network equipment
      Returns:
      set of models which pass the filter requirements, may be empty
    • totalModelWeight

      public double totalModelWeight(HashSet<ModelRecord> validModels, int currentEra, int exactYear, int nextEra, FactionRecord fRec, Collection<MissionRole> roles, int roleStrictness, int equipRating, int numRatingLevels, HashMap<String,Double> weightData)
      Total the weights of all models for this chassis, including modifiers for +/- dynamic adjustment, intro year adjustment, interpolation, and role modifications.
      Parameters:
      validModels - models to add up
      currentEra - year for current era
      exactYear - current year in game
      nextEra - start date of next era after the current one
      fRec - faction data
      roles - roles selected for generation, may be null or empty
      roleStrictness - positive number, higher applies heavier role adjustments
      equipRating - equipment rating to generate for
      numRatingLevels - how many rating levels are present
      Returns:
      sum of calculated weights of all models of this chassis
    • totalModelWeight

      public double totalModelWeight(int era, String fKey)
    • totalModelWeight

      public double totalModelWeight(int era, FactionRecord fRec)