Add debug function to dump defined monsters.

This commit is contained in:
Mari the Deer 2023-07-01 14:10:50 +02:00
commit 2d429be2b7
2 changed files with 22 additions and 2 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r813 \cu(Sat 1 Jul 14:10:36 CEST 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r813 \cu(2023-07-01 14:10:36)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r814 \cu(Sat 1 Jul 14:10:50 CEST 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r814 \cu(2023-07-01 14:10:50)\c-";

View file

@ -440,6 +440,26 @@ Class SWWMStaticHandler : StaticEventHandler
}
if ( !fail ) Console.Printf("ALL OK");
}
else if ( e.Name ~== "swwmdumpmonsters" )
{
int i = 0;
bool bLastVanilla = false;
foreach ( cls:AllActorClasses )
{
if ( cls.IsAbstract() ) continue;
if ( cls == 'ChexSoul' ) // last defined in gzdoom.pk3
{
bLastVanilla = true;
continue;
}
if ( !bLastVanilla ) continue;
let def = GetDefaultByType(cls);
if ( !def.bISMONSTER && !def.bCOUNTKILL ) continue;
Console.Printf("%s [%s]",def.GetClassName(),def.GetTag("NO TAG"));
i++;
}
Console.Printf("\n%d estimated monsters defined.",i);
}
}
override void NetworkProcess( ConsoleEvent e )