#include <containercontrols.h>
Public Member Functions | |
| ContainerConstControls (const ContainerBase *cb) | |
| int | unitProductionPrerequisites (const VehicleType *type, bool internally) const |
| returns 0 if the unit is producable and != 0 otherwise. | |
Protected Member Functions | |
| bool | unitProductionAvailable () const |
Definition at line 27 of file containercontrols.h.
| ContainerConstControls::ContainerConstControls | ( | const ContainerBase * | cb | ) | [inline] |
Definition at line 33 of file containercontrols.h.
| bool ContainerConstControls::unitProductionAvailable | ( | ) | const [protected] |
Definition at line 36 of file containercontrols.cpp.
References GameMap::actplayer, ContainerBase::baseType, ContainerBase::getMap(), ContainerBase::getOwner(), ContainerBaseType::hasFunction(), ContainerBaseType::InternalVehicleProduction, ContainerBaseType::maxLoadableUnits, and ContainerBase::vehiclesLoaded().
| int ContainerConstControls::unitProductionPrerequisites | ( | const VehicleType * | type, | |
| bool | internally | |||
| ) | const |
returns 0 if the unit is producable and != 0 otherwise.
THe bits in the result say why the unit is not producable Bit 1,2+3: energy, material and fuel Bit 10: not researched yet Bit 11: can not be unloaded
Definition at line 46 of file containercontrols.cpp.
References TechAdapterDependency::available(), ContainerBase::baseType, cgp_produceOnlyResearchedStuffExternally, cgp_produceOnlyResearchedStuffInternally, ContainerBase::getAvailableResource(), GameMap::getgameparameter(), ContainerBase::getProductionCost(), ContainerBaseType::hasFunction(), ContainerBaseType::ProduceNonLeavableUnits, Resources::resource(), resourceTypeNum, ContainerBaseType::techDependency, and ContainerBase::vehicleUnloadable().
1.5.1