GDScript: Add @export_storage annotation

This commit is contained in:
Danil Alexeev
2023-12-19 20:56:30 +03:00
parent 1f5d4a62e9
commit 3a3a2011f4
16 changed files with 178 additions and 109 deletions

View File

@@ -4,14 +4,13 @@ enum MyEnum {A, B, C}
const Utils = preload("../../utils.notest.gd")
@export var x1 = MyEnum
@export var x2 = MyEnum.A
@export var x3 := MyEnum
@export var x4 := MyEnum.A
@export var x5: MyEnum
@export var test_1 = MyEnum
@export var test_2 = MyEnum.A
@export var test_3 := MyEnum
@export var test_4 := MyEnum.A
@export var test_5: MyEnum
func test():
for property in get_property_list():
if property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE:
print(Utils.get_property_signature(property))
print(" ", Utils.get_property_additional_info(property))
if str(property.name).begins_with("test_"):
Utils.print_property_extended_info(property)

View File

@@ -1,11 +1,11 @@
GDTEST_OK
@export var x1: Dictionary
var test_1: Dictionary
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
@export var x2: TestExportEnumAsDictionary.MyEnum
var test_2: TestExportEnumAsDictionary.MyEnum
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
@export var x3: Dictionary
var test_3: Dictionary
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
@export var x4: TestExportEnumAsDictionary.MyEnum
var test_4: TestExportEnumAsDictionary.MyEnum
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
@export var x5: TestExportEnumAsDictionary.MyEnum
var test_5: TestExportEnumAsDictionary.MyEnum
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM