13#include "../script/script_scanner.hpp"
20 void Initialize()
override;
35 class AIInfo *
FindInfo(
const std::string &name,
int version,
bool force_exact_match);
40 void SetDummyAI(std::unique_ptr<class AIInfo> &&info);
44 std::string_view
GetFileName()
const override {
return PATHSEP
"info.nut"; }
55 void Initialize()
override;
67 std::string_view
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.
void SetDummyAI(std::unique_ptr< class AIInfo > &&info)
Set the Dummy AI.
std::string_view GetScannerName() const override
Get the type of the script, in plural.
std::unique_ptr< AIInfo > info_dummy
The dummy AI.
Subdirectory GetDirectory() const override
Get the directory to scan in.
void RegisterAPI(class Squirrel &engine) override
Register the API for this ScriptInfo.
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.
std::string_view GetFileName() const override
Get the filename to scan for this type of script.
void RegisterAPI(class Squirrel &engine) override
Register the API for this ScriptInfo.
std::string GetScriptName(ScriptInfo &info) override
Get the script name how to store the script in memory.
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.
std::string_view GetScannerName() const override
Get the type of the script, in plural.
std::string_view GetFileName() const override
Get the filename to scan for this type of script.
All static information from an Script like name, version, etc.
Scanner to help finding scripts.
std::unique_ptr< 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.