From 2d429be2b7617c03382337b6f227c18cdb5bbd8f Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Sat, 1 Jul 2023 14:10:50 +0200 Subject: [PATCH] Add debug function to dump defined monsters. --- language.version | 4 ++-- zscript/handler/swwm_statichandler.zsc | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/language.version b/language.version index 77df3c5b3..fe3ca25ec 100644 --- a/language.version +++ b/language.version @@ -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-"; diff --git a/zscript/handler/swwm_statichandler.zsc b/zscript/handler/swwm_statichandler.zsc index 811fbabb1..07fd5029c 100644 --- a/zscript/handler/swwm_statichandler.zsc +++ b/zscript/handler/swwm_statichandler.zsc @@ -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 )