Some fixes to scenario dirty flag

This commit is contained in:
2016-05-07 12:42:47 -04:00
parent 21f05c464f
commit 4cd7368fbf
2 changed files with 6 additions and 1 deletions

View File

@@ -1030,6 +1030,8 @@ void save_scenario(bool rename) {
writeDialogueToXml(ticpp::Printer("talk.xml", town_talk), scenario.towns[i]->talking, i);
}
change_made = false;
// Alright. At this point, check to see if the scenario was unpacked.
if(fs::is_directory(toFile)) {
// If it was, we just need to save each file to its respective location

View File

@@ -22,7 +22,7 @@
#include "fileio.hpp"
extern short cen_x, cen_y, overall_mode;
extern bool mouse_button_held,editing_town;
extern bool mouse_button_held,editing_town,change_made;
extern short cur_viewing_mode;
extern cTown* town;
extern short mode_count,to_create,cur_town;
@@ -1232,6 +1232,8 @@ bool new_town(short which_town) {
}
}
change_made = true;
return true;
}
@@ -1240,6 +1242,7 @@ void delete_last_town() {
cTown* last_town = scenario.towns.back();
scenario.towns.pop_back();
delete last_town;
change_made = true;
}
cTown* pick_import_town() {