Skip to content

Commit

Permalink
editor: don't write default values when saving a scenario
Browse files Browse the repository at this point in the history
(cherry-picked from commit 15c3312)
  • Loading branch information
gfgtdf committed Oct 7, 2018
1 parent 4500920 commit 40230ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/editor/map/map_context.cpp
Expand Up @@ -481,6 +481,10 @@ config map_context::to_config()

scenario.append(tod_manager_->to_config());
scenario.remove_attribute("turn_at");
scenario.remove_attribute("it_is_a_new_turn");
if(scenario["turns"].to_int() == -1) {
scenario.remove_attribute("turns");
}

scenario["map_data"] = map_.write();

Expand Down

0 comments on commit 40230ca

Please sign in to comment.