From ee4b3ecd32b265938de0020699063511e5ebd79b Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Sun, 6 Jul 2014 19:13:48 -0400 Subject: 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. --- crawl-ref/source/util/gather_features | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'crawl-ref/source/util') 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 $/; $_ = ; } +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; -- cgit v1.2.3-54-g00ecf