Package mekhq.campaign.universe
Class RATManager
java.lang.Object
mekhq.campaign.universe.AbstractUnitGenerator
mekhq.campaign.universe.RATManager
- All Implemented Interfaces:
- IUnitGenerator
Deprecated, for removal: This API element is subject to removal in a future version.
No longer in use
Provides a front end to RandomUnitGenerator that allows the user to generate units based on criteria such as faction,
 unit type, and weight class. May be restricted to a certain subset of all available RATs.
- 
Field SummaryFields inherited from interface mekhq.campaign.universe.IUnitGeneratorALL_BATTLE_ARMOR_MODES, ALL_INFANTRY_MODES, BATTLE_ARMOR_MIN_WEIGHT, FOOT_PLATOON_INFANTRY_WEIGHT, MIXED_TANK_VTOL, NO_WEIGHT_LIMIT
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionList<megamek.common.loaders.MekSummary>generate(int count, String faction, int unitType, int weightClass, int year, int quality, Collection<megamek.common.units.EntityMovementMode> movementModes, Collection<megamek.client.ratgenerator.MissionRole> missionRoles, Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Generates a list of units using additional parameters specific to the generation method.List<megamek.common.loaders.MekSummary>generate(int count, String faction, int unitType, int weightClass, int year, int quality, Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Generates a list of units with an additional test function.List<megamek.common.loaders.MekSummary>generate(int count, UnitGeneratorParameters parameters) Deprecated, for removal: This API element is subject to removal in a future version.Generates a list of mek summaries from a RAT determined by the given faction, quality and other parameters.megamek.common.loaders.MekSummarygenerate(String faction, int unitType, int weightClass, int year, int quality, Collection<megamek.common.units.EntityMovementMode> movementModes, Collection<megamek.client.ratgenerator.MissionRole> missionRoles, Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Generate a unit using additional parameters specific to the generation method.megamek.common.loaders.MekSummarygenerate(String faction, int unitType, int weightClass, int year, int quality, Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Generate a single unit.megamek.common.loaders.MekSummarygenerate(UnitGeneratorParameters parameters) Deprecated, for removal: This API element is subject to removal in a future version.Generates a single unit, for the given faction, using the given set of parameters.Deprecated, for removal: This API element is subject to removal in a future version.booleanisSupportedUnitType(int unitType) Deprecated, for removal: This API element is subject to removal in a future version.static voidDeprecated, for removal: This API element is subject to removal in a future version.Scans RatData directory for list of available RATs that can be used by CampaignOptions to provide a list.voidDeprecated, for removal: This API element is subject to removal in a future version.Remove RAT collection from list of selected RATsvoidsetIgnoreRatEra(boolean ignore) Deprecated, for removal: This API element is subject to removal in a future version.voidsetSelectedRATs(String[] selected) Deprecated, for removal: This API element is subject to removal in a future version.Replaces selected RAT collections with new listvoidsetSelectedRATs(List<String> selected) Deprecated, for removal: This API element is subject to removal in a future version.Replaces selected RAT collections with new listvoidDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class mekhq.campaign.universe.AbstractUnitGeneratorgenerateTurrets
- 
Constructor Details- 
RATManagerpublic RATManager()Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
updateRATConfigDeprecated, for removal: This API element is subject to removal in a future version.
- 
setSelectedRATsDeprecated, for removal: This API element is subject to removal in a future version.Replaces selected RAT collections with new list- Parameters:
- selected- List of RAT collection names
 
- 
setSelectedRATsDeprecated, for removal: This API element is subject to removal in a future version.Replaces selected RAT collections with new list- Parameters:
- selected- Array of RAT collection names
 
- 
removeRATDeprecated, for removal: This API element is subject to removal in a future version.Remove RAT collection from list of selected RATs- Parameters:
- collection- Name of RAT collection to remove
 
- 
setIgnoreRatErapublic void setIgnoreRatEra(boolean ignore) Deprecated, for removal: This API element is subject to removal in a future version.
- 
getAllRATCollectionsDeprecated, for removal: This API element is subject to removal in a future version.- Returns:
- A map of all collections available with a list of eras included
 
- 
populateCollectionNamespublic static void populateCollectionNames()Deprecated, for removal: This API element is subject to removal in a future version.Scans RatData directory for list of available RATs that can be used by CampaignOptions to provide a list.
- 
isSupportedUnitTypepublic boolean isSupportedUnitType(int unitType) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
- unitType- UnitType constant
- Returns:
- true if the generator supports the unit type
 
- 
generate@Nullable public megamek.common.loaders.MekSummary generate(String faction, int unitType, int weightClass, int year, int quality, @Nullable Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IUnitGeneratorGenerate a single unit.- Parameters:
- faction- Faction shortname
- unitType- UnitType constant
- weightClass- EntityWeightClass constant, or -1 for unspecified
- year- The year of the campaign date
- quality- Index of equipment rating, with zero being the lowest quality.
- filter- All generated units return true when the filter function is applied.
- Returns:
- A unit that matches the criteria
 
- 
generate@Nullable public megamek.common.loaders.MekSummary generate(String faction, int unitType, int weightClass, int year, int quality, Collection<megamek.common.units.EntityMovementMode> movementModes, Collection<megamek.client.ratgenerator.MissionRole> missionRoles, @Nullable Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IUnitGeneratorGenerate a unit using additional parameters specific to the generation method.- Parameters:
- faction- Faction shortname
- unitType- UnitType constant
- weightClass- EntityWeightClass constant, or -1 for unspecified
- year- The year of the campaign date
- quality- Index of equipment rating, with zero being the lowest quality.
- movementModes- A collection of various movement modes
- missionRoles- A collection of various mission roles
- filter- All generated units return true when the filter function is applied.
- Returns:
- A unit that matches the criteria
 
- 
generatepublic List<megamek.common.loaders.MekSummary> generate(int count, String faction, int unitType, int weightClass, int year, int quality, @Nullable Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IUnitGeneratorGenerates a list of units with an additional test function.- Parameters:
- count- The number of units to generate
- faction- Faction shortname
- unitType- UnitType constant
- weightClass- EntityWeightClass constant, or -1 for unspecified
- year- The year of the campaign date
- quality- Index of equipment rating, with zero being the lowest quality.
- filter- All generated units return true when the filter function is applied.
- Returns:
- A list of units matching the criteria.
 
- 
generatepublic List<megamek.common.loaders.MekSummary> generate(int count, String faction, int unitType, int weightClass, int year, int quality, Collection<megamek.common.units.EntityMovementMode> movementModes, Collection<megamek.client.ratgenerator.MissionRole> missionRoles, @Nullable Predicate<megamek.common.loaders.MekSummary> filter) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IUnitGeneratorGenerates a list of units using additional parameters specific to the generation method.- Parameters:
- count- The number of units to generate
- faction- Faction shortname
- unitType- UnitType constant
- weightClass- EntityWeightClass constant, or -1 for unspecified
- year- The year of the campaign date
- quality- Index of equipment rating, with zero being the lowest quality.
- movementModes- A collection of various movement modes
- missionRoles- A collection of various mission roles
- filter- All generated units return true when the filter function is applied.
- Returns:
- A list of units matching the criteria.
 
- 
generateDeprecated, for removal: This API element is subject to removal in a future version.Generates a single unit, for the given faction, using the given set of parameters. Note that some of the properties of the parameters may be ignored for generation mechanisms that aren't the RAT Generator- Parameters:
- parameters- data structure containing unit generation parameters
- Returns:
- Generated units. Null if none generated.
 
- 
generatepublic List<megamek.common.loaders.MekSummary> generate(int count, UnitGeneratorParameters parameters) Deprecated, for removal: This API element is subject to removal in a future version.Generates a list of mek summaries from a RAT determined by the given faction, quality and other parameters. Note that for the purposes of this implementation, the only properties of "parameters" used are unit type, year, weight classes and movement modes. We also expect the rating to be a number 1-5, rather than A-F.- Parameters:
- count- How many units to generate
- parameters- RATGenerator parameters (some are ignored)
- Returns:
- List of generated units. Empty if none are generated.
 
 
-