diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-12 13:49:05 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-12 13:49:05 +0000 |
commit | 5e94dac9e3537693dfaa1647c143959d1ce5e069 (patch) | |
tree | 028910f8f34f595a7ef4802e0d0e5d57f5e6b65c /crawl-ref/source/travel.h | |
parent | e5241a144e28fd3aaa803a592eb4656eddc53a27 (diff) | |
download | crawl-ref-5e94dac9e3537693dfaa1647c143959d1ce5e069.tar.gz crawl-ref-5e94dac9e3537693dfaa1647c143959d1ce5e069.zip |
Better explore-stop messages.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@619 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r-- | crawl-ref/source/travel.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h index 935840963c..a95948df2a 100644 --- a/crawl-ref/source/travel.h +++ b/crawl-ref/source/travel.h @@ -206,6 +206,39 @@ struct level_pos void load(FILE *); }; +// Tracks items discovered by explore in this turn. +class LevelStashes; +class explore_discoveries +{ +public: + explore_discoveries(); + + void found_feature(const coord_def &pos, int grid); + void found_item(const coord_def &pos, const item_def &item); + + // Reports discoveries and prompts the player to stop (if necessary). + bool prompt_stop() const; + +private: + template <class C> void say_any(const C &coll, const char *stub) const; + std::string cleaned_feature_description(int feature) const; + +private: + template <class Z> struct named_thing { + std::string name; + Z thing; + + named_thing(const std::string &n, Z t) : name(n), thing(t) { } + }; + + int es_flags; + const LevelStashes *current_level; + std::vector< named_thing<item_def> > items; + std::vector< named_thing<int> > stairs; + std::vector< named_thing<int> > shops; + std::vector< named_thing<int> > altars; +}; + struct stair_info { coord_def position; // Position of stair |