record and replay toggle active

This commit is contained in:
2024-09-04 20:40:49 -05:00
committed by Celtic Minstrel
parent 6b7b42951d
commit 8caef91caf
3 changed files with 8 additions and 1 deletions

View File

@@ -350,7 +350,11 @@ static void handle_parry(bool& did_something, bool& need_redraw, bool& need_repr
need_redraw = true;
}
static void handle_toggle_active(bool& need_reprint) {
void handle_toggle_active(bool& need_reprint) {
if(recording){
record_action("handle_toggle_active", "");
}
if(combat_active_pc == 6) {
add_string_to_buf("This PC now active.");
combat_active_pc = univ.cur_pc;

View File

@@ -55,6 +55,7 @@ void handle_get_items(bool& did_something, bool& need_redraw, bool& need_reprint
void handle_drop_item(short item_hit, bool& need_redraw);
void handle_drop_item(location destination, bool& need_redraw);
void handle_give_item(short item_hit, bool& did_something, bool& need_redraw);
void handle_toggle_active(bool& need_reprint);
void show_dialog_action(std::string xml_file);
void handle_new_pc_graphic();
void handle_rename_pc();

View File

@@ -528,6 +528,8 @@ static void replay_next_action() {
handle_info_request(boost::lexical_cast<int>(next_action.GetText()));
}else if(t == "close_map"){
close_map(true);
}else if(t == "handle_toggle_active"){
handle_toggle_active(need_reprint);
}else{
std::ostringstream sstr;
sstr << "Couldn't replay action: " << next_action;