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

@@ -393,6 +393,13 @@ void writeTerrainToXml(ticpp::Printer&& data, cScenario& scenario) {
data.OpenElement("editor");
if(ter.shortcut_key > 0 && ter.shortcut_key < '\x7f')
data.PushElement("shortcut", ter.shortcut_key);
if(ter.frill_for >= 0) {
data.OpenElement("frill");
if(ter.frill_chance != 10)
data.PushAttribute("chance", ter.frill_chance);
data.PushText(ter.frill_for);
data.CloseElement("frill");
}
if(ter.obj_num > 0) {
data.OpenElement("object");
data.PushElement("num", ter.obj_num);