13#include "../script/script_info.hpp"
19 static constexpr std::string_view ApiVersions[]{
"0.7",
"1.0",
"1.1",
"1.2",
"1.3",
"1.4",
"1.5",
"1.6",
"1.7",
"1.8",
"1.9",
"1.10",
"1.11",
"12",
"13",
"14",
"15" };
All static information from an AI like name, version, etc.
bool CanLoadFromVersion(int version) const
Check if we can start this AI.
bool UseAsRandomAI() const
Use this AI as a random AI.
const std::string & GetAPIVersion() const
Get the API version this AI is written for.
bool use_as_random
Should this AI be used when the user wants a "random AI"?
int min_loadable_version
The AI can load savegame data if the version is equal or greater than this.
std::string api_version
API version used by this AI.
static void RegisterAPI(Squirrel *engine)
Register the functions of this class.
static SQInteger Constructor(HSQUIRRELVM vm)
Create an AI, using this AIInfo as start-template.
static SQInteger DummyConstructor(HSQUIRRELVM vm)
Create a dummy-AI.
All static information from an AI library like name, version, etc.
const std::string & GetCategory() const
Get the category this library is in.
static void RegisterAPI(Squirrel *engine)
Register the functions of this class.
std::string category
The category this library is in.
static SQInteger Constructor(HSQUIRRELVM vm)
Create an AI, using this AIInfo as start-template.
All static information from an Script like name, version, etc.
int version
Version of the script.
class Squirrel * engine
Engine used to register for Squirrel.