From a0065e7a7d5c55f0cf93c758f26afa9a86b16572 Mon Sep 17 00:00:00 2001 From: pauldubois Date: Fri, 11 Apr 2008 10:55:40 +0000 Subject: + allocate and initialize + _fire_prompt_for_item returns -1, not ENDOFPACK + remove _fire_get_noitem_reason() + remove get_current_fire_item() + fix get_next_fire_item + remove _get_fire_order() + remove _fire_item_matches() + verify: no use of ENDOFPACK, use -1 + on_item_fired - implement: tags stuff + bug: wielding sling with stones = empty quiver - bug: wield sling, no quiver, pick up stones: should quiver + bug: wield sling, pick up stones: update # stones + bug: wield sling, stones quivered, drop stones: should update - feature: explicitly dropping all of ammo stack should remove it from quiver - move get_next_fire_item into quiver.cc? - remove: fire_quiver_best - remove: you.quiver - rename: you.quiver_change -> you.redraw_quiver - test no item because of fire_order_begin, =f, etc - find better place for on_weapon_changed - polish Qv: display, the command change - PROBLEM: cast_portal_projectile uses empty quiver slot? (test this) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4191 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/acr.cc') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 89d6fcc0a1..f91bc481fa 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -115,6 +115,7 @@ #include "output.h" #include "overmap.h" #include "player.h" +#include "quiver.h" #include "randart.h" #include "religion.h" #include "shopping.h" @@ -2383,16 +2384,13 @@ void process_command( command_type cmd ) case CMD_CYCLE_QUIVER_FORWARD: { - if (Options.fire_quiver_best) + int cur; + you.m_quiver->get_desired_item(NULL, &cur); + const int next = get_next_fire_item(cur, +1); + if (next != -1) { - mpr("Use fire_quiver_best=false if you want manual quiver control."); - break; - } - const int cur = you.quiver[get_quiver_type()]; - if (cur != ENDOFPACK) - { - const int next = get_next_fire_item(cur, +1); - you.quiver[get_quiver_type()] = next; + // kind of a hacky way to get quiver to change + you.m_quiver->on_item_fired(you.inv[next]); you.quiver_change = true; } break; -- cgit v1.2.3-54-g00ecf