Package megamek.common.equipment
Record Class INarcPod
java.lang.Object
java.lang.Record
megamek.common.equipment.INarcPod
- All Implemented Interfaces:
- Serializable,- InGameObject,- BTObject,- Targetable
public record INarcPod(int team, int type, int location)
extends Record
implements Serializable, Targetable
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from interface megamek.common.units.TargetableTYPE_BLDG_IGNITE, TYPE_BLDG_TAG, TYPE_BUILDING, TYPE_ENTITY, TYPE_FLARE_DELIVER, TYPE_FUEL_TANK, TYPE_FUEL_TANK_IGNITE, TYPE_HEX_AERO_BOMB, TYPE_HEX_ARTILLERY, TYPE_HEX_BOMB, TYPE_HEX_CLEAR, TYPE_HEX_EXTINGUISH, TYPE_HEX_IGNITE, TYPE_HEX_SCREEN, TYPE_HEX_TAG, TYPE_I_NARC_POD, TYPE_MINEFIELD_CLEAR, TYPE_MINEFIELD_DELIVER, TYPE_SEARCHLIGHT
- 
Constructor SummaryConstructorsConstructorDescriptionINarcPod(int team, int type, int location) Creates a newINarcPod, from the team and of the type specified.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDetermine if the other object is an equivalent INarc pod.Returns the general name or type name of this unit/object.intintReturns the elevation of this target, relative to the position Hex's surfaceintReturns the height of the target, that is, how many levels above its elevation it is for LOS purposes.intgetId()Returns this InGameObject's id.intReturns the unique id of this InGameObject's owning player.intReturns the current (remaining) battle strength of this unit or object.intinthashCode()Returns a hash code value for this object.static INarcPodidToInstance(int id) Create a new iNarc pod that is equivalent to the given ID.booleanbooleanbooleanDetermines if this target should be considered the enemy of the supplied player.booleanReturns true if the target is considered immobile (-4 to hit).booleanintlocation()Returns the value of thelocationrecord component.intvoidsetId(int newId) Sets this InGameObject's id.voidsetOwnerId(int newOwnerId) Sets the unique id of this InGameObject's owning player.intintReturns the specific name or type name of this unit/object.intteam()Returns the value of theteamrecord component.toString()Get aStringrepresenting this INarc pod.inttype()Returns the value of thetyperecord component.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.units.BTObjectgetFluffImage, getIcon, hasAerodyneSpheroidDistinction, isAero, isAerodyne, isAerospace, isAerospaceFighter, isAerospaceSV, isBattleArmor, isBattleMek, isCarryableObject, isCombatVehicle, isConventionalFighter, isConventionalInfantry, isDropShip, isFighter, isFixedWingSupport, isGround, isHandheldWeapon, isIndustrialMek, isInfantry, isJumpShip, isLargeAerospace, isMek, isObjectiveMarker, isProtoMek, isQuadMek, isSingleUnit, isSmallCraft, isSpaceStation, isSpheroid, isSupportVehicle, isTripodMek, isUnitGroup, isVehicle, isWarShipMethods inherited from interface megamek.common.game.InGameObjectcountForStrengthSum, hasOwnerMethods inherited from interface megamek.common.units.TargetablegetBoardId, getBoardLocation, isBomber, isBracing, isHexBeingBombed, isOnBoard, tracksHeat
- 
Field Details- 
HOMINGpublic static final int HOMING- See Also:
 
- 
ECMpublic static final int ECM- See Also:
 
- 
HAYWIREpublic static final int HAYWIRE- See Also:
 
- 
NEMESISpublic static final int NEMESIS- See Also:
 
 
- 
- 
Constructor Details- 
INarcPodpublic INarcPod(int team, int type, int location) Creates a newINarcPod, from the team and of the type specified.
 
- 
- 
Method Details- 
equalsDetermine if the other object is an equivalent INarc pod.Overrides Object#equals(Object).- Specified by:
- equalsin interface- Targetable
- Specified by:
- equalsin class- Record
- Parameters:
- obj- the other- Objectwhich may be an equivalent INarc pod.
- Returns:
- trueif the other object matches this one,- falseotherwise.
 
- 
hashCodepublic int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.- Specified by:
- hashCodein interface- Targetable
- Specified by:
- hashCodein class- Record
- Returns:
- a hash code value for this object
 
- 
toStringGet aStringrepresenting this INarc pod.Overrides Object#toString().
- 
idToInstanceCreate a new iNarc pod that is equivalent to the given ID.- Parameters:
- id- the- intID of the iNarc pod.
- Returns:
- a new INarcPodthat matches the ID.
 
- 
getTargetTypepublic int getTargetType()- Specified by:
- getTargetTypein interface- Targetable
 
- 
getIdpublic int getId()Description copied from interface:InGameObjectReturns this InGameObject's id. The id must be unique to this InGameObject within the current game. equals() must return true for two InGameObject objects with the same id.- Specified by:
- getIdin interface- InGameObject
- Returns:
- The game-unique id of this InGameObject (Entity, AlphaStrikeElement etc.)
 
