#include "../actions/actionresult.h"Include dependency graph for commands.h:

Go to the source code of this file.
Functions | |
| GameMap * | loadGameLua (const char *filename) |
| ActionResult | unitAttack (GameMap *actmap, int veh, const MapCoordinate &target, int weapon=-1) |
| ActionResult | unitMovement (GameMap *actmap, int unitID, const MapCoordinate &destination, int destinationHeigth) |
| ActionResult | unitMovement (GameMap *actmap, int unitID, const MapCoordinate &destination) |
| ActionResult | putMineFunc (GameMap *actmap, int veh, const MapCoordinate &destination, int mineType) |
| ActionResult | removeMineFunc (GameMap *actmap, int veh, const MapCoordinate &destination) |
| ActionResult | unitPutObject (GameMap *actmap, int veh, const MapCoordinate &destination, int objectID) |
| ActionResult | unitRemoveObject (GameMap *actmap, int veh, const MapCoordinate &destination, int objectID) |
| ActionResult | unitDestructBuilding (GameMap *actmap, int veh, const MapCoordinate &destination) |
| ActionResult | transferControl (GameMap *actmap, int containerID, int newOwner) |
| ActionResult | trainUnit (GameMap *actmap, int containerID, int unitID) |
| ActionResult | constructUnit (GameMap *actmap, int containerID, const MapCoordinate &position, int unitID) |
| ActionResult | constructBuilding (GameMap *actmap, int unitID, const MapCoordinate &position, int buildingTypeID) |
| ActionResult | serviceCommand (GameMap *actmap, int providingContainerID, int receivingContainerID, int type, int amount) |
| ActionResult | repairUnit (GameMap *actmap, int repairerID, int damagedUnitID) |
| ActionResult | unitReactionFireEnable (GameMap *actmap, int unitID, bool enabled) |
| ActionResult | unitPowerGenerationEnable (GameMap *actmap, int unitID, int enabled) |
| ActionResult | unitJump (GameMap *actmap, int veh, const MapCoordinate &destination) |
| ActionResult | selfDestruct (GameMap *actmap, int containerID) |
| ActionResult | recycleUnit (GameMap *actmap, int containerID, int unitID) |
| ActionResult | buildProductionLine (GameMap *actmap, int containerID, int vehicleTypeID) |
| ActionResult | removeProductionLine (GameMap *actmap, int containerID, int vehicleTypeID) |
| ActionResult | repairBuilding (GameMap *actmap, int buildingID) |
| ActionResult | setResourceProcessingRate (GameMap *actmap, int containerID, int amount) |
| ActionResult | cargoUnitMove (GameMap *actmap, int unitID, int targetContainerID) |
| ActionResult | setDiplomacy (GameMap *actmap, int actingPlayer, int towardsPlayer, bool sneak, int newState) |
| ActionResult | cancelResearch (GameMap *actmap, int actingPlayer) |
| ActionResult | setResearchGoal (GameMap *actmap, int actingPlayer, int techID) |
| ActionResult | renameContainer (GameMap *actmap, int unitID, const ASCString &publicName, const ASCString &privateName) |
| void | endTurn () |
| void | endTurn_headLess (GameMap *gamemap) |
| ends a turn. All user interaction is avoided. Intended for unit tests and other automated tasks | |
| Vehicle * | getSelectedUnit (GameMap *map) |
| ActionResult buildProductionLine | ( | GameMap * | actmap, | |
| int | containerID, | |||
| int | vehicleTypeID | |||
| ) |
Definition at line 499 of file commands.cpp.
References actmap, BuildProductionLineCommand::avail(), ActionRegistry::BuildProductionLineCommand, createContext(), GameMap::getContainer(), ActionResult::successful(), and vehicleTypeRepository.
| ActionResult cancelResearch | ( | GameMap * | actmap, | |
| int | actingPlayer | |||
| ) |
Definition at line 661 of file commands.cpp.
References actmap, ActionRegistry::CancelResearchCommand, createContext(), GameMap::getPlayerCount(), and ActionResult::successful().
| ActionResult cargoUnitMove | ( | GameMap * | actmap, | |
| int | unitID, | |||
| int | targetContainerID | |||
| ) |
Definition at line 594 of file commands.cpp.
References actmap, ActionRegistry::CargoMoveCommand, createContext(), GameMap::getUnit(), CargoMoveCommand::moveInAvail(), CargoMoveCommand::moveInwards, CargoMoveCommand::moveOutAvail(), CargoMoveCommand::moveOutwards, and ActionResult::successful().
| ActionResult constructBuilding | ( | GameMap * | actmap, | |
| int | unitID, | |||
| const MapCoordinate & | position, | |||
| int | buildingTypeID | |||
| ) |
Definition at line 304 of file commands.cpp.
References actmap, ConstructBuildingCommand::avail(), buildingTypeRepository, ActionRegistry::ConstructBuildingCommand, createContext(), GameMap::getUnit(), and ActionResult::successful().
| ActionResult constructUnit | ( | GameMap * | actmap, | |
| int | containerID, | |||
| const MapCoordinate & | position, | |||
| int | unitID | |||
| ) |
Definition at line 266 of file commands.cpp.
References actmap, ConstructUnitCommand::avail(), ActionRegistry::ConstructUnitCommand, createContext(), ConstructUnitCommand::external, GameMap::getContainer(), ConstructUnitCommand::internal, ActionResult::successful(), MapCoordinate::valid(), and vehicleTypeRepository.
| void endTurn | ( | ) |
Definition at line 723 of file commands.cpp.
References actmap, getDefaultMapDisplay(), and next_turn().
| void endTurn_headLess | ( | GameMap * | gamemap | ) |
ends a turn. All user interaction is avoided. Intended for unit tests and other automated tasks
Definition at line 728 of file commands.cpp.
References next_turn().
Definition at line 733 of file commands.cpp.
References GameMap::actplayer, GameMap::getCursor(), GameMap::getField(), ContainerBase::getOwner(), and MapField::vehicle.
| GameMap* loadGameLua | ( | const char * | filename | ) |
| ActionResult putMineFunc | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | destination, | |||
| int | mineType | |||
| ) |
Definition at line 123 of file commands.cpp.
References actmap, PutMineCommand::avail(), createContext(), GameMap::getUnit(), ActionRegistry::PutMineCommand, and ActionResult::successful().
| ActionResult recycleUnit | ( | GameMap * | actmap, | |
| int | containerID, | |||
| int | unitID | |||
| ) |
Definition at line 473 of file commands.cpp.
References actmap, RecycleUnitCommand::avail(), createContext(), GameMap::getContainer(), GameMap::getUnit(), ActionRegistry::RecycleUnitCommand, and ActionResult::successful().
| ActionResult removeMineFunc | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | destination | |||
| ) |
Definition at line 144 of file commands.cpp.
References actmap, PutMineCommand::avail(), createContext(), GameMap::getUnit(), ActionRegistry::PutMineCommand, and ActionResult::successful().
| ActionResult removeProductionLine | ( | GameMap * | actmap, | |
| int | containerID, | |||
| int | vehicleTypeID | |||
| ) |
Definition at line 525 of file commands.cpp.
References actmap, RemoveProductionLineCommand::avail(), createContext(), GameMap::getContainer(), ActionRegistry::RemoveProductionLineCommand, ActionResult::successful(), and vehicleTypeRepository.
| ActionResult renameContainer | ( | GameMap * | actmap, | |
| int | unitID, | |||
| const ASCString & | publicName, | |||
| const ASCString & | privateName | |||
| ) |
Definition at line 745 of file commands.cpp.
References actmap, createContext(), GameMap::getUnit(), ActionRegistry::RenameContainerCommand, and ActionResult::successful().
| ActionResult repairBuilding | ( | GameMap * | actmap, | |
| int | buildingID | |||
| ) |
Definition at line 550 of file commands.cpp.
References actmap, RepairBuildingCommand::avail(), createContext(), GameMap::getContainer(), ActionRegistry::RepairBuildingCommand, and ActionResult::successful().
| ActionResult repairUnit | ( | GameMap * | actmap, | |
| int | repairerID, | |||
| int | damagedUnitID | |||
| ) |
Definition at line 363 of file commands.cpp.
References actmap, RepairUnitCommand::avail(), createContext(), GameMap::getContainer(), GameMap::getUnit(), ActionRegistry::RepairUnitCommand, and ActionResult::successful().
| ActionResult selfDestruct | ( | GameMap * | actmap, | |
| int | containerID | |||
| ) |
Definition at line 453 of file commands.cpp.
References actmap, DestructUnitCommand::avail(), createContext(), ActionRegistry::DestructUnitCommand, GameMap::getContainer(), and ActionResult::successful().
| ActionResult serviceCommand | ( | GameMap * | actmap, | |
| int | providingContainerID, | |||
| int | receivingContainerID, | |||
| int | type, | |||
| int | amount | |||
| ) |
Definition at line 332 of file commands.cpp.
References actmap, createContext(), GameMap::getContainer(), ActionRegistry::ServiceCommand, and ActionResult::successful().
| ActionResult setDiplomacy | ( | GameMap * | actmap, | |
| int | actingPlayer, | |||
| int | towardsPlayer, | |||
| bool | sneak, | |||
| int | newState | |||
| ) |
Definition at line 631 of file commands.cpp.
References actmap, createContext(), ActionRegistry::DiplomacyCommand, diplomaticStateNum, GameMap::getPlayer(), GameMap::getPlayerCount(), and ActionResult::successful().
| ActionResult setResearchGoal | ( | GameMap * | actmap, | |
| int | actingPlayer, | |||
| int | techID | |||
| ) |
Definition at line 679 of file commands.cpp.
References actmap, DirectResearchCommand::available(), createContext(), ActionRegistry::DirectResearchCommand, GameMap::getPlayer(), GameMap::getPlayerCount(), ActionResult::successful(), and technologyRepository.
| ActionResult setResourceProcessingRate | ( | GameMap * | actmap, | |
| int | containerID, | |||
| int | amount | |||
| ) |
Definition at line 574 of file commands.cpp.
References actmap, SetResourceProcessingRateCommand::avail(), createContext(), GameMap::getContainer(), ActionRegistry::SetResourceProcessingRateCommand, and ActionResult::successful().
| ActionResult trainUnit | ( | GameMap * | actmap, | |
| int | containerID, | |||
| int | unitID | |||
| ) |
Definition at line 240 of file commands.cpp.
References actmap, TrainUnitCommand::avail(), createContext(), GameMap::getContainer(), GameMap::getUnit(), ActionResult::successful(), and ActionRegistry::TrainUnitCommand.
| ActionResult transferControl | ( | GameMap * | actmap, | |
| int | containerID, | |||
| int | newOwner | |||
| ) |
Definition at line 215 of file commands.cpp.
References actmap, TransferControlCommand::avail(), createContext(), GameMap::getContainer(), GameMap::getPlayer(), ActionResult::successful(), and ActionRegistry::TransferControlCommand.
| ActionResult unitAttack | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | target, | |||
| int | weapon = -1 | |||
| ) |
Definition at line 72 of file commands.cpp.
References actmap, ActionRegistry::AttackCommand, AttackCommand::avail(), createContext(), GameMap::getUnit(), and ActionResult::successful().
| ActionResult unitDestructBuilding | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | destination | |||
| ) |
Definition at line 194 of file commands.cpp.
References actmap, DestructBuildingCommand::avail(), createContext(), ActionRegistry::DestructBuildingCommand, GameMap::getUnit(), and ActionResult::successful().
| ActionResult unitJump | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | destination | |||
| ) |
Definition at line 431 of file commands.cpp.
References actmap, JumpDriveCommand::available(), createContext(), ActionAvailability::getMessage(), GameMap::getUnit(), ActionRegistry::JumpDriveCommand, ActionAvailability::ready(), and ActionResult::successful().
| ActionResult unitMovement | ( | GameMap * | actmap, | |
| int | unitID, | |||
| const MapCoordinate & | destination | |||
| ) |
| ActionResult unitMovement | ( | GameMap * | actmap, | |
| int | unitID, | |||
| const MapCoordinate & | destination, | |||
| int | destinationHeigth | |||
| ) |
Definition at line 94 of file commands.cpp.
References actmap, MoveUnitCommand::avail(), createContext(), GameMap::getUnit(), ActionRegistry::MoveUnitCommand, and ActionResult::successful().
| ActionResult unitPowerGenerationEnable | ( | GameMap * | actmap, | |
| int | unitID, | |||
| int | enabled | |||
| ) |
Definition at line 410 of file commands.cpp.
References actmap, PowerGenerationSwitchCommand::avail(), createContext(), GameMap::getUnit(), ActionRegistry::PowerGenerationSwitchCommand, and ActionResult::successful().
| ActionResult unitPutObject | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | destination, | |||
| int | objectID | |||
| ) |
Definition at line 167 of file commands.cpp.
References actmap, PutObjectCommand::avail(), createContext(), GameMap::getUnit(), ActionRegistry::PutObjectCommand, and ActionResult::successful().
Referenced by unitRemoveObject().
| ActionResult unitReactionFireEnable | ( | GameMap * | actmap, | |
| int | unitID, | |||
| bool | enabled | |||
| ) |
Definition at line 389 of file commands.cpp.
References actmap, ReactionFireSwitchCommand::avail(), createContext(), GameMap::getUnit(), ActionRegistry::ReactionFireSwitchCommand, and ActionResult::successful().
| ActionResult unitRemoveObject | ( | GameMap * | actmap, | |
| int | veh, | |||
| const MapCoordinate & | destination, | |||
| int | objectID | |||
| ) |
1.5.1