Static Public Member Functions |
static void | SetLastCommandRes (bool res) |
| Store the latest result of a DoCommand per company.
|
static void | SetNewVehicleID (VehicleID vehicle_id) |
| Store a new_vehicle_id per company.
|
static void | SetNewSignID (SignID sign_id) |
| Store a new_sign_id per company.
|
static void | SetNewTunnelEndtile (TileIndex tile) |
| Store a new_tunnel_endtile per company.
|
static void | SetNewGroupID (GroupID group_id) |
| Store a new_group_id per company.
|
static void | SetAllowDoCommand (bool allow) |
| Store a allow_do_command per company.
|
static void *& | GetLogPointer () |
| Get the pointer to store log message in.
|
Static Protected Member Functions |
static bool | DoCommand (TileIndex tile, uint32 p1, uint32 p2, uint cmd, const char *text=NULL, AISuspendCallbackProc *callback=NULL) |
| Executes a raw DoCommand for the AI.
|
static void | SetDoCommandCosts (Money value) |
| Sets the DoCommand costs counter to a value.
|
static void | IncreaseDoCommandCosts (Money value) |
| Increase the current value of the DoCommand costs counter.
|
static Money | GetDoCommandCosts () |
| Get the current DoCommand costs counter.
|
static void | SetLastError (AIErrorType last_error) |
| Set the DoCommand last error.
|
static AIErrorType | GetLastError () |
| Get the DoCommand last error.
|
static void | SetRoadType (RoadType road_type) |
| Set the road type.
|
static RoadType | GetRoadType () |
| Get the road type.
|
static void | SetRailType (RailType rail_type) |
| Set the rail type.
|
static RailType | GetRailType () |
| Get the rail type.
|
static void | SetDoCommandMode (AIModeProc *proc, AIObject *instance) |
| Set the current mode of your AI to this proc.
|
static AIModeProc * | GetDoCommandMode () |
| Get the current mode your AI is currently under.
|
static AIObject * | GetDoCommandModeInstance () |
| Get the instance of the current mode your AI is currently under.
|
static void | SetDoCommandDelay (uint ticks) |
| Set the delay of the DoCommand.
|
static uint | GetDoCommandDelay () |
| Get the delay of the DoCommand.
|
static bool | GetLastCommandRes () |
| Get the latest result of a DoCommand.
|
static VehicleID | GetNewVehicleID () |
| Get the latest stored new_vehicle_id.
|
static SignID | GetNewSignID () |
| Get the latest stored new_sign_id.
|
static TileIndex | GetNewTunnelEndtile () |
| Get the latest stored new_tunnel_endtile.
|
static GroupID | GetNewGroupID () |
| Get the latest stored new_group_id.
|
static bool | CanSuspend () |
| Can we suspend the AI at this moment?
|
static bool | GetAllowDoCommand () |
| Get the internal value of allow_do_command.
|
static void *& | GetEventPointer () |
| Get the pointer to store event data in.
|
static void | SetLastCost (Money last_cost) |
| Set the cost of the last command.
|
static Money | GetLastCost () |
| Get the cost of the last command.
|
static void | SetCallbackVariable (int index, int value) |
| Set a variable that can be used by callback functions to pass information.
|
static int | GetCallbackVariable (int index) |
| Get the variable that is used by callback functions to pass information.
|
Friends |
class | AIInstance |
void | CcAI (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) |
Uper-parent object of all API classes.
You should never use this class in your AI, as it doesn't publish any public functions. It is used internally to have a common place to handle general things, like internal command processing, and command-validation checks.