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.
This commit is contained in:
parent
4366f8bcd4
commit
514624c58e
1 changed files with 3 additions and 3 deletions
|
@ -1564,17 +1564,17 @@ String ResourceFormatSaverTextInstance::_write_resources(void *ud, const Ref<Res
|
||||||
|
|
||||||
String ResourceFormatSaverTextInstance::_write_resource(const Ref<Resource> &res) {
|
String ResourceFormatSaverTextInstance::_write_resource(const Ref<Resource> &res) {
|
||||||
if (external_resources.has(res)) {
|
if (external_resources.has(res)) {
|
||||||
return "ExtResource( \"" + external_resources[res] + "\" )";
|
return "ExtResource(\"" + external_resources[res] + "\")";
|
||||||
} else {
|
} else {
|
||||||
if (internal_resources.has(res)) {
|
if (internal_resources.has(res)) {
|
||||||
return "SubResource( \"" + internal_resources[res] + "\" )";
|
return "SubResource(\"" + internal_resources[res] + "\")";
|
||||||
} else if (!res->is_built_in()) {
|
} else if (!res->is_built_in()) {
|
||||||
if (res->get_path() == local_path) { //circular reference attempt
|
if (res->get_path() == local_path) { //circular reference attempt
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
//external resource
|
//external resource
|
||||||
String path = relative_paths ? local_path.path_to_file(res->get_path()) : res->get_path();
|
String path = relative_paths ? local_path.path_to_file(res->get_path()) : res->get_path();
|
||||||
return "Resource( \"" + path + "\" )";
|
return "Resource(\"" + path + "\")";
|
||||||
} else {
|
} else {
|
||||||
ERR_FAIL_V_MSG("null", "Resource was not pre cached for the resource section, bug?");
|
ERR_FAIL_V_MSG("null", "Resource was not pre cached for the resource section, bug?");
|
||||||
//internal resource
|
//internal resource
|
||||||
|
|
Loading…
Reference in a new issue