4.10 support update (unfinished and untested).

This commit is contained in:
Mari the Deer 2022-12-05 02:10:56 +01:00
commit 8e952f412f
80 changed files with 2343 additions and 2356 deletions

View file

@ -44,6 +44,9 @@ Class SWWMHandler : EventHandler
// to avoid some overlaps
ui DSMapTitle mapmsg;
// corruption cards stuff
ui bool incardmenu, cardmessaged;
enum EProfileTimer
{
PT_WORLDTICK,
@ -78,14 +81,14 @@ Class SWWMHandler : EventHandler
indoomvacation = -1;
inultdoom2 = -1;
// class-checking ones can be initialized here easily
for ( int i=0; i<AllActorClasses.Size(); i++ )
foreach ( cls:AllActorClasses )
{
if ( AllActorClasses[i].GetClassName() == "RLMonster" ) hasdrlamonsters = true;
else if ( AllActorClasses[i].GetClassName() == "LOBZombieman" ) haslegionofbones = true;
if ( cls.GetClassName() == "RLMonster" ) hasdrlamonsters = true;
else if ( cls.GetClassName() == "LOBZombieman" ) haslegionofbones = true;
}
for ( int i=0; i<AllClasses.Size(); i++ )
foreach ( cls:AllClasses )
{
if ( AllClasses[i].GetClassName() != "CCards_Global" ) continue;
if ( cls.GetClassName() != "CCards_Global" ) continue;
ccloaded = true;
break;
}
@ -100,11 +103,11 @@ Class SWWMHandler : EventHandler
dat.Replace("\r","");
list.Clear();
dat.Split(list,"\n");
for ( int i=0; i<list.Size(); i++ )
foreach ( l:list )
{
if ( (list[i].Length() == 0) || (list[i].Left(2) == "//") || (list[i].Left(1) == "") )
if ( (l.Length() == 0) || (l.Left(2) == "//") || (l.Left(1) == "") )
continue;
bludtypes.Push(list[i]);
bludtypes.Push(l);
}
}
// read damnum colors
@ -118,13 +121,13 @@ Class SWWMHandler : EventHandler
dat.Replace("\r","");
list.Clear();
dat.Split(list,"\n");
for ( int i=0; i<list.Size(); i++ )
foreach ( l:list )
{
if ( (list[i].Length() == 0) || (list[i].Left(1) == "#") || (list[i].Left(1) == "") )
if ( (l.Length() == 0) || (l.Left(1) == "#") || (l.Left(1) == "") )
continue;
int spc = list[i].IndexOf(" ");
damtypes.Push(list[i].Left(spc));
damcolors.Push(list[i].Mid(spc+1));
int spc = l.IndexOf(" ");
damtypes.Push(l.Left(spc));
damcolors.Push(l.Mid(spc+1));
}
}
// cache various services into the handler on register
@ -247,7 +250,19 @@ Class SWWMHandler : EventHandler
OnelinerUITick();
FlashUITick();
VanillaBossUITick();
MapstartUITick();
// corruption cards dialogue
if ( ccloaded && !gdat.ccstartonce && !cardmessaged && (gamestate == GS_LEVEL) )
{
let m = Menu.GetCurrentMenu();
if ( m && (m.GetClassName() == 'CorruptionCardsSelector') ) incardmenu = true;
else if ( incardmenu )
{
if ( !swwm_ccmessage ) SWWMDialogues.StartSeq(SWWMDLG_CC);
CVar.GetCVar('swwm_ccmessage').SetBool(true);
cardmessaged = true;
SendNetworkEvent("swwmccstart");
}
}
}
override void WorldLinePreActivated( WorldEvent e )