From 81c815dc48368620beeac50c3cea972d20465715 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 27 Aug 2024 16:34:09 -0500 Subject: [PATCH] record and replay debug clear statuses --- src/game/boe.actions.cpp | 15 +++++++++++---- src/game/boe.actions.hpp | 1 + src/game/boe.main.cpp | 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 4ce7a6a8..cfa950f2 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -1900,6 +1900,16 @@ void debug_refresh_stores() { print_buf(); } +void debug_clean_up() { + if(recording){ + record_action("debug_clean_up", ""); + } + univ.party.clear_bad_status(); + add_string_to_buf("Debug: You get cleaned up!"); + print_buf(); + put_pc_screen(); +} + bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ bool are_done = false; location pass_point; // TODO: This isn't needed @@ -2100,10 +2110,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ case 'C': if(!univ.debug_mode) break; - univ.party.clear_bad_status(); - add_string_to_buf("Debug: You get cleaned up!"); - print_buf(); - put_pc_screen(); + debug_clean_up(); break; case 'E': diff --git a/src/game/boe.actions.hpp b/src/game/boe.actions.hpp index 431a1dce..7a993ca4 100644 --- a/src/game/boe.actions.hpp +++ b/src/game/boe.actions.hpp @@ -79,5 +79,6 @@ void debug_kill(); void debug_magic_map(); void debug_enter_town(); void debug_refresh_stores(); +void debug_clean_up(); #endif diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 39a94895..691fb63f 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -497,6 +497,8 @@ static void replay_next_action() { debug_enter_town(); }else if(t == "debug_refresh_stores"){ debug_refresh_stores(); + }else if(t == "debug_clean_up"){ + debug_clean_up(); } // TODO some of these actions shouldn't call advance_time(). They should return