#include <convertcontainer.h>
Inheritance diagram for ConvertContainer:

Public Member Functions | |
| ConvertContainer (ContainerBase *container, int newPlayer) | |
| ASCString | getDescription () const |
Protected Member Functions | |
| virtual GameActionID | getID () const |
| virtual ActionResult | runAction (const Context &context) |
| virtual ActionResult | undoAction (const Context &context) |
| virtual ActionResult | preCheck () |
| preCheck is called before an action is redone and should check the preconditions for the action. | |
| virtual ActionResult | postCheck () |
| postCheck is called after an action has been redone and should check that the state of the map is exactly the same as it was after the action has been executed the first time. | |
| virtual void | readData (tnstream &stream) |
| virtual void | writeData (tnstream &stream) const |
Friends | |
| template<class Child> | |
| GameAction * | GameActionCreator (GameMap *map) |
Definition at line 29 of file convertcontainer.h.
| ConvertContainer::ConvertContainer | ( | ContainerBase * | container, | |
| int | newPlayer | |||
| ) |
Definition at line 28 of file convertcontainer.cpp.
| ASCString ConvertContainer::getDescription | ( | ) | const [virtual] |
Implements GameAction.
Definition at line 33 of file convertcontainer.cpp.
References ContainerAction::getContainer(), ContainerBase::getName(), and ASCString::toString().
| GameActionID ConvertContainer::getID | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 62 of file convertcontainer.cpp.
References ActionRegistry::ConvertContainer.
| ActionResult ConvertContainer::runAction | ( | const Context & | context | ) | [protected, virtual] |
Implements GameAction.
Definition at line 68 of file convertcontainer.cpp.
References ContainerBase::anyContainerConquered, ContainerBase::baseType, ContainerBase::cargo, ContainerBase::conquered, ActionRegistry::DestructContainer, GameAction::execute(), ContainerAction::getContainer(), ContainerBase::getOwner(), ContainerBaseType::hasFunction(), ContainerBase::registerForNewOwner(), and ContainerBaseType::SelfDestructOnConquer.
| ActionResult ConvertContainer::undoAction | ( | const Context & | context | ) | [protected, virtual] |
Implements GameAction.
Definition at line 92 of file convertcontainer.cpp.
References ContainerAction::getContainer(), and ContainerBase::registerForNewOwner().
| ActionResult ConvertContainer::preCheck | ( | ) | [protected, virtual] |
preCheck is called before an action is redone and should check the preconditions for the action.
The map should be in exactly the same state as it was when the action was first run. This method should check various key indicators to insurce the unmodifiedness of the map. The cheat detection of Replays heavily relies on this mechanism.
Reimplemented from GameAction.
Definition at line 98 of file convertcontainer.cpp.
References ContainerAction::getContainer().
| ActionResult ConvertContainer::postCheck | ( | ) | [protected, virtual] |
postCheck is called after an action has been redone and should check that the state of the map is exactly the same as it was after the action has been executed the first time.
The cheat detection of Replays heavily relies on this mechanism.
Reimplemented from GameAction.
Definition at line 106 of file convertcontainer.cpp.
References ContainerAction::getContainer().
| void ConvertContainer::readData | ( | tnstream & | stream | ) | [protected, virtual] |
Reimplemented from ContainerAction.
Definition at line 41 of file convertcontainer.cpp.
References ContainerAction::readData(), and tnstream::readInt().
| void ConvertContainer::writeData | ( | tnstream & | stream | ) | const [protected, virtual] |
Reimplemented from ContainerAction.
Definition at line 53 of file convertcontainer.cpp.
References ContainerAction::writeData(), and tnstream::writeInt().
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1