From 5f375377f77ce425389fb750cb0d6f4f42d23873 Mon Sep 17 00:00:00 2001 From: Sebastian Morr Date: Thu, 24 Sep 2020 11:15:00 +0200 Subject: [PATCH] Fix all warnings --- main.gd | 8 ++++---- main.tscn | 4 ++-- terminal.gd | 4 +++- text_editor.gd | 1 - 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/main.gd b/main.gd index e8c0575..a08faee 100644 --- a/main.gd +++ b/main.gd @@ -11,10 +11,10 @@ onready var terminal = get_node(terminal_path) onready var input = terminal.input onready var output = terminal.output -export(NodePath) var goal_repository_path -export(NodePath) var active_repository_path -onready var goal_repository = get_node(goal_repository_path) -onready var active_repository = get_node(active_repository_path) +export(NodePath) var goal_repository_path_2 +export(NodePath) var active_repository_path_2 +onready var goal_repository = get_node(goal_repository_path_2) +onready var active_repository = get_node(active_repository_path_2) export(NodePath) var level_select_path onready var level_select = get_node(level_select_path) diff --git a/main.tscn b/main.tscn index 797002b..7e88fc5 100644 --- a/main.tscn +++ b/main.tscn @@ -30,8 +30,8 @@ __meta__ = { "_edit_use_anchors_": false } terminal_path = NodePath("HBoxContainer/RightSide/Terminal") -goal_repository_path = NodePath("HBoxContainer/Repositories/GoalRepository") -active_repository_path = NodePath("HBoxContainer/Repositories/ActiveRepository") +goal_repository_path_2 = NodePath("HBoxContainer/Repositories/GoalRepository") +active_repository_path_2 = NodePath("HBoxContainer/Repositories/ActiveRepository") level_select_path = NodePath("HBoxContainer/RightSide/TopStuff/Menu/LevelSelect") next_level_button_path = NodePath("HBoxContainer/RightSide/TopStuff/Menu/NextLevelButton") level_name_path = NodePath("HBoxContainer/RightSide/TopStuff/LevelPanel/LevelName") diff --git a/terminal.gd b/terminal.gd index c6294c4..f5e40d1 100644 --- a/terminal.gd +++ b/terminal.gd @@ -25,7 +25,9 @@ func _ready(): command_dropdown.get_popup().add_item(command) command_dropdown.get_popup().connect("id_pressed", self, "load_command") - $TextEditor.connect("hide", self, "editor_closed") + var error = $TextEditor.connect("hide", self, "editor_closed") + if error != OK: + push_error("Could not connect TextEditor's hide signal") input.grab_focus() func _input(event): diff --git a/text_editor.gd b/text_editor.gd index 5c4e58f..b087bdc 100644 --- a/text_editor.gd +++ b/text_editor.gd @@ -15,7 +15,6 @@ func _process(_delta): _client_connection = _server.take_connection() var length = _client_connection.get_u8() var filename = _client_connection.get_string(length) - var regex = RegEx.new() filename = filename.replace("/tmp/active/", "") open(filename)