From 2f3206ed43ce35ef9db816923ff855c82fe2697d Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 27 Aug 2024 17:17:36 -0500 Subject: [PATCH] record and replay debug edit stuff done --- src/game/boe.actions.cpp | 6 ++++++ src/game/boe.main.cpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 2c4066e1..3b4ae7fe 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -2263,6 +2263,12 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ case 'S': if(!univ.debug_mode) break; + // edit_stuff_done() is used in the character editor which + // doesn't have replays, so its replay action is recorded + // external to the function definition unlike most actions. + if(recording){ + record_action("edit_stuff_done", ""); + } edit_stuff_done(); break; diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index f63b6939..1e84d2a4 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -127,6 +127,8 @@ void handle_quit_event(); void handle_help_toc(); void menu_give_help(short help1); +extern void edit_stuff_done(); + #ifdef __APPLE__ eMenuChoice menuChoice=eMenuChoice::MENU_CHOICE_NONE; short menuChoiceId=-1; @@ -513,6 +515,8 @@ static void replay_next_action() { debug_increase_age(); }else if(t == "debug_towns_forget"){ debug_towns_forget(); + }else if(t == "edit_stuff_done"){ + edit_stuff_done(); } // TODO some of these actions shouldn't call advance_time(). They should return