Advanced Strategic Command
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
VehicleType Class Reference

The class describing properties that are common to all vehicles of a certain kind. More...

#include <vehicletype.h>

Inheritance diagram for VehicleType:
Inheritance graph
[legend]

Classes

class  HeightChangeMethod
 
struct  JumpDrive
 

Public Member Functions

ASCString getName () const
 
int maxsize (void) const
 returns the maximum weight of this unit without fuel and material More...
 
int maxSpeed () const
 
 VehicleType (void)
 
void read (tnstream &stream)
 read the binary representation of this item from the given stream More...
 
void write (tnstream &stream) const
 write the binary representation of this item to the given stream More...
 
void runTextIO (PropertyContainer &pc)
 registers the properties of this item for loading/writing into asctxt files More...
 
 ~VehicleType ()
 
Resources calcProductionCost ()
 
int getMoveMalusType () const
 
void paint (Surface &s, SPoint pos, const PlayerColor &player, int direction=0) const
 
void paint (Surface &s, SPoint pos) const
 
const SurfacegetImage () const
 
SurfacegetImage ()
 
int getMemoryFootprint () const
 
- Public Member Functions inherited from ContainerBaseType
 ContainerBaseType ()
 
bool hasFunction (ContainerFunctions function) const
 
bool hasAnyFunction (std::bitset< 64 > functions) const
 
int getID () const
 
int getHeight () const
 
virtual ~ContainerBaseType ()
 
bool vehicleFit (const VehicleType *type) const
 can units of the given type be moved into this buildtype? This is a prerequisite - but not the only requirement - for a real unit to move into a real building More...
 
int vehicleUnloadable (const VehicleType *vehicleType, int carrierHeight) const
 checks the unloading of a unit type More...
 
Resources getStorageCapacity (int mode) const
 returns the Storage capacity of the unit More...
 
- Public Member Functions inherited from MapItemType
virtual ~MapItemType ()
 
- Public Member Functions inherited from LoadableItemType
virtual ~LoadableItemType ()
 
- Public Member Functions inherited from MemorySizeQueryInterface
virtual ~MemorySizeQueryInterface ()
 

Static Public Member Functions

static BitSet convertOldFunctions (int abilities, const ASCString &location)
 
- Static Public Member Functions inherited from ContainerBaseType
static const char * getFunctionName (ContainerFunctions function)
 

Public Attributes

int armor
 
double cargoMovementDivisor
 if a transport moves the movement for the units inside a transport is decreased by 1/n of the tranport's distance More...
 
bool wait
 If the unit cannot attack in the same turn after it has moved, it has to wait. More...
 
int fuelConsumption
 the fuel consumption to move a single field More...
 
vector< int > movement
 the distance a unit can travel each round. One value for each of the 8 levels of height More...
 
int movemalustyp
 The category of the unit. Original used only to distinguish only between different movement costs for a field, this categorization is now used for many more things. More...
 
int maxwindspeedonwater
 the maximum speed of the wind that the unit can survive when on open water without sinking More...
 
int digrange
 radius of the circle in which a unit can search for mineral resolures (measured in number of fields, not distance !) More...
 
int initiative
 unused More...
 
int weight
 the weight of the unit, without fuel or other cargo More...
 
TerrainAccess terrainaccess
 the terrain this unit can move to More...
 
int bipicture
 the image index from the GraphicSet , or -1 if no graphics from graphic sets are used. More...
 
vector< IntRangebuildingsBuildable
 the ids of buildings this unit can construct More...
 
vector< IntRangevehiclesBuildable
 the ids of units this unit can construct More...
 
vector< IntRangeobjectsBuildable
 the ids of objects this unit can construct More...
 
vector< IntRangeobjectsRemovable
 the ids of objects this unit can remove More...
 
vector< IntRangeobjectGroupsBuildable
 the group-ids of objects this unit can construct More...
 
vector< IntRangeobjectGroupsRemovable
 the group-ids of objects this unit can remove More...
 
vector< IntRangeobjectLayedByMovement
 the IDs of objects that are automatically layed by moving the movement More...
 
UnitWeapon weapons
 The weapons. More...
 
int autorepairrate
 the damage this unit can repair itself automatically each turn. More...
 
