Some fixes to scenario dirty flag
This commit is contained in:
@@ -1029,6 +1029,8 @@ void save_scenario(bool rename) {
|
|||||||
std::ostream& town_talk = scen_file.newFile("scenario/towns/talk" + std::to_string(i) + ".xml");
|
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);
|
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.
|
// Alright. At this point, check to see if the scenario was unpacked.
|
||||||
if(fs::is_directory(toFile)) {
|
if(fs::is_directory(toFile)) {
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#include "fileio.hpp"
|
#include "fileio.hpp"
|
||||||
|
|
||||||
extern short cen_x, cen_y, overall_mode;
|
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 short cur_viewing_mode;
|
||||||
extern cTown* town;
|
extern cTown* town;
|
||||||
extern short mode_count,to_create,cur_town;
|
extern short mode_count,to_create,cur_town;
|
||||||
@@ -1231,6 +1231,8 @@ bool new_town(short which_town) {
|
|||||||
town->terrain(i,j) = 4;
|
town->terrain(i,j) = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
change_made = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1240,6 +1242,7 @@ void delete_last_town() {
|
|||||||
cTown* last_town = scenario.towns.back();
|
cTown* last_town = scenario.towns.back();
|
||||||
scenario.towns.pop_back();
|
scenario.towns.pop_back();
|
||||||
delete last_town;
|
delete last_town;
|
||||||
|
change_made = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cTown* pick_import_town() {
|
cTown* pick_import_town() {
|
||||||
|
Reference in New Issue
Block a user