OpenTTD Source  20241121-master-g67a0fccfad
ScriptInfo Class Reference

All static information from an Script like name, version, etc. More...

#include <script_info.hpp>

Inheritance diagram for ScriptInfo:
AIInfo AILibrary GameInfo GameLibrary

Public Member Functions

const std::string & GetAuthor () const
 Get the Author of the script.
 
const std::string & GetName () const
 Get the Name of the script.
 
const std::string & GetShortName () const
 Get the 4 character long short name of the script.
 
const std::string & GetDescription () const
 Get the description of the script.
 
int GetVersion () const
 Get the version of the script.
 
const std::string & GetDate () const
 Get the last-modified date of the script.
 
const std::string & GetInstanceName () const
 Get the name of the instance of the script to create.
 
const std::string & GetURL () const
 Get the website for this script.
 
const std::string & GetMainScript () const
 Get the filename of the main.nut script.
 
const std::string & GetTarFile () const
 Get the filename of the tar the script is in.
 
bool CheckMethod (const char *name) const
 Check if a given method exists.
 
virtual class ScriptScannerGetScanner ()
 Get the scanner which has found this ScriptInfo.
 
bool GetSettings ()
 Get the settings of the Script.
 
const ScriptConfigItemListGetConfigList () const
 Get the config list for this Script.
 
const ScriptConfigItemGetConfigItem (const std::string_view name) const
 Get the description of a certain Script config option.
 
SQInteger AddSetting (HSQUIRRELVM vm)
 Set a setting.
 
SQInteger AddLabels (HSQUIRRELVM vm)
 Add labels for a setting.
 
int GetSettingDefaultValue (const std::string &name) const
 Get the default value for a setting.
 
virtual bool IsDeveloperOnly () const
 Can this script be selected by developers only?
 

Static Public Member Functions

static SQInteger Constructor (HSQUIRRELVM vm, ScriptInfo *info)
 Process the creation of a FileInfo object.
 

Protected Attributes

class Squirrelengine
 Engine used to register for Squirrel.
 
HSQOBJECT SQ_instance
 The Squirrel instance created for this info.
 
ScriptConfigItemList config_list
 List of settings from this Script.
 

Private Attributes

std::string main_script
 The full path of the script.
 
std::string tar_file
 If, which tar file the script was in.
 
std::string author
 Author of the script.
 
std::string name
 Full name of the script.
 
std::string short_name
 Short name (4 chars) which uniquely identifies the script.
 
std::string description
 Small description of the script.
 
std::string date
 The date the script was written at.
 
std::string instance_name
 Name of the main class in the script.
 
int version
 Version of the script.
 
std::string url
 URL of the script.
 
class ScriptScannerscanner
 ScriptScanner object that was used to scan this script info.
 

Detailed Description

All static information from an Script like name, version, etc.

Definition at line 30 of file script_info.hpp.


The documentation for this class was generated from the following files: