Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ContainerControls Class Reference

#include <containercontrols.h>

Inheritance diagram for ContainerControls:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ContainerControls (ContainerBase *cb)
VehicleproduceUnit (const Vehicletype *type, bool fillWithAmmo, bool fillWithResources)
Resources calcDestructionOutput (Vehicle *veh)
void destructUnit (Vehicle *veh)
bool unitTrainingAvailable (Vehicle *veh)
void trainUnit (Vehicle *veh)
vector< const Vehicletype * > productionLinesBuyable ()
Resources buildProductionLineResourcesNeeded (const Vehicletype *veh)
int buildProductionLine (const Vehicletype *veh)
Resources removeProductionLineResourcesNeeded (const Vehicletype *veh)
int removeProductionLine (const Vehicletype *veh)
VehicleproduceUnitHypothetically (const Vehicletype *type)
 only to be used by the AI, this doesn't consume any resources, so the unit must be discarded
void fillResource (Vehicle *eht, int resourcetype, int newamount)
void fillAmmo (Vehicle *eht, int weapon, int newa)
void refilleverything (Vehicle *eht)
void refillAmmo (Vehicle *veh)
void refillResources (Vehicle *veh)
void emptyeverything (Vehicle *eht)
int getammunition (int weapontype, int num, bool abbuchen, bool produceifrequired)
bool ammotypeavail (int type)
int ammoProducable (int weaptype, int num)
int produceAmmo (int weaptype, int num)
bool moveUnitUpAvail (const Vehicle *veh)
bool moveUnitUp (Vehicle *veh)
bool moveUnitDownAvail (const Vehicle *movingUnit)
bool moveUnitDownAvail (const Vehicle *movingUnit, const Vehicle *newTransport)
vector< Vehicle * > moveUnitDownTargets (const Vehicle *movingUnit)
bool moveUnitDown (Vehicle *veh, Vehicle *newTransport)

Static Public Member Functions

static VehicleMovementmovement (Vehicle *eht, bool simpleMode=false)

Constructor & Destructor Documentation

ContainerControls::ContainerControls ContainerBase cb  )  [inline]
 

Definition at line 50 of file containercontrols.h.


Member Function Documentation

int ContainerControls::ammoProducable int  weaptype,
int  num
 

Definition at line 174 of file containercontrols.cpp.

References ContainerBaseType::AmmoProduction, ContainerBase::baseType, cwaffenproduktionskosten, ContainerBase::getResource(), ContainerBaseType::hasFunction(), min(), and Resources::resource().

Referenced by getammunition(), and produceAmmo().

bool ContainerControls::ammotypeavail int  type  ) 
 

Definition at line 220 of file containercontrols.cpp.

int ContainerControls::buildProductionLine const Vehicletype veh  ) 
 

Definition at line 378 of file containercontrols.cpp.

References ContainerBase::addProductionLine(), ContainerBase::baseType, buildProductionLineResourcesNeeded(), ContainerBase::getIdentification(), ContainerBase::getProduction(), ContainerBase::getResource(), ContainerBaseType::hasFunction(), logtoreplayinfo(), ContainerBaseType::NoProductionCustomization, and rpl_buildProdLine.

Referenced by trunreplay::execnextreplaymove(), and AddProductionLine_SelectionItemFactory::vehicleTypeSelected().

Resources ContainerControls::buildProductionLineResourcesNeeded const Vehicletype veh  ) 
 

Definition at line 372 of file containercontrols.cpp.

References ContainerBaseType::productionCost, and productionLineConstructionCostFactor.

Referenced by buildProductionLine(), and AddProductionLine_SelectionItemFactory::getCost().

Resources ContainerControls::calcDestructionOutput Vehicle veh  ) 
 

Definition at line 294 of file containercontrols.cpp.

References ContainerBase::baseType, ContainerBase::damage, destructoutput, ContainerBase::getCargo(), ContainerBaseType::hasFunction(), Resources::material, ContainerBaseType::productionCost, ContainerBaseType::RecycleUnits, recyclingoutput, and Vehicle::typ.

Referenced by destructUnit(), and CargoGuiFunctions::RecycleUnit::getName().

void ContainerControls::destructUnit Vehicle veh  ) 
 

Definition at line 313 of file containercontrols.cpp.

References calcDestructionOutput(), emptyeverything(), ContainerBase::getIdentification(), logtoreplayinfo(), Resources::Material, Resources::material, Vehicle::networkid, ContainerBase::putResource(), ContainerBase::removeUnitFromCargo(), and rpl_recycleUnit.

