summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/map_knowledge.cc
diff options
context:
space:
mode:
authorPekka Lampila <pekka.lampila@iki.fi>2013-03-22 09:38:25 +0200
committerFlorian Diebold <flodiebold@gmail.com>2013-03-24 12:23:23 +0100
commit1114c8496a703c1e455c6c5d03ac34d12dbff4d6 (patch)
treef43ddc2befb15a3357fecd1a14e6e07284629352 /crawl-ref/source/map_knowledge.cc
parent5eb53f69cb90a5557e31db04c2b52857cee5eb28 (diff)
downloadcrawl-ref-1114c8496a703c1e455c6c5d03ac34d12dbff4d6.tar.gz
crawl-ref-1114c8496a703c1e455c6c5d03ac34d12dbff4d6.zip
Change the minimap priorities
Dungeon features are now shown, even if there is an item there. Monsters that give no XP have much lower priority.
Diffstat (limited to 'crawl-ref/source/map_knowledge.cc')
-rw-r--r--crawl-ref/source/map_knowledge.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/crawl-ref/source/map_knowledge.cc b/crawl-ref/source/map_knowledge.cc
index 6554b8b279..85cd0ce77b 100644
--- a/crawl-ref/source/map_knowledge.cc
+++ b/crawl-ref/source/map_knowledge.cc
@@ -175,9 +175,15 @@ void map_cell::set_detected_item()
_item->colour = Options.detected_item_colour;
}
+static bool _floor_mf(map_feature mf)
+{
+ return mf == MF_FLOOR || mf == MF_WATER || mf == MF_LAVA;
+}
+
map_feature get_cell_map_feature(const map_cell& cell)
{
map_feature mf = MF_SKIP;
+ bool mf_mons_no_exp = false;
if (cell.invisible_monster())
mf = MF_MONS_HOSTILE;
else if (cell.monster() != MONS_NO_MONSTER)
@@ -197,7 +203,7 @@ map_feature get_cell_map_feature(const map_cell& cell)
case ATT_HOSTILE:
default:
if (mons_class_flag(cell.monster(), M_NO_EXP_GAIN))
- mf = MF_MONS_NO_EXP;
+ mf_mons_no_exp = true;
else
mf = MF_MONS_HOSTILE;
break;
@@ -210,10 +216,12 @@ map_feature get_cell_map_feature(const map_cell& cell)
mf = get_feature_def(show).minimap;
}
- if (mf == MF_SKIP && cell.item())
- mf = get_feature_def(*cell.item()).minimap;
if (mf == MF_SKIP)
mf = get_feature_def(cell.feat()).minimap;
+ if ((mf == MF_SKIP || _floor_mf(mf)) && cell.item())
+ mf = get_feature_def(*cell.item()).minimap;
+ if ((mf == MF_SKIP || _floor_mf(mf)) && mf_mons_no_exp)
+ mf = MF_MONS_NO_EXP;
if (mf == MF_SKIP)
mf = MF_UNSEEN;