Merge branch 'master' into jgrpp

# Conflicts:
#	src/script/api/script_company.cpp
#	src/script/api/script_date.cpp
#	src/script/api/script_date.hpp
#	src/script/api/script_gamesettings.cpp
#	src/script/api/script_order.hpp
#	src/script/api/script_town.cpp
#	src/script/api/script_window.cpp
This commit is contained in:
Jonathan G Rennison
2023-03-06 01:05:43 +00:00
78 changed files with 609 additions and 511 deletions

View File

@@ -354,6 +354,20 @@ const StringParams &GetGameStringParams(uint id)
return _current_data->string_params[id];
}
/**
* Get the name of a particular game string.
* @param id The ID of the game string.
* @return The name of the string.
*/
const std::string &GetGameStringName(uint id)
{
/* The name for STR_UNDEFINED. */
static const std::string undefined = "STR_UNDEFINED";
if (id >= _current_data->string_names.size()) return undefined;
return _current_data->string_names[id];
}
/**
* Register the current translation to the Squirrel engine.
* @param engine The engine to update/