summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-22 19:40:42 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-22 19:40:42 +0000
commit8b989e877550fcc89c79e06905a2128537a852f0 (patch)
tree4230f4f5a5d7ad42fe1a0fa3a0dca962aa349a26 /crawl-ref/source
parentc23deaf938ce66f6c7711a72f2c147690d486376 (diff)
downloadcrawl-ref-8b989e877550fcc89c79e06905a2128537a852f0.tar.gz
crawl-ref-8b989e877550fcc89c79e06905a2128537a852f0.zip
Modify descriptions of artefact-capable items to allow for unquoted
descriptions for artefacts, so as not to drown the actually important information in flavour quotes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4483 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/dat/descript/items.txt16
-rw-r--r--crawl-ref/source/database.cc8
-rw-r--r--crawl-ref/source/database.h5
-rw-r--r--crawl-ref/source/describe.cc2
4 files changed, 27 insertions, 4 deletions
diff --git a/crawl-ref/source/dat/descript/items.txt b/crawl-ref/source/dat/descript/items.txt
index fec7e1ab3e..c1d3cd2aab 100644
--- a/crawl-ref/source/dat/descript/items.txt
+++ b/crawl-ref/source/dat/descript/items.txt
@@ -412,6 +412,10 @@ chunk of flesh
A piece of meat found in the dungeon.
%%%%
+cloak noquote
+
+A cloth cloak.
+%%%%
cloak
A cloth cloak.
@@ -426,6 +430,10 @@ A cloth cloak.
For I'll have a new cloak about me."
-Anonymous, "The Old Cloak". 16th Century.
%%%%
+club noquote
+
+A heavy piece of wood.
+%%%%
club
A heavy piece of wood.
@@ -467,6 +475,10 @@ crystal plate mail
An incredibly heavy but extremely effective suit of crystalline
armour. It is somewhat resistant to corrosion.
%%%%
+dagger noquote
+
+A long knife or a very short sword, which can be held or thrown.
+%%%%
dagger
A long knife or a very short sword, which can be held or thrown.
@@ -755,6 +767,10 @@ lemon
A yellow fruit.
%%%%
+long sword noquote
+
+A sword with a long, slashing blade.
+%%%%
long sword
A sword with a long, slashing blade.
diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc
index af43a29c76..140051b4db 100644
--- a/crawl-ref/source/database.cc
+++ b/crawl-ref/source/database.cc
@@ -591,11 +591,17 @@ static std::string _query_database(DBM *db, std::string key,
/////////////////////////////////////////////////////////////////////////////
// Description DB specific functions.
-std::string getLongDescription(const std::string &key)
+std::string getLongDescription(const std::string &key, bool noquote)
{
if (!DescriptionDB.get())
return ("");
+ if (noquote)
+ {
+ return _query_database(DescriptionDB.get(), key + " noquote",
+ true, true);
+ }
+
return _query_database(DescriptionDB.get(), key, true, true);
}
diff --git a/crawl-ref/source/database.h b/crawl-ref/source/database.h
index 8be7ed8ccc..c48c863a37 100644
--- a/crawl-ref/source/database.h
+++ b/crawl-ref/source/database.h
@@ -50,8 +50,9 @@ std::vector<std::string> database_find_bodies(DBM *database,
std::string getWeightedSpeechString(const std::string &key,
const std::string &suffix,
const int weight = -1);
-
-std::string getLongDescription(const std::string &key);
+
+std::string getLongDescription(const std::string &key,
+ bool noquote = false);
std::vector<std::string> getLongDescKeysByRegex(const std::string &regex,
db_find_filter filter = NULL);
std::vector<std::string> getLongDescBodiesByRegex(const std::string &regex,
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 6c48fc1cee..1d56a276b2 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1566,7 +1566,7 @@ std::string get_item_description( const item_def &item, bool verbose,
{
description << "$$";
std::string db_name = item.name(DESC_DBNAME, true, false, false);
- std::string db_desc = getLongDescription(db_name);
+ std::string db_desc = getLongDescription(db_name, is_artefact(item));
if (db_desc == "")
{