diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-06-19 05:54:03 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-06-19 05:54:03 +0200 |
commit | 514624c58e45668c138640234a0adaaa49c3e68d (patch) | |
tree | 78a803a19a9af31ecbb244e995c46f630046b279 /scene | |
parent | 4366f8bcd455714a5cd29374726d83b674ff0430 (diff) |
Remove spaces in `SubResource()/ExtResource/Resource()` in text resources
These spaces are not needed for the file to be successfully parsed.
Other types such as Vector3 are no longer serialized with spaces
after the opening parenthesis and before the closing parenthesis,
so this is also more consistent.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 9d586c6f03..0320585b5a 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1564,17 +1564,17 @@ String ResourceFormatSaverTextInstance::_write_resources(void *ud, const Ref<Res String ResourceFormatSaverTextInstance::_write_resource(const Ref<Resource> &res) { if (external_resources.has(res)) { - return "ExtResource( \"" + external_resources[res] + "\" )"; + return "ExtResource(\"" + external_resources[res] + "\")"; } else { if (internal_resources.has(res)) { - return "SubResource( \"" + internal_resources[res] + "\" )"; + return "SubResource(\"" + internal_resources[res] + "\")"; } else if (!res->is_built_in()) { if (res->get_path() == local_path) { //circular reference attempt return "null"; } //external resource String path = relative_paths ? local_path.path_to_file(res->get_path()) : res->get_path(); - return "Resource( \"" + path + "\" )"; + return "Resource(\"" + path + "\")"; } else { ERR_FAIL_V_MSG("null", "Resource was not pre cached for the resource section, bug?"); //internal resource |