Class AmmoMounted

java.lang.Object
megamek.common.equipment.Mounted<AmmoType>
megamek.common.equipment.AmmoMounted
All Implemented Interfaces:
Serializable, PhaseUpdated, RoundUpdated
Direct Known Subclasses:
BombMounted

public class AmmoMounted extends Mounted<AmmoType>
See Also:
  • Constructor Details

  • Method Details

    • isHalfLoadAmmo

      public boolean isHalfLoadAmmo()
      Is this bin be marked for half ammo loading?
      Returns:
      if half loading has been set
    • setHalfLoadAmmo

      public void setHalfLoadAmmo(boolean bHalfLoad)
      Set whether this bin should be half-loaded or not
      Parameters:
      bHalfLoad -
    • changeAmmoType

      public void changeAmmoType(AmmoType at)
      Change the type of ammo in this bin
      Parameters:
      at - The new ammo type
    • getExplosionDamage

      public int getExplosionDamage()
      Overrides:
      getExplosionDamage in class Mounted<AmmoType>
    • setAmmoCapacity

      public void setAmmoCapacity(double capacity)
      Sets the capacity of the ammo bin. Used for units that allocate by shot rather than by ton.
      Parameters:
      capacity - The capacity of the ammo bin in tons.
    • isOneShot

      public boolean isOneShot()
      Description copied from class: Mounted
      Checks whether this mount is either one a one-shot weapon or ammo for a one-shot weapon.
      Overrides:
      isOneShot in class Mounted<AmmoType>
      Returns:
      Whether the equipment is one-shot
    • isOneShotAmmo

      public boolean isOneShotAmmo()
      Overrides:
      isOneShotAmmo in class Mounted<AmmoType>
    • isGroundBomb

      public boolean isGroundBomb()
      Overrides:
      isGroundBomb in class Mounted<AmmoType>
      Returns:
      True if this Mounted is a bomb capable of striking ground targets.
    • getTonnage

      public double getTonnage()
      Overrides:
      getTonnage in class Mounted<AmmoType>
      Returns:
      The weight of the equipment in this mount, using the default rounding method for the Entity.