## Copyright (C) 2024 Patrick_Pluto ## ## This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3. ## ## This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License along with this program. If not, see . extends Control func _on_join_pressed(): if $player_customization/name.text != "" or $player_customization/ip.text != "": Server.join_game($player_customization/ip.text) $player_customization/join.hide() $player_customization/join.disabled = true $player_customization/Timer.start() func _on_timer_timeout(): Server.send_playerinfo.rpc($player_customization/name.text, multiplayer.get_unique_id()) func _input(event): if Input.is_action_just_pressed("escape"): get_tree().change_scene_to_file("res://menus/main_menu.tscn")