record and replay fake fancy file picker

This commit is contained in:
2025-03-02 19:20:08 -06:00
committed by Celtic Minstrel
parent d54c61f982
commit b7a647c489
4 changed files with 46 additions and 9 deletions

View File

@@ -37,7 +37,7 @@ const std::set<fs::path> save_extensions = {".exg", ".boe", ".SAV", ".mac"};
// Return a directory's files sorted by last modified time
std::vector<std::pair<fs::path, std::time_t>> sorted_file_mtimes(fs::path dir, std::set<fs::path> valid_extensions = save_extensions);
bool load_party(fs::path file_to_load, cUniverse& univ);
bool load_party(fs::path file_to_load, cUniverse& univ, bool record = true);
bool save_party(cUniverse& univ, bool save_as = false);
bool save_party_force(cUniverse& univ, fs::path file);

View File

@@ -61,7 +61,7 @@ fs::path os_file_picker(bool saving) {
return nav_get_or_decode_party();
}
bool load_party(fs::path file_to_load, cUniverse& univ){
bool load_party(fs::path file_to_load, cUniverse& univ, bool record){
bool town_restore = false;
bool maps_there = false;
bool in_scen = false;
@@ -167,7 +167,7 @@ bool load_party(fs::path file_to_load, cUniverse& univ){
break;
}
if(recording && result){
if(recording && record && result){
record_action("load_party", encode_file(file_to_load), true);
}