int unitConstructionMoveCostPercentage
 if this unit constructs another unit externally (for example a turret), it costs this much of its movement (in percent) More...
 
int unitConstructionMinDistance
 the minimal distance (measured in number of fields) in which units can be externally constructed More...
 
int unitConstructionMaxDistance
 the maximum distance (measured in number of fields) in which units can be externally constructed More...
 
vector< int > wreckageObject
 if the unit is destroyed, it can leave an wreckage object behind ( < 0 to disable ) More...
 
AiValueaiparam [8]
 some information the AI stores about this unit More...
 
AiParameter::Job recommendedAIJob
 the recommended task for the unit, set by the unit creater More...
 
ASCString movementSoundLabel
 this label can select a special sound to be played when moving More...
 
ASCString killSoundLabel
 this label can select a special sound to be played when this unit is killed More...
 
vector< int > guideSortHelp
 
int heightChangeMethodNum
 
vector< HeightChangeMethodheightChangeMethod
 
struct VehicleType::JumpDrive jumpDrive
 
- Public Attributes inherited from ContainerBaseType
int id
 
vector< int > secondaryIDs
 when loading a file and these IDs are encountered, this object will be used. More...
 
ASCString name
 a short name, for example B-52 More...
 
ASCString description
 short description of the units role, for example "strategic bomber" More...
 
ASCString infotext
 an extensive information about the unit/building which may be several paragraphs long More...
 
int jamming
 the radar jamming power More...
 
int view
 the visibility range More...
 
int height
 the levels of height which this unit can enter More...
 
Resources productionCost
 
int maxLoadableUnits
 the maximum number of units that can be loaded More...
 
int maxLoadableUnitSize
 the maximum size of a unit that may enter the building More...
 
int maxLoadableWeight
 the maximum total weight of all loaded units More...
 
int vehicleCategoriesStorable
 bitmapped: vehicle categories that can be stored the container More...
 
int vehicleCategoriesProduceable
 bitmapped: vehicle categories that can be produced in the container More...
 
vector< IntRangevehiclesInternallyProduceable
 the default production capabilities of this container. More...
 
EntranceSystems entranceSystems
 
TechAdapterDependency techDependency
 
ASCString infoImageFilename
 the filename of an image that is shown in info dialogs More...
 
ASCString infoImageSmallFilename
 
int efficiencyfuel
 currently only used by mining stations: the efficiency of the resource extraction from the ground. Base is 1024 More...
 
int efficiencymaterial
 currently only used by mining stations: the efficiency of the resource extraction from the ground. Base is 1024 More...
 
int maxresearchpoints
 the maximum number of research points a research center may produce More...
 
int defaultMaxResearchpoints
 when a building of this type is placed on a map, its maxResearch property will be set to this value More...
 
int nominalresearchpoints
 the number of reseach points for which the plus settings apllies More...
 
int minFieldRepairDamage
 if the unit is repaired in the field (that is, not inside a transport or building), it can only be repaired up to this level 0 would result in a complete repair being possible, 20 that it can only be restored to 20% damage (80% health). More...
 
Resources maxplus
 
Resources defaultProduction
 if a new building is constructed, this will be the resource production of the building More...
 
ResourceMatrix productionEfficiency
 
struct {
   int   range
 
   int   maxFieldsPerTurn
 
   vector< IntRange >   objectsHarvestable
 the ids of objects this unit can construct More...
 
