summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-12 16:26:22 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-12 16:26:22 -0800
commit4fcdab47681adf046474885058d0e3ff95995d86 (patch)
treec6661ddb62d13a57fa0176cbd24de51c4ff5c921 /crawl-ref/source/directn.cc
parentfcd9486498b25072cacd0ae8ef9ef0ae570b8104 (diff)
downloadcrawl-ref-4fcdab47681adf046474885058d0e3ff95995d86.tar.gz
crawl-ref-4fcdab47681adf046474885058d0e3ff95995d86.zip
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.
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc13
1 files changed, 8 insertions, 5 deletions
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<coord_def> 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";