Some fixes to scenario dirty flag
This commit is contained in:
@@ -1030,6 +1030,8 @@ void save_scenario(bool rename) {
|
|||||||
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)) {
|
||||||
// If it was, we just need to save each file to its respective location
|
// If it was, we just need to save each file to its respective location
|
||||||
|
@@ -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;
|
||||||
@@ -1232,6 +1232,8 @@ bool new_town(short which_town) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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