   vector< IntRange >   objectGroupsHarvestable
 the group-ids of objects this unit can construct More...
 
autoHarvest
 
- Public Attributes inherited from LoadableItemType
ASCString filename
 The name of the file from which the item was loaded. More...
 
ASCString location
 The filename and location on disk (including containerfiles) of the object. More...
 
ASCString archive
 

Static Public Attributes

static const int legacyVehicleFunctionNum = 29
 
- Static Public Attributes inherited from ContainerBaseType
static const int functionNum = 45
 

Additional Inherited Members

- Public Types inherited from ContainerBaseType
enum  ContainerFunctions {
  TrainingCenter, InternalVehicleProduction, AmmoProduction, InternalUnitRepair,
  RecycleUnits, Research, Sonar, SatelliteView,
  MineView, WindPowerPlant, SolarPowerPlant, MatterConverter,
  MiningStation, ProduceNonLeavableUnits, ResourceSink, ExternalEnergyTransfer,
  ExternalMaterialTransfer, ExternalFuelTransfer, ExternalAmmoTransfer, ExternalRepair,
  NoObjectChaining, SelfDestructOnConquer, Paratrooper, PlaceMines,
  CruiserLanding, ConquerBuildings, MoveAfterAttack, ExternalVehicleProduction,
  ConstructBuildings, IceBreaker, NoInairRefuelling, MakesTracks,
  DetectsMineralResources, NoReactionfire, AutoRepair, KamikazeOnly,
  ImmuneToMines, JamsOnlyOwnField, MoveWithReactionFire, OnlyMoveToAndFromTransports,
  AutoHarvestObjects, NoProductionCustomization, ManualSelfDestruct, NoMineRemoval,
  NoImageRotation
}
 
typedef vector< TransportationIOEntranceSystems
 
- Protected Member Functions inherited from ContainerBaseType
void setFunction (ContainerFunctions function)
 
- Protected Attributes inherited from ContainerBaseType
std::bitset< 64 > features
 
Resources asc_mode_tank
 
Resources bi_mode_tank
 

Detailed Description

The class describing properties that are common to all vehicles of a certain kind.

See Also
Vehicle

Definition at line 177 of file vehicletype.h.

Constructor & Destructor Documentation

VehicleType::VehicleType ( void  )
VehicleType::~VehicleType ( )

Definition at line 799 of file vehicletype.cpp.

References aiparam.

Member Function Documentation

Resources VehicleType::calcProductionCost ( )
BitSet VehicleType::convertOldFunctions ( int  abilities,
const ASCString location 
)
static
const Surface& VehicleType::getImage ( ) const
inline

Definition at line 325 of file vehicletype.h.

Referenced by paint(), Vehicle::paint(), and DataTab::setData().

Surface& VehicleType::getImage ( )
inline

Definition at line 326 of file vehicletype.h.

int VehicleType::getMemoryFootprint ( ) const
virtual

Implements MemorySizeQueryInterface.

Definition at line 793 of file vehicletype.cpp.

References Surface::getMemoryFootprint().

int VehicleType::getMoveMalusType ( ) const
inlinevirtual

Implements ContainerBaseType.

Definition at line 305 of file vehicletype.h.

References movemalustyp.

ASCString VehicleType::getName ( void  ) const
virtual
int VehicleType::maxsize ( void  ) const

returns the maximum weight of this unit without fuel and material

Definition at line 135 of file vehicletype.cpp.

References weight.

Referenced by ContainerBaseType::vehicleFit().

int VehicleType::maxSpeed ( ) const

Definition at line 785 of file vehicletype.cpp.

References max(), and movement.

Referenced by DataTab::setData().

void VehicleType::paint ( Surface s,
SPoint  pos,
const PlayerColor player,
int  direction = 0 
) const
void VehicleType::paint ( Surface s,
SPoint  pos 
) const

Definition at line 1236 of file vehicletype.cpp.

References getImage(), and nullParam.

void VehicleType::read ( tnstream stream)
virtual

read the binary representation of this item from the given stream

Reimplemented from ContainerBaseType.

Definition at line 159 of file vehicletype.cpp.

References armor, ContainerBaseType::asc_mode_tank, VehicleType::JumpDrive::attackAfterJump, ContainerBaseType::AutoRepair, autorepairrate, ContainerBaseType::bi_mode_tank, bipicture, buildingsBuildable, SingleWeapon::canRefuel(), cargoMovementDivisor, cmovemalitypenum, VehicleType::JumpDrive::consumption, convertOldFunctions(), SingleWeapon::count, UnitWeapon::count, ContainerBaseType::defaultMaxResearchpoints, ContainerBaseType::defaultProduction, ContainerBaseType::description, digrange, SingleWeapon::efficiency, ContainerBaseType::efficiencyfuel, ContainerBaseType::efficiencymaterial, Resources::energy, ContainerBaseType::ExternalAmmoTransfer, ContainerBaseType::features, LoadableItemType::filename, fuelConsumption, tnstream::getDeviceName(), tnstream::getLocation(), guideSortHelp, ContainerBaseType::hasFunction(), ContainerBaseType::height, VehicleType::JumpDrive::height, heightChangeMethod, heightChangeMethodNum, ContainerBaseType::infotext, initiative, ContainerBaseType::jamming, VehicleType::JumpDrive::jumpAfterAttack, jumpDrive, killSoundLabel, SingleWeapon::laserRechargeCost, SingleWeapon::laserRechargeRate, LoadableItemType::location, Resources::material, SingleWeapon::maxdistance, VehicleType::JumpDrive::maxDistance, ContainerBaseType::maxplus, ContainerBaseType::maxresearchpoints, SingleWeapon::maxstrength, maxwindspeedonwater, SingleWeapon::mindistance, SingleWeapon::minstrength, movemalustyp, movement, VehicleType::JumpDrive::movementConsumptionPercentage, movementSoundLabel, ContainerBaseType::name, SingleWeapon::name, ContainerBaseType::nominalresearchpoints, objectGroupsBuildable, objectGroupsRemovable, objectLayedByMovement, objectsBuildable, objectsRemovable, ContainerBaseType::productionCost, SingleWeapon::reactionFireShots, TerrainAccess::read(), Surface::read(), TechAdapterDependency::read(), Resources::read(), ContainerBaseType::read(), readClassContainer(), tnstream::readFloat(), tnstream::readInt(), tnstream::readString(), tnstream::readUint8(), tnstream::readWord(), recommendedAIJob, Resources::resource(), SingleWeapon::set(), ContainerBaseType::setFunction(), TerrainBits::setInt(), SingleWeapon::soundLabel, SingleWeapon::sourceheight, SingleWeapon::targ, SingleWeapon::targetingAccuracy, VehicleType::JumpDrive::targetterrain, ContainerBaseType::techDependency, TerrainAccess::terrain, terrainaccess, TerrainAccess::terrainkill, TerrainAccess::terrainnot, TerrainAccess::terrainreq, unitConstructionMaxDistance, unitConstructionMinDistance, unitConstructionMoveCostPercentage, vehicle_version, vehiclesBuildable, ContainerBaseType::view, wait, UnitWeapon::weapon, weapons, weight, and wreckageObject.

void VehicleType::runTextIO ( PropertyContainer pc)
virtual

registers the properties of this item for loading/writing into asctxt files

Reimplemented from ContainerBaseType.

Definition at line 963 of file vehicletype.cpp.

References PropertyContainer::addBool(), PropertyContainer::addDFloat(), PropertyContainer::addImage(), PropertyContainer::addInteger(), PropertyContainer::addIntegerArray(), PropertyContainer::addIntRangeArray(), PropertyContainer::addNamedInteger(), PropertyContainer::addString(), PropertyContainer::addTagArray(), PropertyContainer::addTagInteger(), AIjobs, armor, ContainerBaseType::asc_mode_tank, Surface::assignDefaultPalette(), VehicleType::JumpDrive::attackAfterJump, autorepairrate, ContainerBaseType::bi_mode_tank, buildingsBuildable, calcProductionCost(), SingleWeapon::canRefuel(), cargoMovementDivisor, choehenstufennum, PropertyContainer::closeBracket(), cmovemalitypenum, VehicleType::JumpDrive::consumption, containerFunctionTags, convertOldFunctions(), UnitWeapon::count, digrange, displayLogMessage(), Resources::energy, PropertyContainer::error(), ContainerBaseType::ExternalAmmoTransfer, ContainerBaseType::ExternalEnergyTransfer, ContainerBaseType::ExternalFuelTransfer, ContainerBaseType::ExternalMaterialTransfer, ContainerBaseType::ExternalRepair, extractFileName_withoutSuffix(), ContainerBaseType::features, fieldsizex, fieldsizey, LoadableItemType::filename, PropertyContainer::find(), Resources::fuel, fuelConsumption, ContainerBaseType::functionNum, PropertyContainer::getFileName(), guideSortHelp, ContainerBaseType::hasFunction(), ContainerBaseType::height, VehicleType::JumpDrive::height, heightChangeMethod, heightChangeMethodNum, heightTags, ContainerBaseType::IceBreaker, ContainerBaseType::id, PropertyContainer::isReading(), AiParameter::job_undefined, AiParameter::jobNum, VehicleType::JumpDrive::jumpAfterAttack, jumpDrive, killSoundLabel, legacyVehicleFunctionNum, ContainerBaseType::MakesTracks, Resources::material, VehicleType::JumpDrive::maxDistance, maxint, maxwindspeedonwater, movemalustyp, movement, VehicleType::JumpDrive::movementConsumptionPercentage, movementSoundLabel, ContainerBaseType::name, ContainerBaseType::NoReactionfire, objectGroupsBuildable, objectGroupsRemovable, objectLayedByMovement, objectsBuildable, objectsRemovable, PropertyContainer::openBracket(), ContainerBaseType::productionCost, productionCostCalculationMethod, productionCostCalculationMethodNum, SingleWeapon::reactionFireShots, recommendedAIJob, TerrainAccess::runTextIO(), TechAdapterDependency::runTextIO(), Resources::runTextIO(), SingleWeapon::runTextIO(), ContainerBaseType::runTextIO(), SingleWeapon::service(), ContainerBaseType::setFunction(), Surface::strech(), strrr(), VehicleType::JumpDrive::targetterrain, ContainerBaseType::techDependency, terrainaccess, unitCategoryTags, unitConstructionMaxDistance, unitConstructionMinDistance, unitConstructionMoveCostPercentage, vehicleAbilities, vehiclesBuildable, ContainerBaseType::view, wait, UnitWeapon::weapon, weapons, weight, and wreckageObject.

Referenced by execaction_pg().

void VehicleType::write ( tnstream stream) const
virtual

write the binary representation of this item to the given stream

Reimplemented from ContainerBaseType.

Definition at line 593 of file vehicletype.cpp.

References armor, ContainerBaseType::asc_mode_tank, VehicleType::JumpDrive::attackAfterJump, autorepairrate, ContainerBaseType::bi_mode_tank, bipicture, buildingsBuildable, cargoMovementDivisor, cmovemalitypenum, VehicleType::JumpDrive::consumption, SingleWeapon::count, UnitWeapon::count, ContainerBaseType::defaultMaxResearchpoints, ContainerBaseType::defaultProduction, ContainerBaseType::description, digrange, SingleWeapon::efficiency, ContainerBaseType::efficiencyfuel, ContainerBaseType::efficiencymaterial, fuelConsumption, SingleWeapon::gettype(), guideSortHelp, ContainerBaseType::height, VehicleType::JumpDrive::height, heightChangeMethod, heightChangeMethodNum, ContainerBaseType::infotext, initiative, ContainerBaseType::jamming, VehicleType::JumpDrive::jumpAfterAttack, jumpDrive, killSoundLabel, SingleWeapon::laserRechargeCost, SingleWeapon::laserRechargeRate, SingleWeapon::maxdistance, VehicleType::JumpDrive::maxDistance, ContainerBaseType::maxplus, ContainerBaseType::maxresearchpoints, SingleWeapon::maxstrength, maxwindspeedonwater, SingleWeapon::mindistance, SingleWeapon::minstrength, movemalustyp, movement, VehicleType::JumpDrive::movementConsumptionPercentage, movementSoundLabel, ContainerBaseType::name, SingleWeapon::name, ContainerBaseType::nominalresearchpoints, objectGroupsBuildable, objectGroupsRemovable, objectLayedByMovement, objectsBuildable, objectsRemovable, ContainerBaseType::productionCost, SingleWeapon::reactionFireShots, recommendedAIJob, SingleWeapon::soundLabel, SingleWeapon::sourceheight, SingleWeapon::targ, SingleWeapon::targetingAccuracy, VehicleType::JumpDrive::targetterrain, ContainerBaseType::techDependency, terrainaccess, unitConstructionMaxDistance, unitConstructionMinDistance, unitConstructionMoveCostPercentage, vehicle_version, vehiclesBuildable, ContainerBaseType::view, wait, UnitWeapon::weapon, weapons, weight, wreckageObject, TerrainAccess::write(), Surface::write(), TechAdapterDependency::write(), Resources::write(), ContainerBaseType::write(), writeClassContainer(), tnstream::writeFloat(), tnstream::writeInt(), tnstream::writeString(), tnstream::writeUint8(), and tnstream::writeWord().

Member Data Documentation

AiValue* VehicleType::aiparam[8]
mutable

some information the AI stores about this unit

Definition at line 265 of file vehicletype.h.

Referenced by CalculateThreat_Vehicle::calc_threat_vehicle(), CalculateThreat_VehicleType::calc_threat_vehicletype(), VehicleType(), and ~VehicleType().

int VehicleType::armor
int VehicleType::autorepairrate
int VehicleType::bipicture

the image index from the GraphicSet , or -1 if no graphics from graphic sets are used.

Definition at line 224 of file vehicletype.h.

Referenced by read(), VehicleType(), and write().

vector<IntRange> VehicleType::buildingsBuildable

the ids of buildings this unit can construct

Definition at line 227 of file vehicletype.h.

Referenced by DestructBuildingCommand::avail(), ConstructBuildingCommand::getProduceableBuildings(), read(), runTextIO(), and write().

double VehicleType::cargoMovementDivisor

if a transport moves the movement for the units inside a transport is decreased by 1/n of the tranport's distance

Definition at line 194 of file vehicletype.h.

Referenced by read(), runTextIO(), Vehicle::setMovement(), VehicleType(), and write().

int VehicleType::digrange

radius of the circle in which a unit can search for mineral resolures (measured in number of fields, not distance !)

Definition at line 212 of file vehicletype.h.

Referenced by PBPUnitCostCalculator::productionCost(), StandardUnitCostCalculator::productionCost(), read(), runTextIO(), VehicleType(), and write().

int VehicleType::fuelConsumption
vector<int> VehicleType::guideSortHelp

Definition at line 279 of file vehicletype.h.

Referenced by PBPUnitCostCalculator::productionCost(), read(), runTextIO(), and write().

vector<HeightChangeMethod> VehicleType::heightChangeMethod
int VehicleType::heightChangeMethodNum
int VehicleType::initiative
struct VehicleType::JumpDrive VehicleType::jumpDrive
ASCString VehicleType::killSoundLabel

this label can select a special sound to be played when this unit is killed

Definition at line 277 of file vehicletype.h.

Referenced by DestructUnitCommand::go(), read(), runTextIO(), BattleSoundPlayer::visit(), and write().

const int VehicleType::legacyVehicleFunctionNum = 29
static

Definition at line 187 of file vehicletype.h.

Referenced by ContainerBaseType::TransportationIO::runTextIO(), and runTextIO().

int VehicleType::maxwindspeedonwater

the maximum speed of the wind that the unit can survive when on open water without sinking

Definition at line 209 of file vehicletype.h.

Referenced by getmaxwindspeedforunit(), read(), runTextIO(), DataTab::setData(), UnitInfoDialog::UnitInfoDialog(), VehicleType(), and write().

int VehicleType::movemalustyp
vector<int> VehicleType::movement
ASCString VehicleType::movementSoundLabel

this label can select a special sound to be played when moving

Definition at line 274 of file vehicletype.h.

Referenced by read(), MoveUnit::runAction(), runTextIO(), and write().

vector<IntRange> VehicleType::objectGroupsBuildable

the group-ids of objects this unit can construct

Definition at line 239 of file vehicletype.h.

Referenced by PutObjectCommand::avail(), read(), runTextIO(), and write().

vector<IntRange> VehicleType::objectGroupsRemovable

the group-ids of objects this unit can remove

Definition at line 242 of file vehicletype.h.

Referenced by PutObjectCommand::avail(), read(), runTextIO(), and write().

vector<IntRange> VehicleType::objectLayedByMovement

the IDs of objects that are automatically layed by moving the movement

Definition at line 245 of file vehicletype.h.

Referenced by read(), runTextIO(), Vehicle::spawnMoveObjects(), and write().

vector<IntRange> VehicleType::objectsBuildable

the ids of objects this unit can construct

Definition at line 233 of file vehicletype.h.

Referenced by PutObjectCommand::avail(), PBPUnitCostCalculator::productionCost(), StandardUnitCostCalculator::productionCost(), read(), runTextIO(), and write().

vector<IntRange> VehicleType::objectsRemovable

the ids of objects this unit can remove

Definition at line 236 of file vehicletype.h.

Referenced by PutObjectCommand::avail(), read(), runTextIO(), and write().

AiParameter::Job VehicleType::recommendedAIJob

the recommended task for the unit, set by the unit creater

Definition at line 268 of file vehicletype.h.

Referenced by read(), runTextIO(), VehicleType(), and write().

TerrainAccess VehicleType::terrainaccess
int VehicleType::unitConstructionMaxDistance

the maximum distance (measured in number of fields) in which units can be externally constructed

Definition at line 259 of file vehicletype.h.

Referenced by ConstructUnitCommand::getFields(), read(), runTextIO(), VehicleType(), and write().

int VehicleType::unitConstructionMinDistance

the minimal distance (measured in number of fields) in which units can be externally constructed

Definition at line 257 of file vehicletype.h.

Referenced by ConstructUnitCommand::getFields(), read(), runTextIO(), Vehicle::vehicleconstructable(), VehicleType(), and write().

int VehicleType::unitConstructionMoveCostPercentage

if this unit constructs another unit externally (for example a turret), it costs this much of its movement (in percent)

Definition at line 254 of file vehicletype.h.

Referenced by GuiFunctions::BuildVehicleCommand::execute(), ConstructUnitCommand::go(), read(), runTextIO(), ConstructUnitCommand::unitProductionPrerequisites(), Vehicle::vehicleconstructable(), VehicleType(), and write().

vector<IntRange> VehicleType::vehiclesBuildable
bool VehicleType::wait
UnitWeapon VehicleType::weapons

The weapons.

Definition at line 248 of file vehicletype.h.

Referenced by attackpossible(), attackpossible28(), attackpossible2n(), attackpossible2u(), InternalAmmoTransferCommand::avail(), ReactionFireSwitchCommand::avail(), TrainUnitCommand::avail(), RepairUnitCommand::availExternally(), CalculateThreat_VehicleType::calc_threat_vehicletype(), Vehicle::endOwnTurn(), Vehicle::fillMagically(), Vehicle::getAmmo(), VehicleProduction_SelectionItemFactory::getCost(), ServiceChecker::getServiceWeapon(), Vehicle::getWeapon(), TrainUnitCommand::go(), InternalAmmoTransferCommand::go(), PutMineCommand::go(), InternalAmmoTransferHandler::InternalAmmoTransferHandler(), Vehicle::maxAmmo(), Vehicle::paint(), DashboardPanel::painter(), InternalAmmoTransferHandler::performTransfer(), PBPUnitCostCalculator::productionCost(), StandardUnitCostCalculator::productionCost(), Vehicle::putAmmo(), PutMineCommand::PutMineCommand(), Vehicle::ReactionFire::ReactionFire(), read(), WeaponRange::run(), ConsumeAmmo::runAction(), runTextIO(), AttackCommand::searchTargets(), DataTab::setData(), tunitattacksunit::setresult(), tunitattacksbuilding::setresult(), tunitattacksobject::setresult(), tunitattacksunit::setup(), tunitattacksbuilding::setup(), tunitattacksobject::setup(), DashboardPanel::showUnitData(), Vehicle::transform(), ConsumeAmmo::undoAction(), UnitInfoDialog::UnitInfoDialog(), UnitInfoDialog::userHandler(), VehiclePropertyEditor::VehiclePropertyEditor(), Vehicle::weapexist(), WeaponInfoPanel::WeaponInfoPanel(), write(), and Vehicle::write().

int VehicleType::weight

the weight of the unit, without fuel or other cargo

Definition at line 218 of file vehicletype.h.

Referenced by executeUserAction(), maxsize(), read(), runTextIO(), DataTab::setData(), Vehicle::size(), UnitInfoDialog::UnitInfoDialog(), VehicleType(), Vehicle::weight(), and write().

vector<int> VehicleType::wreckageObject

if the unit is destroyed, it can leave an wreckage object behind ( < 0 to disable )

Definition at line 262 of file vehicletype.h.

Referenced by read(), DestructContainer::runAction(), runTextIO(), and write().


The documentation for this class was generated from the following files: