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

@@ -1029,6 +1029,8 @@ void save_scenario(bool rename) {
std::ostream& town_talk = scen_file.newFile("scenario/towns/talk" + std::to_string(i) + ".xml");
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)) {

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;
@@ -1231,6 +1231,8 @@ bool new_town(short which_town) {
town->terrain(i,j) = 4;
}
}
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() {