diff options
-rw-r--r-- | crawl-ref/source/dat/database/miscname.txt | 78 | ||||
-rw-r--r-- | crawl-ref/source/dat/database/rand_all.txt | 2 | ||||
-rw-r--r-- | crawl-ref/source/dat/database/rand_wpn.txt | 2 | ||||
-rw-r--r-- | crawl-ref/source/database.cc | 22 | ||||
-rw-r--r-- | crawl-ref/source/database.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 22 |
6 files changed, 64 insertions, 64 deletions
diff --git a/crawl-ref/source/dat/database/miscname.txt b/crawl-ref/source/dat/database/miscname.txt index 372cd27a4f..0f32fed00f 100644 --- a/crawl-ref/source/dat/database/miscname.txt +++ b/crawl-ref/source/dat/database/miscname.txt @@ -6,8 +6,6 @@ # This file contains a list of names for miscellaneous things. # This is currently only used for colours, writing types, # roaring animals, and smells. -# -# Note that randarts may use these as well. ###################################################### %%%% glowing_adj @@ -35,65 +33,65 @@ shining %%%% colour_name -Aubergine +aubergine -Azure +azure -Beige +beige -Black +black -Blue +blue -Bronze +bronze -Brown +brown -Charcoal +charcoal -Chartreuse +chartreuse -Cyan +cyan -Gold +gold -Green +green -Grey +grey -Indigo +indigo -Leaf Green +leaf green -Lime Green +lime green -Magenta +magenta -Marigold +marigold -Mauve +mauve -Ochre +ochre -Orange +orange -Pink +pink -Purple +purple -Red +red -Rubric +rubric -Scarlet +scarlet -Silver +silver -Umber +umber -White +white -Yellow +yellow %%%% glowing_colour_name @@ -162,21 +160,21 @@ writing_name %%%% roaring_animal_name -Albino Dragon +albino dragon -Dragon +dragon -Eggplant +eggplant -Frog +frog -Human +human -Millipede +millipede -Pill Bug +pill bug -Slug +slug %%%% smell_name diff --git a/crawl-ref/source/dat/database/rand_all.txt b/crawl-ref/source/dat/database/rand_all.txt index 2264a11dce..a281b63da4 100644 --- a/crawl-ref/source/dat/database/rand_all.txt +++ b/crawl-ref/source/dat/database/rand_all.txt @@ -209,8 +209,6 @@ the Clouds the Sky -the @colour_name@ Skies - %%%% virtue_or_vice diff --git a/crawl-ref/source/dat/database/rand_wpn.txt b/crawl-ref/source/dat/database/rand_wpn.txt index 44ff112000..3becb714b8 100644 --- a/crawl-ref/source/dat/database/rand_wpn.txt +++ b/crawl-ref/source/dat/database/rand_wpn.txt @@ -1005,8 +1005,6 @@ Bung Bingo -@roaring_animal_name@'s Rage - # from the crawl.akrasiac.org patch Cookie Cutter diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc index af4b9b90e1..c949606788 100644 --- a/crawl-ref/source/database.cc +++ b/crawl-ref/source/database.cc @@ -74,8 +74,6 @@ static TextDB AllDBs[] = "database/rand_all.txt", // jewellery and general // This doesn't really belong here, but they *are* god gifts... "database/monname.txt", // orcish names for Beogh to choose from - // This doesn't really belong here, but *can* be used by randarts... - "database/miscname.txt", // names for miscellaneous things NULL), TextDB( "db/speak", @@ -93,6 +91,10 @@ static TextDB AllDBs[] = TextDB( "db/help", "database/help.txt", NULL), + + TextDB( "db/misc", + "database/miscname.txt", // names for miscellaneous things + NULL), }; static TextDB& DescriptionDB = AllDBs[0]; @@ -100,6 +102,7 @@ static TextDB& RandartDB = AllDBs[1]; static TextDB& SpeakDB = AllDBs[2]; static TextDB& ShoutDB = AllDBs[3]; static TextDB& HelpDB = AllDBs[4]; +static TextDB& MiscDB = AllDBs[5]; // ---------------------------------------------------------------------- // TextDB @@ -683,3 +686,18 @@ std::string getHelpString(const std::string &topic) { return _query_database(HelpDB.get(), topic, false, true); } + +///////////////////////////////////////////////////////////////////////////// +// Miscellaneous DB specific functions. + +std::string getMiscString(const std::string &misc, + const std::string &suffix) + +{ + if (!MiscDB) + return (""); + + int num_replacements = 0; + + return _getRandomizedStr(MiscDB, misc, suffix, num_replacements); +} diff --git a/crawl-ref/source/database.h b/crawl-ref/source/database.h index c48c863a37..94471a4803 100644 --- a/crawl-ref/source/database.h +++ b/crawl-ref/source/database.h @@ -64,5 +64,7 @@ std::string getSpeakString(const std::string &monst); std::string getRandNameString(const std::string &itemtype, const std::string &suffix = ""); std::string getHelpString(const std::string &topic); +std::string getMiscString(const std::string &misc, + const std::string &suffix = ""); #endif diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index efe325b4f5..b80e276fc6 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2404,38 +2404,24 @@ void new_level(void) #endif } -// XXX: Why the lowercasing? I mean why not list the messages as lowercased -// in the first place? (jpeg) std::string weird_glowing_colour() { - std::string result = getRandNameString("glowing_colour_name"); - - lowercase(result); - - return result; + return getMiscString("glowing_colour_name"); } std::string weird_writing() { - std::string result = getRandNameString("writing_name"); - - lowercase(result); - - return result; + return getMiscString("writing_name"); } std::string weird_roaring_animal() { - std::string result = getRandNameString("roaring_animal_name"); - - lowercase(result); - - return result; + return getMiscString("roaring_animal_name"); } std::string weird_smell() { - return getRandNameString("smell_name"); + return getMiscString("smell_name"); } bool scramble(void) |