display the scenario id for unknown scenarios in the lobby

This commit is contained in:
Gunter Labes 2007-10-02 21:53:16 +00:00
parent 3c2f7dcd39
commit 7eeb584f54
3 changed files with 5 additions and 3 deletions

View file

@ -41,6 +41,7 @@ Version 1.3.8+svn:
* fixed a server side bug with could cause invalid utf-8 being send to a
client.
* display the era id for not installed eras in the lobby.
* display the scenario id for unknown scenarios in the lobby.
* units:
* balancing changes:
* created undead variations for the 'bat' and 'gryphon' race

View file

@ -45,6 +45,7 @@ Version 1.3.8+svn:
* Minimum number of turns reduced to 1.
* Fixed a crash if the client recieves invalid utf-8.
* Display the era id for not installed eras in the lobby.
* Display the scenario id for unknown scenarios in the lobby.
* Unit changes and balancing
* Created undead variations for the 'bat' and 'gryphon' race.

View file

@ -412,8 +412,6 @@ void gamebrowser::set_game_items(const config& cfg, const config& game_config)
games_.back().map_info += " ";
if((**game)["mp_scenario"] != "" && map_hashes_) {
const config* level_cfg = game_config.find_child("generic_multiplayer", "id", (**game)["mp_scenario"]);
if(level_cfg == NULL)
level_cfg = game_config.find_child("multiplayer", "id", (**game)["mp_scenario"]);
if(level_cfg) {
games_.back().map_info += level_cfg->get_attribute("name");
const std::string& hash = (**game)["hash"];
@ -430,7 +428,9 @@ void gamebrowser::set_game_items(const config& cfg, const config& game_config)
verified = false;
}
} else {
games_.back().map_info += _("Unknown scenario");
utils::string_map symbols;
symbols["scenario_id"] = (**game)["mp_scenario"];
games_.back().map_info += vgettext("Unknown scenario: $scenario_id", symbols);
verified = false;
}
} else {