10#ifndef SCRIPT_INFO_HPP
11#define SCRIPT_INFO_HPP
15#include "script_object.hpp"
76 const std::string &
GetURL()
const {
return this->
url; }
All static information from an Script like name, version, etc.
const std::string & GetInstanceName() const
Get the name of the instance of the script to create.
std::string short_name
Short name (4 chars) which uniquely identifies the script.
int version
Version of the script.
class ScriptScanner * scanner
ScriptScanner object that was used to scan this script info.
static SQInteger Constructor(HSQUIRRELVM vm, ScriptInfo *info)
Process the creation of a FileInfo object.
const std::string & GetName() const
Get the Name of the script.
const std::string & GetAuthor() const
Get the Author of the script.
std::string description
Small description of the script.
const std::string & GetURL() const
Get the website for this script.
ScriptConfigItemList config_list
List of settings from this Script.
const ScriptConfigItemList * GetConfigList() const
Get the config list for this Script.
bool CheckMethod(const char *name) const
Check if a given method exists.
const std::string & GetMainScript() const
Get the filename of the main.nut script.
class Squirrel * engine
Engine used to register for Squirrel.
std::string name
Full name of the script.
SQInteger AddSetting(HSQUIRRELVM vm)
Set a setting.
std::string main_script
The full path of the script.
const std::string & GetShortName() const
Get the 4 character long short name of the script.
SQInteger AddLabels(HSQUIRRELVM vm)
Add labels for a setting.
int GetVersion() const
Get the version of the script.
const std::string & GetTarFile() const
Get the filename of the tar the script is in.
std::string instance_name
Name of the main class in the script.
bool GetSettings()
Get the settings of the Script.
HSQOBJECT SQ_instance
The Squirrel instance created for this info.
std::string author
Author of the script.
int GetSettingDefaultValue(const std::string &name) const
Get the default value for a setting.
std::string tar_file
If, which tar file the script was in.
const ScriptConfigItem * GetConfigItem(const std::string_view name) const
Get the description of a certain Script config option.
std::string url
URL of the script.
const std::string & GetDescription() const
Get the description of the script.
const std::string & GetDate() const
Get the last-modified date of the script.
virtual class ScriptScanner * GetScanner()
Get the scanner which has found this ScriptInfo.
virtual bool IsDeveloperOnly() const
Can this script be selected by developers only?
std::string date
The date the script was written at.
Scanner to help finding scripts.
ScriptConfig stores the configuration settings of every Script.
std::vector< ScriptConfigItem > ScriptConfigItemList
List of ScriptConfig items.
static const int MAX_CREATEINSTANCE_OPS
Number of operations to create an instance of a script.
static const int MAX_GET_SETTING_OPS
Maximum number of operations allowed for getting a particular setting.
static const int MAX_SL_OPS
The maximum number of operations for saving or loading the data of a script.
static const int MAX_CONSTRUCTOR_OPS
The maximum number of operations for initial start of a script.
static const int MAX_GET_OPS
Number of operations to get the author and similar information.
void Script_CreateDummyInfo(HSQUIRRELVM vm, const char *type, const char *dir)
Run the dummy info.nut.
void Script_CreateDummy(HSQUIRRELVM vm, StringID string, const char *type)
Run the dummy AI and let it generate an error message.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Info about a single Script setting.