Debug action: crash the game

This commit is contained in:
2025-03-06 19:24:41 -06:00
committed by Celtic Minstrel
parent 4cc6d7efb9
commit 14c36ed5a8
5 changed files with 31 additions and 1 deletions

View File

@@ -954,6 +954,8 @@ static void replay_action(Element& action) {
clear_trapped_monst();
}else if(t == "error"){
// The error is recorded for debugging only. It should be triggered by replaying the actions.
}else if(t == "debug_crash"){
debug_crash();
}else if(t == "advance_time"){
// This is bad regardless of strictness, because visual changes may have occurred which won't get redrawn/reprinted
throw std::string { "Replay system internal error! advance_time() was supposed to be called by the last action, but wasn't: " } + _last_action_type;