#include <putobjectcommand.h>
Inheritance diagram for PutObjectCommand:

Public Member Functions | |
| PutObjectCommand (Vehicle *unit) | |
| ActionResult | searchFields () |
| Vehicle * | getAttacker () |
| void | setTarget (const MapCoordinate &target, int objectID) |
| ActionResult | go (const Context &context) |
| ASCString | getCommandString () const |
| const vector< int > & | getCreatableObjects (const MapCoordinate &pos) |
| const vector< int > & | getRemovableObjects (const MapCoordinate &pos) |
| vector< MapCoordinate > | getFields () |
Static Public Member Functions | |
| static bool | avail (Vehicle *eht) |
Protected Member Functions | |
| void | readData (tnstream &stream) |
| void | writeData (tnstream &stream) const |
| GameActionID | getID () const |
| ASCString | getDescription () const |
Friends | |
| template<class Child> | |
| GameAction * | GameActionCreator (GameMap *map) |
Definition at line 32 of file putobjectcommand.h.
| PutObjectCommand::PutObjectCommand | ( | Vehicle * | unit | ) |
Definition at line 50 of file putobjectcommand.cpp.
| bool PutObjectCommand::avail | ( | Vehicle * | eht | ) | [static] |
Definition at line 38 of file putobjectcommand.cpp.
References GameMap::actplayer, Vehicle::attacked, ContainerBase::getMap(), ContainerBase::getOwner(), VehicleType::objectGroupsBuildable, VehicleType::objectGroupsRemovable, VehicleType::objectsBuildable, VehicleType::objectsRemovable, and Vehicle::typ.
Referenced by GuiFunctions::BuildObject::available(), go(), and unitPutObject().
| void PutObjectCommand::readData | ( | tnstream & | stream | ) | [protected, virtual] |
Reimplemented from UnitCommand.
Definition at line 263 of file putobjectcommand.cpp.
References MapCoordinate::read(), UnitCommand::readData(), and tnstream::readInt().
| void PutObjectCommand::writeData | ( | tnstream & | stream | ) | const [protected, virtual] |
Reimplemented from UnitCommand.
Definition at line 274 of file putobjectcommand.cpp.
References MapCoordinate::write(), UnitCommand::writeData(), and tnstream::writeInt().
| GameActionID PutObjectCommand::getID | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 294 of file putobjectcommand.cpp.
References ActionRegistry::PutObjectCommand.
| ASCString PutObjectCommand::getDescription | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 299 of file putobjectcommand.cpp.
References GameAction::getMap(), Vehicle::getName(), GameMap::getobjecttype_byid(), UnitCommand::getUnit(), ObjectType::name, and MapCoordinate::toString().
| ActionResult PutObjectCommand::searchFields | ( | ) |
Definition at line 79 of file putobjectcommand.cpp.
References circularFieldIterator(), Command::Evaluated, GameAction::getMap(), UnitCommand::getUnit(), and Command::setState().
Referenced by go(), and testObjectRemoval().
| Vehicle* PutObjectCommand::getAttacker | ( | ) | [inline] |
| void PutObjectCommand::setTarget | ( | const MapCoordinate & | target, | |
| int | objectID | |||
| ) |
Definition at line 178 of file putobjectcommand.cpp.
References MapField::checkForObject(), GameMap::getField(), GameAction::getMap(), GameMap::getobjecttype_byid(), Command::setState(), and Command::SetUp.
Referenced by GuiFunctions::ObjectBuildingGui::execute(), and testObjectRemoval().
| ActionResult PutObjectCommand::go | ( | const Context & | context | ) | [virtual] |
Implements Command.
Definition at line 203 of file putobjectcommand.cpp.
References RecalculateAreaView::addView(), avail(), ObjectType::basicjamming_abs, ObjectType::basicjamming_plus, ObjectType::build_movecost, ObjectType::buildcost, ActionRegistry::ChangeUnitMovement, ActionRegistry::ConsumeResource, GameAction::execute(), Command::Failed, Command::Finished, GameAction::getMap(), GameMap::getobjecttype_byid(), Command::getState(), UnitCommand::getUnit(), maxmalq, maxViewRange, ObjectType::remove_movecost, ObjectType::removecost, ActionRegistry::RemoveObject, RecalculateAreaView::removeView(), searchFields(), Command::setState(), Command::SetUp, ActionRegistry::SpawnObject, ActionResult::successful(), ObjectType::viewbonus_abs, and ObjectType::viewbonus_plus.
| ASCString PutObjectCommand::getCommandString | ( | ) | const [virtual] |
Implements Command.
Definition at line 283 of file putobjectcommand.cpp.
References ASCString::format(), UnitCommand::getUnitID(), MapCoordinate::x, and MapCoordinate::y.
| const vector< int > & PutObjectCommand::getCreatableObjects | ( | const MapCoordinate & | pos | ) |
Definition at line 69 of file putobjectcommand.cpp.
Referenced by GuiFunctions::ObjectBuildingGui::eval().
| const vector< int > & PutObjectCommand::getRemovableObjects | ( | const MapCoordinate & | pos | ) |
Definition at line 74 of file putobjectcommand.cpp.
Referenced by GuiFunctions::ObjectBuildingGui::eval().
| vector< MapCoordinate > PutObjectCommand::getFields | ( | ) |
Definition at line 57 of file putobjectcommand.cpp.
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1