File diff r10750:3efcb08f2f72 → r10751:8bea4563bd26
src/ai/api/ai_object.cpp
Show inline comments
 
@@ -195,13 +195,13 @@ int AIObject::GetCallbackVariable(int in
 
	return GetStorage()->callback_value[index];
 
}
 

	
 
bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const char *text, AISuspendCallbackProc *callback)
 
{
 
	if (AIObject::GetAllowDoCommand() == false) {
 
		AILog::Error("You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), and Load().\n");
 
		AILog::Error("You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), Load(), and any valuator.\n");
 
		return false;
 
	}
 

	
 
	CommandCost res;
 

	
 
	/* Set the default callback to return a true/false result of the DoCommand */