OpenTTD Source
20240919-master-gdf0233f4c2
|
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;
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.
class AILibrary * FindLibrary(const std::string &library, int version)
Find a library in the pool.
const char * GetFileName() const override
Get the filename to scan for this type of script.
Subdirectory GetDirectory() const override
Get the directory to scan in.
std::string GetScriptName(ScriptInfo *info) override
Get the script name how to store the script in memory.
int version
Version of the script.
@ 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.
std::string GetScriptName(ScriptInfo *info) override
Get the script name how to store the script in memory.
void SetDummyAI(class AIInfo *info)
Set the Dummy AI.
const char * GetScannerName() const override
Get the type of the script, in plural.
std::string name
Full name of the script.
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.
const char * GetScannerName() const override
Get the type of the script, in plural.
All static information from an Script 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.
class AIInfo * SelectRandomAI() const
Select a random AI.
void RegisterAPI(class Squirrel *engine) override
Register the API for this ScriptInfo.