#include <putminecommand.h>
Inheritance diagram for PutMineCommand:

Public Member Functions | |
| PutMineCommand (Vehicle *unit) | |
| ActionResult | searchFields () |
| void | setCreationTarget (const MapCoordinate &target, MineTypes mineType) |
| void | setRemovalTarget (const MapCoordinate &target) |
| ActionResult | go (const Context &context) |
| ASCString | getCommandString () const |
| const vector< MineTypes > & | getCreatableMines (const MapCoordinate &pos) |
| bool | getRemovableMines (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 putminecommand.h.
| PutMineCommand::PutMineCommand | ( | Vehicle * | unit | ) |
Definition at line 50 of file putminecommand.cpp.
References Vehicle::ammo, cmantitankmine, UnitWeapon::count, cwminen, SingleWeapon::getScalarWeaponType(), ContainerBaseType::hasFunction(), Vehicle::height, ContainerBaseType::NoMineRemoval, SingleWeapon::shootable(), SingleWeapon::sourceheight, Vehicle::typ, UnitWeapon::weapon, and VehicleType::weapons.
| bool PutMineCommand::avail | ( | Vehicle * | eht | ) | [static] |
Definition at line 39 of file putminecommand.cpp.
References GameMap::actplayer, Vehicle::attacked, ContainerBase::getMap(), ContainerBase::getOwner(), ContainerBaseType::hasFunction(), ContainerBaseType::PlaceMines, and Vehicle::typ.
Referenced by GuiFunctions::PutMine::available(), putMineFunc(), and removeMineFunc().
| void PutMineCommand::readData | ( | tnstream & | stream | ) | [protected, virtual] |
Reimplemented from UnitCommand.
Definition at line 219 of file putminecommand.cpp.
References MapCoordinate::read(), UnitCommand::readData(), and tnstream::readInt().
| void PutMineCommand::writeData | ( | tnstream & | stream | ) | const [protected, virtual] |
Reimplemented from UnitCommand.
Definition at line 234 of file putminecommand.cpp.
References MapCoordinate::write(), UnitCommand::writeData(), and tnstream::writeInt().
| GameActionID PutMineCommand::getID | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 258 of file putminecommand.cpp.
References ActionRegistry::PutMineCommand.
| ASCString PutMineCommand::getDescription | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 263 of file putminecommand.cpp.
References Vehicle::getName(), UnitCommand::getUnit(), and MapCoordinate::toString().
| ActionResult PutMineCommand::searchFields | ( | ) |
Definition at line 92 of file putminecommand.cpp.
References circularFieldIterator(), Command::Evaluated, GameAction::getMap(), UnitCommand::getUnit(), mineputmovedecrease, and Command::setState().
Referenced by go().
| void PutMineCommand::setCreationTarget | ( | const MapCoordinate & | target, | |
| MineTypes | mineType | |||
| ) |
Definition at line 150 of file putminecommand.cpp.
References GameMap::getField(), GameAction::getMap(), Command::setState(), and Command::SetUp.
Referenced by GuiFunctions::PutMineStage2::execute().
| void PutMineCommand::setRemovalTarget | ( | const MapCoordinate & | target | ) |
Definition at line 166 of file putminecommand.cpp.
References GameMap::getField(), GameAction::getMap(), Command::setState(), and Command::SetUp.
Referenced by GuiFunctions::RemoveMine::execute().
| ActionResult PutMineCommand::go | ( | const Context & | context | ) | [virtual] |
Implements Command.
Definition at line 180 of file putminecommand.cpp.
References ActionRegistry::ChangeUnitMovement, computeview(), ActionRegistry::ConsumeAmmo, GameAction::execute(), Command::Failed, fieldvisiblenow(), Command::Finished, GameMap::getField(), GameAction::getMap(), Command::getState(), UnitCommand::getUnit(), SingleWeapon::maxstrength, MineBasePunch, mineputmovedecrease, ActionRegistry::RemoveMine, searchFields(), Command::setState(), Command::SetUp, ActionRegistry::SpawnMine, ActionResult::successful(), Vehicle::typ, UnitWeapon::weapon, and VehicleType::weapons.
| ASCString PutMineCommand::getCommandString | ( | ) | const [virtual] |
Implements Command.
Definition at line 247 of file putminecommand.cpp.
References ASCString::format(), UnitCommand::getUnitID(), MapCoordinate::x, and MapCoordinate::y.
| const vector< MineTypes > & PutMineCommand::getCreatableMines | ( | const MapCoordinate & | pos | ) |
Definition at line 82 of file putminecommand.cpp.
Referenced by GuiFunctions::PutMineStage2::available().
| bool PutMineCommand::getRemovableMines | ( | const MapCoordinate & | pos | ) |
Definition at line 87 of file putminecommand.cpp.
Referenced by GuiFunctions::RemoveMine::available().
| vector< MapCoordinate > PutMineCommand::getFields | ( | ) |
Definition at line 72 of file putminecommand.cpp.
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1