Finally got around to returning to menu on death or exit. I shouldn't have put this off for so long, was painful. Also quest system future proofed if I decide to add anything that might cause death in one of them.

This commit is contained in:
Storm Dragon
2026-02-08 14:10:02 -05:00
parent cbe79b9317
commit 942cbfd011
20 changed files with 446 additions and 377 deletions

View File

@@ -50,8 +50,8 @@ int get_quest_chance_from_favor() {
return chance;
}
void quest_menu_background_tick() {
menu_background_tick();
bool quest_menu_background_tick() {
return menu_background_tick();
}
void quest_boomerang_hit_sound() {
@@ -163,6 +163,10 @@ void run_quest(int quest_type) {
else if (quest_type == QUEST_ENCHANTED_MELODY) score = run_enchanted_melody();
else if (quest_type == QUEST_ESCAPE_FROM_HEL) score = run_escape_from_hel();
else if (quest_type == QUEST_SKELETAL_BARD) score = run_skeletal_bard();
if (return_to_main_menu_requested) {
p.resume_all();
return;
}
apply_quest_reward(score);
p.resume_all();
}
@@ -178,7 +182,9 @@ void run_quest_menu() {
while(true) {
wait(5);
menu_background_tick();
if (menu_background_tick()) {
return;
}
if (key_pressed(KEY_ESCAPE)) {
speak_with_history("Closed.", true);
break;