summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/gather_mons
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-05-21 15:16:57 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-05-22 01:49:53 +0200
commit4415be98bf5efe2738c82ff3f908250fecedc17e (patch)
tree0144b6c103b5d20ef2b501bb9f52ec0172f85bf4 /crawl-ref/source/util/gather_mons
parent2a8b170176470bc1837b1c621ed3edcec302959b (diff)
downloadcrawl-ref-4415be98bf5efe2738c82ff3f908250fecedc17e.tar.gz
crawl-ref-4415be98bf5efe2738c82ff3f908250fecedc17e.zip
A new monster tag "dbname:", overrides the key for db lookups.
This allows sharing the same desc and speech between different monsters.
Diffstat (limited to 'crawl-ref/source/util/gather_mons')
-rwxr-xr-xcrawl-ref/source/util/gather_mons4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/util/gather_mons b/crawl-ref/source/util/gather_mons
index 1b55e19f8c..0cf847947a 100755
--- a/crawl-ref/source/util/gather_mons
+++ b/crawl-ref/source/util/gather_mons
@@ -1,5 +1,8 @@
#!/usr/bin/perl -w
+# Run gather_mons -d if you want dbname: to be heeded (descs, etc).
+my $db = grep /^-d$/, @ARGV;
+
open IN, "<mon-data.h" or die "Can't read mon-data.h\n";
while (<IN>)
{
@@ -29,6 +32,7 @@ sub vault_mon()
$_="$tags{'name'} $_" if $flags{'adj'} || $flags{'adjective'};
$_.=" $tags{'name'}" if $flags{'suf'} || $flags{'suffix'};
$_=$tags{'name'} if $flags{'rpl'} || $flags{'replace'};
+ $_=$tags{'dbname'} if $db && $tags{'dbname'};
s/_/ /g;
$mons{$_} = 1;