Package megamek.common.equipment
Class InfantryWeaponMounted
java.lang.Object
megamek.common.equipment.Mounted<WeaponType>
megamek.common.equipment.WeaponMounted
megamek.common.equipment.InfantryWeaponMounted
- All Implemented Interfaces:
Serializable,PhaseUpdated,RoundUpdated
Specialized mount used for infantry units with primary and secondary weapons. This handles special features of both
weapons. Infantry units that only have a single weapon should use
Mounted.- 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
ConstructorsConstructorDescriptionInfantryWeaponMounted(Entity entity, InfantryWeapon rangeWeapon, InfantryWeapon otherWeapon) Creates a Mounted that deals with combined feature of a primary and a secondary weapon. -
Method Summary
Modifier and TypeMethodDescriptionvoidadaptToGameOptions(IGameOptions options) booleancanInstantSwitch(int newMode) Can the switch from the current mode to the new mode happen instantly?protected EquipmentModegetMode(int mode) intbooleanhasModes()booleanhasModeType(String mode) voidMethods inherited from class megamek.common.equipment.WeaponMounted
addAmmoToBay, addAmmoToBay, addWeaponToBay, addWeaponToBay, ammoInBay, assignAPDS, bayComponentsToString, bayContains, bayContains, clearBayAmmo, clearBayWeapons, getBayAmmo, getBayWeapon, getBayWeapons, getCurrentHeat, getCurrentShots, getExplosionDamage, getHeatByBay, getLinkedAmmo, isAPDS, isDisposableWeapon, isGroundBomb, isOneShot, removeAmmoFromBay, removeFromBay, removeFromBay, removeWeaponFromBay, removeWeaponFromBay, setDisposableWeaponMethods inherited from class megamek.common.equipment.Mounted
allLocations, canFire, canFire, countQuirks, createMounted, curMode, directionalMountDebug, equipmentIndex, getArmorValue, getBaMountLoc, getBaseDesc, getBaseShotsLeft, getCalledShot, getChargeState, getCost, getCrossLinkedBy, getDesc, getDirectionalMountFacing, getEntity, getEquipmentNum, getFacing, getFoundCrits, getHittableShotsLeft, getLinked, getLinkedBy, getLocation, getMissingTrooperString, getName, getNumCriticalSlots, getNumShots, getNWeapons, getOriginalShots, getQuirkList, getQuirks, getSecondLocation, getShortName, getSize, getSwitchedReason, getTonnage, getTonnage, getType, getUsableShotsLeft, hasChargedCapacitor, hasChargedOrChargingCapacitor, hasDirectional360TorsoMount, hasDirectionalTorsoMount, 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, isOneShotAmmo, 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
-
InfantryWeaponMounted
Creates a Mounted that deals with combined feature of a primary and a secondary weapon. Infantry units with a single type of weapon should useMounted- Parameters:
entity- The infantry unitrangeWeapon- The weapon used to calculate range.otherWeapon- The other weapon
-
-
Method Details
-
getOtherWeapon
-
rebuildModeList
public void rebuildModeList() -
getModesCount
public int getModesCount()- Overrides:
getModesCountin classMounted<WeaponType>
-
getMode
- Overrides:
getModein classMounted<WeaponType>
-
hasModes
public boolean hasModes()- Overrides:
hasModesin classMounted<WeaponType>
-
hasModeType
- Overrides:
hasModeTypein classMounted<WeaponType>
-
canInstantSwitch
public boolean canInstantSwitch(int newMode) Description copied from class:MountedCan the switch from the current mode to the new mode happen instantly?- Overrides:
canInstantSwitchin classMounted<WeaponType>- Parameters:
newMode- - integer that represents the new mode- Returns:
- true if the new mode can be switched instantly
-
adaptToGameOptions
- Overrides:
adaptToGameOptionsin classMounted<WeaponType>
-