Class MekSummary
- All Implemented Interfaces:
Serializable,ASCardDisplayable,CombatRole,BattleForceSUAFormatter,BTObject
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanformatSUA(BattleForceSUA sua, String delimiter, ASSpecialAbilityCollector collection) Returns the formatted SUA string for the given sua.intDeprecated, for removal: This API element is subject to removal in a future version.longint[]int[]intintdoubleintintintdoubleintintintgetBfsMp()intintintintintgetBV()doubleintlonggetCost()intintintdoublelongintlongbooleanReturns a fluff image for this unit or object to be shown e.g.Returns the Force Generator availability declared in this unit's file.intintintintintgetHands()intintdoubleintintdoubleintbooleanintgetLevel()getLevel(int year) intintdoubleintintintdoublebooleanReturns the Force Generator mission roles declared in this unit's file, as raw comma-separated text such as "fire_support,urban".getModel()longbooleanintgetMulId()getName()intbooleangetOmni()intgetOV()intintintdoublegetRole()intgetRunMp()intgetSize()intintdoubleintintDeprecated, for removal: This API element is subject to removal in a future version.doubleintintdoubleintintintintgetTMM()doublegetTons()intintdoubledoubledoubleintgetType()intgetType(int year) intintintgetYear()inthashCode()booleanbooleanbooleanisCanon()booleanisClan()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanLoads and returns the entity for this MekSummary.static EntityloadEntity(File unitFile) Loads anEntitydirectly from the specified unit file.static EntityloadEntity(String fullName) Loads and returns the entity for the given full name.voidsetAdvancedYear(int year) voidsetAlternateCost(long aCost) voidsetAltTypes(int[] altTypes) voidsetArmorTechTypes(int[] att) voidsetArmorType(int[] locsArmor) Takes the armor type at all locations and creates a set of the armor types.voidsetArmorTypes(int[] al) voidsetASFBays(int i) voidsetASFDoors(int i) voidsetASFUnits(double d) voidsetAsUnitType(ASUnitType asUnitType) voidsetBattleArmorBays(int i) voidsetBattleArmorDoors(int i) voidsetBattleArmorHandles(int i) voidsetBattleArmorUnits(double d) voidsetBfsAssetType(BFSAssetType bfsAssetType) voidsetBfsBsp(int bfsBsp) voidsetBfsCardSubtitle(String bfsCardSubtitle) voidsetBfsCardTitle(String bfsCardTitle) voidsetBfsDamage(BFSDamage bfsDamage) voidsetBfsDestroyCheck(int bfsDestroyCheck) voidsetBfsMovementMode(EntityMovementMode bfsMovementMode) voidsetBfsMp(int bfsMp) voidsetBfsRange(BFSRange bfsRange) voidsetBfsRangeKeyword(String bfsRangeKeyword) voidsetBfsSkill(int bfsSkill) voidsetBfsSpecialDetails(List<BFSSpecial> bfsSpecialDetails) voidsetBfsSpecials(List<BFSSpecialType> bfsSpecials) voidsetBfsThreshold(int bfsThreshold) voidsetBfsTmm(int bfsTmm) voidsetBfsVeteranBv(int bfsVeteranBv) voidsetBV(int nBV) voidsetCanon(boolean canon) voidsetCargoBayUnits(double d) voidsetChassis(String sChassis) voidsetClan(boolean clan) voidsetClanChassisName(String name) voidsetCockpitType(int cockpitType) voidsetCost(long nCost) voidsetDockingCollars(int i) voidsetDoomedInAtmosphere(boolean doomedInAtmosphere) voidsetDoomedInExtremeTemp(boolean doomedInExtremeTemp) voidsetDoomedInSpace(boolean doomedInSpace) voidsetDoomedInVacuum(boolean doomedInVacuum) voidsetDoomedOnGround(boolean doomedOnGround) voidsetDropShuttleBays(int i) voidsetDropShuttleDoors(int i) voidsetDropShuttleUnits(double d) voidsetDryCost(long nCost) voidsetEngineName(String engineName) voidsetEngineType(int engineType) voidsetEntityType(long type) voidsetEntryName(String sEntryName) voidsetEquipment(List<Mounted<?>> mountedList) Given the list of equipment mounted on this unit, parse it into a unique list of names and the number of times that name appears.voidsetExtinctRange(String extinctRange) voidsetFailedToLoadEquipment(boolean b) voidsetFluffImage(String base64image) voidsetForceGeneratorAvailability(List<ForceGeneratorAvailability> forceGeneratorAvailability) voidsetFrankenMek(boolean frankenMek) voidsetFrontArc(ASArcSummary frontArc) voidvoidsetFullArmor(int fullArmor) voidsetFullStructure(int fullStructure) voidsetGenericBattleValue(int genericBattleValue) voidsetGyroType(int gyroType) voidsetHands(int i) voidsetHeavyVehicleBays(int i) voidsetHeavyVehicleDoors(int i) voidsetHeavyVehicleUnits(double d) voidsetInfantryBays(int i) voidsetInfantryDoors(int i) voidsetInfantryUnits(double d) voidsetInternalsType(int internalsType) voidsetInvalid(boolean b) voidsetJumpMp(int jumpMp) voidsetLeftArc(ASArcSummary leftArc) voidvoidsetLightVehicleBays(int i) voidsetLightVehicleDoors(int i) voidsetLightVehicleUnits(double d) voidsetLinkedUnitId(String linkedUnitId) voidsetLowerArms(int i) voidsetMekBays(int i) voidsetMekDoors(int i) voidsetMekUnits(double d) voidsetMilitary(boolean b) voidsetMissionRoles(String missionRoles) voidvoidsetModified(long lModified) voidsetMountedInfantry(boolean b) voidsetMovement(Map<String, Integer> movement) voidsetMoveMode(EntityMovementMode moveMode) voidsetMulId(int mulId) voidsetMyomerName(String myomerName) voidvoidsetNavalRepairFacilities(int i) voidsetNonCanonBySource(boolean nonCanonBySource) voidsetOmni(boolean b) voidsetOverheat(int overheat) voidsetPatchwork(boolean patchwork) voidsetPointValue(int pointValue) voidsetPrimaryMovementMode(String primaryMovementMode) voidsetProtoMekBays(int i) voidsetProtoMekDoors(int i) voidsetProtoMekUnits(double d) voidsetPublished(String published) voidsetQuirkNames(Quirks quirks) voidsetRearArc(ASArcSummary rearArc) voidsetRightArc(ASArcSummary rightArc) voidsetRunMp(int runMp) voidsetSize(int size) voidsetSmallCraftBays(int i) voidsetSmallCraftDoors(int i) voidsetSmallCraftUnits(double d) voidvoidsetSourceFile(File sSourceFile) voidsetSpecialAbilities(ASSpecialAbilityCollection specialAbilities) voidsetSquadSize(int squadSize) voidsetStandardDamage(ASDamageVector standardDamage) voidsetStandardYear(int year) voidsetSuitWeight(double suitWeight) voidsetSuperHeavyVehicleBays(int i) voidsetSuperHeavyVehicleDoors(int i) voidsetSuperHeavyVehicleUnits(double d) voidsetSupport(boolean support) voidsetTankTurrets(int i) voidvoidvoidsetTechLevelCode(int i) voidsetThreshold(int threshold) voidsetTmm(int tmm) voidsetTons(double nTons) voidsetTotalArmor(int totalArmor) voidsetTotalInternal(int totalInternal) voidsetTOWeight(double TOSuitTons) voidsetTroopCarryingSpace(double d) voidsetTWWeight(double TWSuitTons) voidsetType(int nType) voidsetUnitFileUUID(String unitFileUUID) voidsetUnitRole(UnitRole role) voidsetUnitSubType(String subType) voidsetUnitType(String sUnitType) voidsetWalkMp(int walkMp) voidsetWeaponQuirkNames(Entity entity) voidsetWeightClass(int weightClass) voidsetYear(int nYear) booleanshowSUA(BattleForceSUA sua) Returns true when this object wants to have the given SUA displayed among its special abilities.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.alphaStrike.ASCardDisplayable
generalName, getCurrentArmor, getCurrentStructure, getSkill, hasAirMovement, hasGroundMovement, hasMovementMode, hasOV, hasWaterMovement, isAero, isAerospaceFighter, isAerospaceSV, isBattleArmor, isBattleMek, isCombatVehicle, isConventionalFighter, isConventionalInfantry, isDropShip, isFighter, isFixedWingSupport, isIndustrialMek, isJumpCapable, isJumpShip, isLargeAerospace, isMek, isProtoMek, isQuadMek, isSmallCraft, isSpaceStation, isSpheroid, isSubmarine, isSupportVehicle, isTripodMek, isType, isWarShip, specificName, usesArcs, usesCapitalWeapons, usesOV, usesSML, usesSMLE, usesThreshold, usesTMMMethods inherited from interface megamek.common.units.BTObject
getIcon, hasAerodyneSpheroidDistinction, isAerodyne, isAerospace, isCarryableObject, isGround, isHandheldWeapon, isInfantry, isObjectiveMarker, isSingleUnit, isUnitGroup, isVehicleMethods inherited from interface megamek.common.interfaces.CombatRole
hasRole
-
Constructor Details
-
MekSummary
public MekSummary()
-
-
Method Details
-
getName
-
getChassis
- Specified by:
getChassisin interfaceASCardDisplayable- Returns:
- The AS element's chassis, such as "Atlas".
-
getFullChassis
- Specified by:
getFullChassisin interfaceASCardDisplayable
-
setClanChassisName
-
getClanChassisName
-
getModel
- Specified by:
getModelin interfaceASCardDisplayable- Returns:
- The AS element's model, such as "AS7-D".
-
getMulId
public int getMulId()- Specified by:
getMulIdin interfaceASCardDisplayable- Returns:
- This AS element's MUL ID if it has one, -1 otherwise.
-
getUnitType
-
isCanon
public boolean isCanon() -
isPatchwork
public boolean isPatchwork() -
isFrankenMek
public boolean isFrankenMek() -
isDoomedOnGround
public boolean isDoomedOnGround() -
isDoomedInAtmosphere
public boolean isDoomedInAtmosphere() -
isDoomedInSpace
public boolean isDoomedInSpace() -
isDoomedInExtremeTemp
public boolean isDoomedInExtremeTemp() -
isDoomedInVacuum
public boolean isDoomedInVacuum() -
isClan
public boolean isClan() -
isSupport
public boolean isSupport() -
isBattlefieldSupportAsset
public boolean isBattlefieldSupportAsset()- Specified by:
isBattlefieldSupportAssetin interfaceBTObject- Returns:
- true if this summary represents a Battlefield Support Asset (a
.bfsunit).
-
getUnitFileUUID
- Returns:
- this unit's own unit-file UUID, or
nullif the file carries none
-
setUnitFileUUID
-
getLinkedUnitId
- Returns:
- for a Battlefield Support Asset, the base unit's UUID it links to;
nullwhen standalone/non-asset
-
setLinkedUnitId
-
getUnitSubType
-
getSourceFile
-
getInvalid
public boolean getInvalid() -
getTechLevel
-
getTechLevelCode
public int getTechLevelCode() -
getTechBase
-
getFailedToLoadEquipment
public boolean getFailedToLoadEquipment() -
getSource
-
getPublished
-
hasPublishedRecordSheet
public boolean hasPublishedRecordSheet() -
isNonCanonBySource
public boolean isNonCanonBySource() -
getEntryName
-
getYear
public int getYear() -
getType
public int getType() -
getType
public int getType(int year) -
getFullAccurateUnitType
-
getEntityType
public long getEntityType() -
getOmni
public boolean getOmni() -
getMilitary
public boolean getMilitary() -
getMountedInfantry
public boolean getMountedInfantry() -
getTankTurrets
public int getTankTurrets() -
getLowerArms
public int getLowerArms() -
getHands
public int getHands() -
getTroopCarryingSpace
public double getTroopCarryingSpace() -
getASFBays
public int getASFBays() -
getASFDoors
public int getASFDoors() -
getASFUnits
public double getASFUnits() -
getSmallCraftBays
public int getSmallCraftBays() -
getSmallCraftDoors
public int getSmallCraftDoors() -
getSmallCraftUnits
public double getSmallCraftUnits() -
getDockingCollars
public int getDockingCollars() -
getMekBays
public int getMekBays() -
getMekDoors
public int getMekDoors() -
getMekUnits
public double getMekUnits() -
getHeavyVehicleBays
public int getHeavyVehicleBays() -
getHeavyVehicleDoors
public int getHeavyVehicleDoors() -
getHeavyVehicleUnits
public double getHeavyVehicleUnits() -
getLightVehicleBays
public int getLightVehicleBays() -
getLightVehicleDoors
public int getLightVehicleDoors() -
getLightVehicleUnits
public double getLightVehicleUnits() -
getProtoMekBays
public int getProtoMekBays() -
getProtoMekDoors
public int getProtoMekDoors() -
getProtoMekUnits
public double getProtoMekUnits() -
getBattleArmorBays
public int getBattleArmorBays() -
getBattleArmorDoors
public int getBattleArmorDoors() -
getBattleArmorUnits
public double getBattleArmorUnits() -
getInfantryBays
public int getInfantryBays() -
getInfantryDoors
public int getInfantryDoors() -
getInfantryUnits
public double getInfantryUnits() -
getSuperHeavyVehicleBays
public int getSuperHeavyVehicleBays() -
getSuperHeavyVehicleDoors
public int getSuperHeavyVehicleDoors() -
getSuperHeavyVehicleUnits
public double getSuperHeavyVehicleUnits() -
getDropShuttleBays
public int getDropShuttleBays() -
getDropShuttleDoors
public int getDropShuttleDoors() -
getDropShuttleUnits
public double getDropShuttleUnits() -
getBattleArmorHandles
public int getBattleArmorHandles() -
getCargoBayUnits
public double getCargoBayUnits() -
getTons
public double getTons() -
getTOWeight
public double getTOWeight() -
getTWWeight
public double getTWWeight() -
getBV
public int getBV() -
getBfsVeteranBv
public int getBfsVeteranBv()- Returns:
- for a Battlefield Support Asset, the Veteran cost in Battle Value (Veteran BSP times 20), or 0 if the asset has no Veteran variant (or is not an asset)
-
setBfsVeteranBv
public void setBfsVeteranBv(int bfsVeteranBv) -
getBfsAssetType
- Returns:
- the Asset's rules category, or
nullif this summary is not a Battlefield Support Asset
-
setBfsAssetType
-
getBfsCardTitle
- Returns:
- the Asset card title, or
nullfor a non-asset
-
setBfsCardTitle
-
getBfsCardSubtitle
- Returns:
- the Asset card subtitle, or
nullfor a non-asset
-
setBfsCardSubtitle
-
getBfsMovementMode
- Returns:
- the Asset's movement mode, or
nullfor a non-asset
-
setBfsMovementMode
-
getBfsMp
public int getBfsMp()- Returns:
- the Asset's single Movement Point allowance
-
setBfsMp
public void setBfsMp(int bfsMp) -
getBfsTmm
public int getBfsTmm()- Returns:
- the Asset's fixed Target Movement Modifier
-
setBfsTmm
public void setBfsTmm(int bfsTmm) -
getBfsRange
- Returns:
- the Asset's Short/Medium/Long range, or
nullfor a non-asset
-
setBfsRange
-
getBfsRangeKeyword
- Returns:
- the Asset's keyword-range label, or
nullfor a numeric/absent range
-
setBfsRangeKeyword
-
getBfsSkill
public int getBfsSkill()- Returns:
- the Asset's crew Skill
-
setBfsSkill
public void setBfsSkill(int bfsSkill) -
getBfsDamage
- Returns:
- the Asset's attack damage, or
nullfor a non-asset
-
setBfsDamage
-
getBfsDestroyCheck
public int getBfsDestroyCheck()- Returns:
- the Asset's undamaged Destroy Check target number
-
setBfsDestroyCheck
public void setBfsDestroyCheck(int bfsDestroyCheck) -
getBfsThreshold
public int getBfsThreshold()- Returns:
- the Asset's damage Threshold
-
setBfsThreshold
public void setBfsThreshold(int bfsThreshold) -
getBfsBsp
public int getBfsBsp()- Returns:
- the Asset's effective Battlefield Support Point cost
-
setBfsBsp
public void setBfsBsp(int bfsBsp) -
getBfsSpecials
- Returns:
- the recognized Specials present on the Asset (never
null)
-
setBfsSpecials
-
getBfsSpecialDetails
- Returns:
- the full Specials present on the Asset, retaining parameter values (never
null)
-
setBfsSpecialDetails
-
getGenericBattleValue
public int getGenericBattleValue() -
getCost
public long getCost() -
getDryCost
public long getDryCost() -
getAlternateCost
public long getAlternateCost() -
getModified
public long getModified() -
getLevel
-
getAdvancedTechYear
Deprecated, for removal: This API element is subject to removal in a future version. -
getStandardTechYear
Deprecated, for removal: This API element is subject to removal in a future version. -
getLevel
-
getPointValue
public int getPointValue()- Specified by:
getPointValuein interfaceASCardDisplayable- Returns:
- The AS element's Point Value (PV). This is not adjusted for damage on the element.
-
getASUnitType
- Specified by:
getASUnitTypein interfaceASCardDisplayable- Returns:
- The AS element's type (TP), e.g. BM or CV.
-
getSize
public int getSize()- Specified by:
getSizein interfaceASCardDisplayable- Returns:
- The AS element's size (SZ).
-
getTMM
public int getTMM()- Specified by:
getTMMin interfaceASCardDisplayable- Returns:
- The AS element's Target Movement Modifier (TMM).
-
getMovement
- Specified by:
getMovementin interfaceASCardDisplayable- Returns:
- The AS element's entire movement capability (MV).
-
getPrimaryMovementMode
- Specified by:
getPrimaryMovementModein interfaceASCardDisplayable- Returns:
- The primary (= first) movement type String, such as "" for some ground units or "s" for submarines.
-
getStandardDamage
- Specified by:
getStandardDamagein interfaceASCardDisplayable- Returns:
- The standard damage (SML or SMLE depending on type). This will be empty for elements that use arcs.
-
getOV
public int getOV()- Specified by:
getOVin interfaceASCardDisplayable- Returns:
- The AS element's extra Overheat Damage capability (OV) (not the current heat buildup).
-
getFrontArc
- Specified by:
getFrontArcin interfaceASCardDisplayable- Returns:
- The AS element's front arc. Returns an empty arc for elements that don't use arcs.
-
getLeftArc
- Specified by:
getLeftArcin interfaceASCardDisplayable- Returns:
- The AS element's left arc. Returns an empty arc for elements that don't use arcs.
-
getRightArc
- Specified by:
getRightArcin interfaceASCardDisplayable- Returns:
- The AS element's right arc. Returns an empty arc for elements that don't use arcs.
-
getRearArc
- Specified by:
getRearArcin interfaceASCardDisplayable- Returns:
- The AS element's rear arc. Returns an empty arc for elements that don't use arcs.
-
getThreshold
public int getThreshold()- Specified by:
getThresholdin interfaceASCardDisplayable- Returns:
- The AS element's armor threshold (TH), if it uses threshold.
-
getFullArmor
public int getFullArmor()- Specified by:
getFullArmorin interfaceASCardDisplayable- Returns:
- The AS element's full (=undamaged) Armor (A).
-
getFullStructure
public int getFullStructure()- Specified by:
getFullStructurein interfaceASCardDisplayable- Returns:
- The AS element's full (=undamaged) Structure (S).
-
getSquadSize
public int getSquadSize()- Specified by:
getSquadSizein interfaceASCardDisplayable- Returns:
- The squad size (typically 4, 5 or 6), if this AS element is a BA.
-
getSpecialAbilities
- Specified by:
getSpecialAbilitiesin interfaceASCardDisplayable- Returns:
- The element's central special abilities (not those in arcs).
-
getRole
- Specified by:
getRolein interfaceCombatRole- Returns:
- The battlefield role (UnitRole) of this combat unit.
-
getForceGeneratorAvailability
Returns the Force Generator availability declared in this unit's file. Empty for canon units, whose availability comes from the era files in data/forcegenerator instead.- Returns:
- the availability entries, never
null
-
setForceGeneratorAvailability
public void setForceGeneratorAvailability(List<ForceGeneratorAvailability> forceGeneratorAvailability) -
getMissionRoles
Returns the Force Generator mission roles declared in this unit's file, as raw comma-separated text such as "fire_support,urban".- Returns:
- the mission role text, never
null
-
setMissionRoles
-
setFullAccurateUnitType
-
setEntityType
public void setEntityType(long type) -
setOmni
public void setOmni(boolean b) -
setMilitary
public void setMilitary(boolean b) -
setMountedInfantry
public void setMountedInfantry(boolean b) -
setTankTurrets
public void setTankTurrets(int i) -
setLowerArms
public void setLowerArms(int i) -
setHands
public void setHands(int i) -
setTroopCarryingSpace
public void setTroopCarryingSpace(double d) -
setASFBays
public void setASFBays(int i) -
setASFDoors
public void setASFDoors(int i) -
setASFUnits
public void setASFUnits(double d) -
setSmallCraftBays
public void setSmallCraftBays(int i) -
setSmallCraftDoors
public void setSmallCraftDoors(int i) -
setSmallCraftUnits
public void setSmallCraftUnits(double d) -
setDockingCollars
public void setDockingCollars(int i) -
setMekBays
public void setMekBays(int i) -
setMekDoors
public void setMekDoors(int i) -
setMekUnits
public void setMekUnits(double d) -
setHeavyVehicleBays
public void setHeavyVehicleBays(int i) -
setHeavyVehicleDoors
public void setHeavyVehicleDoors(int i) -
setHeavyVehicleUnits
public void setHeavyVehicleUnits(double d) -
setLightVehicleBays
public void setLightVehicleBays(int i) -
setLightVehicleDoors
public void setLightVehicleDoors(int i) -
setLightVehicleUnits
public void setLightVehicleUnits(double d) -
setProtoMekBays
public void setProtoMekBays(int i) -
setProtoMekDoors
public void setProtoMekDoors(int i) -
setProtoMekUnits
public void setProtoMekUnits(double d) -
setBattleArmorBays
public void setBattleArmorBays(int i) -
setBattleArmorDoors
public void setBattleArmorDoors(int i) -
setBattleArmorUnits
public void setBattleArmorUnits(double d) -
setInfantryBays
public void setInfantryBays(int i) -
setInfantryDoors
public void setInfantryDoors(int i) -
setInfantryUnits
public void setInfantryUnits(double d) -
setSuperHeavyVehicleBays
public void setSuperHeavyVehicleBays(int i) -
setSuperHeavyVehicleDoors
public void setSuperHeavyVehicleDoors(int i) -
setSuperHeavyVehicleUnits
public void setSuperHeavyVehicleUnits(double d) -
setDropShuttleBays
public void setDropShuttleBays(int i) -
setDropShuttleDoors
public void setDropShuttleDoors(int i) -
setDropShuttleUnits
public void setDropShuttleUnits(double d) -
setBattleArmorHandles
public void setBattleArmorHandles(int i) -
setCargoBayUnits
public void setCargoBayUnits(double d) -
setName
-
setChassis
-
setModel
-
setMulId
public void setMulId(int mulId) -
setUnitType
-
setSourceFile
-
setInvalid
public void setInvalid(boolean b) -
setTechLevel
-
setTechLevelCode
public void setTechLevelCode(int i) -
setTechBase
-
setFailedToLoadEquipment
public void setFailedToLoadEquipment(boolean b) -
setSource
-
setPublished
-
setNonCanonBySource
public void setNonCanonBySource(boolean nonCanonBySource) -
setEntryName
-
setYear
public void setYear(int nYear) -
setType
public void setType(int nType) -
setAltTypes
public void setAltTypes(int[] altTypes) -
setTons
public void setTons(double nTons) -
setTOWeight
public void setTOWeight(double TOSuitTons) -
setTWWeight
public void setTWWeight(double TWSuitTons) -
setCost
public void setCost(long nCost) -
setDryCost
public void setDryCost(long nCost) -
setAlternateCost
public void setAlternateCost(long aCost) -
setBV
public void setBV(int nBV) -
setGenericBattleValue
public void setGenericBattleValue(int genericBattleValue) -
setModified
public void setModified(long lModified) -
setLevel
-
setAdvancedYear
public void setAdvancedYear(int year) -
setStandardYear
public void setStandardYear(int year) -
setCanon
public void setCanon(boolean canon) -
setPatchwork
public void setPatchwork(boolean patchwork) -
setFrankenMek
public void setFrankenMek(boolean frankenMek) -
setDoomedOnGround
public void setDoomedOnGround(boolean doomedOnGround) -
setDoomedInAtmosphere
public void setDoomedInAtmosphere(boolean doomedInAtmosphere) -
setDoomedInSpace
public void setDoomedInSpace(boolean doomedInSpace) -
setDoomedInExtremeTemp
public void setDoomedInExtremeTemp(boolean doomedInExtremeTemp) -
setDoomedInVacuum
public void setDoomedInVacuum(boolean doomedInVacuum) -
setClan
public void setClan(boolean clan) -
setSupport
public void setSupport(boolean support) -
setUnitSubType
-
setWeightClass
public void setWeightClass(int weightClass) -
getWeightClass
public int getWeightClass() -
getWalkMp
public int getWalkMp() -
setWalkMp
public void setWalkMp(int walkMp) -
getRunMp
public int getRunMp() -
setRunMp
public void setRunMp(int runMp) -
getJumpMp
public int getJumpMp() -
setJumpMp
public void setJumpMp(int jumpMp) -
setFluffImage
-
getFluffImage
Description copied from interface:BTObjectReturns a fluff image for this unit or object to be shown e.g. in the unit summary.Important: This method returns only a fluff image that is stored in the object itself, e.g. if it was part of the unit's file or is created by the unit itself. It does not search for fluff images in the fluff images directories. For GUI, use
FluffImageHelper.getFluffImage(BTObject)instead; that method will retrieve either a unit's own fluff image or an image from the fluff images directories (if there is one).The default implementation returns null. For canon units, this will return null, as they do not store fluff images in the unit files.
- Specified by:
getFluffImagein interfaceBTObject- Returns:
- A fluff image for this object/unit if it contains one as part of the object/unit
-
setEquipment
Given the list of equipment mounted on this unit, parse it into a unique list of names and the number of times that name appears.- Parameters:
mountedList- A collection ofMountedequipment
-
getEquipmentNames
-
getEquipmentQuantities
-
setQuirkNames
-
getQuirkNames
-
setWeaponQuirkNames
-
getWeaponQuirkNames
-
setTotalArmor
public void setTotalArmor(int totalArmor) -
getMoveMode
-
setMoveMode
-
getTotalArmor
public int getTotalArmor() -
setTotalInternal
public void setTotalInternal(int totalInternal) -
getTotalInternal
public int getTotalInternal() -
setInternalsType
public void setInternalsType(int internalsType) -
getInternalsType
public int getInternalsType() -
setArmorType
public void setArmorType(int[] locsArmor) Takes the armor type at all locations and creates a set of the armor types.- Parameters:
locsArmor- An array that stores the armor type at each location.
-
getArmorType
-
getArmorTypes
public int[] getArmorTypes() -
setArmorTypes
public void setArmorTypes(int[] al) -
getArmorTechTypes
public int[] getArmorTechTypes() -
setArmorTechTypes
public void setArmorTechTypes(int[] att) -
setCockpitType
public void setCockpitType(int cockpitType) -
getCockpitType
public int getCockpitType() -
getEngineName
-
setEngineName
-
getEngineType
public int getEngineType() -
setEngineType
public void setEngineType(int engineType) -
getGyroType
public int getGyroType() -
setGyroType
public void setGyroType(int gyroType) -
getMyomerName
-
setMyomerName
-
getSuitWeight
public double getSuitWeight() -
setSuitWeight
public void setSuitWeight(double suitWeight) -
getExtinctRange
-
setAsUnitType
-
setSize
public void setSize(int size) -
setTmm
public void setTmm(int tmm) -
setMovement
-
setPrimaryMovementMode
-
setStandardDamage
-
setOverheat
public void setOverheat(int overheat) -
setFrontArc
-
setLeftArc
-
setRightArc
-
setRearArc
-
setThreshold
public void setThreshold(int threshold) -
setFullArmor
public void setFullArmor(int fullArmor) -
setFullStructure
public void setFullStructure(int fullStructure) -
setSquadSize
public void setSquadSize(int squadSize) -
setPointValue
public void setPointValue(int pointValue) -
setSpecialAbilities
-
setUnitRole
-
setExtinctRange
-
equals
-
hashCode
public int hashCode() -
showSUA
Description copied from interface:BattleForceSUAFormatterReturns true when this object wants to have the given SUA displayed among its special abilities. This method defaults to returning true and must be overridden when some SUAs are not too displayed.- Specified by:
showSUAin interfaceBattleForceSUAFormatter- Returns:
- True when this object wants to have the given sua displayed among its special abilities.
-
formatSUA
Description copied from interface:BattleForceSUAFormatterReturns the formatted SUA string for the given sua. The given collection can be the specials of the AlphaStrikeElement itself, a turret or an arc of a large aerospace unit. It is required to access related SUAs such as the doors for a transport ability like MT.- Specified by:
formatSUAin interfaceBattleForceSUAFormatter- Parameters:
sua- The Special Unit Ability to processdelimiter- The delimiter to insert between entries (only relevant for TUR)collection- The SUA collection that the given SUA is part of- Returns:
- The complete formatted Special Unit Ability string such as "LRM1/1/-" or "CK15D2".
-
loadEntity
Loads and returns the entity for this MekSummary. If the entity cannot be loaded, the error is logged and null is returned.- Returns:
- The loaded entity or null in case of an error
-
loadEntity
Loads and returns the entity for the given full name. If the entity cannot be loaded, the error is logged and null is returned. This is a shortcut for first loading the MekSummary usingMekSummaryCache.getMek(String)and thenloadEntity().- Returns:
- The loaded entity or null in case of an error
-
loadEntity
Loads anEntitydirectly from the specified unit file.Attempts to parse the file using
MekFileParserand retrieve an entity object. If the file does not contain a valid entity, or an error occurs while reading or parsing, this method logs the error and returnsnull.Usage: This method is intended for use in tests, so we can easily load in units without needing to substantiate the entire unit cache.
- Parameters:
unitFile- the file containing the unit data to load- Returns:
- the loaded
Entity, ornullif loading failed - Since:
- 0.50.07
-
toString
-