Add group to perl-doc-parser.pl - update usage docs for perl_groups.cpp

This commit is contained in:
Akkadius 2018-07-01 20:00:52 -05:00
parent ef39395580
commit 782c5ebc75
2 changed files with 19 additions and 12 deletions

View File

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

View File

@ -105,7 +105,7 @@ XS(XS_Group_CastGroupSpell)
{ {
dXSARGS; dXSARGS;
if (items != 3) if (items != 3)
Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, caster, spellid)"); Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, Mob* caster, uint16 spell_id)");
{ {
Group * THIS; Group * THIS;
Mob* caster; Mob* caster;
@ -139,7 +139,7 @@ XS(XS_Group_SplitExp)
{ {
dXSARGS; dXSARGS;
if (items != 3) if (items != 3)
Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, exp, other)"); Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, uint32 exp, Mob* other)");
{ {
Group * THIS; Group * THIS;
uint32 exp = (uint32)SvUV(ST(1)); uint32 exp = (uint32)SvUV(ST(1));
@ -173,7 +173,7 @@ XS(XS_Group_GroupMessage)
{ {
dXSARGS; dXSARGS;
if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability
Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, sender, language, message)"); Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, Mob* sender, uint8 language, string message)");
{ {
Group * THIS; Group * THIS;
Mob* sender; Mob* sender;
@ -218,7 +218,7 @@ XS(XS_Group_GetTotalGroupDamage)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, other)"); Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, Mob* other)");
{ {
Group * THIS; Group * THIS;
uint32 RETVAL; uint32 RETVAL;
@ -254,7 +254,7 @@ XS(XS_Group_SplitMoney)
{ {
dXSARGS; dXSARGS;
if (items != 5) if (items != 5)
Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, copper, silver, gold, platinum)"); Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)");
{ {
Group * THIS; Group * THIS;
uint32 copper = (uint32)SvUV(ST(1)); uint32 copper = (uint32)SvUV(ST(1));
@ -281,7 +281,7 @@ XS(XS_Group_SetLeader)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, newleader)"); Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, Mob* new_leader)");
{ {
Group * THIS; Group * THIS;
Mob* newleader; Mob* newleader;
@ -366,7 +366,7 @@ XS(XS_Group_SendHPPacketsTo)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, newmember)"); Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, Mob* new_member)");
{ {
Group * THIS; Group * THIS;
Mob* newmember; Mob* newmember;
@ -399,7 +399,7 @@ XS(XS_Group_SendHPPacketsFrom)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, newmember)"); Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, Mob* new_member)");
{ {
Group * THIS; Group * THIS;
Mob* newmember; Mob* newmember;
@ -432,7 +432,7 @@ XS(XS_Group_IsLeader)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, leadertest)"); Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, Mob* target)");
{ {
Group * THIS; Group * THIS;
bool RETVAL; bool RETVAL;
@ -520,7 +520,7 @@ XS(XS_Group_TeleportGroup)
{ {
dXSARGS; dXSARGS;
if (items != 7) if (items != 7)
Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, sender, zoneID, x, y, z, heading)"); Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
{ {
Group * THIS; Group * THIS;
Mob* sender; Mob* sender;
@ -584,7 +584,7 @@ XS(XS_Group_GetMember)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, index)"); Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, int group_index)");
{ {
Group * THIS; Group * THIS;
Mob* member; Mob* member;