diff --git a/scenes/card.gd b/scenes/card.gd index 6f3168f..3738bff 100644 --- a/scenes/card.gd +++ b/scenes/card.gd @@ -102,9 +102,12 @@ func set_energy(new_energy): func set_id(new_id): id = new_id - var texture = load("res://cards/%s.svg" % new_id) - if texture: - $Image.texture = texture + var art_path = "res://cards/%s.svg" % new_id + var file = File.new() + if file.file_exists(art_path): + var texture = load(art_path) + if texture: + $Image.texture = texture func move_back(): position = _home_position diff --git a/scenes/cursor.gd b/scenes/cursor.gd index 7f7f641..5cc7be4 100644 --- a/scenes/cursor.gd +++ b/scenes/cursor.gd @@ -1,4 +1,4 @@ extends Node2D -func _process(delta): +func _process(_delta): global_position = get_global_mouse_position() diff --git a/scenes/file_browser.gd b/scenes/file_browser.gd index 98b543d..d1b34d7 100644 --- a/scenes/file_browser.gd +++ b/scenes/file_browser.gd @@ -100,8 +100,8 @@ func update(): # is_visible = true #visible = is_visible -func get_file_status(file_path, shell, idx): - var file_status = shell.run("git status -s '%s'" % file_path) +func get_file_status(file_path, the_shell, idx): + var file_status = the_shell.run("git status -s '%s'" % file_path) if file_status.length()>0: match file_status[idx]: "D": diff --git a/scenes/file_browser_item.gd b/scenes/file_browser_item.gd index ff3910c..1d5285d 100644 --- a/scenes/file_browser_item.gd +++ b/scenes/file_browser_item.gd @@ -54,5 +54,5 @@ func _set_status(new_status): -func _popup_menu_pressed(id): +func _popup_menu_pressed(_id): emit_signal("deleted", self) diff --git a/scenes/repository.gd b/scenes/repository.gd index f72ffb8..9b2b637 100644 --- a/scenes/repository.gd +++ b/scenes/repository.gd @@ -323,13 +323,3 @@ func _on_mouse_entered(): func _on_mouse_exited(): mouse_inside = false - -func close_all_file_browsers(): - var all = all_objects() - - for o in objects.values(): - if o.type == "commit": - o.file_browser.close() - o.file_browser.visible = false - - diff --git a/scenes/shell_command.gd b/scenes/shell_command.gd index c02c4d5..7e65794 100644 --- a/scenes/shell_command.gd +++ b/scenes/shell_command.gd @@ -8,3 +8,7 @@ var output var exit_code var crash_on_fail = true var thread + +func _unused(): + # This is just to suppress a warning about the signal never being emitted. + emit_signal("done") diff --git a/scenes/text_editor.gd b/scenes/text_editor.gd index 974b8d7..2018eec 100644 --- a/scenes/text_editor.gd +++ b/scenes/text_editor.gd @@ -16,7 +16,7 @@ func _process(_delta): if _server.is_connection_available(): _client_connection = _server.take_connection() var length = _client_connection.get_u32() - var filename = _client_connection.get_string(length) + var _filename = _client_connection.get_string(length) length = _client_connection.get_u32() var content = _client_connection.get_string(length)