Change: [Script] Improve ScriptText validation error messages
This commit is contained in:
@@ -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/
|
||||
|
Reference in New Issue
Block a user