From 1684a483b739a7c09396b230f92bae027a336fcd Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 11 Aug 2025 13:21:23 -0500 Subject: [PATCH] queue_special() return whether special was queued --- src/game/boe.specials.cpp | 5 +++-- src/game/boe.specials.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index 62d80e8a..5cebc7ef 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -1987,8 +1987,8 @@ void special_increase_age(long length, bool queue) { draw_terrain(0); } -void queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc) { - if(spec < 0) return; +bool queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc) { + if(spec < 0) return false; pending_special_type queued_special; queued_special.spec = spec; queued_special.where = spec_loc; @@ -2000,6 +2000,7 @@ void queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, loca run_special(queued_special, nullptr, nullptr, nullptr); else special_queue.push(queued_special); + return true; } void run_special(pending_special_type spec, short* a, short* b, bool* redraw) { diff --git a/src/game/boe.specials.hpp b/src/game/boe.specials.hpp index 32523b9f..203f35d3 100644 --- a/src/game/boe.specials.hpp +++ b/src/game/boe.specials.hpp @@ -20,7 +20,7 @@ void teleport_party(short x,short y,short mode); bool run_stone_circle(short which); void change_level(short town_num,short x,short y); void push_things(); -void queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc); +bool queue_special(eSpecCtx mode, eSpecCtxType which_type, spec_num_t spec, location spec_loc); void run_special(eSpecCtx which_mode, eSpecCtxType which_type, spec_num_t start_spec, location spec_loc, short* a = nullptr, short* b = nullptr, bool* redraw = nullptr); void run_special(pending_special_type spec, short* a, short* b, bool* redraw);