com.springrts.ai.oo
Class UnitDef

java.lang.Object
  extended by com.springrts.ai.oo.UnitDef
All Implemented Interfaces:
Comparable<UnitDef>

public class UnitDef
extends Object
implements Comparable<UnitDef>


Method Summary
 int compareTo(UnitDef other)
           
 boolean equals(Object otherObject)
           
 int getAiHint()
           
 float getAirLosRadius()
           
 float getArmoredMultiple()
           
 int getArmorType()
           
 float getAutoHeal()
          This amount of auto-heal will always be applied.
 int getBuildAngle()
           
 float getBuildDistance()
           
 float getBuildingDecalDecaySpeed()
           
 int getBuildingDecalSizeX()
           
 int getBuildingDecalSizeY()
           
 int getBuildingDecalType()
           
 List<UnitDef> getBuildOptions()
           
 float getBuildSpeed()
           
 float getBuildTime()
           
 float getCaptureSpeed()
           
 int getCategory()
           
 String getCategoryString()
           
 float getCloakCost()
          Energy cost per second to stay cloaked when stationary
 float getCloakCostMoving()
          Energy cost per second to stay cloaked when moving
 int getCobId()
           
 CollisionVolume getCollisionVolume()
           
 float getControlRadius()
           
 float getCost(Resource c_resourceId)
           
 Map<String,String> getCustomParams()
           
 String getDeathExplosion()
           
 float getDecloakDistance()
          If enemy unit comes within this range, decloaking is forced
 UnitDef getDecoyDef()
           
 float getDlHoverFactor()
           
 float getDrag()
           
 float getExtractsResource(Resource c_resourceId)
           
 float getFallSpeed()
          Dictates fall speed of all transported units.
 String getFileName()
           
 int getFireState()
           
 FlankingBonus getFlankingBonus()
           
 float getFlareDelay()
           
 AIFloat3 getFlareDropVector()
           
 float getFlareEfficiency()
           
 float getFlareReloadTime()
           
 int getFlareSalvoDelay()
           
 int getFlareSalvoSize()
           
 int getFlareTime()
           
 float getFrontToSpeed()
           
 String getGaia()
           
 float getHealth()
           
 float getHeight()
          Forces loading of the unit model
 int getHighTrajectoryType()
          Indicates the trajectory types supported by this unit.
 String getHumanName()
           
 float getIdleAutoHeal()
          This amount of auto-heal will only be applied while the unit is idling.
 int getIdleTime()
          Time a unit needs to idle before it is considered idling.
 int getJammerRadius()
           
 float getKamikazeDist()
           
 float getLoadingRadius()
           
 float getLosHeight()
           
 float getLosRadius()
           
 float getMakesResource(Resource c_resourceId)
          This amount of the resource will be created when the unit is on and enough energy can be drained.
 float getMass()
           
 float getMaxAcceleration()
           
 float getMaxAileron()
           
 float getMaxBank()
           
 float getMaxDeceleration()
           
 float getMaxElevator()
           
 float getMaxFuel()
          Maximum flight time in seconds before the aircraft needs to return to an air repair bay to refuel.
 float getMaxHeightDif()
          Maximum terra-form height this building allows.
 float getMaxPitch()
           
 float getMaxRepairSpeed()
           
 float getMaxRudder()
           
 float getMaxSlope()
          Build location relevant maximum steepness of the underlaying terrain.
 int getMaxThisUnit()
          Number of units of this type allowed simultaneously in the game
 float getMaxWaterDepth()
           
 float getMaxWeaponRange()
           
 float getMinAirBasePower()
          Minimum build power of airbases that this aircraft can land on
 float getMinCollisionSpeed()
           
 float getMinTransportMass()
           
 int getMinTransportSize()
           
 float getMinWaterDepth()
           
 MoveData getMoveData()
           
 int getMoveState()
           
 int getMoveType()
           
 float getMyGravity()
           
 String getName()
           
 int getNoChaseCategory()
           
 float getPower()
           
 int getRadarRadius()
           
 float getRadius()
          Forces loading of the unit model
 float getReclaimSpeed()
           
 float getRefuelTime()
          Time to fully refuel the unit
 float getRepairSpeed()
           
 float getResourceExtractorRange(Resource c_resourceId)
           
 float getResourceMake(Resource c_resourceId)
          This amount of the resource will always be created.
 float getResurrectSpeed()
           
 int getSeismicRadius()
           
 float getSeismicSignature()
           
 int getSelfDCountdown()
           
 String getSelfDExplosion()
           
 WeaponDef getShieldDef()
           
 float getSlideTolerance()
           
 int getSonarJamRadius()
           
 int getSonarRadius()
           
 float getSpeed()
           
 float getSpeedToFront()
           
 WeaponDef getStockpileDef()
           
 float getStorage(Resource c_resourceId)
           
 int getTechLevel()
           
 String getTedClassString()
           
 float getTerraformSpeed()
           
 float getTidalResourceGenerator(Resource c_resourceId)
           
 String getTooltip()
           
 float getTrackOffset()
           
 float getTrackStrength()
           
 float getTrackStretch()
           
 int getTrackType()
           
 float getTrackWidth()
           
 int getTransportCapacity()
           
 float getTransportMass()
           
 int getTransportSize()
           
 int getTransportUnloadMethod()
           
 float getTurnInPlaceDistance()
          Units above this distance to goal will try to turn while keeping some of their speed.
 float getTurnInPlaceSpeedLimit()
          Units below this speed will turn in place regardless of their turnInPlace setting.
 float getTurnRadius()
           
 float getTurnRate()
           
 String getType()
           
 int getUnitDefId()
           
 float getUnitFallSpeed()
          Sets the transported units FBI, overrides fallSpeed
 float getUnloadSpread()
           
 float getUpkeep(Resource c_resourceId)
           
 float getVerticalSpeed()
           
 float getWantedHeight()
           
 float getWaterline()
           
 List<WeaponMount> getWeaponMounts()
           
 float getWindResourceGenerator(Resource c_resourceId)
           
 float getWingAngle()
           
 float getWingDrag()
           
 String getWreckName()
           
 int getXSize()
           
 int getZSize()
           
 int hashCode()
           
 boolean isAbleToAssist()
           
 boolean isAbleToAttack()
           
 boolean isAbleToCapture()
           
 boolean isAbleToCloak()
          If the unit can cloak
 boolean isAbleToCrash()
           
 boolean isAbleToDGun()
           
 boolean isAbleToDropFlare()
           
 boolean isAbleToFight()
           
 boolean isAbleToFireControl()
           
 boolean isAbleToFly()
           
 boolean isAbleToGuard()
           
 boolean isAbleToHover()
           
 boolean isAbleToKamikaze()
          Will the unit self destruct if an enemy comes to close?
 boolean isAbleToLoopbackAttack()
          Only matters for fighter aircraft
 boolean isAbleToMove()
           
 boolean isAbleToPatrol()
           
 boolean isAbleToReclaim()
           
 boolean isAbleToRepair()
           
 boolean isAbleToRepeat()
           
 boolean isAbleToRestore()
           
 boolean isAbleToResurrect()
           
 boolean isAbleToSelfD()
           
 boolean isAbleToSelfRepair()
           
 boolean isAbleToSubmerge()
           
 boolean isActivateWhenBuilt()
           
 boolean isAirBase()
           
 boolean isAirStrafe()
           
 boolean isAssistable()
           
 boolean isBuilder()
           
 boolean isBuildRange3D()
           
 boolean isCapturable()
           
 boolean isCollide()
           
 boolean isCommander()
           
 boolean isDecloakOnFire()
          Will the unit decloak upon firing?
 boolean isDecloakSpherical()
          Use a spherical, instead of a cylindrical test?
 boolean isDontLand()
           
 boolean isFactoryHeadingTakeoff()
           
 boolean isFeature()
           
 boolean isFirePlatform()
           
 boolean isFloater()
           
 boolean isFullHealthFactory()
           
 boolean isHideDamage()
           
 boolean isHoldSteady()
           
 boolean isHoverAttack()
           
 boolean isLeaveTracks()
           
 boolean isLevelGround()
          Indicates whether the ground will be leveled/flattened out after this building has been built on it.
 boolean isNeedGeo()
           
 boolean isNotTransportable()
           
 boolean isOnOffable()
           
 boolean isPushResistant()
           
 boolean isReclaimable()
           
 boolean isReleaseHeld()
           
 boolean isResourceMaker(Resource c_resourceId)
           
 boolean isShowPlayerName()
           
 boolean isSonarStealth()
           
 boolean isSquareResourceExtractor(Resource c_resourceId)
           
 boolean isStartCloaked()
          If the unit wants to start out cloaked
 boolean isStealth()
           
 boolean isStrafeToAttack()
          Should the unit move sideways when it can not shoot?
 boolean isTargetingFacility()
           
 boolean isTransportByEnemy()
           
 boolean isTurnInPlace()
           
 boolean isUpright()
           
 boolean isUseBuildingGroundDecal()
           
 boolean isValid()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getUnitDefId

