#include <ai_testmode.hpp>
Public Member Functions | |
AITestMode () | |
Creating instance of this class switches the build mode to Testing. | |
~AITestMode () | |
Destroying this instance reset the building mode to the mode it was in when the instance was created. | |
Static Public Member Functions | |
static const char * | GetClassName () |
Static Protected Member Functions | |
static bool | ModeProc (TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs) |
The callback proc for Testing mode. | |
Private Attributes | |
AIModeProc * | last_mode |
AIObject * | last_instance |
If you create an instance of this class, the mode will be switched to Testing. The original mode is stored and recovered from when ever the instance is destroyed. In Test mode all the commands you execute aren't really executed. The system only checks if it would be able to execute your requests, and what the cost would be.
Definition at line 19 of file ai_testmode.hpp.
AITestMode::AITestMode | ( | ) |
Creating instance of this class switches the build mode to Testing.
Definition at line 15 of file ai_testmode.cpp.
References AIObject::GetDoCommandMode(), AIObject::GetDoCommandModeInstance(), ModeProc(), and AIObject::SetDoCommandMode().