summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/delay.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-12 13:49:05 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-12 13:49:05 +0000
commit5e94dac9e3537693dfaa1647c143959d1ce5e069 (patch)
tree028910f8f34f595a7ef4802e0d0e5d57f5e6b65c /crawl-ref/source/delay.cc
parente5241a144e28fd3aaa803a592eb4656eddc53a27 (diff)
downloadcrawl-ref-5e94dac9e3537693dfaa1647c143959d1ce5e069.tar.gz
crawl-ref-5e94dac9e3537693dfaa1647c143959d1ce5e069.zip
Better explore-stop messages.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@619 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r--crawl-ref/source/delay.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 5f5879ac15..55ba0bb96c 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -909,12 +909,13 @@ inline static void monster_warning(activity_interrupt_type ai,
}
}
-void interrupt_activity( activity_interrupt_type ai,
+// Returns true if any activity was stopped.
+bool interrupt_activity( activity_interrupt_type ai,
const activity_interrupt_data &at )
{
const int delay = current_delay_action();
if (delay == DELAY_NOT_DELAYED)
- return;
+ return (false);
// First try to stop the current delay.
const delay_queue_item &item = you.delay_queue.front();
@@ -923,7 +924,7 @@ void interrupt_activity( activity_interrupt_type ai,
{
monster_warning(ai, at, item.type);
stop_delay();
- return;
+ return (true);
}
// Check the other queued delays; the first delay that is interruptible
@@ -943,16 +944,18 @@ void interrupt_activity( activity_interrupt_type ai,
{
monster_warning(ai, at, you.delay_queue[j].type);
stop_delay();
- return;
+ return (true);
}
}
// Non-run queued delays can be discarded without any processing.
you.delay_queue.erase( you.delay_queue.begin() + i,
you.delay_queue.end() );
- break;
+ return (true);
}
}
+
+ return (false);
}
static const char *activity_interrupt_names[] =