diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-05-21 15:16:57 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-05-22 01:49:53 +0200 |
commit | 4415be98bf5efe2738c82ff3f908250fecedc17e (patch) | |
tree | 0144b6c103b5d20ef2b501bb9f52ec0172f85bf4 /crawl-ref/source/util/gather_mons | |
parent | 2a8b170176470bc1837b1c621ed3edcec302959b (diff) | |
download | crawl-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-x | crawl-ref/source/util/gather_mons | 4 |
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; |