Referenced by trunreplay::execnextreplaymove(), and CargoGuiFunctions::RecycleUnit::execute().

void ContainerControls::emptyeverything Vehicle eht  ) 
 

Definition at line 278 of file containercontrols.cpp.

References fillAmmo(), fillResource(), SingleWeapon::requiresAmmo(), Vehicle::typ, UnitWeapon::weapon, and Vehicletype::weapons.

Referenced by destructUnit().

void ContainerControls::fillAmmo Vehicle eht,
int  weapon,
int  newa
 

Definition at line 240 of file containercontrols.cpp.

References getammunition(), logtoreplayinfo(), ContainerBase::putAmmo(), and rpl_refuel.

Referenced by emptyeverything(), and refillAmmo().

void ContainerControls::fillResource Vehicle eht,
int  resourcetype,
int  newamount
 

Definition at line 227 of file containercontrols.cpp.

References ContainerBase::getIdentification(), ContainerBase::getResource(), Vehicle::getResource(), Vehicle::getTank(), logtoreplayinfo(), maxint, Vehicle::networkid, Vehicle::putResource(), rpl_refuel2, rpl_refuel3, Vehicle::xpos, and Vehicle::ypos.

Referenced by emptyeverything(), and refillResources().

int ContainerControls::getammunition int  weapontype,
int  num,
bool  abbuchen,
bool  produceifrequired
 

Definition at line 207 of file containercontrols.cpp.

References ammoProducable(), ContainerBaseType::AmmoProduction, ContainerBase::getAmmo(), and produceAmmo().

Referenced by trunreplay::execnextreplaymove(), and fillAmmo().

VehicleMovement * ContainerControls::movement Vehicle eht,
bool  simpleMode = false
[static]
 

Definition at line 154 of file containercontrols.cpp.

References VehicleMovement::DisableHeightChange, VehicleMovement::execute(), and getDefaultMapDisplay().

Referenced by CargoGuiFunctions::Movement::execute().

bool ContainerControls::moveUnitDown Vehicle veh,
Vehicle newTransport
 

Definition at line 510 of file containercontrols.cpp.

References ContainerBase::addToCargo(), ContainerBase::getPosition(), logtoreplayinfo(), Vehicle::networkid, ContainerBase::removeUnitFromCargo(), rpl_moveUnitUpDown, and ContainerBase::vehicleFit().

bool ContainerControls::moveUnitDownAvail const Vehicle movingUnit,
const Vehicle newTransport
 

Definition at line 488 of file containercontrols.cpp.

References ContainerBase::vehicleFit().

bool ContainerControls::moveUnitDownAvail const Vehicle movingUnit  ) 
 

Definition at line 483 of file containercontrols.cpp.

References moveUnitDownTargets().

Referenced by moveUnitDownTargets().

vector< Vehicle * > ContainerControls::moveUnitDownTargets const Vehicle movingUnit  ) 
 

Definition at line 494 of file containercontrols.cpp.

References ContainerBase::getCargo(), and moveUnitDownAvail().

Referenced by moveUnitDownAvail().

bool ContainerControls::moveUnitUp Vehicle veh  ) 
 

Definition at line 460 of file containercontrols.cpp.

References logtoreplayinfo(), moveUnitUpAvail(), and rpl_moveUnitUp.

Referenced by trunreplay::execnextreplaymove().

bool ContainerControls::moveUnitUpAvail const Vehicle veh  ) 
 

Definition at line 449 of file containercontrols.cpp.

References ContainerBase::getCarrier().

Referenced by moveUnitUp().

int ContainerControls::produceAmmo int  weaptype,
int  num
 

Definition at line 195 of file containercontrols.cpp.

References ammoProducable(), cwaffenproduktionskosten, ContainerBase::getPosition(), ContainerBase::getResource(), logtoreplayinfo(), ContainerBase::putAmmo(), and rpl_produceAmmo.

Referenced by trunreplay::execnextreplaymove(), VehicleService::execute(), NewVehicleService::executeContainer(), and getammunition().

Vehicle * ContainerControls::produceUnit const Vehicletype type,
bool  fillWithAmmo,
bool  fillWithResources
 

Definition at line 82 of file containercontrols.cpp.

