Package megamek.client.ratgenerator
Class ChassisRecord
java.lang.Object
megamek.client.ratgenerator.AbstractUnitRecord
megamek.client.ratgenerator.ChassisRecord
The ChassisRecord tracks all available variants and determines how much total
weight
is to be distributed among the various models.
-
Field Summary
FieldsFields inherited from class megamek.client.ratgenerator.AbstractUnitRecord
chassis, clan, includedFactions, introYear, omni, unitType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addModel
(ModelRecord model) getFilteredModels
(int exactYear, Collection<Integer> validWeightClasses, Collection<EntityMovementMode> movementModes, int networkMask) Generate a list of models for this chassis based on certain criteria.double
totalModelWeight
(int era, String fKey) double
totalModelWeight
(int era, FactionRecord fRec) 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.Methods inherited from class megamek.client.ratgenerator.AbstractUnitRecord
calcAvailability, getChassis, getChassisKey, getIncludedFactions, getIntroYear, getKey, getUnitType, isClan, isOmni, parseUnitType, setChassis, setClan, setIntroYear, setOmni, setUnitType, setUnitType, toString
-
Field Details
-
models
-
-
Constructor Details
-
ChassisRecord
-
-
Method Details
-
addModel
-
getModels
-
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 yearvalidWeightClasses
- restrict weight class to one or more classesmovementModes
- movement mode types, may be null or emptynetworkMask
- 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 upcurrentEra
- year for current eraexactYear
- current year in gamenextEra
- start date of next era after the current onefRec
- faction dataroles
- roles selected for generation, may be null or emptyroleStrictness
- positive number, higher applies heavier role adjustmentsequipRating
- equipment rating to generate fornumRatingLevels
- how many rating levels are present- Returns:
- sum of calculated weights of all models of this chassis
-
totalModelWeight
-
totalModelWeight
-