A few more scenario read tests

- Introduce enum for scenario content rating
This commit is contained in:
2015-07-07 18:58:35 -04:00
parent 2218513aa5
commit 137a3aa5d4
25 changed files with 208 additions and 34 deletions

View File

@@ -138,12 +138,7 @@ void writeScenarioToXml(ticpp::Printer&& data, cScenario& scenario) {
}
data.CloseElement("text");
data.OpenElement("ratings");
switch(scenario.rating) {
case 0: data.PushElement("content", "g"); break;
case 1: data.PushElement("content", "pg"); break;
case 2: data.PushElement("content", "r"); break;
case 3: data.PushElement("content", "nc17"); break;
}
data.PushElement("content", scenario.rating);
data.PushElement("difficulty", scenario.difficulty + 1);
data.CloseElement("ratings");
data.OpenElement("flags");