diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-24 14:06:28 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-24 14:06:28 +0000 |
commit | a117fb1baf5f81a56014a174f0400622cdf2ab5d (patch) | |
tree | ebe42721a9dad967d0c1a000a29c1a01920a19f6 /crawl-ref/source/quiver.h | |
parent | 33b1249af4f983197d5af346199c5d0a4061835a (diff) | |
download | crawl-ref-a117fb1baf5f81a56014a174f0400622cdf2ab5d.tar.gz crawl-ref-a117fb1baf5f81a56014a174f0400622cdf2ab5d.zip |
Modify quiver to only quiver ammunition explicitly chosen by the player
(via (,) or i, or by the new quivering command). Ammo that just happens
to come next in the fire order is not quivered anymore even if you continue
firing.
Add a new quiver command on Q, and while I was at it, restrict the items
offered when firing (fi) or quivering to actual throwables. (This was a
long outstanding FR.) I think that's it...
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6112 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/quiver.h')
-rw-r--r-- | crawl-ref/source/quiver.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/quiver.h b/crawl-ref/source/quiver.h index 04366051d2..5014cc1a8f 100644 --- a/crawl-ref/source/quiver.h +++ b/crawl-ref/source/quiver.h @@ -34,12 +34,13 @@ class player_quiver // Queries from engine -- don't affect state void get_desired_item(const item_def** item_out, int* slot_out) const; - int get_fire_item(std::string* no_item_reason=0) const; + int get_fire_item(std::string* no_item_reason = 0) const; void get_fire_order(std::vector<int>& v) const; // Callbacks from engine - void on_item_fired(const item_def&); - void on_item_fired_fi(const item_def&); + void set_quiver(const item_def &item, ammo_t ammo_type); + void on_item_fired(const item_def &item, bool explicitly_chosen = false); + void on_item_fired_fi(const item_def &item); void on_inv_quantity_changed(int slot, int amt); void on_weapon_changed(); @@ -77,4 +78,7 @@ class preserve_quiver_slots int m_last_used_of_type[NUM_AMMO]; }; + +void choose_item_for_quiver(void); + #endif |