summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-06 19:13:48 -0400
committerNeil Moore <neil@s-z.org>2014-07-06 19:13:48 -0400
commitee4b3ecd32b265938de0020699063511e5ebd79b (patch)
tree44ebe825bec9873a57568b0e293acc3129834622 /crawl-ref/source/util
parentb7afdf89eed1cf0978c3d5ec49a03e7ac65c7d07 (diff)
downloadcrawl-ref-ee4b3ecd32b265938de0020699063511e5ebd79b.tar.gz
crawl-ref-ee4b3ecd32b265938de0020699063511e5ebd79b.zip
Handle traps in db_lint.
The refactoring in 0.15-a0-1555-g728ed82 moved the feature names somewhere that gather_features didn't know to look. Unfortunately we have to duplicate the postprocessing that turns the trap_name into the full_trap_name.
Diffstat (limited to 'crawl-ref/source/util')
-rwxr-xr-xcrawl-ref/source/util/gather_features16
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/util/gather_features b/crawl-ref/source/util/gather_features
index dc3405f311..c8ae5d797c 100755
--- a/crawl-ref/source/util/gather_features
+++ b/crawl-ref/source/util/gather_features
@@ -32,6 +32,22 @@ for (/"([^"\n]*)"/g)
$features{articled($_)} = 1;
}
+open IN, "util/cpp_version describe.cc|" or die "Can't read directn.cc\n";
+{ undef local $/; $_ = <IN>; }
+close IN;
+
+s/.*trap_names\[\] =(.*?)\n};\n.*/$1/s
+ or die "Can't find trap_names in describe.cc\n";
+s|//.*$||mg;
+
+for (/"([^"\n]*)"/g)
+{
+ $_ .= " trap" unless /^(web|shaft|passage|pressure plate)$/;
+ $_ .= " of Golubria" if /^passage$/;
+
+ $features{articled($_)} = 1;
+}
+
for (grep /\.des|\.des\.disabled|\.lua$/, `git ls-files`)
{
chomp;