Milestone 5: Private Testing Release 1

Lot's of changes.
This commit is contained in:
patrick_pluto 2024-08-05 22:35:50 +02:00
commit 40100e8fee
90 changed files with 5741 additions and 156 deletions

View file

@ -1,13 +1,16 @@
## Copyright (C) 2024 Patrick_Pluto
## freeftf
## 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 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, either version 3 of the License, or (at your option) any later version.
##
## 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.
## 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 <https://www.gnu.org/licenses/>.
## You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
extends Control
var elevated = false
func _ready():
if Server.is_server:
$player_customization/ip.hide()
@ -19,8 +22,12 @@ func _ready():
func _process(delta):
if Server.is_server:
Server.sync_playerlist.rpc($player_list/list.text)
Server.sync_playerlist.rpc($player_list/list.text, multiplayer.get_unique_id())
if Server.is_server and !elevated:
_ready()
Server.send_playerinfo($player_customization/name.text, multiplayer.get_unique_id())
elevated = true
func _on_start_pressed():
Server.start_game.rpc(Server.players)
@ -37,7 +44,6 @@ func _on_join_pressed():
$player_customization/join.disabled = true
$player_customization/name.editable = false
$player_customization/ip.editable = false
while $player_list/list.text == "":
await get_tree().create_timer(0.001).timeout
await get_tree().create_timer(1).timeout
Server.send_playerinfo.rpc($player_customization/name.text, multiplayer.get_unique_id())