Advanced Strategic Command
|
The parent class of Vehicle and Building; The name Container originates from Battle Isle, where everything that could load units was a container. More...
#include <containerbase.h>
Classes | |
class | Work |
class | WorkClassFactory |
Public Types | |
typedef vector< const VehicleType * > | Production |
Public Member Functions | |
virtual bool | isBuilding () const =0 |
virtual Surface | getImage () const =0 |
returns an image for the Container. More... | |
const Production & | getProduction () const |
Resources | getProductionCost (const VehicleType *unit) const |
void | deleteProductionLine (const VehicleType *type) |
void | deleteAllProductionLines () |
void | addProductionLine (const VehicleType *type) |
bool | hasProductionLine (const VehicleType *type) |
void | setProductionLines (const Production &production) |
virtual int | getArmor () const =0 |
int | getOwner () const |
returns the number of the player this vehicle/building belongs to More... | |
Player & | getOwningPlayer () const |
returns the player this vehicle/building belongs to More... | |
virtual void | registerForNewOwner (int player)=0 |
this is a low level functions that changes the registration in the map. It's called by convert(int,bool) More... | |
virtual void | write (tnstream &stream, bool includeLoadedUnits=true) const =0 |
virtual void | read (tnstream &stream)=0 |
virtual void | addview (void)=0 |
registers the containers view (=radar) on the map More... | |
virtual void | removeview (void)=0 |
removes the containers view (=radar) on the map More... | |
GameMap * | getMap () const |
virtual int | getIdentification () const =0 |
virtual int | getHeight () const =0 |
returns the bitmapped level of height. Only one bit will be set, of course More... | |
virtual ASCString | getName () const =0 |
ASCString | getPrivateName () const |
virtual void | setName (const ASCString &name) |
virtual int | getAmmo (int type, int num, bool queryOnly)=0 |
virtual int | getAmmo (int type, int num) const =0 |
virtual int | putAmmo (int type, int num, bool queryOnly)=0 |
virtual int | maxAmmo (int type) const =0 |
virtual void | endOwnTurn (void) |
hook that is called when a player ends his turn More... | |
virtual void | endAnyTurn (void) |
hook that is called when any player (including owner) ends turn More... | |
virtual void | endRound (void) |
hook that is called the next round begins ( active player switching from player8 to player1 ) More... | |
Work * | spawnWorkClasses (bool justQuery) |
virtual MapCoordinate3D | getPosition () const =0 |
virtual | ~ContainerBase () |
virtual vector< MapCoordinate > | getCoveredFields ()=0 |
Repairing related functions | |
virtual const ResourceMatrix & | getRepairEfficiency () const =0 |
when a ContainerBase is repair by this ContainerBase, the default cost can be customized with this matrix. More... | |
virtual void | postRepair (int oldDamage, bool autoRepair)=0 |
is called after a repair is performed. Vehicles use this to reduce their experience. More... | |
virtual bool | canRepair (const ContainerBase *item) const =0 |
checks whether the item can be repaired provided that it is in range More... | |
int | getMaxRepair (const ContainerBase *item) const |
returns the maximum amount of damage that the given item can be repaired More... | |
int | getMaxRepair (const ContainerBase *item, int newDamage, Resources &cost, bool ignoreCost=false) const |
int | repairItem (ContainerBase *item, int newDamage=0, bool autoRepair=false) |
virtual int | repairableDamage () const =0 |
returns the amount of damage that can still be repaired this turn More... | |
Static Public Member Functions | |
static int | calcShadowDist (int binaryHeight) |
static bool | registerWorkClassFactory (WorkClassFactory *wcf, bool ASCmode=true) |
Public Attributes | |
const ContainerBaseType * | baseType |
the type descriping all non-instance specific properties of the container More... | |
int | damage |
Damage. 0 is no damage, when damage reaches 100 the container is destroyed. More... | |
int | color |
The owner of the container. More... | |
sigc::signal< void > | conquered |
sigc::signal< void > | destroyed |
int | researchpoints |
the current amount of research that the building conducts every turn More... | |
int | maxresearchpoints |
int | view |
Static Public Attributes | |
static sigc::signal< void, ContainerBase * > | anyContainerDestroyed |
static sigc::signal< void, ContainerBase * > | anyContainerConquered |
Protected Member Functions | |
void | paintField (const Surface &src, Surface &dest, SPoint pos, int dir, bool shaded, int shadowDist=-1) const |
displays an image of this container on the surface. More... | |
ContainerBase (const ContainerBaseType *bt, GameMap *map, int player) | |
Protected Attributes | |
int | repairedThisTurn |
the percantage that this container has already been repaired this turn. More... | |
GameMap * | gamemap |
the map that this container is placed on More... | |
ContainerBase * | cargoParent |
if this container is transported inside a carrier, this is carrier More... | |
Production | internalUnitProduction |
Friends | |
class | ConvertContainer |
class | ChangeContainerProperty |
Cargo related functions | |
typedef vector< Vehicle * > | Cargo |
Cargo | cargo |
sigc::signal< void > | cargoChanged |
ASCString | name |
a name given by the user or the map creator More... | |
ASCString | privateName |
a name given by the user which is only visible to him and his allies. More... | |
const Cargo & | getCargo () const |
int | getCargoCount () const |
Vehicle * | getCargo (int i) |
returns the cargo slot with index i Warning: the cargo may contain NULL items. More... | |
void | clearCargo () |
removes ALL units from cargo More... | |
void | addToCargo (Vehicle *veh, int position=-1) |
adds the unit to the cargo More... | |
void | moveToCargo (Vehicle *veh) |
adds the unit to the cargo, and removes its from its current position More... | |
bool | removeUnitFromCargo (Vehicle *veh, bool recursive=false) |
removes the given unit from the container. More... | |
bool | removeUnitFromCargo (int nwid, bool recursive=false) |
int | vehiclesLoaded (void) const |
returns the number of loaded units More... | |
ContainerBase * | getCarrier () const |
if this is a unit and it is inside a building or transport, returns the transport. NULL otherwise. More... | |
Vehicle * | findUnit (int nwid, bool recursive=true) const |
searches for a the unit in carrier and optionally all inner carriers More... | |
bool | vehicleLoadable (const Vehicle *vehicle, int uheight=-1, const bool *attacked=NULL) const |
can the vehicle be loaded. More... | |
int | vehicleUnloadable (const VehicleType *vehicleType, int carrierHeight=-1) const |
checks the unloading of a unit type More... | |
const ContainerBaseType::TransportationIO * | vehicleUnloadSystem (const VehicleType *vehicle, int height) |
returns the unloading system More... | |
int | vehicleDocking (const Vehicle *vehicle, bool out) const |
returns the levels of height on which this unit can be transfered by docking; or 0 if no unloading is possible More... | |
bool | doesVehicleFit (const Vehicle *vehicle) const |
Does the vehicle fit into the container? This does not include checking if it can reach the entry. More... | |
int | cargoWeight () const |
weight of all loaded units More... | |
int | cargoNestingDepth () |
returns the nesting depth of the cargo. The unit standing on the field is 0, its cargo is 1, the cargo's cargo 2 ... More... | |
Resource related functions | |
Resources | plus |
the Resources that are produced each turn More... | |
Resources | maxplus |
the maximum amount of Resources that the building can produce each turn in the ASC resource mode ; see also bi_resourceplus More... | |
Resources | bi_resourceplus |
the maximum amount of Resources that the building can produce each turn in the BI resource mode ; see also maxplus More... | |
virtual int | putResource (int amount, int resourcetype, bool queryonly, int scope=1, int player=-1)=0 |
scope: 0 = local 1 = resource network 2 = global in all buildings 3 = map wide pool( used only internally! ) More... | |
virtual int | getResource (int amount, int resourcetype, bool queryonly, int scope=1, int player=-1)=0 |
virtual int | getAvailableResource (int amount, int resourcetype, int scope=1) const =0 |
Resources | putResource (const Resources &res, bool queryonly, int scope=1, int player=-1) |
Resources | getResource (const Resources &res, bool queryonly, int scope=1, int player=-1) |
Resources | getResource (const Resources &res) const |
Resources | getResourceUsage () |
returns the resource that the building consumes for its operation. More... | |
Resources | getResourcePlus () |
Resources | getStorageCapacity () const |
returns the local storage capacity for the given resource, which depends on the resource mode of the map. More... | |
Resources | netResourcePlus () const |
returns the amount of resources that the net which the building is connected to produces each turn More... | |
void | setInternalResourcePlus (const Resources &res) |
The ResourcePlus is used for different purposes by different building or vehicle functions, or not at all. More... | |
void | setInternalResourceMaxPlus (const Resources &res) |
The ResourceMaxPlus is used for different purposes by different building or vehicle functions, or not at all. More... | |
Resources | getInternalResourcePlus () const |
The ResourcePlus is used for different purposes by different building or vehicle functions, or not at all. More... | |
Resources | getInternalResourceMaxPlus () const |
The ResourceMaxPlus is used for different purposes by different building or vehicle functions, or not at all. More... | |
The parent class of Vehicle and Building; The name Container originates from Battle Isle, where everything that could load units was a container.
Definition at line 40 of file containerbase.h.
typedef vector<Vehicle*> ContainerBase::Cargo |
Definition at line 106 of file containerbase.h.
typedef vector<const VehicleType*> ContainerBase::Production |
Definition at line 87 of file containerbase.h.
|
protected |
Definition at line 36 of file containerbase.cpp.
References baseType, color, damage, ContainerBaseType::defaultMaxResearchpoints, ContainerBaseType::defaultProduction, GameMap::getvehicletype_bypos(), GameMap::getVehicleTypeNum(), ContainerBaseType::id, internalUnitProduction, ContainerBaseType::maxplus, maxplus, maxresearchpoints, min(), ContainerBaseType::nominalresearchpoints, plus, repairedThisTurn, researchpoints, ContainerBaseType::vehiclesInternallyProduceable, ContainerBaseType::view, and view.
|
virtual |
Definition at line 610 of file containerbase.cpp.
References anyContainerDestroyed, cargo, destroyed, GameMap::Destruction, gamemap, and GameMap::state.
void ContainerBase::addProductionLine | ( | const VehicleType * | type | ) |
Definition at line 581 of file containerbase.cpp.
References internalUnitProduction.
Referenced by copyBuildingData(), copyVehicleData(), AddProductionCapability::execute(), BuildProductionLineCommand::go(), and RemoveProductionLineCommand::undoAction().
void ContainerBase::addToCargo | ( | Vehicle * | veh, |
int | position = -1 |
||
) |
adds the unit to the cargo
veh | the unit to add |
position | specifies a specific cargo slot. -1 assigns slot automatically. The automatic mode should be used in almost all cases |
Definition at line 363 of file containerbase.cpp.
References cargo, cargoChanged, cargoParent, fatalError(), getPosition(), and Vehicle::setnewposition().
Referenced by copyBuildingData(), copyVehicleData(), trunreplay::execnextreplaymove(), CargoItemFactory::itemSelected(), moveToCargo(), UnitFieldRegistration::runAction(), UnitFieldRegistration::undoAction(), and DestructContainer::undoAction().
|
pure virtual |
registers the containers view (=radar) on the map
Implemented in Vehicle, and Building.
Referenced by ViewRegistration::runAction(), and ViewRegistration::undoAction().
|
static |
Definition at line 268 of file containerbase.cpp.
References chfahrend, and getFirstBit().
Referenced by MapDisplayPG::displayAddons(), MapDisplayPG::displayUnitMovement(), and paintField().
|
pure virtual |
checks whether the item can be repaired provided that it is in range
Implemented in Vehicle, and Building.
Referenced by getMaxRepair(), and repairItem().
int ContainerBase::cargoNestingDepth | ( | ) |
returns the nesting depth of the cargo. The unit standing on the field is 0, its cargo is 1, the cargo's cargo 2 ...
Definition at line 188 of file containerbase.cpp.
References cargoNestingDepth(), and getCarrier().
Referenced by cargoNestingDepth(), and Vehicle::setMovement().
int ContainerBase::cargoWeight | ( | ) | const |
weight of all loaded units
Definition at line 177 of file containerbase.cpp.
References cargo.
Referenced by StoringPosition::eventDraw(), executeUserAction(), CargoDialog::setUnitInfoWidgets(), CargoDialog::updateVariables(), and Vehicle::weight().
void ContainerBase::clearCargo | ( | ) |
removes ALL units from cargo
Definition at line 351 of file containerbase.cpp.
References cargo, and cargoChanged.
Referenced by TemporaryContainerStorage::restore().
void ContainerBase::deleteAllProductionLines | ( | ) |
Definition at line 575 of file containerbase.cpp.
References internalUnitProduction.
Referenced by copyBuildingData(), and copyVehicleData().
void ContainerBase::deleteProductionLine | ( | const VehicleType * | type | ) |
Definition at line 569 of file containerbase.cpp.
References internalUnitProduction.
Referenced by RemoveProductionLineCommand::go(), and BuildProductionLineCommand::undoAction().
bool ContainerBase::doesVehicleFit | ( | const Vehicle * | vehicle | ) | const |
Does the vehicle fit into the container? This does not include checking if it can reach the entry.
Definition at line 446 of file containerbase.cpp.
References baseType, color, Player::diplomacy, findUnit(), getMap(), GameMap::getPlayer(), isBuilding(), DiplomaticStateVector::isHostile(), ContainerBaseType::maxLoadableUnits, Vehicle::networkid, Vehicle::typ, ContainerBaseType::vehicleFit(), vehiclesLoaded(), and Vehicle::weight().
Referenced by CargoItemFactory::isFiltered(), CargoItemFactory::itemSelected(), CargoMoveCommand::moveInAvail(), CargoMoveCommand::moveOutAvail(), vehicleDocking(), and vehicleLoadable().
|
virtual |
hook that is called when any player (including owner) ends turn
Reimplemented in Vehicle.
Definition at line 655 of file containerbase.cpp.
Referenced by Vehicle::endAnyTurn().
|
virtual |
hook that is called when a player ends his turn
Reimplemented in Vehicle.
Definition at line 651 of file containerbase.cpp.
Referenced by Vehicle::endOwnTurn().
|
virtual |
hook that is called the next round begins ( active player switching from player8 to player1 )
Reimplemented in Vehicle, and Building.
Definition at line 659 of file containerbase.cpp.
References baseType, ContainerBaseType::view, and view.
Referenced by Building::endRound(), and Vehicle::endRound().
Vehicle * ContainerBase::findUnit | ( | int | nwid, |
bool | recursive = true |
||
) | const |
searches for a the unit in carrier and optionally all inner carriers
Definition at line 224 of file containerbase.cpp.
References cargo, and findUnit().
Referenced by RecycleUnitCommand::avail(), TrainUnitCommand::avail(), doesVehicleFit(), findUnit(), and GameMap::getUnit().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ammoCounter(), AmmoTransferrable::AmmoTransferrable(), ConsumeAmmo::runAction(), CargoDialog::showAmmo(), and ConsumeAmmo::undoAction().
|
pure virtual |
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by CargoDialog::updateVariables().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ammoCounter(), getResource(), StatisticsCalculator::resource(), and ContainerConstControls::unitProductionPrerequisites().
|
inline |
Definition at line 115 of file containerbase.h.
References cargo.
Referenced by ammoCounter(), autoTrainer(), CalculateThreat_Vehicle::calc_threat_vehicle(), VehicleCounterFactory::calcCargoSummary(), Vehicle::canMove(), copyBuildingData(), copyVehicleData(), countPlayersBinary(), StoringPosition::eventDraw(), AnyUnitEntersPolygon::fieldOperator(), Vehicle::freeWeight(), getFirstCargo(), CargoWidget::getMarkedUnit(), RecycleUnitCommand::getOutput(), CargoMoveCommand::getTargetCarriers(), getUnitResourceCargo(), StatisticsCalculator::resource(), UnitTypeTransformation::run(), UnitFieldRegistration::runAction(), DestructContainer::runAction(), CargoDialog::setUnitInfoWidgets(), StoringPosition::setup(), ServiceTargetSearcher::startSearch(), StatisticsCalculator::strength(), testCargoMovement(), testCargoMovementMax(), SearchReconquerBuilding::testfield(), testManualRepair(), StatisticsCalculator::unitCost(), StatisticsCalculator::unitCount(), and CargoDialog::userHandler().
Vehicle * ContainerBase::getCargo | ( | int | i | ) |
returns the cargo slot with index i Warning: the cargo may contain NULL items.
This was done deliberately, to allow easier navigation when the user moves items successivly out of a carrier
Definition at line 208 of file containerbase.cpp.
References cargo.
|
inline |
Definition at line 117 of file containerbase.h.
References cargo.
ContainerBase * ContainerBase::getCarrier | ( | ) | const |
if this is a unit and it is inside a building or transport, returns the transport. NULL otherwise.
Definition at line 218 of file containerbase.cpp.
References cargoParent.
Referenced by TrainUnitCommand::avail(), TransferControlCommand::avail(), ServiceCommand::avail(), Vehicle::beginTurn(), cargoNestingDepth(), UnitHooveringLogic::getEndurance(), getMaxRepair(), CargoMoveCommand::getTargetCarriers(), CargoMoveCommand::go(), CargoMoveCommand::moveOutAvail(), DestructContainer::runAction(), Vehicle::unregisterPosition(), and Vehicle::~Vehicle().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by SolarPowerplant::getPlus().
|
pure virtual |
returns the bitmapped level of height. Only one bit will be set, of course
Implemented in Vehicle, and Building.
Referenced by ServiceChecker::check(), getheightdelta(), and paintField().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ContainerAction::ContainerAction(), ContainerCommand::ContainerCommand(), DestructContainer::runAction(), ServiceCommand::setDestination(), and UnitFieldRegistration::UnitFieldRegistration().
|
pure virtual |
returns an image for the Container.
Implemented in Vehicle, and Building.
Referenced by AmmoTransferWindow::AmmoTransferWindow().
Resources ContainerBase::getInternalResourceMaxPlus | ( | ) | const |
The ResourceMaxPlus is used for different purposes by different building or vehicle functions, or not at all.
Definition at line 700 of file containerbase.cpp.
References maxplus.
Resources ContainerBase::getInternalResourcePlus | ( | ) | const |
The ResourcePlus is used for different purposes by different building or vehicle functions, or not at all.
Definition at line 695 of file containerbase.cpp.
References plus.
|
inline |
Definition at line 302 of file containerbase.h.
References gamemap.
Referenced by attack(), tsearchreactionfireingunits::attack(), attackpossible(), attackpossible2n(), attackpossible2u(), Mine::attacksunit(), autoTrainer(), ConstructBuildingCommand::avail(), DestructUnitCommand::avail(), PowerGenerationSwitchCommand::avail(), PutObjectCommand::avail(), PutMineCommand::avail(), ReactionFireSwitchCommand::avail(), TransferControlCommand::avail(), TrainUnitCommand::avail(), DestructBuildingCommand::avail(), CargoGuiFunctions::Movement::available(), CargoGuiFunctions::UnitProduction::available(), CargoGuiFunctions::UnitTraining::available(), CargoGuiFunctions::OpenContainer::available(), CargoGuiFunctions::RecycleUnitCommandButton::available(), CargoGuiFunctions::TransferUnitControl::available(), GuiFunctions::OpenContainer::available(), GuiFunctions::InternalAmmoTransferDialog::available(), VehicleCounterFactory::calcCargoSummary(), UnitHooveringLogic::calcFuelUsage(), calcMoveMalus(), Vehicle::canMove(), ServiceChecker::check(), checkModificationConstraints(), compareMapResources(), DashboardPanel::containerRenamed(), countPlayers(), MapDisplayPG::displayMovementStep(), doesVehicleFit(), Building::execnetcontrol(), trunreplay::execnextreplaymove(), CargoGuiFunctions::Movement::execute(), CargoGuiFunctions::UnitProduction::execute(), CargoGuiFunctions::UnitTraining::execute(), CargoGuiFunctions::RefuelUnitCommand::execute(), CargoGuiFunctions::RepairUnit::execute(), CargoGuiFunctions::MoveUnitUp::execute(), CargoGuiFunctions::MoveUnitIntoInnerContainer::execute(), CargoGuiFunctions::RecycleUnitCommandButton::execute(), CargoGuiFunctions::TransferUnitControl::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::BuildVehicleCommand::execute(), ConstructUnitCommand::externalConstructionAvail(), ServiceTargetSearcher::externallyAvailable(), fieldAccessible(), AStar3D::findPath(), Building::getAvailableResource(), VehicleProduction_SelectionItemFactory::getCost(), ConstructUnitCommand::getFields(), CargoDialog::getMap(), getmaxwindspeedforunit(), getOwningPlayer(), WindPowerplant::getPlus(), SolarPowerplant::getPlus(), ConstructUnitCommand::getProduceableVehicles(), Building::getResource(), Vehicle::getResource(), CargoDialog::getResourceValue(), getTransferLimitation(), giveunitaway(), TrainUnitCommand::go(), tcomputevehicleview::init(), tcomputebuildingview::init(), ConstructUnitCommand::internalConstructionAvail(), log(), move(), MoveUnitCommand::MoveUnitCommand(), moveUnitTest(), netResourcePlus(), DashboardPanel::painter(), InternalAmmoTransferHandler::performTransfer(), BuildProductionLineCommand::productionLinesBuyable(), Building::putResource(), Vehicle::putResource(), ResearchGraph::recalc(), VehicleProduction_SelectionWindow::removeProductionLine(), Building::repairableDamage(), DashboardPanel::reset(), ServiceTargetSearcher::ServiceTargetSearcher(), ResearchGraph::setResearch(), tunitattacksunit::setresult(), tmineattacksunit::setresult(), tunitattacksobject::setresult(), tunitattacksunit::setup(), tunitattacksbuilding::setup(), tmineattacksunit::setup(), tunitattacksobject::setup(), DashboardPanel::showUnitData(), Vehicle::spawnMoveObjects(), spawnWorkClasses(), ServiceTargetSearcher::startSearch(), StatisticsCalculator::strength(), testHeightChangeAI(), testHeightChangeGUI(), testMapResizeWithMovement(), testMovementFieldsReachable(), TransferHandler::TransferHandler(), DestructContainer::undoAction(), UnitInfoPanel::unitNaming(), ContainerConstControls::unitProductionAvailable(), Vehicle::unregisterPosition(), ResourceInfoWindow::update(), ResearchWindow::update(), CargoDialog::updateVariables(), vehicleLoadable(), VehiclePropertyEditor::VehiclePropertyEditor(), AddProductionLine_SelectionItemFactory::vehicleTypeSelected(), and WindMovement::WindMovement().
int ContainerBase::getMaxRepair | ( | const ContainerBase * | item | ) | const |
returns the maximum amount of damage that the given item can be repaired
Definition at line 118 of file containerbase.cpp.
Referenced by RepairBuildingCommand::getCost(), CargoGuiFunctions::RepairUnit::getName(), GuiFunctions::RepairUnit::getName(), RepairUnitCommand::go(), and repairItem().
int ContainerBase::getMaxRepair | ( | const ContainerBase * | item, |
int | newDamage, | ||
Resources & | cost, | ||
bool | ignoreCost = false |
||
) | const |
Definition at line 124 of file containerbase.cpp.
References baseType, canRepair(), damage, getCarrier(), getRepairEfficiency(), getResource(), ContainerBaseType::minFieldRepairDamage, ContainerBaseType::productionCost, repairableDamage(), Resources::resource(), and resourceTypeNum.
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ActionResult::ActionResult(), CargoDialog::CargoDialog(), ViewRegistration::getDescription(), ConsumeResource::getDescription(), ConvertContainer::getDescription(), DestructUnitCommand::getDescription(), RepairBuildingCommand::getDescription(), RecycleUnitCommand::getDescription(), SetResourceProcessingRateCommand::getDescription(), RemoveProductionLineCommand::getDescription(), BuildProductionLineCommand::getDescription(), TransferControlCommand::getDescription(), ConsumeAmmo::getDescription(), RepairUnitCommand::getDescription(), ChangeContainerProperty::getDescription(), ConstructUnitCommand::getDescription(), ServiceCommand::getDescription(), and getPrivateName().
|
inline |
returns the number of the player this vehicle/building belongs to
Definition at line 206 of file containerbase.h.
References color.
Referenced by tsearchreactionfireingunits::addunit(), attackpossible(), attackpossible2n(), attackpossible2u(), Mine::attacksunit(), autoTrainer(), ConstructBuildingCommand::avail(), PowerGenerationSwitchCommand::avail(), PutMineCommand::avail(), PutObjectCommand::avail(), DestructBuildingCommand::avail(), TransferControlCommand::avail(), GuiFunctions::MovementBase::available(), CargoGuiFunctions::Movement::available(), CargoGuiFunctions::UnitProduction::available(), CargoGuiFunctions::UnitTraining::available(), CargoGuiFunctions::OpenContainer::available(), CargoGuiFunctions::RecycleUnitCommandButton::available(), CargoGuiFunctions::TransferUnitControl::available(), GuiFunctions::Ascend::available(), GuiFunctions::Descend::available(), GuiFunctions::OpenContainer::available(), GuiFunctions::EnableReactionfire::available(), GuiFunctions::DisableReactionfire::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::RefuelUnitCommand::available(), GuiFunctions::BuildVehicleCommand::available(), GuiFunctions::ConstructBuilding::available(), calcMoveMalus(), calcvisibilityfield(), Vehicle::ReactionFire::canPerformAttack(), ServiceChecker::check(), checkModificationConstraints(), checkunitsforremoval(), DashboardPanel::containerRenamed(), Building::convert(), copyFieldStep2(), countPlayersBinary(), ReplayMapDisplay::displayMovingUnit(), PG_MapDisplay::displayMovingUnit(), trunreplay::execnextreplaymove(), executeUserAction(), ConstructUnitCommand::externalConstructionAvail(), fieldAccessible(), AnyUnitEntersPolygon::fieldOperator(), AStar3D::findPath(), UnitAttacksSomething::getAttackingPlayer(), tunitattacksbuilding::getAttackingPlayer(), tunitattacksobject::getAttackingPlayer(), tunitattacksunit::getDefendingPlayer(), tunitattacksbuilding::getDefendingPlayer(), tmineattacksunit::getDefendingPlayer(), Vehicle::getResource(), CargoDialog::getResourceValue(), getSelectedUnit(), UnitLost::getState(), UnitConquered::getState(), BuildingConquered::getState(), getTransferLimitation(), giveunitaway(), JumpDriveCommand::go(), tcomputevehicleview::init(), tcomputebuildingview::init(), ConstructUnitCommand::internalConstructionAvail(), CargoItemFactory::isFiltered(), CargoItemFactory::itemSelected(), log(), DashboardPanel::painter(), paintField(), ContainerInfoLayer::paintSingleField(), MapRenderer::paintSingleField(), ReactionFireLayer::paintSingleField(), UnitInfoLayer::paintSingleField(), UnitTrainingLayer::paintSingleField(), MapRenderer::paintUnitOntoField(), SelectionHolder::pickup(), ClipBoardBase::place(), Vehicle::putResource(), putResources(), tspfldloaders::readfields(), ResearchGraph::recalc(), Building::registerForNewOwner(), Vehicle::registerForNewOwner(), MapField::removeObject(), tsearchreactionfireingunits::removeunit(), MatterConverter::run(), ResourceSink::run(), RegenerativePowerPlant::run(), MiningStation::run(), ConvertContainer::runAction(), MoveUnit::runAction(), ResearchGraph::setResearch(), tunitattacksunit::setup(), tunitattacksbuilding::setup(), tmineattacksunit::setup(), DashboardPanel::showUnitData(), SpawnUnit::SpawnUnit(), PutTribute::start(), testAiMovement5(), testAiMovement6(), testAiMovement7(), SearchReconquerBuilding::testfield(), MiningStation::testfield(), testTransferControl(), TransferHandler::TransferHandler(), DestructContainer::undoAction(), UnitInfoPanel::unitNaming(), ContainerConstControls::unitProductionAvailable(), ResearchWindow::update(), OverviewMapHolder::updateField(), Vehicle::vehicleconstructable(), VehicleCounterFactory::VehicleCounterFactory(), vehicleLoadable(), VehiclePropertyEditor::VehiclePropertyEditor(), viewterraininfo(), and viewUnitSetinfo().
Player & ContainerBase::getOwningPlayer | ( | ) | const |
returns the player this vehicle/building belongs to
Definition at line 678 of file containerbase.cpp.
References getMap(), and GameMap::getPlayer().
Referenced by GuiFunctions::ConstructBuilding::execute(), Building::getImage(), DashboardPanel::painter(), and GetTargetImage::visit().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by addToCargo(), DestructUnitCommand::avail(), ServiceChecker::check(), constructUnit(), GuiFunctions::RefuelUnitCommand::execute(), ServiceTargetSearcher::externallyAvailable(), CargoDialog::getResourceValue(), DestructUnitCommand::go(), CargoMoveCommand::go(), CargoItemFactory::itemSelected(), netResourcePlus(), MatterConverter::run(), MiningStation::run(), DestructContainer::runAction(), ConstructUnitCommand::setMode(), ServiceTargetSearcher::startSearch(), CargoDialog::updateVariables(), vehicleDocking(), vehicleLoadable(), vehicleUnloadable(), and vehicleUnloadSystem().
ASCString ContainerBase::getPrivateName | ( | ) | const |
Definition at line 58 of file containerbase.cpp.
References getName(), and privateName.
const ContainerBase::Production & ContainerBase::getProduction | ( | ) | const |
Definition at line 549 of file containerbase.cpp.
References baseType, ContainerBaseType::hasFunction(), ContainerBaseType::height, internalUnitProduction, ContainerBaseType::ProduceNonLeavableUnits, and vehicleUnloadable().
Referenced by compareMapResources(), copyBuildingData(), copyVehicleData(), ConstructUnitCommand::getProduceableVehicles(), RemoveProductionLineCommand::go(), ProductionEditorWindow::ProductionEditorWindow(), BuildProductionLineCommand::productionLinesBuyable(), and UnitTypeTransformation::run().
Resources ContainerBase::getProductionCost | ( | const VehicleType * | unit | ) | const |
Definition at line 563 of file containerbase.cpp.
References baseType, ContainerBaseType::productionCost, and ContainerBaseType::productionEfficiency.
Referenced by trunreplay::execnextreplaymove(), ContainerConstControls::unitProductionPrerequisites(), and ConstructUnitCommand::unitProductionPrerequisites().
|
pure virtual |
when a ContainerBase is repair by this ContainerBase, the default cost can be customized with this matrix.
Implemented in Vehicle, and Building.
Referenced by getMaxRepair().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ResourceTransferrable::commit(), compareMapResources(), Vehicle::endOwnTurn(), trunreplay::execnextreplaymove(), getMaxRepair(), Building::getResource(), Vehicle::getResource(), getResource(), RemoveProductionLineCommand::go(), BuildProductionLineCommand::go(), VehicleProduction_SelectionWindow::reLoadAndUpdate(), repairItem(), ResourceWatch::ResourceWatch(), MatterConverter::run(), ResourceSink::run(), MiningStation::run(), ConsumeResource::runAction(), CargoDialog::updateResourceDisplay(), and VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow().
Resources ContainerBase::getResource | ( | const Resources & | res, |
bool | queryonly, | ||
int | scope = 1 , |
||
int | player = -1 |
||
) |
Definition at line 80 of file containerbase.cpp.
References getResource(), Resources::resource(), and resourceNum.
Definition at line 88 of file containerbase.cpp.
References getAvailableResource(), Resources::resource(), and resourceNum.
Resources ContainerBase::getResourcePlus | ( | ) |
Definition at line 706 of file containerbase.cpp.
References ContainerBase::Work::getPlus(), and spawnWorkClasses().
Referenced by GetResourcePlus::checkbuilding().
Resources ContainerBase::getResourceUsage | ( | ) |
returns the resource that the building consumes for its operation.
Definition at line 719 of file containerbase.cpp.
References baseType, ContainerBase::Work::getUsage(), ContainerBaseType::hasFunction(), ContainerBaseType::Research, researchpoints, returnResourcenUseForResearch(), and spawnWorkClasses().
Referenced by GetResourceUsage::checkbuilding().
Resources ContainerBase::getStorageCapacity | ( | ) | const |
returns the local storage capacity for the given resource, which depends on the resource mode of the map.
Definition at line 734 of file containerbase.cpp.
References GameMap::_resourcemode, baseType, gamemap, ContainerBaseType::getStorageCapacity(), and isBuilding().
Referenced by ServiceChecker::check(), PutResource::checkbuilding(), PutTribute::checkbuilding(), GetResourceCapacity::checkbuilding(), Vehicle::endRound(), Building::execnetcontrol(), Vehicle::fillMagically(), BuildingValues::init(), CargoItemFactory::itemSelected(), UnitInfoLayer::paintSingleField(), Vehicle::putResource(), DashboardPanel::showUnitData(), Vehicle::transform(), and VehiclePropertyEditor::VehiclePropertyEditor().
bool ContainerBase::hasProductionLine | ( | const VehicleType * | type | ) |
Definition at line 588 of file containerbase.cpp.
References internalUnitProduction.
|
pure virtual |
Implemented in Building, and Vehicle.
Referenced by RecycleUnitCommand::avail(), ServiceChecker::check(), DestructContainer::DestructContainer(), doesVehicleFit(), getStorageCapacity(), and vehicleLoadable().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ServiceChecker::check(), AmmoTransferrable::getMax(), and AmmoTransferrable::getMin().
void ContainerBase::moveToCargo | ( | Vehicle * | veh | ) |
adds the unit to the cargo, and removes its from its current position
Definition at line 384 of file containerbase.cpp.
References addToCargo(), and Vehicle::unregisterPosition().
Resources ContainerBase::netResourcePlus | ( | ) | const |
returns the amount of resources that the net which the building is connected to produces each turn
Definition at line 666 of file containerbase.cpp.
References color, getMap(), getPosition(), ResourceChangeNet::getresource(), Resources::resource(), and resourceTypeNum.
|
protected |
displays an image of this container on the surface.
The different shaders (like semi-transparency for submerged stuff) is processed here
src | The source surface, which is an image of the ContainerBase |
dest | The destination surface, onto which the src image is painted |
pos | The position within dest at which src is painted |
dir | Rotation of the image. Valid range is 0..5, resuling in 0�, 60� 120�, etc |
shaded | If true then the image will not be displayed in color, but in greyscale |
shadowDist | The offset of the shadow of the unit in pixels. Shadowdist will be added to the x and y coordinates if the position, resulting in the shadow being in the lower right of the image 0 = no shadow will be drawn If -1, the shadowDist will be calculated depending on the container's current height |
blitter.setPlayer( getOwner() );
Definition at line 280 of file containerbase.cpp.
References MegaBlitter< BytesPerSourcePixel, BytesPerTargetPixel, SourceColorTransform, ColorMerger, SourcePixelSelector, TargetPixelSelector, MyColorConverter >::blit(), calcShadowDist(), chfahrend, chgetaucht, directionangle, gamemap, getFirstBit(), getHeight(), getOwner(), megaBlitter(), nullParam, and GameMap::player.
Referenced by Vehicle::paint(), and Building::paintSingleField().
|
pure virtual |
is called after a repair is performed. Vehicles use this to reduce their experience.
Implemented in Vehicle, and Building.
Referenced by repairItem().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by ConsumeAmmo::runAction(), and ConsumeAmmo::undoAction().
|
pure virtual |
scope: 0 = local 1 = resource network 2 = global in all buildings 3 = map wide pool( used only internally! )
Implemented in Vehicle, and Building.
Referenced by RecycleUnitCommand::go(), Building::putResource(), Vehicle::putResource(), putResource(), putResources(), ResourceWatch::ResourceWatch(), MatterConverter::run(), RegenerativePowerPlant::run(), MiningStation::run(), and ConsumeResource::undoAction().
Resources ContainerBase::putResource | ( | const Resources & | res, |
bool | queryonly, | ||
int | scope = 1 , |
||
int | player = -1 |
||
) |
Definition at line 71 of file containerbase.cpp.
References putResource(), Resources::resource(), and resourceNum.
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by TemporaryContainerStorage::restore().
|
pure virtual |
this is a low level functions that changes the registration in the map. It's called by convert(int,bool)
Implemented in Vehicle, and Building.
Referenced by ConvertContainer::runAction(), and ConvertContainer::undoAction().
|
static |
Definition at line 745 of file containerbase.cpp.
bool ContainerBase::removeUnitFromCargo | ( | Vehicle * | veh, |
bool | recursive = false |
||
) |
removes the given unit from the container.
Definition at line 391 of file containerbase.cpp.
References cargoChanged, and Vehicle::networkid.
Referenced by trunreplay::execnextreplaymove(), UnitFieldRegistration::runAction(), UnitFieldRegistration::undoAction(), Vehicle::unregisterPosition(), and Vehicle::~Vehicle().
bool ContainerBase::removeUnitFromCargo | ( | int | nwid, |
bool | recursive = false |
||
) |
Definition at line 404 of file containerbase.cpp.
References baseType, cargo, cargoChanged, and ContainerBaseType::maxLoadableUnits.
|
pure virtual |
removes the containers view (=radar) on the map
Implemented in Vehicle, and Building.
Referenced by ViewRegistration::runAction(), and ViewRegistration::undoAction().
|
pure virtual |
returns the amount of damage that can still be repaired this turn
Implemented in Building, and Vehicle.
Referenced by DamageBarWidget::eventBlit(), getMaxRepair(), and repairItem().
int ContainerBase::repairItem | ( | ContainerBase * | item, |
int | newDamage = 0 , |
||
bool | autoRepair = false |
||
) |
Definition at line 97 of file containerbase.cpp.
References canRepair(), damage, getMaxRepair(), getResource(), postRepair(), and repairableDamage().
Referenced by Vehicle::endOwnTurn(), and trunreplay::execnextreplaymove().
void ContainerBase::setInternalResourceMaxPlus | ( | const Resources & | res | ) |
The ResourceMaxPlus is used for different purposes by different building or vehicle functions, or not at all.
Definition at line 689 of file containerbase.cpp.
References baseType, Resources::count, ContainerBaseType::maxplus, maxplus, min(), and Resources::resource().
void ContainerBase::setInternalResourcePlus | ( | const Resources & | res | ) |
The ResourcePlus is used for different purposes by different building or vehicle functions, or not at all.
Definition at line 683 of file containerbase.cpp.
References baseType, Resources::count, ContainerBaseType::maxplus, maxplus, min(), plus, and Resources::resource().
|
virtual |
Definition at line 601 of file containerbase.cpp.
References checkModificationConstraints(), and name.
Referenced by setLocalizedContainerName().
void ContainerBase::setProductionLines | ( | const Production & | production | ) |
Definition at line 594 of file containerbase.cpp.
References internalUnitProduction.
Referenced by UnitTypeTransformation::run().
ContainerBase::Work * ContainerBase::spawnWorkClasses | ( | bool | justQuery | ) |
Definition at line 765 of file containerbase.cpp.
References getMap().
Referenced by getResourcePlus(), and getResourceUsage().
int ContainerBase::vehicleDocking | ( | const Vehicle * | vehicle, |
bool | out | ||
) | const |
returns the levels of height on which this unit can be transfered by docking; or 0 if no unloading is possible
Definition at line 526 of file containerbase.cpp.
References baseType, ContainerBaseType::TransportationIO::Docking, doesVehicleFit(), ContainerBaseType::entranceSystems, MapCoordinate3D::getNumericalHeight(), getPosition(), VehicleType::movemalustyp, Vehicle::typ, and ContainerBaseType::vehicleFit().
Referenced by Vehicle::canMove(), and AStar3D::findPath().
bool ContainerBase::vehicleLoadable | ( | const Vehicle * | vehicle, |
int | uheight = -1 , |
||
const bool * | attacked = NULL |
||
) | const |
can the vehicle be loaded.
If uheight is passed, it is assumed that vehicle is at the height 'uheight' and not the actual level of height
Definition at line 458 of file containerbase.cpp.
References Vehicle::attacked, baseType, ContainerBaseType::ConquerBuildings, damage, Player::diplomacy, doesVehicleFit(), ContainerBaseType::entranceSystems, gamemap, MapCoordinate3D::getBitmappedHeight(), getFirstBit(), getheightdelta(), getMap(), MapCoordinate3D::getNumericalHeight(), getOwner(), GameMap::getPlayer(), getPosition(), ContainerBaseType::hasAnyFunction(), ContainerBaseType::hasFunction(), Vehicle::height, ContainerBaseType::TransportationIO::In, DiplomaticStateVector::isAllied(), isBuilding(), DiplomaticStateVector::isHostile(), minimumBuildingDamageForConquering, VehicleType::movemalustyp, and Vehicle::typ.
Referenced by fieldAccessible().
int ContainerBase::vehiclesLoaded | ( | void | ) | const |
returns the number of loaded units
Definition at line 165 of file containerbase.cpp.
References cargo.
Referenced by doesVehicleFit(), ConstructUnitCommand::internalConstructionAvail(), ContainerConstControls::unitProductionAvailable(), and CargoDialog::updateVariables().
int ContainerBase::vehicleUnloadable | ( | const VehicleType * | vehicleType, |
int | carrierHeight = -1 |
||
) | const |
checks the unloading of a unit type
vehicleType | the vehicletype for which the unloading is checked |
carrierHeight | assume the carrier ( = this) was on this height (numerical: 0 - 7). If -1, use current height |
Definition at line 494 of file containerbase.cpp.
References baseType, getPosition(), and ContainerBaseType::vehicleUnloadable().
Referenced by Vehicle::canMove(), AStar3D::findPath(), getProduction(), BuildProductionLineCommand::productionLinesBuyable(), ContainerConstControls::unitProductionPrerequisites(), and ConstructUnitCommand::unitProductionPrerequisites().
const ContainerBaseType::TransportationIO * ContainerBase::vehicleUnloadSystem | ( | const VehicleType * | vehicle, |
int | height | ||
) |
returns the unloading system
Definition at line 503 of file containerbase.cpp.
References baseType, ContainerBaseType::entranceSystems, getPosition(), ContainerBaseType::hasAnyFunction(), VehicleType::movemalustyp, ContainerBaseType::TransportationIO::Out, and ContainerBaseType::vehicleFit().
Referenced by calcMoveMalus(), and AStar3D::findPath().
|
pure virtual |
Implemented in Vehicle, and Building.
Referenced by DestructContainer::runAction(), and TemporaryContainerStorage::TemporaryContainerStorage().
|
friend |
Definition at line 42 of file containerbase.h.
|
friend |
Definition at line 41 of file containerbase.h.
|
static |
Definition at line 322 of file containerbase.h.
Referenced by AllEnemyUnitsDestroyed::arm(), AllEnemyBuildingsDestroyed::arm(), Building::convert(), Building::registerForNewOwner(), Vehicle::registerForNewOwner(), and ConvertContainer::runAction().
|
static |
Definition at line 321 of file containerbase.h.
Referenced by AllEnemyUnitsDestroyed::arm(), AllEnemyBuildingsDestroyed::arm(), DashboardPanel::DashboardPanel(), and ~ContainerBase().
const ContainerBaseType* ContainerBase::baseType |
the type descriping all non-instance specific properties of the container
Definition at line 80 of file containerbase.h.
Referenced by ResearchGraph::addSecondaryLab(), TransferHandler::ammoProductionPossible(), RemoveProductionLineCommand::avail(), DestructUnitCommand::avail(), ReactionFireSwitchCommand::avail(), BuildProductionLineCommand::avail(), SetResourceProcessingRateCommand::avail(), TrainUnitCommand::avail(), ContextMenu::ContainerCargo::available(), ContextMenu::ContainerProduction::available(), SolarPowerWindow::available(), WindPowerWindow::available(), ResearchWindow::available(), RepairUnitCommand::availInternally(), CargoDialog::CargoDialog(), cargoEditor(), ServiceChecker::check(), ContainerBase(), doesVehicleFit(), endRound(), StoringPosition::eventDraw(), ServiceTargetSearcher::externallyAvailable(), VehicleProduction_SelectionItemFactory::getAmmoFilling(), AddProductionLine_SelectionItemFactory::getCost(), RenameContainerCommand::getDescription(), getMaxRepair(), RecycleUnitCommand::getOutput(), getProduction(), getProductionCost(), getResourceUsage(), getStorageCapacity(), DestructUnitCommand::go(), MatterConversionWindow::hasFunction(), MiningWindow::hasFunction(), ConstructUnitCommand::internalConstructionAvail(), CargoItemFactory::isFiltered(), ProductionItemFactory::isFiltered(), MiningStation::MiningStation(), BuildProductionLineCommand::productionLinesBuyable(), removeUnitFromCargo(), StatisticsCalculator::resource(), returnResourcenUseForResearch(), ConvertContainer::runAction(), DestructContainer::runAction(), setInternalResourceMaxPlus(), setInternalResourcePlus(), ResearchGraph::setResearch(), CargoDialog::setUnitInfoWidgets(), StoringPosition::setup(), StatisticsCalculator::unitCost(), ContainerConstControls::unitProductionAvailable(), ContainerConstControls::unitProductionPrerequisites(), ConstructUnitCommand::unitProductionPrerequisites(), CargoDialog::updateVariables(), CargoDialog::userHandler(), vehicleDocking(), vehicleLoadable(), VehicleProduction_SelectionWindow::VehicleProduction_SelectionWindow(), vehicleUnloadable(), and vehicleUnloadSystem().
Resources ContainerBase::bi_resourceplus |
the maximum amount of Resources that the building can produce each turn in the BI resource mode ; see also maxplus
Definition at line 271 of file containerbase.h.
Referenced by BiResourceGeneration::getPlus(), BuildingValues::init(), Building::newFromStream(), Building::read(), SpawnBuilding::runAction(), Building::write(), and Vehicle::write().
|
protected |
Definition at line 108 of file containerbase.h.
Referenced by addToCargo(), cargoWeight(), Building::chainbuildingtofield(), clearCargo(), Building::convert(), Vehicle::convert(), findUnit(), getCargo(), getCargoCount(), removeUnitFromCargo(), ConvertContainer::runAction(), Vehicle::setAttacked(), Vehicle::setMovement(), Vehicle::setnewposition(), vehiclesLoaded(), Building::write(), Vehicle::write(), and ~ContainerBase().
sigc::signal<void> ContainerBase::cargoChanged |
Definition at line 128 of file containerbase.h.
Referenced by addToCargo(), clearCargo(), removeUnitFromCargo(), and CargoDialog::userHandler().
|
protected |
if this container is transported inside a carrier, this is carrier
Definition at line 56 of file containerbase.h.
Referenced by addToCargo(), and getCarrier().
int ContainerBase::color |
The owner of the container.
For historical reasons, this is actually 8 times the player numer Use getOwner() instead of directly accesing this variable
Definition at line 203 of file containerbase.h.
Referenced by attackpossible(), GuiFunctions::Attack::available(), GetResource::checkbuilding(), PutResource::checkbuilding(), PutTribute::checkbuilding(), GetResourceCapacity::checkbuilding(), GetResourcePlus::checkbuilding(), GetResourceUsage::checkbuilding(), GetResource::checkvehicle(), ContainerBase(), Building::convert(), DiscoverResources::DiscoverResources(), doesVehicleFit(), fieldvisiblenow(), MapField::getmovemalus(), getOwner(), BuildingValues::init(), netResourcePlus(), Building::newFromStream(), Vehicle::newFromStream(), Vehicle::paint(), Building::registerForNewOwner(), Vehicle::registerForNewOwner(), Building::removeview(), MapNetwork::searchAllVehiclesNextToBuildings(), Building::write(), Vehicle::write(), Building::~Building(), and Vehicle::~Vehicle().
sigc::signal<void> ContainerBase::conquered |
Definition at line 319 of file containerbase.h.
Referenced by UnitLost::arm(), UnitConquered::arm(), BuildingConquered::arm(), BuildingLost::arm(), Building::convert(), Building::registerForNewOwner(), Vehicle::registerForNewOwner(), and ConvertContainer::runAction().
int ContainerBase::damage |
Damage. 0 is no damage, when damage reaches 100 the container is destroyed.
Definition at line 199 of file containerbase.h.
Referenced by RepairBuildingCommand::avail(), CargoGuiFunctions::RepairUnit::available(), Building::Building(), ServiceChecker::check(), compareMapResources(), ContainerBase(), copyBuildingData(), copyVehicleData(), Vehicle::endOwnTurn(), GameMap::endTurn(), DamageBarWidget::eventBlit(), trunreplay::execnextreplaymove(), ChangeBuildingDamage::execute(), RepairBuildingCommand::getCost(), CalculateThreat_Vehicle::getdamage(), getMaxRepair(), RecycleUnitCommand::getOutput(), RepairUnitCommand::go(), MoveUnitCommand::go(), BuildingValues::init(), UnitInfoLayer::paintSingleField(), InflictDamage::postCheck(), Building::postRepair(), Vehicle::postRepair(), Vehicle::repairableDamage(), Building::repairableDamage(), repairItem(), AiParameter::reset(), InflictDamage::runAction(), tunitattacksunit::setresult(), tunitattacksbuilding::setresult(), tmineattacksunit::setresult(), tunitattacksobject::setresult(), tunitattacksunit::setup(), tunitattacksbuilding::setup(), tmineattacksunit::setup(), tunitattacksobject::setup(), DashboardPanel::showUnitData(), StatisticsCalculator::strength(), testAiHeliMovement1(), testAiMovement1(), testAiMovement2(), testAiMovement3(), testAiMovement4(), testAiMovement5(), testAiService1(), testAutoRepair(), testJumpdrive(), testManualRepair(), testMovementRF(), testSelfDamage(), testView2(), InflictDamage::undoAction(), CargoDialog::updateResourceDisplay(), vehicleLoadable(), VehiclePropertyEditor::VehiclePropertyEditor(), Building::write(), and Vehicle::write().
sigc::signal<void> ContainerBase::destroyed |
Definition at line 320 of file containerbase.h.
Referenced by UnitLost::arm(), UnitDestroyed::arm(), BuildingLost::arm(), CargoDialog::CargoDialog(), and ~ContainerBase().
|
protected |
the map that this container is placed on
Definition at line 52 of file containerbase.h.
Referenced by Building::addview(), Vehicle::addview(), Building::Building(), Vehicle::canMove(), Building::chainbuildingtofield(), Building::convert(), Vehicle::endOwnTurn(), Vehicle::freeWeight(), Building::getArmor(), Building::getField(), getMap(), Vehicle::getPosition3D(), getStorageCapacity(), Vehicle::paint(), paintField(), Building::registerForNewOwner(), Vehicle::registerForNewOwner(), Building::removeview(), Vehicle::removeview(), Vehicle::spawnMoveObjects(), Vehicle::Vehicle(), Vehicle::vehicleconstructable(), vehicleLoadable(), Building::~Building(), ~ContainerBase(), and Vehicle::~Vehicle().
|
protected |
Definition at line 99 of file containerbase.h.
Referenced by addProductionLine(), ContainerBase(), deleteAllProductionLines(), deleteProductionLine(), getProduction(), hasProductionLine(), setProductionLines(), Building::write(), and Vehicle::write().
Resources ContainerBase::maxplus |
the maximum amount of Resources that the building can produce each turn in the ASC resource mode ; see also bi_resourceplus
Definition at line 268 of file containerbase.h.
Referenced by ContainerBase(), getInternalResourceMaxPlus(), SetResourceProcessingRateCommand::getNewPlus(), MatterConversionWindow::getOutput(), MiningWindow::getOutput(), WindPowerplant::getPlus(), SolarPowerplant::getPlus(), BuildingValues::init(), SpawnBuilding::runAction(), setInternalResourceMaxPlus(), setInternalResourcePlus(), GetMiningInfo::testfield(), MatterAndMiningBaseWindow::update(), CargoDialog::updateVariables(), Building::write(), and Vehicle::write().
int ContainerBase::maxresearchpoints |
Definition at line 330 of file containerbase.h.
Referenced by ContainerBase(), BuildingValues::init(), ResearchGraph::ResearchGraph(), ResearchGraph::setResearch(), Building::write(), and Vehicle::write().
ASCString ContainerBase::name |
a name given by the user or the map creator
Definition at line 132 of file containerbase.h.
Referenced by DashboardPanel::containerRenamed(), copyBuildingData(), copyVehicleData(), Building::getName(), Vehicle::getName(), RenameContainerCommand::go(), BuildingValues::init(), setName(), CargoDialog::setUnitInfoWidgets(), DashboardPanel::showUnitData(), RenameContainerCommand::undoAction(), UnitNaming::UnitNaming(), VehiclePropertyEditor::VehiclePropertyEditor(), Building::write(), and Vehicle::write().
Resources ContainerBase::plus |
the Resources that are produced each turn
Definition at line 265 of file containerbase.h.
Referenced by ContainerBase(), trunreplay::execnextreplaymove(), getInternalResourcePlus(), MatterConversionWindow::getOutput(), MiningWindow::getOutput(), MatterConverter::getPlus(), MatterConverter::getUsage(), ResourceSink::getUsage(), SetResourceProcessingRateCommand::go(), BuildingValues::init(), MiningStation::MiningStation(), ResourceSink::ResourceSink(), MatterConverter::run(), MiningStation::run(), SpawnBuilding::runAction(), setInternalResourcePlus(), SetResourceProcessingRateCommand::undoAction(), Building::write(), and Vehicle::write().
ASCString ContainerBase::privateName |
a name given by the user which is only visible to him and his allies.
Definition at line 135 of file containerbase.h.
Referenced by getPrivateName(), RenameContainerCommand::go(), DashboardPanel::showUnitData(), RenameContainerCommand::undoAction(), UnitNaming::UnitNaming(), Building::write(), and Vehicle::write().
|
protected |
the percantage that this container has already been repaired this turn.
Currently only used for Buildings - and only buildings serialize this property to disk! The maximum percentage may be limited by a gameparameter
Definition at line 49 of file containerbase.h.
Referenced by ContainerBase(), Building::endRound(), Building::postRepair(), Building::repairableDamage(), and Building::write().
int ContainerBase::researchpoints |
the current amount of research that the building conducts every turn
Definition at line 328 of file containerbase.h.
Referenced by ResearchGraph::addSecondaryLab(), ContainerBase(), doresearch(), trunreplay::execnextreplaymove(), getResourceUsage(), BuildingValues::init(), ResearchGraph::recalc(), returnResourcenUseForResearch(), ResearchGraph::setResearch(), ResearchWindow::update(), Building::write(), and Vehicle::write().
int ContainerBase::view |
Definition at line 341 of file containerbase.h.
Referenced by ContainerBase(), endRound(), tcomputevehicleview::init(), tcomputebuildingview::init(), SpawnBuilding::runAction(), Building::write(), and Vehicle::write().