Package megamek.common.units
Class DamageEditSpec
java.lang.Object
megamek.common.units.DamageEditSpec
- All Implemented Interfaces:
Serializable
The damage editor's edits as plain values, detached from the dialog that collected them. The dialog builds one of
these from its controls and either applies it to its local unit (in the lobby, or outside a game as in MekHQ) or
sends it to the server, which applies it to its own authoritative copy of the unit. Sending the values instead of
the edited unit keeps the server's copy authoritative: a full unit sent back from a client carries whatever stale
state the client held, which has to be guarded against field by field.
A field is null when the dialog had nothing to edit for it, mirroring the dialog's controls: a unit
without rear armor has no rear armor values, and only a gamemaster's in-game editor has skill modifier values.
The maps are always present and empty when there is nothing in them.
This class only travels inside packets and is never written to a save, so it stays a plain Serializable
class with no XStream concerns.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionInteger[][]Actuator crit hits by limb and actuator, in the damage editor's layout: the first index counts limbs fromMek.LOC_RIGHT_ARM, the second counts actuators from the shoulder (arms) or hip (legs and quads), with a QuadVee's conversion gear after the foot.The shots left in each ammo bin, by its equipment number.Integer[]Double[]The undamaged capacity left in each transport bay, in the order the unit lists its bays.Integer[]Crit hits on each transport bay's doors, in the same order asbayCapacityRemaining.Whether the gunners of each of the building's hexes are dead, keyed by one entity location in that hex.Whether the building's power is switched off at the mains, ornullwhen the unit has no such switch.Turns the building's gunners remain stunned, ornullwhen the unit has no such state.Whether each of the building's turreted weapons is locked to the forward arc, by its equipment number.Whether each of the building's weapons is jammed, by its equipment number.static final intWhere a QuadVee's conversion gear sits in its leg's actuator values, after the hip to foot actuators.Integer[]Hits taken by each crew member; the entry of a missing crew member stays null.intThe unit these edits apply to.Whether each chargeable weapon (a bombast laser or a PPC capacitor) holds a full charge, by its equipment number; only carried by a gamemaster's in-game edit.The crit hits on each piece of equipment, by its equipment number.The chosen mode of each piece of equipment with modes, by its equipment number as the internal (non-localized) mode name; only carried by a gamemaster's in-game edit.A VTOL's flight stabilizer crit hits.The fuel left in an aero.booleanThe unit's current heat, for the unit types that track it.Hot-loading on each ammo bin, by its equipment number; only carried by a gamemaster's in-game edit.booleanInteger[]A Jumpship's K-F drive integrity.A land-air Mek's avionics crit hits, by location.A land-air Mek's landing gear crit hits, by location.Burst fire on each machine gun, by its equipment number; only carried by a gamemaster's in-game edit.booleanInteger[]A ProtoMek's per-location system crit hits.Integer[]A Jumpship's jump sail integrity.Integer[]Per-location stabilizer crit hits; a null element means that location has no stabilizer to edit.How many of a Jumpship's docking collars are still working. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CONVERSION_GEAR_INDEX
public static final int CONVERSION_GEAR_INDEXWhere a QuadVee's conversion gear sits in its leg's actuator values, after the hip to foot actuators.- See Also:
-
entityId
public int entityIdThe unit these edits apply to. -
internal
-
armor
-
rearArmor
-
crewHits
Hits taken by each crew member; the entry of a missing crew member stays null. -
heat
The unit's current heat, for the unit types that track it. -
shutdown
-
prone
-
hullDown
-
stealth
-
dugIn
-
fuel
The fuel left in an aero. -
ammoShots
The shots left in each ammo bin, by its equipment number. Only a gamemaster edits these. -
equipmentHits
The crit hits on each piece of equipment, by its equipment number. -
mgBurst
Burst fire on each machine gun, by its equipment number; only carried by a gamemaster's in-game edit. -
hotLoadedAmmo
Hot-loading on each ammo bin, by its equipment number; only carried by a gamemaster's in-game edit. -
equipmentMode
The chosen mode of each piece of equipment with modes, by its equipment number as the internal (non-localized) mode name; only carried by a gamemaster's in-game edit. The gamemaster's mode change takes effect at once, without the End Phase wait of a player's declared switch, and a mode matching the equipment's current mode is left alone so that a player's pending switch on untouched equipment survives the edit. -
equipmentCharged
Whether each chargeable weapon (a bombast laser or a PPC capacitor) holds a full charge, by its equipment number; only carried by a gamemaster's in-game edit. -
buildingStunnedTurns
Turns the building's gunners remain stunned, ornullwhen the unit has no such state. Zero means the gunners can act. -
buildingGunnersKilled
Whether the gunners of each of the building's hexes are dead, keyed by one entity location in that hex. Gunners are killed a hex at a time, so any location of the hex stands for the whole hex. -
buildingTurretLocked
Whether each of the building's turreted weapons is locked to the forward arc, by its equipment number. -
buildingWeaponJammed
Whether each of the building's weapons is jammed, by its equipment number. -
buildingPowerSwitchedOff
Whether the building's power is switched off at the mains, ornullwhen the unit has no such switch. A structure switched off shuts down however healthy its generators are. -
gunneryModifier
-
gunneryRounds
-
gunneryPermanent
public boolean gunneryPermanent -
pilotingModifier
-
pilotingRounds
-
pilotingPermanent
public boolean pilotingPermanent -
initiativeModifier
-
initiativeRounds
-
initiativePermanent
public boolean initiativePermanent -
centerEngineHits
-
leftEngineHits
-
rightEngineHits
-
gyroHits
-
sensorHits
-
lifeSupportHits
-
cockpitHits
-
lamAvionicsHits
A land-air Mek's avionics crit hits, by location. -
lamLandingGearHits
A land-air Mek's landing gear crit hits, by location. -
actuatorHits
Actuator crit hits by limb and actuator, in the damage editor's layout: the first index counts limbs fromMek.LOC_RIGHT_ARM, the second counts actuators from the shoulder (arms) or hip (legs and quads), with a QuadVee's conversion gear after the foot. -
engineHits
-
turretLockHits
-
motiveHits
-
stabilizerHits
Per-location stabilizer crit hits; a null element means that location has no stabilizer to edit. -
flightStabilizerHits
A VTOL's flight stabilizer crit hits. -
avionicsHits
-
fcsHits
-
cicHits
-
gearHits
-
leftThrusterHits
-
rightThrusterHits
-
kfBoomHits
-
dockCollarHits
-
gravDeckHits
-
bayCapacityRemaining
The undamaged capacity left in each transport bay, in the order the unit lists its bays. -
bayDoorHits
Crit hits on each transport bay's doors, in the same order asbayCapacityRemaining. -
workingDockingCollars
How many of a Jumpship's docking collars are still working. -
kfIntegrity
A Jumpship's K-F drive integrity. -
chargingSystemHits
-
driveCoilHits
-
driveControllerHits
-
fieldInitiatorHits
-
heliumTankHits
-
lfBatteryHits
-
sailIntegrity
A Jumpship's jump sail integrity. -
protoHits
A ProtoMek's per-location system crit hits.
-
-
Constructor Details
-
DamageEditSpec
public DamageEditSpec()
-