From 4fcdab47681adf046474885058d0e3ff95995d86 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Thu, 12 Nov 2009 16:26:22 -0800 Subject: New door Lua marker properties door_description_prefix: String to prefix to door name. door_open_prompt: Prompt user if they really want to open the door. --- crawl-ref/source/directn.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/directn.cc') diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 45437ab529..78c9f5ce24 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -2902,6 +2902,13 @@ std::string feature_description(const coord_def& where, bool bloody, if (grid == DNGN_OPEN_DOOR || feat_is_closed_door(grid)) { + const std::string door_desc_prefix = + env.markers.property_at(where, MAT_ANY, + "door_description_prefix"); + const std::string door_desc_suffix = + env.markers.property_at(where, MAT_ANY, + "door_description_suffix"); + std::set all_door; find_connected_identical(where, grd(where), all_door); const char *adj, *noun; @@ -2911,12 +2918,8 @@ std::string feature_description(const coord_def& where, bool bloody, desc += (grid == DNGN_OPEN_DOOR) ? "open " : "closed "; if (grid == DNGN_DETECTED_SECRET_DOOR) desc += "detected secret "; - desc += noun; - const std::string door_desc_suffix = - env.markers.property_at(where, MAT_ANY, - "door_description_suffix"); - desc += door_desc_suffix; + desc += door_desc_prefix + noun + door_desc_suffix; if (bloody) desc += ", spattered with blood"; -- cgit v1.2.3-54-g00ecf