Generalize the editor's terrain frills mechanism

This commit is contained in:
2015-09-26 15:05:49 -04:00
parent 06930e30d4
commit ab232bb31a
10 changed files with 74 additions and 17 deletions

View File

@@ -1008,6 +1008,9 @@ void readTerrainFromXml(ticpp::Document&& data, cScenario& scenario) {
val.clear();
edit->GetText(&val, false);
the_ter.shortcut_key = val.empty() ? 0 : val[0];
} else if(type == "frill") {
edit->GetText(&the_ter.frill_for);
edit->GetAttributeOrDefault("chance", &the_ter.frill_chance, 10);
} else if(type == "object") {
std::set<std::string> reqs = {"num", "pos", "size"};
Iterator<Element> obj;