add license, move folders

This commit is contained in:
Nordup 2024-05-04 00:14:24 +04:00
parent 185cc74060
commit 271c4a46a1
132 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,31 @@
extends CommandSync
@export var gate_events: GateEvents
@export var command_events: CommandEvents
func _ready() -> void:
gate_events.gate_entered.connect(bind)
execute_function = _execute_function
func _physics_process(_delta: float) -> void:
receive_commands()
func _execute_function(command: Command) -> Variant:
Debug.logclr("Recieved command: " + command.name + ". Args: " + str(command.args), Color.SANDY_BROWN)
match command.name:
"send_filehandle":
if command.args.size() != 1: Debug.logerr("Arg count should be 1"); return ""
command_events.send_filehandle_emit(command.args[0])
"set_mouse_mode":
if command.args.size() != 1: Debug.logerr("Arg count should be 1"); return ""
command_events.set_mouse_mode_emit(command.args[0])
"open_gate":
if command.args.size() != 1: Debug.logerr("Arg count should be 1"); return ""
var url = Url.join(gate_events.current_gate_url, command.args[0])
gate_events.open_gate_emit(url)
_:
Debug.logerr("Command %s not implemented" % [command.name])
return ""