diff --git a/addons/func_godot/src/core/parser.gd b/addons/func_godot/src/core/parser.gd index 4a2a587..4d2a978 100644 --- a/addons/func_godot/src/core/parser.gd +++ b/addons/func_godot/src/core/parser.gd @@ -297,9 +297,12 @@ func parse_map_data(map_file: String, map_settings: FuncGodotMapSettings) -> _Pa properties[property] = prop_default[prop_default.keys().front()] else: properties[property] = 0 - # Materials, Shaders, and Sounds + # Materials, Shaders, Sounds, and special property types elif prop_default is Resource: - properties[property] = prop_default.resource_path + if prop_default is FuncGodotTargetSourceProperty: + properties[property] = "" + else: + properties[property] = prop_default.resource_path # Target Destination and Target Source elif prop_default is NodePath or prop_default is Object or prop_default == null: properties[property] = "" diff --git a/addons/func_godot/src/fgd/func_godot_fgd_entity_class.gd b/addons/func_godot/src/fgd/func_godot_fgd_entity_class.gd index de967a4..5b235b0 100644 --- a/addons/func_godot/src/fgd/func_godot_fgd_entity_class.gd +++ b/addons/func_godot/src/fgd/func_godot_fgd_entity_class.gd @@ -215,6 +215,9 @@ func build_def_text(target_editor: FuncGodotFGDFile.FuncGodotTargetMapEditors = prop_type = "decal" elif value is AudioStream: prop_type = "sound" + elif value is FuncGodotTargetSourceProperty: + prop_type = "target_source" + prop_val = "\"\"" else: prop_type = "target_source" prop_val = "\"\"" diff --git a/addons/func_godot/src/fgd/func_godot_target_source_property.gd b/addons/func_godot/src/fgd/func_godot_target_source_property.gd new file mode 100644 index 0000000..c9de206 --- /dev/null +++ b/addons/func_godot/src/fgd/func_godot_target_source_property.gd @@ -0,0 +1,3 @@ +class_name FuncGodotTargetSourceProperty +extends Resource +## Special resource used to indicate that an FGD entity property is of type "target_source" \ No newline at end of file diff --git a/addons/func_godot/src/fgd/func_godot_target_source_property.gd.uid b/addons/func_godot/src/fgd/func_godot_target_source_property.gd.uid new file mode 100644 index 0000000..787624c --- /dev/null +++ b/addons/func_godot/src/fgd/func_godot_target_source_property.gd.uid @@ -0,0 +1 @@ +uid://dkhtfq0fu81pm