public int getUnitDefId()

compareTo

public int compareTo(UnitDef other)
Specified by:
compareTo in interface Comparable<UnitDef>

equals

public boolean equals(Object otherObject)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getHeight

public float getHeight()
Forces loading of the unit model


getRadius

public float getRadius()
Forces loading of the unit model


isValid

public boolean isValid()

getName

public String getName()

getHumanName

public String getHumanName()

getFileName

public String getFileName()

getAiHint

public int getAiHint()

getCobId

public int getCobId()

getTechLevel

public int getTechLevel()

getGaia

public String getGaia()

getUpkeep

public float getUpkeep(Resource c_resourceId)

getResourceMake

public float getResourceMake(Resource c_resourceId)
This amount of the resource will always be created.


getMakesResource

public float getMakesResource(Resource c_resourceId)
This amount of the resource will be created when the unit is on and enough energy can be drained.


getCost

public float getCost(Resource c_resourceId)

getExtractsResource

public float getExtractsResource(Resource c_resourceId)

getResourceExtractorRange

public float getResourceExtractorRange(Resource c_resourceId)

getWindResourceGenerator

public float getWindResourceGenerator(Resource c_resourceId)

getTidalResourceGenerator

public float getTidalResourceGenerator(Resource c_resourceId)

getStorage

public float getStorage(Resource c_resourceId)

isSquareResourceExtractor

public boolean isSquareResourceExtractor(Resource c_resourceId)

isResourceMaker

public boolean isResourceMaker(Resource c_resourceId)

getBuildTime

public float getBuildTime()

getAutoHeal

public float getAutoHeal()
This amount of auto-heal will always be applied.


getIdleAutoHeal

public float getIdleAutoHeal()
This amount of auto-heal will only be applied while the unit is idling.


getIdleTime

public int getIdleTime()
Time a unit needs to idle before it is considered idling.


getPower

public float getPower()

getHealth

public float getHealth()

getCategory

public int getCategory()

getSpeed

public float getSpeed()

getTurnRate

public float getTurnRate()

isTurnInPlace

public boolean isTurnInPlace()

getTurnInPlaceDistance

public float getTurnInPlaceDistance()
Units above this distance to goal will try to turn while keeping some of their speed. 0 to disable


getTurnInPlaceSpeedLimit

public float getTurnInPlaceSpeedLimit()
Units below this speed will turn in place regardless of their turnInPlace setting.


getMoveType

public int getMoveType()

isUpright

public boolean isUpright()

isCollide

public boolean isCollide()

getControlRadius

public float getControlRadius()

getLosRadius

public float getLosRadius()

getAirLosRadius

public float getAirLosRadius()

getLosHeight

public float getLosHeight()

getRadarRadius

public int getRadarRadius()

getSonarRadius

public int getSonarRadius()

getJammerRadius

public int getJammerRadius()

getSonarJamRadius

public int getSonarJamRadius()

getSeismicRadius

public int getSeismicRadius()

getSeismicSignature

public float getSeismicSignature()

isStealth

public boolean isStealth()

isSonarStealth

public boolean isSonarStealth()

isBuildRange3D

public boolean isBuildRange3D()

getBuildDistance

public float getBuildDistance()

getBuildSpeed

public float getBuildSpeed()

getReclaimSpeed

public float getReclaimSpeed()

getRepairSpeed

public float getRepairSpeed()

getMaxRepairSpeed

public float getMaxRepairSpeed()

getResurrectSpeed

public float getResurrectSpeed()

getCaptureSpeed

public float getCaptureSpeed()

getTerraformSpeed

public float getTerraformSpeed()

getMass

public float getMass()

isPushResistant

public boolean isPushResistant()

isStrafeToAttack

public boolean isStrafeToAttack()
Should the unit move sideways when it can not shoot?


getMinCollisionSpeed

public float getMinCollisionSpeed()

getSlideTolerance

public float getSlideTolerance()

