diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-22 00:19:13 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-22 00:21:14 -0800 |
commit | 722243eb20be246b6042a36deb016f48091bb6aa (patch) | |
tree | 65a90ded496dc817c25ba4ff88d4efb7e1a8cb24 /crawl-ref/source/items.cc | |
parent | 41814e9593b3364fd0bdfae7ecb19d7dbd3ebb98 (diff) | |
download | crawl-ref-722243eb20be246b6042a36deb016f48091bb6aa.tar.gz crawl-ref-722243eb20be246b6042a36deb016f48091bb6aa.zip |
explore_stop: new condition greedy_pickup_thrown
explore_stop condition greedy_pickup_smart no longer stops for items
which were thrown by the player. The new condition greedy_pickup_thrown
can be used by those who wish to stop auto-explore when thrown items are
auto-pickup'd.
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 80f6dae865..f298e19f38 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2431,6 +2431,12 @@ static bool _interesting_explore_pickup(const item_def& item) if (item.base_type == OBJ_GOLD) return (false); + if ((Options.explore_stop & ES_GREEDY_PICKUP_THROWN) + && (item.flags & ISFLAG_THROWN)) + { + return (true); + } + std::vector<text_pattern> &ignore = Options.explore_stop_pickup_ignore; if (!ignore.empty()) { @@ -2443,10 +2449,12 @@ static bool _interesting_explore_pickup(const item_def& item) if (!(Options.explore_stop & ES_GREEDY_PICKUP_SMART)) return (true); - // "Smart" code follows. + + // If ES_GREEDY_PICKUP_THROWN isn't set, then smart greedy pickup + // will ignore thrown items. if (item.flags & ISFLAG_THROWN) - return (true); + return (false); if (is_artefact(item)) return (true); |