Public Member Functions | |
void | Initialize () |
class AIInfo * | SelectRandomAI () const |
Select a random AI. | |
class AIInfo * | FindInfo (const char *nameParam, int versionParam, bool force_exact_match) |
Check if we have an AI by name and version available in our list. | |
void | SetDummyAI (class AIInfo *info) |
Set the Dummy AI. | |
Protected Member Functions | |
void | GetScriptName (ScriptInfo *info, char *name, int len) |
Get the script name how to store the script in memory. | |
const char * | GetFileName () const |
Get the filename to scan for this type of script. | |
Subdirectory | GetDirectory () const |
Get the directory to scan in. | |
const char * | GetScannerName () const |
Get the type of the script, in plural. | |
void | RegisterAPI (class Squirrel *engine) |
Register the API for this ScriptInfo. | |
Private Attributes | |
AIInfo * | info_dummy |
The dummy AI. |
Definition at line 17 of file ai_scanner.hpp.
AIInfo * AIScannerInfo::FindInfo | ( | const char * | nameParam, | |
int | versionParam, | |||
bool | force_exact_match | |||
) |
Check if we have an AI by name and version available in our list.
nameParam | The name of the AI. | |
versionParam | The version of the AI, or -1 if you want the latest. | |
force_exact_match | Only match name+version, never latest. |
Definition at line 93 of file ai_scanner.cpp.
References AIInfo::CanLoadFromVersion(), ScriptInfo::GetName(), ScriptInfo::GetVersion(), ScriptScanner::info_list, ScriptScanner::info_single_list, strtolower(), and ttd_strlcpy().
Referenced by AI::FindInfo().
AIInfo * AIScannerInfo::SelectRandomAI | ( | ) | const |
Select a random AI.
Definition at line 59 of file ai_scanner.cpp.
References _networking, DEBUG, info_dummy, ScriptScanner::info_single_list, and AIInfo::UseAsRandomAI().
Referenced by AI::StartNew().