Commit 5302c49c authored by talljosh's avatar talljosh

Move StandardMap to the top of the list of map options if it's available.

parent fc9f0fe22638
v1.15.1
* Added a server option for requiring all players to select ‘Ready’ before starting a game instead of 70% of players. This is useful for tournament matches.
* Added a server option to select what kind of bot is used for balance bot and in Humans vs. Machines games.
* If no bot type is selected for a Humans vs. Machines game, SilverBot is now used for Trosnoth matches played on a Regulation 1v1 map.
* The list of available games now only allows 2 seconds to resolve DNS names for trusted servers. This means discovered LAN servers often appear sooner.
* Moved ‘Regulation Standard’ map type to the top of the selection list whenever it’s available.
* Fixed server bug were the location of replays was not correctly stored and displayed.
* Fixed bug where missing stationary points in the pathfinding database could result in server and clients getting out of sync.
* Fixed concurrency issue when displaying messages like ‘Joining game…’ which sometimes resulted in the wrong message being briefly shown.
......
......@@ -364,7 +364,13 @@ class MapMenu(SelectionMenu):
map_code = player.suggested_map
counts[map_code] = counts.get(map_code, 0) + 1
for code, name in sorted(options.items(), key=lambda i: i[1]):
sorted_options = sorted(options.items(), key=lambda i: i[1])
if 'StandardMap' in options:
item = ('StandardMap', options['StandardMap'])
sorted_options.remove(item)
sorted_options.insert(0, item)
for code, name in sorted_options:
item = CountedMenuItem(name, code)
item.set_count(counts.get(code, 0))
item.set_selected(self.gvm.player.suggested_map == code)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment