refactor: reorganize networking and data bridge scenes

* Move networking scenes under `controllers/networking`
* Move data bridge scene under `scenes/data`
* Rename the bridge node to `data_bridge`
* Update lobby UI scene path
* Remove unused lobby RPC node/script
This commit is contained in:
2026-08-12 16:52:16 -05:00
parent 84b3600044
commit 09369d3dd4
21 changed files with 14 additions and 21 deletions

View File

@@ -0,0 +1,31 @@
class_name GameServer extends ServerNetworking
func _ready() -> void:
setup_signals()
func setup_signals() -> void:
pass
func server_client_connected(id: int) -> void:
push_warning("Client Connected... ID: ", id)
if not Globals.game_data.client1:
Globals.game_data.client1 = id
elif not Globals.game_data.client2:
Globals.game_data.client2 = id
if Globals.game_data.client1 and Globals.game_data.client2:
Globals.multiplayer_data.init_match()
# TODO: Add watch match feature...
func server_client_disconnected(id: int) -> void:
push_warning("Client Disconnected... ID: ", id)
MessageBus.emit_propagation_clients_only.rpc("game_peer_disconnected", null)
await get_tree().create_timer(5.0).timeout
# NOTE: Quits game server instance.
get_tree().quit()