References actmap, GameMap::actplayer, ContainerBase::addToCargo(), Player::buildingList, cgp_bi3_training, Vehicle::experience, GameMap::getgameparameter(), ContainerBase::getPosition(), ContainerBase::getProductionCost(), ContainerBase::getResource(), logtoreplayinfo(), maxunitexperience, Vehicle::networkid, GameMap::player, refillAmmo(), refillResources(), rpl_produceunit, Vehicle::setnewposition(), ContainerBaseType::TrainingCenter, ContainerConstControls::unitProductionAvailable(), and ContainerConstControls::unitProductionPrerequisites().

Referenced by CargoGuiFunctions::UnitProduction::execute().

Vehicle * ContainerControls::produceUnitHypothetically const Vehicletype type  ) 
 

only to be used by the AI, this doesn't consume any resources, so the unit must be discarded

Definition at line 126 of file containercontrols.cpp.

References actmap, GameMap::actplayer, Player::buildingList, cgp_bi3_training, Vehicle::experience, GameMap::getgameparameter(), ContainerBase::getPosition(), maxunitexperience, GameMap::player, Vehicle::setnewposition(), ContainerBaseType::TrainingCenter, ContainerConstControls::unitProductionAvailable(), and ContainerConstControls::unitProductionPrerequisites().

vector< const Vehicletype * > ContainerControls::productionLinesBuyable  ) 
 

Definition at line 423 of file containercontrols.cpp.

References actmap, ContainerBase::baseType, ContainerBase::getMap(), ContainerBase::getProduction(), ContainerBase::getResource(), GameMap::getvehicletype_bypos(), ContainerBaseType::hasFunction(), maxint, ContainerBaseType::NoProductionCustomization, ContainerBaseType::ProduceNonLeavableUnits, ContainerBaseType::vehicleCategoriesProduceable, ContainerBaseType::vehicleFit(), vehicleTypeRepository, and ContainerBase::vehicleUnloadable().

Referenced by VehicleProduction_SelectionWindow::addProductionLine().

void ContainerControls::refillAmmo Vehicle veh  ) 
 

Definition at line 259 of file containercontrols.cpp.

References fillAmmo(), maxint, SingleWeapon::requiresAmmo(), Vehicle::typ, UnitWeapon::weapon, and Vehicletype::weapons.

Referenced by ContainerBase::endOwnTurn(), produceUnit(), and refilleverything().

void ContainerControls::refilleverything Vehicle eht  ) 
 

Definition at line 272 of file containercontrols.cpp.

References refillAmmo(), and refillResources().

void ContainerControls::refillResources Vehicle veh  ) 
 

Definition at line 266 of file containercontrols.cpp.

References fillResource(), and maxint.

Referenced by produceUnit(), and refilleverything().

int ContainerControls::removeProductionLine const Vehicletype veh  ) 
 

Definition at line 404 of file containercontrols.cpp.

References ContainerBase::baseType, ContainerBase::deleteProductionLine(), ContainerBase::getIdentification(), ContainerBase::getProduction(), ContainerBase::getResource(), ContainerBaseType::hasFunction(), logtoreplayinfo(), ContainerBaseType::NoProductionCustomization, removeProductionLineResourcesNeeded(), and rpl_removeProdLine.

Referenced by trunreplay::execnextreplaymove(), and VehicleProduction_SelectionWindow::removeProductionLine().

Resources ContainerControls::removeProductionLineResourcesNeeded const Vehicletype veh  ) 
 

Definition at line 398 of file containercontrols.cpp.

References ContainerBaseType::productionCost, and productionLineRemovalCostFactor.

Referenced by removeProductionLine().

void ContainerControls::trainUnit Vehicle veh  ) 
 

Definition at line 353 of file containercontrols.cpp.

References actmap, cgp_maxtrainingexperience, cgp_trainingIncrement, GameMap::getgameparameter(), ContainerBase::getMap(), ContainerBase::getPosition(), logtoreplayinfo(), rpl_trainunit, and unitTrainingAvailable().

Referenced by ContainerBase::endOwnTurn(), and trunreplay::execnextreplaymove().

bool ContainerControls::unitTrainingAvailable Vehicle veh  ) 
 

Definition at line 327 of file containercontrols.cpp.

References actmap, ContainerBase::baseType, cgp_bi3_training, cgp_maxtrainingexperience, GameMap::getgameparameter(), ContainerBase::getMap(), ContainerBaseType::hasFunction(), and ContainerBaseType::TrainingCenter.

Referenced by ContainerBase::endOwnTurn(), trunreplay::execnextreplaymove(), and trainUnit().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:16:56 2008 for Advanced Strategic Command by  doxygen 1.4.2