OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
10 #ifndef AI_SCANNER_HPP
11 #define AI_SCANNER_HPP
13 #include "../script/script_scanner.hpp"
20 void Initialize()
override;
35 class AIInfo *
FindInfo(
const char *nameParam,
int versionParam,
bool force_exact_match);
44 const char *
GetFileName()
const override {
return PATHSEP
"info.nut"; }
55 void Initialize()
override;
67 const char *
GetFileName()
const override {
return PATHSEP
"library.nut"; }
const char * GetFileName() const override
Get the filename to scan for this type of script.
class Squirrel * engine
The engine we're scanning with.
const char * GetFileName() const override
Get the filename to scan for this type of script.
void GetScriptName(ScriptInfo *info, char *name, const char *last) override
Get the script name how to store the script in memory.
Subdirectory GetDirectory() const override
Get the directory to scan in.
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.
int version
Version of the script.
class AILibrary * FindLibrary(const char *library, int version)
Find a library in the pool.
@ AI_DIR
Subdirectory for all AI files.
Subdirectory GetDirectory() const override
Get the directory to scan in.
AIInfo * info_dummy
The dummy AI.
All static information from an AI library like name, version, etc.
Scanner to help finding scripts.
void SetDummyAI(class AIInfo *info)
Set the Dummy AI.
const char * GetScannerName() const override
Get the type of the script, in plural.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
@ AI_LIBRARY_DIR
Subdirectory for all AI libraries.
All static information from an AI like name, version, etc.
void RegisterAPI(class Squirrel *engine) override
Register the API for this ScriptInfo.
void GetScriptName(ScriptInfo *info, char *name, const char *last) override
Get the script name how to store the script in memory.
const char * GetScannerName() const override
Get the type of the script, in plural.
const char * name
Full name of the script.
All static information from an Script like name, version, etc.
class AIInfo * SelectRandomAI() const
Select a random AI.
void RegisterAPI(class Squirrel *engine) override
Register the API for this ScriptInfo.