summaryrefslogtreecommitdiff
path: root/UI/PlayerLobby/lobby.gd
diff options
context:
space:
mode:
Diffstat (limited to 'UI/PlayerLobby/lobby.gd')
-rw-r--r--UI/PlayerLobby/lobby.gd13
1 files changed, 7 insertions, 6 deletions
diff --git a/UI/PlayerLobby/lobby.gd b/UI/PlayerLobby/lobby.gd
index a278a33..c391a11 100644
--- a/UI/PlayerLobby/lobby.gd
+++ b/UI/PlayerLobby/lobby.gd
@@ -103,7 +103,7 @@ func _on_cancel_button_pressed() -> void:
@rpc("authority", "call_local")
func start(host_settings: Dictionary):
- var packed_scene = %Maps.get_child(current_map_idx).get_meta("map_scene")
+ var packed_scene = %Maps.get_child(current_map_idx).map_scene
var scene = packed_scene.instantiate()
for setting in host_settings:
@@ -115,6 +115,8 @@ func start(host_settings: Dictionary):
premade_teams[team_name] = teams[team_name]["players"]
scene.premade_teams = premade_teams
+ multiplayer.multiplayer_peer.refuse_new_connections = true
+
Client.change_scene_to_instance(scene)
@@ -130,16 +132,15 @@ func set_map(index: int):
node.add_theme_color_override("font_color", Color(1.0, 1.0, 1.0, 0.5))
var map_button = %Maps.get_child(index)
- var thumbnail = map_button.get_meta("thumbnail")
+ var thumbnail = map_button.thumbnail
# settings
for child in %Settings.get_children():
child.free()
- if map_button.has_meta("settings"):
- current_map_scene = map_button.get_meta("map_scene").instantiate()
- var map_settings = map_button.get_meta("settings", [])
- for setting in map_settings:
+ if map_button.settings.size() > 0:
+ current_map_scene = map_button.map_scene.instantiate()
+ for setting in map_button.settings:
if not settings.has(setting):
settings[setting] = current_map_scene[setting]