Package megamek.client.ratgenerator
Class ModelRecord
java.lang.Object
megamek.client.ratgenerator.AbstractUnitRecord
megamek.client.ratgenerator.ModelRecord
Specific unit variants; analyzes equipment to determine suitability for certain types of missions in addition to what
is formally declared in the data files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class megamek.client.ratgenerator.AbstractUnitRecord
chassis, clan, includedFactions, introYear, omni, unitType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanfactionIsExcluded(String faction, String subfaction) Deprecated, for removal: This API element is subject to removal in a future version.booleanfactionIsExcluded(FactionRecord checkFaction) doubleProportion of total weapons BV that is dependent on ammunitionbooleanDeprecated, for removal: This API element is subject to removal in a future version.doubleDeprecated, for removal: This API element is subject to removal in a future version.doublegetFlak()Proportion of total weapons BV that is optimized against airborne targetsbooleangetJump()getKey()doubleProportion of total weapons BV that is capable of attacking targets at longer ranges.getModel()intgetRoles()intgetSpeed()doubleDeprecated, for removal: This API element is subject to removal in a future version.intbooleanbooleanbooleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.booleanbooleanUnit contains at least some primitive technology, without any advanced tech.booleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanisSL()Unit has advanced IS-base technologybooleanbooleanvoidsetExcludedFactions(String excludedFactions) voidsetMagClamp(boolean flag) voidsetMechanizedBA(boolean flag) voidsetNetwork(int network) voidsetRequiredUnits(String requiredUnitNames) Methods inherited from class megamek.client.ratgenerator.AbstractUnitRecord
calcAvailability, getChassis, getChassisKey, getIncludedFactions, getIntroYear, getUnitType, isClan, isOmni, parseUnitType, setChassis, setClan, setIntroYear, setOmni, setUnitType, setUnitType, toString
-
Field Details
-
NETWORK_NONE
public static final int NETWORK_NONE- See Also:
-
NETWORK_C3_SLAVE
public static final int NETWORK_C3_SLAVE- See Also:
-
NETWORK_BA_C3
public static final int NETWORK_BA_C3- See Also:
-
NETWORK_C3_MASTER
public static final int NETWORK_C3_MASTER- See Also:
-
NETWORK_C3I
public static final int NETWORK_C3I- See Also:
-
NETWORK_NAVAL_C3
public static final int NETWORK_NAVAL_C3- See Also:
-
NETWORK_NOVA
public static final int NETWORK_NOVA- See Also:
-
NETWORK_BOOSTED
public static final int NETWORK_BOOSTED- See Also:
-
NETWORK_COMPANY_COMMAND
public static final int NETWORK_COMPANY_COMMAND- See Also:
-
NETWORK_BOOSTED_SLAVE
public static final int NETWORK_BOOSTED_SLAVE- See Also:
-
NETWORK_BOOSTED_MASTER
public static final int NETWORK_BOOSTED_MASTER- See Also:
-
-
Constructor Details
-
ModelRecord
-
ModelRecord
-
-
Method Details
-
getModel
-
getWeightClass
public int getWeightClass() -
getMovementMode
-
isQuadMek
public boolean isQuadMek() -
isTripodMek
public boolean isTripodMek() -
isMixedISTech
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true, if unit is base IS tech and mounts Clan tech equipment
-
isMixedOrClanTech
public boolean isMixedOrClanTech()- Returns:
- true, if unit is either base Clan tech, or is base IS tech and mounts Clan tech equipment
-
isPrimitive
public boolean isPrimitive()Unit contains at least some primitive technology, without any advanced tech. Testing is not extensive, there may be units that are not properly flagged.- Returns:
- true, if unit contains no advanced tech and at least some primitive tech
-
isRetroTech
Deprecated, for removal: This API element is subject to removal in a future version.Unit consists of at least some primitive technology and some advanced/Star League/Clan technology. Testing is not extensive, there may be units that are not properly flagged.- Returns:
- true, if unit contains both primitive and advanced tech
-
isSL
public boolean isSL()Unit has advanced IS-base technology -
getRoles
-
getDeployedWith
-
getRequiredUnits
-
getExcludedFactions
-
getNetworkMask
public int getNetworkMask() -
setNetwork
public void setNetwork(int network) -
getFlak
public double getFlak()Proportion of total weapons BV that is optimized against airborne targets- Returns:
- between zero (none) and 1.0 (all weapons)
-
getArtilleryProportion
Deprecated, for removal: This API element is subject to removal in a future version.Proportion of total weapons BV that is artillery- Returns:
- between zero (none) and 1.0 (all weapons)
-
getLongRange
public double getLongRange()Proportion of total weapons BV that is capable of attacking targets at longer ranges. Units with values of 0.75 or higher are mostly armed with weapons that can hit targets at 15+ hexes, have a minimum range, and potentially fire indirectly in ground combat; or reach long/extreme range in air or space combat. Complementary to getSRProportion() - where one is high and the other is low, the unit is specialized for that range bracket. If both values are similar the unit is well balanced between long and short ranged capabilities. TODO: rename for consistency and clarity- Returns:
- between zero (none) and 1.0 (all weapons)
-
getSRProportion
Deprecated, for removal: This API element is subject to removal in a future version.Proportion of total weapons BV that is limited to attacking targets at close range. Units with values of 0.75 or higher are mostly armed with weapons that have a long range of less than 12 hexes and do not have a minimum range in ground combat, or are limited to short range in air/space combat. Complementary to getLongRange() - where one is high and the other is low, the unit is specialized for that range bracket. If both values are similar the unit is well balanced between long and short ranged capabilities.- Returns:
- between zero (none) and 1.0 (all weapons)
-
getSpeed
public int getSpeed() -
getJump
public boolean getJump() -
getAmmoRequirement
public double getAmmoRequirement()Proportion of total weapons BV that is dependent on ammunition- Returns:
- between zero (none) and 1.0 (all weapons)
-
hasIncendiaryWeapon
public boolean hasIncendiaryWeapon() -
hasAPWeapons
public boolean hasAPWeapons() -
isUnarmed
public boolean isUnarmed()- Returns:
- true if unit has no BV invested in weapons
-
isRemoteDrone
Deprecated, for removal: This API element is subject to removal in a future version.Unit is a remotely operated drone- Returns:
- true if unit has remote drone operation equipment
-
isRobotDrone
Deprecated, for removal: This API element is subject to removal in a future version.Unit is an independently operating drone- Returns:
- true if unit has robotic operations system
-
getMekSummary
-
addRoles
-
setRequiredUnits
-
setExcludedFactions
-
factionIsExcluded
-
factionIsExcluded
@Deprecated(since="0.51.0", forRemoval=true) public boolean factionIsExcluded(String faction, String subfaction) Deprecated, for removal: This API element is subject to removal in a future version. -
getKey
- Overrides:
getKeyin classAbstractUnitRecord
-
canDoMechanizedBA
public boolean canDoMechanizedBA() -
setMechanizedBA
public void setMechanizedBA(boolean flag) -
hasMagClamp
public boolean hasMagClamp() -
setMagClamp
public void setMagClamp(boolean flag) -
getAntiMek
Deprecated, for removal: This API element is subject to removal in a future version.
-