getMaxSlope

public float getMaxSlope()
Build location relevant maximum steepness of the underlaying terrain. Used to calculate the maxHeightDif.


getMaxHeightDif

public float getMaxHeightDif()
Maximum terra-form height this building allows. If this value is 0.0, you can only build this structure on totally flat terrain.


getMinWaterDepth

public float getMinWaterDepth()

getWaterline

public float getWaterline()

getMaxWaterDepth

public float getMaxWaterDepth()

getArmoredMultiple

public float getArmoredMultiple()

getArmorType

public int getArmorType()

getMaxWeaponRange

public float getMaxWeaponRange()

getType

public String getType()

getTooltip

public String getTooltip()

getWreckName

public String getWreckName()

getDeathExplosion

public String getDeathExplosion()

getSelfDExplosion

public String getSelfDExplosion()

getTedClassString

public String getTedClassString()

getCategoryString

public String getCategoryString()

isAbleToSelfD

public boolean isAbleToSelfD()

getSelfDCountdown

public int getSelfDCountdown()

isAbleToSubmerge

public boolean isAbleToSubmerge()

isAbleToFly

public boolean isAbleToFly()

isAbleToMove

public boolean isAbleToMove()

isAbleToHover

public boolean isAbleToHover()

isFloater

public boolean isFloater()

isBuilder

public boolean isBuilder()

isActivateWhenBuilt

public boolean isActivateWhenBuilt()

isOnOffable

public boolean isOnOffable()

isFullHealthFactory

public boolean isFullHealthFactory()

isFactoryHeadingTakeoff

public boolean isFactoryHeadingTakeoff()

isReclaimable

public boolean isReclaimable()

isCapturable

public boolean isCapturable()

isAbleToRestore

public boolean isAbleToRestore()

isAbleToRepair

public boolean isAbleToRepair()

isAbleToSelfRepair

public boolean isAbleToSelfRepair()

isAbleToReclaim

public boolean isAbleToReclaim()

isAbleToAttack

public boolean isAbleToAttack()

isAbleToPatrol

public boolean isAbleToPatrol()

isAbleToFight

public boolean isAbleToFight()

isAbleToGuard

public boolean isAbleToGuard()

isAbleToAssist

public boolean isAbleToAssist()

isAssistable

public boolean isAssistable()

isAbleToRepeat

public boolean isAbleToRepeat()

isAbleToFireControl

public boolean isAbleToFireControl()

getFireState

public int getFireState()

getMoveState

public int getMoveState()

getWingDrag

public float getWingDrag()

getWingAngle

public float getWingAngle()

getDrag

public float getDrag()

getFrontToSpeed

public float getFrontToSpeed()

getSpeedToFront

public float getSpeedToFront()

getMyGravity

public float getMyGravity()

getMaxBank

public float getMaxBank()

getMaxPitch

public float getMaxPitch()

getTurnRadius

public float getTurnRadius()

getWantedHeight

public float getWantedHeight()

getVerticalSpeed

public float getVerticalSpeed()

isAbleToCrash

public boolean isAbleToCrash()

isHoverAttack

public boolean isHoverAttack()

isAirStrafe

public boolean isAirStrafe()

getDlHoverFactor

public float getDlHoverFactor()
Returns:
< 0: it can land >= 0: how much the unit will move during hovering on the spot

getMaxAcceleration

public float getMaxAcceleration()

getMaxDeceleration

public float getMaxDeceleration()

getMaxAileron

public float getMaxAileron()

getMaxElevator

public float getMaxElevator()

getMaxRudder

public float getMaxRudder()

getXSize

public int getXSize()

getZSize

public int getZSize()

getBuildAngle

public int getBuildAngle()

getLoadingRadius

public float getLoadingRadius()

getUnloadSpread

public float getUnloadSpread()

getTransportCapacity

public int getTransportCapacity()

getTransportSize

public int getTransportSize()

getMinTransportSize

public int getMinTransportSize()

isAirBase

public boolean isAirBase()

isFirePlatform

public boolean isFirePlatform()

getTransportMass

public float getTransportMass()

getMinTransportMass

public float getMinTransportMass()

isHoldSteady

public boolean isHoldSteady()

isReleaseHeld

public boolean isReleaseHeld()

isNotTransportable

public boolean isNotTransportable()

isTransportByEnemy

public boolean isTransportByEnemy()

