record and replay print_party_stats

This commit is contained in:
2024-08-24 14:27:43 -05:00
committed by Celtic Minstrel
parent 9abd80b87d
commit e64ba776be
2 changed files with 8 additions and 3 deletions

View File

@@ -356,6 +356,8 @@ static void replay_next_action() {
talk_notes();
}else if(t == "adventure_notes"){
adventure_notes();
}else if(t == "print_party_stats"){
print_party_stats();
}
// TODO some of these actions shouldn't call advance_time(). They should return
@@ -710,9 +712,7 @@ void handle_menu_choice(eMenu item_hit) {
adventure_notes();
break;
case eMenu::OPTIONS_STATS:
// TODO record and replay
if(overall_mode != MODE_STARTUP)
print_party_stats();
print_party_stats();
break;
case eMenu::HELP_OUT:
dialogToShow = "help-outdoor";

View File

@@ -22,6 +22,7 @@ const int TEXT_BUF_LEN = 70;
#include "fileio/resmgr/res_font.hpp"
#include "spell.hpp"
#include "tools/enum_map.hpp"
#include "replay.hpp"
typedef struct {
char line[50];
@@ -654,6 +655,10 @@ void draw_pc_effects(short pc) {
void print_party_stats() {
if(recording){
record_action("print_party_stats", "");
}
if(overall_mode == MODE_STARTUP) return;
add_string_to_buf("PARTY STATS:");
add_string_to_buf(" Number of kills: " + std::to_string(univ.party.total_m_killed));
if((is_town()) || ((is_combat()) && (which_combat_type == 1))) {