Some test cases for saving scenarios, and fix some bugs they revealed

- Fix variable town entry and saved item rects not being saved if they referenced an invalid town
- Fix "blank" scenario timers being saved
- Fix junk data appearing in timers
- Output operators for location and rectangle types
- Set timer node_type to 2 when loading from town record
This commit is contained in:
2015-07-01 18:05:42 -04:00
parent 9a2881ef66
commit 1f5a1118f8
13 changed files with 211 additions and 17 deletions

View File

@@ -1595,6 +1595,7 @@ static void readTownFromXml(ticpp::Document&& data, cTown*& town, cScenario& sce
if(num_timers >= 8)
throw xBadNode(type, elem->Row(), elem->Column(), fname);
readTimerFromXml(*elem, town->timers[num_timers]);
town->timers[num_timers].node_type = 2;
num_timers++;
} else if(type == "flags") {
Iterator<Element> flag;