diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index f9990e51..4ce7a6a8 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -1891,6 +1891,15 @@ void debug_enter_town() { start_town_mode(get_num_response(0, univ.scenario.towns.size() - 1, "Enter Town Number"), find_direction_from); } +void debug_refresh_stores() { + if(recording){ + record_action("debug_refresh_stores", ""); + } + univ.refresh_store_items(); + add_string_to_buf("Debug: Refreshed jobs/shops."); + print_buf(); +} + bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ bool are_done = false; location pass_point; // TODO: This isn't needed @@ -2204,9 +2213,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ case 'W': if(!univ.debug_mode) break; - univ.refresh_store_items(); - add_string_to_buf("Debug: Refreshed jobs/shops."); - print_buf(); + debug_refresh_stores(); break; case '<': diff --git a/src/game/boe.actions.hpp b/src/game/boe.actions.hpp index d308a7d5..431a1dce 100644 --- a/src/game/boe.actions.hpp +++ b/src/game/boe.actions.hpp @@ -78,5 +78,6 @@ void debug_leave_town(); void debug_kill(); void debug_magic_map(); void debug_enter_town(); +void debug_refresh_stores(); #endif diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 0b29d378..39a94895 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -495,6 +495,8 @@ static void replay_next_action() { debug_magic_map(); }else if(t == "debug_enter_town"){ debug_enter_town(); + }else if(t == "debug_refresh_stores"){ + debug_refresh_stores(); } // TODO some of these actions shouldn't call advance_time(). They should return