diff --git a/project/the_gates/scripts/gate_jump.gd b/project/the_gates/scripts/gate_jump.gd deleted file mode 100644 index 1d94931..0000000 --- a/project/the_gates/scripts/gate_jump.gd +++ /dev/null @@ -1,21 +0,0 @@ -extends Node - -@export var gate_events: GateEvents - -var gate_jump: String = "gate_jump" - - -func _ready() -> void: - gate_events.gate_entered.connect(connect_to_gate_signals) - - -func connect_to_gate_signals() -> void: - var root_node = get_child(0) - if root_node == null: Debug.logerr("Gate root node is null"); return - if root_node.has_signal(gate_jump): - root_node.connect(gate_jump, on_gate_jump) - - -func on_gate_jump(url: String) -> void: - url = Url.join(gate_events.current_gate_url, url) - gate_events.open_gate_emit(url) diff --git a/project/the_gates/scripts/loading/pack_loader.gd b/project/the_gates/scripts/loading/pack_loader.gd index 8f4015c..d8275cd 100644 --- a/project/the_gates/scripts/loading/pack_loader.gd +++ b/project/the_gates/scripts/loading/pack_loader.gd @@ -17,7 +17,6 @@ func create_process(_gate: Gate) -> void: var sandbox_path = "/home/nordup/projects/godot/the-gates-folder/the-gates/bin/godot.linuxbsd.editor.dev.sandbox.x86_64.llvm" var pack_file = ProjectSettings.globalize_path(gate.resource_pack) - var main_pid = OS.get_process_id() var args = [ "--main-pack", pack_file, diff --git a/project/the_gates/scripts/sandbox/command_sync.gd b/project/the_gates/scripts/sandbox/command_sync.gd index 061787a..e4e30d6 100644 --- a/project/the_gates/scripts/sandbox/command_sync.gd +++ b/project/the_gates/scripts/sandbox/command_sync.gd @@ -9,7 +9,7 @@ func _ready() -> void: execute_function = _execute_function -func _physics_process(delta: float) -> void: +func _physics_process(_delta: float) -> void: receive_commands() @@ -21,6 +21,10 @@ func _execute_function(command: Command) -> Variant: "set_mouse_mode": if command.args.size() != 1: push_error("Arg count should be 1"); return "" command_events.set_mouse_mode_emit(command.args[0]) + "open_gate": + if command.args.size() != 1: push_error("Arg count should be 1"); return "" + var url = Url.join(gate_events.current_gate_url, command.args[0]) + gate_events.open_gate_emit(url) _: print("Command %s not implemented" % [command.name]) return ""