Add --entity to perl-doc-parser.pl

This commit is contained in:
Akkadius 2018-07-01 19:49:52 -05:00
parent a6c1314e3e
commit 26ed80bdda

View File

@ -5,6 +5,7 @@ sub usage() {
print "Usage:\n";
print " --client - Prints methods for just client class methods\n";
print " --mob - Prints methods for just mob class methods\n";
print " --entity - Prints methods for just entity class methods\n";
print " --corpse - Prints methods for just corpse class methods\n";
print " --all - Prints methods for all classes\n";
exit(1);
@ -46,7 +47,7 @@ for my $file (@files) {
chomp;
$line = $_;
if ($line=~/Client::|Mob::|Corpse::/i && $line=~/_croak/i) {
if ($line=~/Client::|Mob::|Corpse::|EntityList::/i && $line=~/_croak/i) {
#::: Client export
if ($export=~/all|client/i) {
@ -66,6 +67,12 @@ for my $file (@files) {
$object_prefix = "\$corpse->";
}
#::: Entity export
if ($export=~/all|entity/i) {
$split_key = "EntityList::";
$object_prefix = "\$entity_list->";
}
#::: Split on croak usage
@data = split($split_key, $line);
$usage = trim($data[1]);