OpenTTD Source  12.0-beta2
ai_instance.cpp File Reference
#include "../stdafx.h"
#include "../debug.h"
#include "../error.h"
#include "../script/squirrel_class.hpp"
#include "ai_config.hpp"
#include "ai_gui.hpp"
#include "ai.hpp"
#include "../script/script_storage.hpp"
#include "ai_info.hpp"
#include "ai_instance.hpp"
#include "../script/api/template/template_text.hpp.sq"
#include "../script/api/ai/ai_includes.hpp"
#include "../company_base.h"
#include "../company_func.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

void CcAI (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
 DoCommand callback function for all commands executed by AIs. More...
 

Detailed Description

Implementation of AIInstance.

Definition in file ai_instance.cpp.

Function Documentation

◆ CcAI()

void CcAI ( const CommandCost result,
TileIndex  tile,
uint32  p1,
uint32  p2,
uint32  cmd 
)

DoCommand callback function for all commands executed by AIs.

Parameters
resultThe result of the command.
tileThe tile on which the command was executed.
p1p1 as given to DoCommandPInternal.
p2p2 as given to DoCommandPInternal.
cmdcmd as given to DoCommandPInternal.

Definition at line 101 of file ai_instance.cpp.

References _current_company, ScriptInstance::Continue(), ScriptInstance::DoCommandCallback(), and Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid().

Referenced by AIInstance::GetDoCommandCallback().