/* $Id$ */
/** @file ai_object.hpp declaration of class for AIObject class */
#ifndef AI_OBJECT_HPP
#define AI_OBJECT_HPP
#include "../../stdafx.h" // Needed for functions.h
#include "../../functions.h" // Needed for command.h
#include "../../command.h" // Needed for CommandCallback
class AIObject {
protected:
/**
* Executes a raw DoCommandCc for the AI.
*/
int32 DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback *callback);
/**
* Executes a raw DoCommand for the AI.
*/
int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc) { return this->DoCommandCc(tile, p1, p2, flags, procc, NULL); }
/**
* Checks if the result of a DoCommand went wrong.
*/
bool CmdFailed(int32 res);
/**
* Checks if the result of a DoCommand went okay.
*/
bool CmdSucceeded(int32 res);
};
#endif /* AI_OBJECT_HPP */