13#include "../script/api/script_event_types.hpp"
114 static void GetConsoleList(std::back_insert_iterator<std::string> &output_iterator,
bool newest_only);
122 static class AIInfo *
FindInfo(
const std::string &name,
int version,
bool force_exact_match);
139 static bool HasAILibrary(
const ContentInfo *ci,
bool md5sum);
declarations of the class for AI scanner
All static information from an AI like name, version, etc.
All static information from an AI library like name, version, etc.
static uint GetTick()
Get the current AI tick.
static class AIScannerInfo * scanner_info
ScriptScanner instance that is used to find AIs.
static void Uninitialize(bool keepConfig)
Uninitialize the AI system.
static AIScannerLibrary * GetScannerLibrary()
Gets the ScriptScanner instance that is used to find AI Libraries.
static bool HasAI(const struct ContentInfo *ci, bool md5sum)
Wrapper function for AIScanner::HasAI.
static void Pause(CompanyID company)
Suspend the AI and then pause execution of the script.
static void GetConsoleLibraryList(std::back_insert_iterator< std::string > &output_iterator)
Wrapper function for AIScanner::GetAIConsoleLibraryList.
static void Initialize()
Initialize the AI system.
static class AIScannerLibrary * scanner_library
ScriptScanner instance that is used to find AI Libraries.
static void GetConsoleList(std::back_insert_iterator< std::string > &output_iterator, bool newest_only)
Wrapper function for AIScanner::GetAIConsoleList.
static void GameLoop()
Called every game-tick to let AIs do something.
static bool CanStartNew()
Is it possible to start a new AI company?
static void BroadcastNewEvent(ScriptEvent *event, CompanyID skip_company=MAX_COMPANIES)
Broadcast a new event to all active AIs.
static void StartNew(CompanyID company)
Start a new AI company.
static void Stop(CompanyID company)
Stop a company to be controlled by an AI.
static class AILibrary * FindLibrary(const std::string &library, int version)
Wrapper function for AIScanner::FindLibrary.
static void ResetConfig()
Reset all AIConfigs, and make them reload their AIInfo.
static void NewEvent(CompanyID company, ScriptEvent *event)
Queue a new event for an AI.
static AIScannerInfo * GetScannerInfo()
Gets the ScriptScanner instance that is used to find AIs.
static const ScriptInfoList * GetUniqueInfoList()
Wrapper function for AIScanner::GetUniqueAIInfoList.
static void Rescan()
Rescans all searchpaths for available AIs.
static uint frame_counter
Tick counter for the AI code.
static bool IsPaused(CompanyID company)
Checks if the AI is paused.
static void Save(CompanyID company)
Save data from an AI to a savegame.
static void Unpause(CompanyID company)
Resume execution of the AI.
static void KillAll()
Kill any and all AIs we manage.
static const ScriptInfoList * GetInfoList()
Wrapper function for AIScanner::GetAIInfoList.
static class AIInfo * FindInfo(const std::string &name, int version, bool force_exact_match)
Wrapper function for AIScanner::FindInfo.
Owner
Enum for all companies/owners.
@ MAX_COMPANIES
Maximum number of companies.
std::map< std::string, class ScriptInfo *, CaseInsensitiveComparator > ScriptInfoList
Type for the list of scripts.
Container for all important information about a piece of content.