summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/db_lint
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-05-20 20:45:43 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-05-20 21:03:19 +0200
commit01d83500f5eeabb498f2750f558d34d91b5f1781 (patch)
tree1b256d913879ad1625bc506fb3f737c60dac00c5 /crawl-ref/source/util/db_lint
parent5db4cc5112960b5fe161ee6878dbdcedbbebfd50 (diff)
downloadcrawl-ref-01d83500f5eeabb498f2750f558d34d91b5f1781.tar.gz
crawl-ref-01d83500f5eeabb498f2750f558d34d91b5f1781.zip
Cross-check all description files, looking for duplicates.
They all go into one database, so the last desc for the same key overwrites previous ones, even if they come from a different file (within the db type).
Diffstat (limited to 'crawl-ref/source/util/db_lint')
-rwxr-xr-xcrawl-ref/source/util/db_lint16
1 files changed, 15 insertions, 1 deletions
diff --git a/crawl-ref/source/util/db_lint b/crawl-ref/source/util/db_lint
index 7d2b98c3dc..57a44724b2 100755
--- a/crawl-ref/source/util/db_lint
+++ b/crawl-ref/source/util/db_lint
@@ -14,6 +14,7 @@ sub __________________________________________________________________________
sub read_file($)
{
+ %keys = ();
$file = $_[0];
$line = 0;
open F, "<dat/$file.txt" or die "Can't read dat/$file.txt\n";
@@ -66,13 +67,26 @@ sub read_file($)
}
__________________________________________________________________________();
+read_file("descript/features");
+read_file("descript/items");
+read_file("descript/unident");
+read_file("descript/unrand");
+read_file("descript/spells");
+read_file("descript/gods");
+read_file("descript/branches");
+read_file("descript/skills");
+read_file("descript/ability");
+read_file("descript/cards");
+read_file("descript/commands");
+
read_file("descript/monsters");
$keys{'the Serpent of Hell'} = 1;
for (`util/gather_mons`)
{
chomp;
- err "$file: No description for '$_'\n" unless $keys{$_};
+ # using a desc from another file is ok, it's the same db
+ err "$file: No description for '$_'\n" unless $entries{$_};
delete $keys{$_}
}