From 5c65cedddfd6f3d893c7eaec03f3c8519e266d45 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 1 Dec 2006 15:20:32 +0000 Subject: [1597293] Preliminary greedy-explore, parked on Ctrl-I. We can (re)move it if necessary. Stash-tracking is no longer #ifdef conditionalised. I'm not aware of anybody who compiles without it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@538 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/stash.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/stash.h') diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h index 727fb656e4..9727102067 100644 --- a/crawl-ref/source/stash.h +++ b/crawl-ref/source/stash.h @@ -10,8 +10,6 @@ #include "shopping.h" #include -#ifdef STASH_TRACKING - #include #include #include @@ -48,6 +46,14 @@ public: bool show_menu(const std::string &place, bool can_travel) const; + // Returns true if this Stash contains items that are eligible for + // autopickup. + bool pickup_eligible() const; + + // Returns true if this Stash is unverified (a visit by the character will + // verify the stash). + bool unverified() const; + bool matches_search(const std::string &prefix, const base_pattern &search, stash_search_result &res) @@ -197,6 +203,7 @@ public: LevelStashes(); Stash *find_stash(int x = -1, int y = -1); + const Stash *find_stash(int x = -1, int y = -1) const; ShopInfo &get_shop(int x, int y); const ShopInfo *find_shop(int x, int y) const; @@ -207,6 +214,11 @@ public: // location if no parameters are supplied. bool update_stash(int x = -1, int y = -1); + // Returns true if the square at (x,y) contains potentially interesting + // swag that merits a personal visit (for EXPLORE_GREEDY). + bool needs_visit(int x, int y) const; + bool shop_needs_visit(int x, int y) const; + // Add stash at (x,y), or player's current location if no parameters are // supplied void add_stash(int x = -1, int y = -1); @@ -315,8 +327,6 @@ extern StashTracker stashes; bool is_stash(int x, int y); void describe_stash(int x, int y); -#endif // STASH_TRACKING - std::string userdef_annotate_item(const char *s, const item_def *item, bool exclusive = false); -- cgit v1.2.3-54-g00ecf