Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	src/industry_cmd.cpp
#	src/industry_cmd.h
#	src/network/core/http_curl.cpp
#	src/network/core/tcp_http.cpp
#	src/network/core/tcp_http.h
#	src/network/network_content.h
#	src/script/api/script_goal.cpp
#	src/script/api/script_industry.cpp
#	src/script/api/script_league.cpp
#	src/script/api/script_story_page.cpp
#	src/script/api/script_town.cpp
#	src/train.h
#	src/train_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2023-03-04 01:11:51 +00:00
77 changed files with 1197 additions and 761 deletions

View File

@@ -21,17 +21,17 @@ class Text : public ScriptObject {
public:
/**
* Convert a ScriptText to a normal string.
* @return A string (in a static buffer), or nullptr.
* @return A string.
* @api -all
*/
virtual const char *GetEncodedText() = 0;
virtual const std::string GetEncodedText() = 0;
/**
* Convert a #ScriptText into a decoded normal string.
* @return A string (in a static buffer), or nullptr.
* @return A string.
* @api -all
*/
const char *GetDecodedText();
const std::string GetDecodedText();
};
/**
@@ -41,11 +41,10 @@ public:
class RawText : public Text {
public:
RawText(const char *text);
~RawText();
const char *GetEncodedText() override { return this->text; }
const std::string GetEncodedText() override { return this->text; }
private:
const char *text;
const std::string text;
};
/**
@@ -125,7 +124,7 @@ public:
/**
* @api -all
*/
virtual const char *GetEncodedText();
virtual const std::string GetEncodedText();
private:
StringID string;