Madcat lore.

This commit is contained in:
Mari the Deer 2022-04-16 02:04:48 +02:00
commit 7b30e1ebac
9 changed files with 674 additions and 3 deletions

View file

@ -715,6 +715,8 @@ extend Class SWWMHandler
let s = SWWMStats.Find(players[e.Args[0]]);
if ( s ) s.oldcheat = true;
}
else if ( e.Name ~== "swwmgamelore" )
SWWMLoreLibrary.Add(players[e.Args[0]],"Madcat");
// cheats go here
else CheatEvent(e);
}

View file

@ -9,7 +9,11 @@ Class DemolitionistGameTab : DemolitionistMenuTab
override DemolitionistMenuTab Init( DemolitionistMenu master )
{
title = StringTable.Localize("$SWWM_GAMETAB");
gamelist.Push((Class<MadcatGame>)('MadcatGame')); // test
for ( int i=0; i<AllClasses.Size(); i++ )
{
if ( AllClasses[i].isAbstract() || !(AllClasses[i] is 'MadcatGame') ) continue;
gamelist.Push((Class<MadcatGame>)(AllClasses[i]));
}
bDirectInput = true;
return Super.Init(master);
}
@ -23,6 +27,22 @@ Class DemolitionistGameTab : DemolitionistMenuTab
override void OnSelect()
{
sel = master.shnd.menustate.At("LastGame").ToInt();
// auto-add lore for kris
let lore = SWWMLoreLibrary.Find(players[consoleplayer]);
bool found = false;
for ( int i=0; i<lore.ent.Size(); i++ )
{
if ( !(lore.ent[i].tag ~== "$SWWM_LORETAG_MADCAT") ) continue;
found = true;
break;
}
if ( !found )
{
EventHandler.SendNetworkEvent("swwmgamelore",consoleplayer);
// notify
master.tmsg = StringTable.Localize("$SWWM_NEWLORE");
master.tmsgtic = gametic+70;
}
}
override void OnDeselect()
{

View file

@ -555,6 +555,8 @@ Class SWWMLoreLibrary : Thinker
text = "SWWM_LORETXT_YNYKRON2"; // confirmed to harm (but not kill) gods
else if ( text ~== "SWWM_LORETXT_ZANAVETH2" )
text = "SWWM_LORETXT_ZANAVETH22"; // met at wedding
else if ( text ~== "SWWM_LORETXT_MADCAT" )
text = "SWWM_LORETXT_MADCAT3"; // demolition quest released
}
if ( (gameinfo.gametype&GAME_Raven) || (mlog && (mlog.year >= 2171) && (mlog.month >= 3)) )
{
@ -570,6 +572,8 @@ Class SWWMLoreLibrary : Thinker
text = "SWWM_LORETXT_HELL3"; // invasion was a thing of the past
else if ( text ~== "SWWM_LORETXT_UAC" )
text = "SWWM_LORETXT_UAC3"; // events of doom 64 and more
else if ( text ~== "SWWM_LORETXT_MADCAT" )
text = "SWWM_LORETXT_MADCAT2"; // interstellar demolitionist released
}
if ( (gameinfo.gametype&GAME_Raven) || SWWMUtility.IsEviternity() || (mlog && (mlog.year >= 2150) && (mlog.month >= 5)) )
{