summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shopping.h
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-31 02:16:00 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-31 02:16:00 -0700
commit59068ce8dae39e2f6a35861d371d0ce6b01732d9 (patch)
treed60a7415f571bc2afcdc5b377bb8bdd349408492 /crawl-ref/source/shopping.h
parentea0a802d98e069bd95b350423546ca727c1b3a2a (diff)
downloadcrawl-ref-59068ce8dae39e2f6a35861d371d0ce6b01732d9.tar.gz
crawl-ref-59068ce8dae39e2f6a35861d371d0ce6b01732d9.zip
Auto-update shopping-list when new items seen
Automatically update the shopping list if you see the same item for less cost in another shop, or if you get an item identical to one on the shopping list (currently only applies to jewellery, books and staves).
Diffstat (limited to 'crawl-ref/source/shopping.h')
-rw-r--r--crawl-ref/source/shopping.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/source/shopping.h b/crawl-ref/source/shopping.h
index b74d056899..75ed26a2ac 100644
--- a/crawl-ref/source/shopping.h
+++ b/crawl-ref/source/shopping.h
@@ -46,16 +46,18 @@ public:
bool del_thing(const item_def &item, level_pos* pos = NULL);
bool del_thing(std::string desc, level_pos* pos = NULL);
- int size() const;
-
- void move_things(const coord_def &src, const coord_def &dst);
+ unsigned int cull_identical_items(const item_def& item, long cost = -1);
void gold_changed(int old_amount, int new_amount);
+ void move_things(const coord_def &src, const coord_def &dst);
+
void display_list();
void refresh();
+ int size() const;
+
private:
CrawlVector* list;
@@ -75,8 +77,12 @@ private:
static long thing_cost(const CrawlHashTable& thing);
static level_pos thing_pos(const CrawlHashTable& thing);
- static std::string name_thing(const CrawlHashTable& thing);
- static std::string describe_thing(const CrawlHashTable& thing);
+ static std::string name_thing(const CrawlHashTable& thing,
+ description_level_type descrip = DESC_PLAIN);
+ static std::string describe_thing(const CrawlHashTable& thing,
+ description_level_type descrip = DESC_PLAIN);
+ static std::string item_name_simple(const item_def& item,
+ bool ident = false);
};
extern ShoppingList shopping_list;