Class WeaponQuirks

java.lang.Object
megamek.common.options.AbstractOptions
megamek.common.options.WeaponQuirks
All Implemented Interfaces:
Serializable, IGameOptions

public class WeaponQuirks extends AbstractOptions
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:
  • Field Details

  • Constructor Details

    • WeaponQuirks

      public WeaponQuirks()
  • Method Details

    • initialize

      public void initialize()
      Specified by:
      initialize in class AbstractOptions
    • getOptionsInfoImp

      protected AbstractOptionsInfo getOptionsInfoImp()
      Specified by:
      getOptionsInfoImp in class AbstractOptions
    • activeQuirks

      public List<IOption> activeQuirks()
      Returns:
      A list of weapon quirks that are active in this Quirks object.
    • isQuirkDisallowed

      public static boolean isQuirkDisallowed(IOption quirk, Entity en, EquipmentType equipmentType)
    • hasLocationPlacementRestriction

      public static boolean hasLocationPlacementRestriction(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. 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 in Mounted.hasDirectionalTorsoMount().
      Parameters:
      weaponType - the weapon being checked
      Returns:
      true if the weapon may not be placed in a Directional Torso Mount