diff options
| author | tpart <tpart120@proton.me> | 2024-08-15 20:11:56 +0200 | 
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2024-08-15 20:12:03 +0200 | 
| commit | 6a68bbfabd914e1b1c9d552a18089f9b3a14ca86 (patch) | |
| tree | 291431333e8a64ba4ccfd520305dcf4751f6e39f /client/menu | |
| parent | 967d3a0d70aa0b002373c593c7b31168c24d0a19 (diff) | |
| download | hurrycurry-6a68bbfabd914e1b1c9d552a18089f9b3a14ca86.tar hurrycurry-6a68bbfabd914e1b1c9d552a18089f9b3a14ca86.tar.bz2 hurrycurry-6a68bbfabd914e1b1c9d552a18089f9b3a14ca86.tar.zst | |
Fix: Game crash on join; Update protocol
Diffstat (limited to 'client/menu')
| -rw-r--r-- | client/menu/lobby.gd | 11 | 
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): | 
