record and replay debug increase age

This commit is contained in:
2024-08-27 17:07:03 -05:00
committed by Celtic Minstrel
parent de0ee8a070
commit 3c9f5fa00e
3 changed files with 15 additions and 5 deletions

View File

@@ -1976,6 +1976,17 @@ void debug_return_to_start() {
print_buf();
}
void debug_increase_age() {
if(recording){
record_action("debug_increase_age", "");
}
ASB("Debug: Increase age.");
ASB(" It is now 1 day later.");
print_buf();
univ.party.age += 3700;
put_pc_screen();
}
bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
bool are_done = false;
location pass_point; // TODO: This isn't needed
@@ -2256,11 +2267,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
case '<':
if(!univ.debug_mode) break;
ASB("Debug: Increase age.");
ASB(" It is now 1 day later.");
print_buf();
univ.party.age += 3700;
put_pc_screen();
debug_increase_age();
break;
case '>':
if(!univ.debug_mode) break;

View File

@@ -85,5 +85,6 @@ void debug_fly();
void debug_ghost_mode();
void debug_return_to_start();
void handle_victory(bool record = false);
void debug_increase_age();
#endif

View File

@@ -509,6 +509,8 @@ static void replay_next_action() {
debug_return_to_start();
}else if(t == "handle_victory"){
handle_victory();
}else if(t == "debug_increase_age"){
debug_increase_age();
}
// TODO some of these actions shouldn't call advance_time(). They should return