mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Add "mob" to perl-doc-parser.pl
This commit is contained in:
parent
214503617e
commit
332a3d6c6a
@ -1,6 +1,21 @@
|
||||
use File::Find;
|
||||
use Data::Dumper;
|
||||
|
||||
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 " --all - Prints methods for all classes\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if($#ARGV < 0) {
|
||||
usage();
|
||||
}
|
||||
|
||||
my $export = $ARGV[0];
|
||||
$export=~s/--//g;
|
||||
|
||||
my @files;
|
||||
my $start_dir = "zone/";
|
||||
find(
|
||||
@ -14,6 +29,13 @@ for my $file (@files) {
|
||||
next;
|
||||
}
|
||||
|
||||
#::: If we are specifying a specific class type, skip everything else
|
||||
if ($export ne "all" && $export ne "") {
|
||||
if ($file!~/$export/i) {
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
@methods = ();
|
||||
|
||||
#::: Open File
|
||||
@ -23,10 +45,19 @@ for my $file (@files) {
|
||||
chomp;
|
||||
$line = $_;
|
||||
|
||||
if ($line=~/Client::/i) {
|
||||
if ($line=~/Client::|Mob::/i && $line=~/_croak/i) {
|
||||
|
||||
$split_key = "Client::";
|
||||
$object_prefix = "\$client->";
|
||||
#::: Client export
|
||||
if ($export=~/all|client/i) {
|
||||
$split_key = "Client::";
|
||||
$object_prefix = "\$client->";
|
||||
}
|
||||
|
||||
#::: Mob export
|
||||
if ($export=~/all|mob/i) {
|
||||
$split_key = "Mob::";
|
||||
$object_prefix = "\$mob->";
|
||||
}
|
||||
|
||||
#::: Split on croak usage
|
||||
@data = split($split_key, $line);
|
||||
|
||||
@ -7183,7 +7183,7 @@ XS(XS_Mob_IsRunning); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_IsRunning) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob:::IsRunning(THIS)");
|
||||
Perl_croak(aTHX_ "Usage: Mob::IsRunning(THIS)");
|
||||
{
|
||||
Mob *THIS;
|
||||
bool RETVAL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user