Debug action to save out (and keep saving) the log in memory

This commit is contained in:
2025-02-22 10:20:53 -06:00
parent 64702b3a88
commit 60b178d6e8
2 changed files with 11 additions and 0 deletions

View File

@@ -2427,6 +2427,7 @@ void init_debug_actions() {
add_debug_action({'%'}, "Fight wandering encounter from this section", []() -> void {debug_fight_encounter(true);});
add_debug_action({'^'}, "Fight special encounter from this section", []() -> void {debug_fight_encounter(false);});
add_debug_action({'/', '?'}, "Bring up this window", show_debug_help);
add_debug_action({'Z'}, "Save the current action log for bug reporting", save_replay_log);
}
// Later we might want to know whether the key is used or not
@@ -3969,4 +3970,13 @@ void preview_every_dialog_xml() {
preview_dialog_xml(path);
});
}
}
void save_replay_log(){
// This doesn't need to be recorded or replayed.
if(replaying) return;
fs::path out_file = nav_put_rsrc({"xml"});
start_log_file(out_file.string());
}

View File

@@ -117,5 +117,6 @@ void update_item_stats_area(bool& need_reprint);
void easter_egg(int idx);
void preview_dialog_xml();
void preview_every_dialog_xml();
void save_replay_log();
#endif