summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapmark.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-25 00:23:09 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-25 00:23:09 -0700
commita0ae32c8f8a04398b4b99880069eb31a26b43eff (patch)
treee619d8de305de18bb7c9fc1ead65ee33a1377f33 /crawl-ref/source/mapmark.cc
parent83d7fbfa11973abf823ed07f4c7b39956fc6aa4a (diff)
downloadcrawl-ref-a0ae32c8f8a04398b4b99880069eb31a26b43eff.tar.gz
crawl-ref-a0ae32c8f8a04398b4b99880069eb31a26b43eff.zip
Let markers change the description of any feature
Allow markers to change the short and/or long description of any feature, not just portal vault entrances. The feature_description() and feature_description_long() functions have been removed from the mapmark classes and turned into ordinary properties. Also added the marker property "door_description_suffix", which can be used to alter the short description of (known) doors by appending a string to them.
Diffstat (limited to 'crawl-ref/source/mapmark.cc')
-rw-r--r--crawl-ref/source/mapmark.cc30
1 files changed, 4 insertions, 26 deletions
diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc
index 794cfb74d5..253855eb23 100644
--- a/crawl-ref/source/mapmark.cc
+++ b/crawl-ref/source/mapmark.cc
@@ -65,16 +65,6 @@ void map_marker::read(reader &inf)
unmarshallCoord(inf, pos);
}
-std::string map_marker::feature_description() const
-{
- return ("");
-}
-
-std::string map_marker::feature_description_long() const
-{
- return ("");
-}
-
std::string map_marker::property(const std::string &pname) const
{
return ("");
@@ -381,16 +371,6 @@ std::string map_lua_marker::debug_describe() const
return (call_str_fn("describe"));
}
-std::string map_lua_marker::feature_description() const
-{
- return (call_str_fn("feature_description"));
-}
-
-std::string map_lua_marker::feature_description_long() const
-{
- return (call_str_fn("feature_description_long"));
-}
-
std::string map_lua_marker::property(const std::string &pname) const
{
lua_stack_cleaner cln(dlua);
@@ -533,13 +513,11 @@ void map_wiz_props_marker::read(reader &inf)
}
}
-std::string map_wiz_props_marker::feature_description() const
-{
- return property("desc");
-}
-
std::string map_wiz_props_marker::property(const std::string &pname) const
{
+ if (pname == "desc")
+ return property("feature_description");
+
std::map<std::string, std::string>::const_iterator
i = properties.find(pname);
@@ -577,7 +555,7 @@ map_marker *map_wiz_props_marker::parse(
std::string map_wiz_props_marker::debug_describe() const
{
- return make_stringf("wizard props: ") + feature_description();
+ return "Wizard props: " + property("feature_description");
}
//////////////////////////////////////////////////////////////////////////