Package megamek.common.options
Class WeaponQuirks
java.lang.Object
megamek.common.options.AbstractOptions
megamek.common.options.WeaponQuirks
- All Implemented Interfaces:
Serializable,IGameOptions
This class represents the weapon quirks of an individual weapon. Each weapon on a unit has its own WeaponQuirks
object assigned that contains its specific quirks, see
Mounted.getQuirks(). When changing this, note that all
options should remain boolean options.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.common.options.AbstractOptions
AbstractOptions.GroupsEnumeration -
Field Summary
FieldsFields inherited from class megamek.common.options.AbstractOptions
optionsHash -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractOptionsInfostatic booleanhasLocationPlacementRestriction(WeaponType weaponType) Determines whether a weapon has location placement restrictions that forbid it from being placed in a Directional Torso Mount (BMM p.83): the Heavy Gauss and Improved Heavy Gauss rifles, which carry genuine mandatory mounting rules.voidstatic booleanisQuirkDisallowed(IOption quirk, Entity en, EquipmentType equipmentType) Methods inherited from class megamek.common.options.AbstractOptions
addGroup, addGroup, addOption, addOption, addOption, addOption, addOption, addOption, booleanOption, count, count, floatOption, getGroups, getOption, getOptionInfo, getOptionList, getOptionListString, getOptionMap, getOptions, getOptionsInfo, getOptionsList, intOption, stringOption
-
Field Details
-
WPN_QUIRKS
- See Also:
-
-
Constructor Details
-
WeaponQuirks
public WeaponQuirks()
-
-
Method Details
-
initialize
public void initialize()- Specified by:
initializein classAbstractOptions
-
getOptionsInfoImp
- Specified by:
getOptionsInfoImpin classAbstractOptions
-
activeQuirks
- Returns:
- A list of weapon quirks that are active in this Quirks object.
-
isQuirkDisallowed
-
hasLocationPlacementRestriction
Determines whether a weapon has location placement restrictions that forbid it from being placed in a Directional Torso Mount (BMM p.83): the Heavy Gauss and Improved Heavy Gauss rifles, which carry genuine mandatory mounting rules. Merely being large enough that construction allows splitting over two locations (8+ critical slots, e.g. a HAG/30) is an allowance, not a restriction, and does not exclude the weapon - the canon OmniMarauder Prime mounts its Directional Torso Mount HAG/30 whole in one torso. A weapon that actually is split across two locations can never ride the single-location mount; that is checked per mount inMounted.hasDirectionalTorsoMount().- Parameters:
weaponType- the weapon being checked- Returns:
trueif the weapon may not be placed in a Directional Torso Mount
-