Merge pull request #72708 from KoBeWi/PackedMultilineStringArray

Fix @export_multiline for PackedStringArray
This commit is contained in:
Yuri Sizov 2023-02-06 23:01:16 +03:00 committed by GitHub
commit de4369ca4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -3696,6 +3696,13 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
} else if (export_type.builtin_type == Variant::DICTIONARY) {
variable->export_info.type = Variant::DICTIONARY;
return true;
} else if (export_type.builtin_type == Variant::PACKED_STRING_ARRAY) {
String hint_prefix = itos(Variant::STRING) + "/" + itos(variable->export_info.hint);
variable->export_info.hint = PROPERTY_HINT_TYPE_STRING;
variable->export_info.hint_string = hint_prefix + ":" + variable->export_info.hint_string;
variable->export_info.type = Variant::PACKED_STRING_ARRAY;
return true;
}
}