blob: 8db9b644c48bbbd38a713c4f52aa0541fa05c6a2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/perl -w
# Use -d if you want only newgame ones (ie, without coloured dracs).
my $db = grep /^-d$/, @ARGV;
undef $/;
open IN, "util/cpp_version enum.h|" or die "Can't read enum.h\n";
$_ = <IN>;
close IN;
s/.*enum species_type\n\{(.*?)LAST_VALID_SPECIES.*/$1/s
or die "Can't find species_type in enum.h\n";
for (/SP_([A-Z_]+)/g)
{
s/_/ /g;
s/\b([A-Z])([A-Z]+)/\u$1\L$2/g;
if ($db)
{
print "Draconian\n" if /Base Draconian/;
next if /Draconian/;
}
print "$_\n";
}
|