From 307197d96b8facf98a3dabdff8ead19d0b967a3c Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 12 Jan 2010 20:11:19 +0100 Subject: Autoannotate exclusions placed on staircases with "up/downstairs". --- crawl-ref/source/exclude.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crawl-ref/source/exclude.cc') diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 4aa70848e5..fe1f604ffa 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -485,6 +485,16 @@ void set_exclude(const coord_def &p, int radius, bool autoexcl, bool vaultexcl, { desc = mons_type_name(m->type, DESC_PLAIN); } + else + { + // Maybe it's a staircase? + const dungeon_feature_type feat = env.map_knowledge(p).feat(); + const command_type dir = feat_stair_direction(feat); + if (dir == CMD_GO_UPSTAIRS) + desc = "upstairs"; + else if (dir == CMD_GO_DOWNSTAIRS) + desc = "downstairs"; + } } else { -- cgit v1.2.3-54-g00ecf