getTransportUnloadMethod

public int getTransportUnloadMethod()
Returns:
0: land unload 1: fly-over drop 2: land flood

getFallSpeed

public float getFallSpeed()
Dictates fall speed of all transported units. This only makes sense for air transports, if they an drop units while in the air.


getUnitFallSpeed

public float getUnitFallSpeed()
Sets the transported units FBI, overrides fallSpeed


isAbleToCloak

public boolean isAbleToCloak()
If the unit can cloak


isStartCloaked

public boolean isStartCloaked()
If the unit wants to start out cloaked


getCloakCost

public float getCloakCost()
Energy cost per second to stay cloaked when stationary


getCloakCostMoving

public float getCloakCostMoving()
Energy cost per second to stay cloaked when moving


getDecloakDistance

public float getDecloakDistance()
If enemy unit comes within this range, decloaking is forced


isDecloakSpherical

public boolean isDecloakSpherical()
Use a spherical, instead of a cylindrical test?


isDecloakOnFire

public boolean isDecloakOnFire()
Will the unit decloak upon firing?


isAbleToKamikaze

public boolean isAbleToKamikaze()
Will the unit self destruct if an enemy comes to close?


getKamikazeDist

public float getKamikazeDist()

isTargetingFacility

public boolean isTargetingFacility()

isAbleToDGun

public boolean isAbleToDGun()

isNeedGeo

public boolean isNeedGeo()

isFeature

public boolean isFeature()

isHideDamage

public boolean isHideDamage()

isCommander

public boolean isCommander()

isShowPlayerName

public boolean isShowPlayerName()

isAbleToResurrect

public boolean isAbleToResurrect()

isAbleToCapture

public boolean isAbleToCapture()

getHighTrajectoryType

public int getHighTrajectoryType()
Indicates the trajectory types supported by this unit.

Returns:
0: (default) = only low 1: only high 2: choose

getNoChaseCategory

public int getNoChaseCategory()

isLeaveTracks

public boolean isLeaveTracks()

getTrackWidth

public float getTrackWidth()

getTrackOffset

public float getTrackOffset()

getTrackStrength

public float getTrackStrength()

getTrackStretch

public float getTrackStretch()

getTrackType

public int getTrackType()

isAbleToDropFlare

public boolean isAbleToDropFlare()

getFlareReloadTime

public float getFlareReloadTime()

getFlareEfficiency

public float getFlareEfficiency()

getFlareDelay

public float getFlareDelay()

getFlareDropVector

public AIFloat3 getFlareDropVector()

getFlareTime

public int getFlareTime()

getFlareSalvoSize

public int getFlareSalvoSize()

getFlareSalvoDelay

public int getFlareSalvoDelay()

isAbleToLoopbackAttack

public boolean isAbleToLoopbackAttack()
Only matters for fighter aircraft


isLevelGround

public boolean isLevelGround()
Indicates whether the ground will be leveled/flattened out after this building has been built on it. Only matters for buildings.


isUseBuildingGroundDecal

public boolean isUseBuildingGroundDecal()

getBuildingDecalType

public int getBuildingDecalType()

getBuildingDecalSizeX

public int getBuildingDecalSizeX()

getBuildingDecalSizeY

public int getBuildingDecalSizeY()

getBuildingDecalDecaySpeed

public float getBuildingDecalDecaySpeed()

getMaxFuel

public float getMaxFuel()
Maximum flight time in seconds before the aircraft needs to return to an air repair bay to refuel.


getRefuelTime

public float getRefuelTime()
Time to fully refuel the unit


getMinAirBasePower

public float getMinAirBasePower()
Minimum build power of airbases that this aircraft can land on


getMaxThisUnit

public int getMaxThisUnit()
Number of units of this type allowed simultaneously in the game


getDecoyDef

public UnitDef getDecoyDef()

isDontLand

public boolean isDontLand()

getShieldDef

public WeaponDef getShieldDef()

getStockpileDef

public WeaponDef getStockpileDef()

getBuildOptions

public List<UnitDef> getBuildOptions()

getCustomParams

public Map<String,String> getCustomParams()

getFlankingBonus

public FlankingBonus getFlankingBonus()

getCollisionVolume

public CollisionVolume getCollisionVolume()

getMoveData

public MoveData getMoveData()

getWeaponMounts

public List<WeaponMount> getWeaponMounts()