1
0
mirror of https://github.com/Relintai/broken_seals.git synced 2024-12-28 13:27:10 +01:00

Add uv parameter to get_value, and call emit_changed() in get_default_value in the universal property.

This commit is contained in:
Relintai 2021-10-06 00:53:19 +02:00
parent 04c3098390
commit cca43432f3

View File

@ -22,7 +22,7 @@ export(Resource) var obj : Resource
export(String) var getter : String
export(Array) var params : Array
func get_value():
func get_value(uv : Vector2):
if !obj:
if default_type == MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_INT:
return default_int
@ -38,9 +38,9 @@ func get_value():
return null
if params.size() == 0:
return obj.call(getter)
return obj.call(getter, uv)
else:
return obj.call(getter, params)
return obj.call(getter, uv, params)
func get_default_value():
if default_type == MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_INT:
@ -65,3 +65,5 @@ func set_default_value(val):
default_vector3 = val
elif default_type == MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR:
default_color = val
emit_changed()