OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
13 #include "../script/script_info.hpp"
bool use_as_random
Should this AI be used when the user wants a "random AI"?
static void RegisterAPI(Squirrel *engine)
Register the functions of this class.
class Squirrel * engine
Engine used to register for Squirrel.
const std::string & GetAPIVersion() const
Get the API version this AI is written for.
bool UseAsRandomAI() const
Use this AI as a random AI.
int version
Version of the script.
int min_loadable_version
The AI can load savegame data if the version is equal or greater than this.
All static information from an AI library like name, version, etc.
std::string category
The category this library is in.
static SQInteger Constructor(HSQUIRRELVM vm)
Create an AI, using this AIInfo as start-template.
static SQInteger Constructor(HSQUIRRELVM vm)
Create an AI, using this AIInfo as start-template.
static SQInteger DummyConstructor(HSQUIRRELVM vm)
Create a dummy-AI.
std::string api_version
API version used by this AI.
static void RegisterAPI(Squirrel *engine)
Register the functions of this class.
All static information from an AI like name, version, etc.
bool CanLoadFromVersion(int version) const
Check if we can start this AI.
All static information from an Script like name, version, etc.
const std::string & GetCategory() const
Get the category this library is in.