This commit will be reverted when the actual problem is fixed in Godot itself.
This commit is contained in:
OverloadedOrama 2020-02-04 17:33:34 +02:00
parent 79d3da8c50
commit f8ee851a6f
2 changed files with 9 additions and 9 deletions

View file

@ -72,8 +72,8 @@ func save_to_file(path : String) -> void:
file.store_string(_serialize()) file.store_string(_serialize())
file.close() file.close()
func duplicate() -> Palette: func duplicate(): # -> Palette
var copy : Palette = get_script().new() var copy = get_script().new() # : Palette
copy.name = name copy.name = name
copy.comments = comments copy.comments = comments
copy.editable = editable copy.editable = editable
@ -96,7 +96,7 @@ func _serialize() -> String:
return result return result
func deserialize(input_string : String) -> Palette: func deserialize(input_string : String): # -> Palette
var result = get_script().new() var result = get_script().new()
var result_json = JSON.parse(input_string) var result_json = JSON.parse(input_string)
@ -120,8 +120,8 @@ func deserialize(input_string : String) -> Palette:
return result return result
func load_from_file(path : String) -> Palette: func load_from_file(path : String): # -> Palette
var result : Palette = null var result = null # : Palette
var file = File.new() var file = File.new()
if file.file_exists(path): if file.file_exists(path):

View file

@ -29,7 +29,7 @@ func toDict() -> Dictionary:
} }
return result return result
func fromDict(input_dict : Dictionary) -> PaletteColor: func fromDict(input_dict : Dictionary): # -> PaletteColor
var result = get_script().new() var result = get_script().new()
result.data = input_dict.data result.data = input_dict.data
@ -37,8 +37,8 @@ func fromDict(input_dict : Dictionary) -> PaletteColor:
return result return result
func duplicate() -> PaletteColor: func duplicate(): # -> PaletteColor
var copy : PaletteColor = get_script().new() var copy = get_script().new() # : PaletteColor
copy.data = data copy.data = data
copy.name = name copy.name = name
return copy return copy