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