fix replay show_debug_help

This commit is contained in:
2025-02-22 10:20:30 -06:00
parent 01c11518cc
commit 5ee8f91f5d
2 changed files with 5 additions and 2 deletions

View File

@@ -2364,7 +2364,9 @@ void show_debug_help() {
if(action.action != &show_debug_help){
button.attachClickHandler([action](cDialog& me, std::string, eKeyMod) -> bool {
me.toast(false);
action.action();
// In a replay, the action will have been recorded next anyway, so the dialog doesn't need to trigger it.
if(!replaying)
action.action();
return true;
});
}

View File

@@ -910,8 +910,9 @@ static void replay_action(Element& action) {
cancel_item_target(did_something, need_redraw, need_reprint);
}else if(t == "easter_egg"){
easter_egg(boost::lexical_cast<int>(action.GetText()));
}else if(t == "show_debug_panel"){
}else if(t == "show_debug_help"){
show_debug_help();
return;
}else if(t == "debug_fight_encounter"){
debug_fight_encounter(str_to_bool(action.GetText()));
}else if(t == "preview_every_dialog_xml"){