summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/show.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-13 11:15:23 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:22 -0600
commit6841e2560bc81adc6ddfebd0fb8f28bbce540d54 (patch)
tree79909f8cc96a2795007358401bff0cdac2099708 /crawl-ref/source/show.cc
parent3f3bee6cc598206a866c0e59a476e32d78794418 (diff)
downloadcrawl-ref-6841e2560bc81adc6ddfebd0fb8f28bbce540d54.tar.gz
crawl-ref-6841e2560bc81adc6ddfebd0fb8f28bbce540d54.zip
Gozag: Gold sense.
You passively detect gold on entering a level.
Diffstat (limited to 'crawl-ref/source/show.cc')
-rw-r--r--crawl-ref/source/show.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index 5c21697a08..2dff3da4e2 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -25,6 +25,7 @@
#include "monster.h"
#include "options.h"
#include "random.h"
+#include "stash.h"
#include "state.h"
#include "areas.h"
#include "terrain.h"
@@ -231,7 +232,7 @@ static show_item_type _item_to_show_code(const item_def &item)
}
}
-static void _update_item_at(const coord_def &gp)
+void update_item_at(const coord_def &gp, bool detected)
{
if (!in_bounds(gp))
return;
@@ -254,12 +255,15 @@ static void _update_item_at(const coord_def &gp)
}
else
{
+ if (detected)
+ StashTrack.add_stash(gp.x, gp.y);
+
const vector<item_def> stash = item_list_in_stash(gp);
if (stash.empty())
return;
eitem = stash[0];
- if (stash.size() > 1)
+ if (!detected && stash.size() > 1)
more_items = true;
}
env.map_knowledge(gp).set_item(get_item_info(eitem), more_items);
@@ -535,7 +539,7 @@ void show_update_at(const coord_def &gp, bool terrain_only)
_update_cloud(cloud);
}
- _update_item_at(gp);
+ update_item_at(gp);
}
#ifdef USE_TILE