Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release-linux.yml # .github/workflows/release-macos.yml # .github/workflows/release-source.yml # .github/workflows/release.yml # CMakeLists.txt # COMPILING.md # src/ai/ai_core.cpp # src/ai/ai_gui.cpp # src/bridge_gui.cpp # src/company_gui.cpp # src/console_cmds.cpp # src/core/CMakeLists.txt # src/core/smallmap_type.hpp # src/disaster_vehicle.h # src/effectvehicle_base.h # src/fontcache.cpp # src/game/game_core.cpp # src/game/game_gui.cpp # src/gamelog.cpp # src/gamelog_internal.h # src/group_gui.cpp # src/linkgraph/linkgraph.h # src/misc.cpp # src/network/core/config.h # src/network/core/udp.cpp # src/network/network_chat_gui.cpp # src/network/network_content_gui.cpp # src/network/network_gui.cpp # src/newgrf.cpp # src/newgrf_gui.cpp # src/newgrf_profiling.cpp # src/newgrf_profiling.h # src/object_gui.cpp # src/openttd.cpp # src/openttd.h # src/order_gui.cpp # src/os/windows/font_win32.cpp # src/rail_gui.cpp # src/road.cpp # src/road_gui.cpp # src/saveload/afterload.cpp # src/saveload/saveload.h # src/script/api/script_controller.cpp # src/script/api/script_roadtypelist.cpp # src/script/script_config.cpp # src/script/script_config.hpp # src/script/script_instance.cpp # src/script/script_scanner.cpp # src/script/squirrel.cpp # src/script/squirrel_helper.hpp # src/settings_gui.cpp # src/settings_internal.h # src/settings_type.h # src/table/settings/network_private_settings.ini # src/timetable_gui.cpp # src/vehicle.cpp # src/vehicle_base.h # src/window_gui.h
This commit is contained in:
@@ -31,38 +31,29 @@ class ScriptInfo : public SimpleCountedObject {
|
||||
public:
|
||||
ScriptInfo() :
|
||||
engine(nullptr),
|
||||
SQ_instance(nullptr),
|
||||
author(nullptr),
|
||||
name(nullptr),
|
||||
short_name(nullptr),
|
||||
description(nullptr),
|
||||
date(nullptr),
|
||||
instance_name(nullptr),
|
||||
version(0),
|
||||
url(nullptr),
|
||||
scanner(nullptr)
|
||||
{}
|
||||
~ScriptInfo();
|
||||
|
||||
/**
|
||||
* Get the Author of the script.
|
||||
*/
|
||||
const char *GetAuthor() const { return this->author; }
|
||||
const std::string &GetAuthor() const { return this->author; }
|
||||
|
||||
/**
|
||||
* Get the Name of the script.
|
||||
*/
|
||||
const char *GetName() const { return this->name; }
|
||||
const std::string &GetName() const { return this->name; }
|
||||
|
||||
/**
|
||||
* Get the 4 character long short name of the script.
|
||||
*/
|
||||
const char *GetShortName() const { return this->short_name; }
|
||||
const std::string &GetShortName() const { return this->short_name; }
|
||||
|
||||
/**
|
||||
* Get the description of the script.
|
||||
*/
|
||||
const char *GetDescription() const { return this->description; }
|
||||
const std::string &GetDescription() const { return this->description; }
|
||||
|
||||
/**
|
||||
* Get the version of the script.
|
||||
@@ -72,27 +63,27 @@ public:
|
||||
/**
|
||||
* Get the last-modified date of the script.
|
||||
*/
|
||||
const char *GetDate() const { return this->date; }
|
||||
const std::string &GetDate() const { return this->date; }
|
||||
|
||||
/**
|
||||
* Get the name of the instance of the script to create.
|
||||
*/
|
||||
const char *GetInstanceName() const { return this->instance_name; }
|
||||
const std::string &GetInstanceName() const { return this->instance_name; }
|
||||
|
||||
/**
|
||||
* Get the website for this script.
|
||||
*/
|
||||
const char *GetURL() const { return this->url; }
|
||||
const std::string &GetURL() const { return this->url; }
|
||||
|
||||
/**
|
||||
* Get the filename of the main.nut script.
|
||||
*/
|
||||
const char *GetMainScript() const { return this->main_script.c_str(); }
|
||||
const std::string &GetMainScript() const { return this->main_script; }
|
||||
|
||||
/**
|
||||
* Get the filename of the tar the script is in.
|
||||
*/
|
||||
std::string GetTarFile() const { return this->tar_file; }
|
||||
const std::string &GetTarFile() const { return this->tar_file; }
|
||||
|
||||
/**
|
||||
* Check if a given method exists.
|
||||
@@ -122,7 +113,7 @@ public:
|
||||
/**
|
||||
* Get the description of a certain Script config option.
|
||||
*/
|
||||
const ScriptConfigItem *GetConfigItem(const std::string &name) const;
|
||||
const ScriptConfigItem *GetConfigItem(const std::string_view name) const;
|
||||
|
||||
/**
|
||||
* Set a setting.
|
||||
@@ -146,20 +137,20 @@ public:
|
||||
|
||||
protected:
|
||||
class Squirrel *engine; ///< Engine used to register for Squirrel.
|
||||
HSQOBJECT *SQ_instance; ///< The Squirrel instance created for this info.
|
||||
HSQOBJECT SQ_instance; ///< The Squirrel instance created for this info.
|
||||
ScriptConfigItemList config_list; ///< List of settings from this Script.
|
||||
|
||||
private:
|
||||
std::string main_script; ///< The full path of the script.
|
||||
std::string tar_file; ///< If, which tar file the script was in.
|
||||
const char *author; ///< Author of the script.
|
||||
const char *name; ///< Full name of the script.
|
||||
const char *short_name; ///< Short name (4 chars) which uniquely identifies the script.
|
||||
const char *description; ///< Small description of the script.
|
||||
const char *date; ///< The date the script was written at.
|
||||
const char *instance_name; ///< Name of the main class in the script.
|
||||
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.
|
||||
const char *url; ///< URL of the script.
|
||||
std::string url; ///< URL of the script.
|
||||
|
||||
class ScriptScanner *scanner; ///< ScriptScanner object that was used to scan this script info.
|
||||
};
|
||||
|
Reference in New Issue
Block a user