summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-11 10:55:40 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-11 10:55:40 +0000
commita0065e7a7d5c55f0cf93c758f26afa9a86b16572 (patch)
tree74d513f5d251dd57f5b64c5ffb85703c4e08c70a /crawl-ref/source/command.cc
parent172fd76cadb63cb41be2758b044b3f16c29a5fbf (diff)
downloadcrawl-ref-a0065e7a7d5c55f0cf93c758f26afa9a86b16572.tar.gz
crawl-ref-a0065e7a7d5c55f0cf93c758f26afa9a86b16572.zip
+ 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
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 922ac5b504..04834336d9 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -42,6 +42,7 @@
#include "mon-util.h"
#include "ouch.h"
#include "player.h"
+#include "quiver.h"
#include "religion.h"
#include "spl-cast.h"
#include "spl-util.h"
@@ -511,16 +512,26 @@ void list_weapons(void)
// Now we print out the current default fire weapon
wstring = "Firing : ";
- const int item = get_current_fire_item();
+ const item_def* item;
+ int slot;
+ you.m_quiver->get_desired_item(&item, &slot);
colour = MSGCOL_BLACK;
- if (item == ENDOFPACK)
+ if (slot == -1 && !is_valid_item(*item))
+ {
wstring += " nothing";
+ }
+ else if (slot == -1)
+ {
+ wstring += "-) ";
+ wstring += you.inv[slot].name(DESC_PLAIN);
+ wstring += " (empty)";
+ }
else
{
- wstring += you.inv[item].name(DESC_INVENTORY_EQUIP);
+ wstring += you.inv[slot].name(DESC_INVENTORY_EQUIP);
colour = menu_colour(wstring,
- menu_colour_item_prefix(you.inv[item]),
+ menu_colour_item_prefix(you.inv[slot]),
"equip");
}