mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
Fix warnings
This commit is contained in:
parent
d57674acca
commit
4d97430d44
7 changed files with 15 additions and 18 deletions
|
@ -102,9 +102,12 @@ func set_energy(new_energy):
|
||||||
|
|
||||||
func set_id(new_id):
|
func set_id(new_id):
|
||||||
id = new_id
|
id = new_id
|
||||||
var texture = load("res://cards/%s.svg" % new_id)
|
var art_path = "res://cards/%s.svg" % new_id
|
||||||
if texture:
|
var file = File.new()
|
||||||
$Image.texture = texture
|
if file.file_exists(art_path):
|
||||||
|
var texture = load(art_path)
|
||||||
|
if texture:
|
||||||
|
$Image.texture = texture
|
||||||
|
|
||||||
func move_back():
|
func move_back():
|
||||||
position = _home_position
|
position = _home_position
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
func _process(delta):
|
func _process(_delta):
|
||||||
global_position = get_global_mouse_position()
|
global_position = get_global_mouse_position()
|
||||||
|
|
|
@ -100,8 +100,8 @@ func update():
|
||||||
# is_visible = true
|
# is_visible = true
|
||||||
#visible = is_visible
|
#visible = is_visible
|
||||||
|
|
||||||
func get_file_status(file_path, shell, idx):
|
func get_file_status(file_path, the_shell, idx):
|
||||||
var file_status = shell.run("git status -s '%s'" % file_path)
|
var file_status = the_shell.run("git status -s '%s'" % file_path)
|
||||||
if file_status.length()>0:
|
if file_status.length()>0:
|
||||||
match file_status[idx]:
|
match file_status[idx]:
|
||||||
"D":
|
"D":
|
||||||
|
|
|
@ -54,5 +54,5 @@ func _set_status(new_status):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _popup_menu_pressed(id):
|
func _popup_menu_pressed(_id):
|
||||||
emit_signal("deleted", self)
|
emit_signal("deleted", self)
|
||||||
|
|
|
@ -323,13 +323,3 @@ func _on_mouse_entered():
|
||||||
|
|
||||||
func _on_mouse_exited():
|
func _on_mouse_exited():
|
||||||
mouse_inside = false
|
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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,7 @@ var output
|
||||||
var exit_code
|
var exit_code
|
||||||
var crash_on_fail = true
|
var crash_on_fail = true
|
||||||
var thread
|
var thread
|
||||||
|
|
||||||
|
func _unused():
|
||||||
|
# This is just to suppress a warning about the signal never being emitted.
|
||||||
|
emit_signal("done")
|
||||||
|
|
|
@ -16,7 +16,7 @@ func _process(_delta):
|
||||||
if _server.is_connection_available():
|
if _server.is_connection_available():
|
||||||
_client_connection = _server.take_connection()
|
_client_connection = _server.take_connection()
|
||||||
var length = _client_connection.get_u32()
|
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()
|
length = _client_connection.get_u32()
|
||||||
var content = _client_connection.get_string(length)
|
var content = _client_connection.get_string(length)
|
||||||
|
|
Loading…
Reference in a new issue