aboutsummaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/lobby.gd11
1 files changed, 5 insertions, 6 deletions
diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd
index 3d8401d0..d1b186f7 100644
--- a/client/menu/lobby.gd
+++ b/client/menu/lobby.gd
@@ -51,10 +51,10 @@ func initialize():
for c in map_list.get_children():
c.queue_free()
var i := 0
- for m in game.maps.keys():
+ for m in game.maps:
var b = Button.new()
- b.name = m
- b.text = "%s (%d)" % [game.maps[m]["name"], game.maps[m]["players"]]
+ b.name = m[0]
+ b.text = "%s (%d)" % [m[1]["name"], m[1]["players"]]
b.pressed.connect(select_map.bind(i))
b.focus_entered.connect(select_map.bind(i))
map_list.add_child(b)
@@ -65,12 +65,11 @@ func select_map(i: int):
if i >= map_count:
return
selected_map = i
- var k = game.maps.keys()[i]
- var map_data: Dictionary = game.maps[k]
+ var map_data: Dictionary = game.maps[i][1]
map_name_label.text = map_data["name"]
map_player_label.text = tr("%d players recommended") % map_data["players"]
map_difficulty_label.text = difficulty_names[map_data["difficulty"] - 1]
- selected_map_name = k
+ selected_map_name = game.maps[i][0]
map_list.get_child(i).grab_focus()
func update_players(player_list: Dictionary):