From f8ee851a6f8f20a84a21369089643df7fb0fdbe5 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 4 Feb 2020 17:33:34 +0200 Subject: [PATCH] Fixes #141 This commit will be reverted when the actual problem is fixed in Godot itself. --- Scripts/Palette/Palette.gd | 10 +++++----- Scripts/Palette/PaletteColor.gd | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Scripts/Palette/Palette.gd b/Scripts/Palette/Palette.gd index f8ece9add..5c73844b5 100644 --- a/Scripts/Palette/Palette.gd +++ b/Scripts/Palette/Palette.gd @@ -72,8 +72,8 @@ func save_to_file(path : String) -> void: file.store_string(_serialize()) file.close() -func duplicate() -> Palette: - var copy : Palette = get_script().new() +func duplicate(): # -> Palette + var copy = get_script().new() # : Palette copy.name = name copy.comments = comments copy.editable = editable @@ -96,7 +96,7 @@ func _serialize() -> String: return result -func deserialize(input_string : String) -> Palette: +func deserialize(input_string : String): # -> Palette var result = get_script().new() var result_json = JSON.parse(input_string) @@ -120,8 +120,8 @@ func deserialize(input_string : String) -> Palette: return result -func load_from_file(path : String) -> Palette: - var result : Palette = null +func load_from_file(path : String): # -> Palette + var result = null # : Palette var file = File.new() if file.file_exists(path): diff --git a/Scripts/Palette/PaletteColor.gd b/Scripts/Palette/PaletteColor.gd index 806f7fd57..06673311a 100644 --- a/Scripts/Palette/PaletteColor.gd +++ b/Scripts/Palette/PaletteColor.gd @@ -29,7 +29,7 @@ func toDict() -> Dictionary: } return result -func fromDict(input_dict : Dictionary) -> PaletteColor: +func fromDict(input_dict : Dictionary): # -> PaletteColor var result = get_script().new() result.data = input_dict.data @@ -37,8 +37,8 @@ func fromDict(input_dict : Dictionary) -> PaletteColor: return result -func duplicate() -> PaletteColor: - var copy : PaletteColor = get_script().new() +func duplicate(): # -> PaletteColor + var copy = get_script().new() # : PaletteColor copy.data = data copy.name = name - return copy \ No newline at end of file + return copy