From 9af02159866bdf8b87800293d2a93916e1c0e96a Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 28 Dec 2007 17:49:03 +0000 Subject: [1849483] Warn player when fire_items_start option is blocking selection of the only available missile (note that this doesn't entirely address the problem). [1852034] Added greedy_items option to explore_stop to force greedy explore to stop and announce even items that it plans to pick up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3137 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 0f5ed83c17..6f4f2d1bfc 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1473,16 +1473,25 @@ void shoot_thing(void) if (item == ENDOFPACK) { - mpr("No suitable missiles."); + unwind_var festart(Options.fire_items_start, 0); + if ((item = get_fire_item_index()) == ENDOFPACK) + mpr("No suitable missiles."); + else + mprf("No suitable missiles (fire_items_start = '%c', " + "ignoring item on '%c').", + index_to_letter(festart.original_value()), + index_to_letter(item)); flush_input_buffer( FLUSH_ON_FAILURE ); return; } dist target; bolt beam; - if (choose_fire_target(target, item)) - if (check_warning_inscriptions(you.inv[item], OPER_FIRE)) - throw_it( beam, item, false, 0, &target ); + if (choose_fire_target(target, item) + && check_warning_inscriptions(you.inv[item], OPER_FIRE)) + { + throw_it( beam, item, false, 0, &target ); + } } // Returns delay multiplier numerator (denominator should be 100) for the -- cgit v1.2.3-54-g00ecf