Fix all warnings and errors

This commit is contained in:
Sebastian Morr 2020-09-08 20:26:14 +02:00
parent 3460e37d82
commit 2711d6ed8b
5 changed files with 14 additions and 10 deletions

View file

@ -7,7 +7,7 @@ var repository: Container
func _ready():
pass
func _process(delta):
func _process(_delta):
if repository and repository.objects.has(target):
var t = repository.objects[target]
#print(t)

View file

@ -87,11 +87,11 @@ func construct_repo(script, path):
shell.run("mkdir " + path)
shell.cd(path)
shell.run("git init")
var output = shell.run("source "+script_path)
var o = shell.run("source "+script_path)
if game.debug:
print(output)
print(o)
func _process(delta):
func _process(_delta):
if server.is_connection_available():
client_connection = server.take_connection()
read_commit_message()

View file

@ -14,7 +14,7 @@ var arrow = preload("res://arrow.tscn")
func _ready():
pass
func _process(delta):
func _process(_delta):
if held:
global_position = get_global_mouse_position()
@ -83,7 +83,7 @@ func _on_unhover():
$Content.visible = false
$ID.visible = false
func _input_event(viewport, event, shape_idx):
func _input_event(_viewport, event, _shape_idx):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT:
held = event.pressed

View file

@ -11,7 +11,7 @@ var objects = {}
func _ready():
pass
func _process(delta):
func _process(_delta):
if path:
apply_forces()
@ -184,9 +184,10 @@ func commit_parents(id):
func all_refs():
var refs = []
for line in git("show-ref", true):
# If there are no refs, show-ref will have exit code 1. We don't care.
for line in git("show-ref || true", true):
line = line.split(" ")
var id = line[0]
var _id = line[0]
var name = line[1]
refs.push_back(name)
return refs

View file

@ -46,9 +46,12 @@ func _exec(command, args=[]):
print("exec: %s [%s]" % [command, PoolStringArray(args).join(", ")])
var output = []
OS.execute(command, args, true, output, true)
var exit_code = OS.execute(command, args, true, output, true)
output = output[0]
if exit_code != 0:
push_error("OS.execute failed: %s [%s] Output: %s" % [command, PoolStringArray(args).join(", "), output])
if debug:
print(output)