- 
setIdpublic void setId(int newId) Description copied from interface:InGameObjectSets this InGameObject's id. The id must be unique to this InGameObject within the current game. equals() must return true for two InGameObject objects with the same id.- Specified by:
- setIdin interface- InGameObject
- Parameters:
- newId- The game-unique id of this InGameObject (Entity, AlphaStrikeElement etc.)
 
- 
getOwnerIdpublic int getOwnerId()Description copied from interface:InGameObjectReturns the unique id of this InGameObject's owning player. This id may be Player.NONE.- Specified by:
- getOwnerIdin interface- InGameObject
- Returns:
- The player id of the owner of this InGameObject.
 
- 
setOwnerIdpublic void setOwnerId(int newOwnerId) Description copied from interface:InGameObjectSets the unique id of this InGameObject's owning player. This id may be Player.NONE.- Specified by:
- setOwnerIdin interface- InGameObject
- Parameters:
- newOwnerId- The player id of the owner of this InGameObject.
 
- 
getStrengthpublic int getStrength()Description copied from interface:InGameObjectReturns the current (remaining) battle strength of this unit or object. For combat units, this is the battle value (BV) or the point value (PV).- Specified by:
- getStrengthin interface- InGameObject
- Returns:
- The current battle strength (BV/PV)
 
- 
getPosition- Specified by:
- getPositionin interface- Targetable
- Returns:
- the coordinates of the hex containing the target
 
- 
getSecondaryPositions- Specified by:
- getSecondaryPositionsin interface- Targetable
 
- 
relHeightpublic int relHeight()- Specified by:
- relHeightin interface- Targetable
- Returns:
- elevation of the top (e.g. torso) of the target relative to surface
 
- 
getHeightpublic int getHeight()Description copied from interface:TargetableReturns the height of the target, that is, how many levels above its elevation it is for LOS purposes.- Specified by:
- getHeightin interface- Targetable
- Returns:
- height of the target in elevation levels
 
- 
getElevationpublic int getElevation()Description copied from interface:TargetableReturns the elevation of this target, relative to the position Hex's surface- Specified by:
- getElevationin interface- Targetable
- Returns:
- elevation of the bottom (e.g. legs) of the target relative to surface
 
- 
isImmobilepublic boolean isImmobile()Description copied from interface:TargetableReturns true if the target is considered immobile (-4 to hit). If this is a game unit, implementations should check the status of the unit (shutdown, damage) and also the status of the crew (unconscious) if any.- Specified by:
- isImmobilein interface- Targetable
- Returns:
- True if the target is considered immobile
 
- 
getDisplayName- Specified by:
- getDisplayNamein interface- Targetable
- Returns:
- name of the target for ui purposes
 
- 
sideTable- Specified by:
- sideTablein interface- Targetable
- Returns:
- side hit from location
 
- 
sideTable- Specified by:
- sideTablein interface- Targetable
- Returns:
- side hit from location
 
- 
isOffBoardpublic boolean isOffBoard()- Specified by:
- isOffBoardin interface- Targetable
- Returns:
- if this is off the board
 
- 
isAirbornepublic boolean isAirborne()- Specified by:
- isAirbornein interface- Targetable
- Returns:
- Is the entity airborne in the fashion of an aerospace unit? Does not include VTOL movement (see
       Targetable.isAirborneVTOLorWIGE()
 
- 
isAirborneVTOLorWIGEpublic boolean isAirborneVTOLorWIGE()- Specified by:
- isAirborneVTOLorWIGEin interface- Targetable
- Returns:
- is the entity airborne in the fashion of a VTOL Not used for aerospace units, see
       Targetable.isAirborne()
 
- 
getAltitudepublic int getAltitude()- Specified by:
- getAltitudein interface- Targetable
- Returns:
- altitude of target
 
- 
isEnemyOfDescription copied from interface:TargetableDetermines if this target should be considered the enemy of the supplied player. Targets that aren't owned by any player, such as buildings or terrain, are always considered enemies, since this will most often be used to determine if something is valid to be shot at.- Specified by:
- isEnemyOfin interface- Targetable
 
- 
generalNameDescription copied from interface:BTObjectReturns the general name or type name of this unit/object. For standard individual units, this is the chassis. For other types of units or objects this can be the full designation or a general part of the designation. Much like the chassis, this can be much more narrow than the general type of unit ("Mek").The general name should not be empty and not return null. Return the chassis in Entity and AlphaStrikeElement. - Specified by:
- generalNamein interface- BTObject
- Returns:
- The general name / chassis
 
- 
specificNameDescription copied from interface:BTObjectReturns the specific name or type name of this unit/object. For standard individual units, this is the model. For other types of units or objects this can be a part of the designation, or empty.The specific name should not return null. Return the model in Entity and AlphaStrikeElement. - Specified by:
- specificNamein interface- BTObject
- Returns:
- The specific name / model
 
- 
teampublic int team()Returns the value of theteamrecord component.- Returns:
- the value of the teamrecord component
 
- 
typepublic int type()Returns the value of thetyperecord component.- Returns:
- the value of the typerecord component
 
- 
locationpublic int location()Returns the value of thelocationrecord component.- Returns:
- the value of the locationrecord component
 
 
-