Skip to content

Commit

Permalink
preserve [story] on random scenario generation
Browse files Browse the repository at this point in the history
this was the previous behaviour. That also HttT 17 expects.
  • Loading branch information
gfgtdf committed Jun 16, 2014
1 parent b5b287a commit 81161da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/saved_game.cpp
Expand Up @@ -318,8 +318,14 @@ void saved_game::expand_random_scenario()
LOG_NG << "randomly generating scenario...\n";
const cursor::setter cursor_setter(cursor::WAIT);

starting_pos_ = random_generate_scenario(starting_pos_["scenario_generation"],
config scenario_new = random_generate_scenario(starting_pos_["scenario_generation"],
starting_pos_.child("generator"));
//Preserve "story" form the scenario toplevel.
BOOST_FOREACH(config& story, starting_pos_.child_range("story"))
{
scenario_new.add_child("story", story);
}
starting_pos_ = scenario_new;
}
//it looks like we support a map= where map=filename equals more or less map_data={filename}
if(starting_pos_["map_data"].empty() && starting_pos_["map"] != "") {
Expand Down

0 comments on commit 81161da

Please sign in to comment.