From 722243eb20be246b6042a36deb016f48091bb6aa Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Sun, 22 Nov 2009 00:19:13 -0800 Subject: 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. --- crawl-ref/source/items.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/items.cc') 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 &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); -- cgit v1.2.3-54-g00ecf