Package megamek.common.equipment
Class AmmoMounted
- All Implemented Interfaces:
Serializable,PhaseUpdated,RoundUpdated
- Direct Known Subclasses:
BombMounted
- See Also:
-
Field Summary
Fields inherited from class megamek.common.equipment.Mounted
baseDamageAbsorptionRate, baseDamageCapacity, damageTaken, EQUIP_OFF_DIAGNOSTIC_LOGGER, MINE_ACTIVE, MINE_COMMAND_DETONATED, MINE_CONVENTIONAL, MINE_EMP, MINE_INFERNO, MINE_NONE, MINE_VIBRABOMB, MODE_NONE, MODE_OFF, MODE_ON, switchedReason -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChange the type of ammo in this binintdoublebooleanbooleanIs this bin be marked for half ammo loading?booleanChecks whether this mount is either one a one-shot weapon or ammo for a one-shot weapon.booleanvoidsetAmmoCapacity(double capacity) Sets the capacity of the ammo bin.voidsetHalfLoadAmmo(boolean bHalfLoad) Set whether this bin should be half-loaded or notMethods inherited from class megamek.common.equipment.Mounted
adaptToGameOptions, allLocations, bayComponentsToString, canFire, canFire, canInstantSwitch, countQuirks, createMounted, curMode, directionalMountDebug, equipmentIndex, getArmorValue, getBaMountLoc, getBaseDesc, getBaseShotsLeft, getCalledShot, getChargeState, getCost, getCrossLinkedBy, getCurrentHeat, getDesc, getDirectionalMountFacing, getEntity, getEquipmentNum, getFacing, getFoundCrits, getHittableShotsLeft, getLinked, getLinkedBy, getLocation, getMissingTrooperString, getMode, getModesCount, getName, getNumCriticalSlots, getNumShots, getNWeapons, getOriginalShots, getQuirkList, getQuirks, getSecondLocation, getShortName, getSize, getSwitchedReason, getTonnage, getType, getUsableShotsLeft, hasChargedCapacitor, hasChargedOrChargingCapacitor, hasDirectional360TorsoMount, hasDirectionalTorsoMount, hasModes, hasModeType, hasQuirk, hasUsableShotsLeft, is, isAmmoUsable, isAMSused, isAnyMissingTroopers, isAPMMounted, isArmored, isAutocannonHit, isBodyMounted, isBombMounted, isBreached, isCrippled, isDestroyed, isDirectionalMountAlreadyFlipped, isDirectionalMountLocked, isDirectionalMountRear, isDumping, isDWPMounted, isFired, isHit, isHomingAmmoInHomingMode, isHotLoaded, isInBearingsOnlyMode, isInoperable, isInternalBomb, isInWaypointLaunchMode, isJammed, isMekTurretMounted, isMissing, isMissingForTrooper, isModeSwitchable, isModeTurnedOff, isModeTurnedOffNextRound, isOmniPodMounted, isOperable, isPendingDump, isPintleTurretMounted, isRapidFire, isReady, isReady, isRearMounted, isRepairable, isSplit, isSplitable, isSponsonTurretMounted, isSquadSupportWeapon, isTSEMPDowntime, isTurret, isUsedThisRound, isWeaponGroup, jammedThisPhase, modeNextRound, newPhase, newRound, pendingMode, relevantToTargetingComputer, resetJam, restore, setAMSused, setAPMMounted, setArmored, setArmorValue, setAutocannonHit, setBaMountLoc, setBombMounted, setBreached, setByShot, setChargeState, setCrossLinked, setDestroyed, setDirectionalMountFacing, setDirectionalMountLocked, setDirectionalMountRear, setDumping, setDWPMounted, setFacing, setFired, setFoundCrits, setHit, setHotLoad, setInternalBomb, setJammed, setLinked, setLocation, setLocation, setMekTurretMounted, setMissing, setMissingForTrooper, setMode, setMode, setModeImmediately, setModesForMapType, setModeSwitchable, setNWeapons, setOmniPodMounted, setOriginalShots, setPendingDump, setPintleTurretMounted, setQuirks, setRapidFire, setRepairable, setSecondLocation, setSecondLocation, setShotsLeft, setSize, setSplit, setSponsonTurretMounted, setSquadSupportWeapon, setSwitchedReason, setTSEMPDowntime, setType, setUsedThisRound, setWeaponGroup, switchChargeLevel, switchMode, toString, usedInPhase
-
Constructor Details
-
AmmoMounted
-
-
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
Change the type of ammo in this bin- Parameters:
at- The new ammo type
-
getExplosionDamage
public int getExplosionDamage()- Overrides:
getExplosionDamagein classMounted<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:MountedChecks whether this mount is either one a one-shot weapon or ammo for a one-shot weapon. -
isOneShotAmmo
public boolean isOneShotAmmo()- Overrides:
isOneShotAmmoin classMounted<AmmoType>
-
isGroundBomb
public boolean isGroundBomb()- Overrides:
isGroundBombin classMounted<AmmoType>- Returns:
- True if this Mounted is a bomb capable of striking ground targets.
-
getTonnage
public double getTonnage()- Overrides:
getTonnagein classMounted<AmmoType>- Returns:
- The weight of the equipment in this mount, using the default rounding method for the
Entity.
-