Enhance ASS SLAP (now optional).

Also added a "sewercount++" easter egg cheat, just for fun.
This commit is contained in:
Mari the Deer 2021-06-02 01:16:49 +02:00
commit a45943763f
17 changed files with 127 additions and 10 deletions

View file

@ -8,6 +8,14 @@ extend Class SWWMHandler
transient ui int rss;
transient ui Font kfnt;
ui bool nostalgic;
transient int sewercnt;
private ui void CheatUITick()
{
if ( !sewercnt || (sewercnt < gametic) ) return;
let m = new("SWWMSewerCount").Init();
StatusBar.AttachMessage(m,-1111);
}
private void CheatEvent( ConsoleEvent e )
{
@ -311,7 +319,7 @@ extend Class SWWMHandler
if ( consoleplayer == e.Args[0] )
{
Console.Printf("\cyLet's mop up that big mess over there.\c-");
S_StartSound("misc/buyinv",CHAN_ITEM,CHANF_UI);
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
}
let cc = SWWMCorpseCleaner(ThinkerIterator.Create("SWWMCorpseCleaner",Thinker.STAT_USER).Next());
if ( !cc )
@ -322,6 +330,51 @@ extend Class SWWMHandler
}
else cc.Init(players[e.Args[0]].mo);
}
else if ( e.Name ~== "swwmsewercountcheat" )
{
if ( consoleplayer == e.Args[0] )
{
let cv = CVar.FindCVar('swwm_sewercount');
int cur = max(0,cv.GetInt());
if ( cur == 0 ) Console.Printf("\cyIt begins.\c-");
else switch ( Random[HudStuff](0,9) )
{
case 0:
Console.Printf("\cyAnother one?\c-");
break;
case 1:
Console.Printf("\cyOh hi Civvie.\c-");
break;
case 2:
Console.Printf("\cyIt does stink.\c-");
break;
case 3:
Console.Printf("\cyGod, imagine the smell...\c-");
break;
case 4:
Console.Printf("\cyObligatory sewer level?\c-");
break;
case 5:
Console.Printf("\cyYup! It's another sewer.\c-");
break;
case 6:
Console.Printf("\cyOh boy here we go...\c-");
break;
case 7:
Console.Printf("\cyIt smells, boy does it smell.\c-");
break;
case 8:
Console.Printf("\cyPlease don't sue me, Civvie.\c-");
break;
case 9:
Console.Printf("\cyOnce more, from the top!\c-");
break;
}
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
cv.SetInt(cur+1);
sewercnt = gametic;
}
}
}
private ui bool CheatInput( InputEvent e )
@ -330,7 +383,7 @@ extend Class SWWMHandler
String cht[] =
{
"swwmlodsofemone", "swwmdeeplore", "swwmfroggygang", "swwmforgetaboutit",
"swwmmisterproper",
"swwmmisterproper", "swwmstinky",
// SWWM Platinum cheats
"swwmimstuck", "swwmarmojumbo", "swwmdangimhealthy",
"swwmwarriorofzaemonath", "swwmpowerparp", "swwmcannotseemyhands",
@ -343,7 +396,7 @@ extend Class SWWMHandler
String cmd[] =
{
"swwmmoneycheat", "swwmlorecheat", "swwmfroggycheat", "swwmamnesiacheat",
"swwmjanitorcheat",
"swwmjanitorcheat", "swwmsewercountcheat",
// SWWM Platinum cheats
"swwmsafecheat", "swwmweaponcheat", "swwmhealcheat",
"swwmynykroncheat", "swwmgravcheat", "swwminvischeat",
@ -364,7 +417,7 @@ extend Class SWWMHandler
if ( kstr != cht[i].Left(kstr.length()) ) continue;
matchany = true;
if ( kstr != cht[i] ) continue;
if ( (i > 4) && !swwm_oldcheat )
if ( (i > 5) && !swwm_oldcheat )
{
let m = new("SWWMSecretZanavethMessage").Init();
StatusBar.AttachMessage(m,-1232);

View file

@ -223,6 +223,34 @@ Class SWWMAchievementNotification : HUDMessageBase
}
}
Class SWWMSewerCount : HUDMessageBase
{
int tics;
String str;
SWWMSewerCount Init()
{
tics = 150;
str = String.Format("Sewer Count: %d",swwm_sewercount);
return self;
}
override bool Tick()
{
if ( tics == 100 ) S_StartSound("misc/sewercount",CHAN_VOICE,CHANF_UI,1.,0.);
return (tics--<=0);
}
override void Draw( int bottom, int visibility )
{
if ( tics > 100 ) return;
double alph = clamp(tics/20.,0.,1.);
double x = (Screen.GetWidth()-(newsmallfont.StringWidth(str)*CleanXFac*2))/2;
double y = int(Screen.GetHeight()*.75)-(newsmallfont.GetHeight()*CleanYFac*2)/2;
Screen.DrawText(newsmallfont,Font.CR_GREEN,x,y,str,DTA_ScaleX,CleanXFac*2,DTA_ScaleY,CleanYFac*2,DTA_Alpha,alph);
}
}
// Secret dialogue
Class SWWMSecretZanavethMessage : HUDMessageBase
{

View file

@ -127,6 +127,7 @@ Class SWWMHandler : EventHandler
OnelinerUITick();
FlashUITick();
VanillaBossUITick();
CheatUITick();
}
override void WorldLinePreActivated( WorldEvent e )

View file

@ -1160,10 +1160,12 @@ Class Demolitionist : PlayerPawn
}
if ( buttslam && (!a || (a.Health <= 0)) )
{
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4);
if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
Spawn("SWWMItemFog",level.Vec3Offset(pos,diff/2));
A_QuakeEx(8,8,8,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:1.);
mystats.buttslams++;
lastbump *= .8;
}
}
if ( raging )
@ -1223,10 +1225,12 @@ Class Demolitionist : PlayerPawn
busted = true;
if ( buttslam )
{
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.2);
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4);
if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
Spawn("SWWMItemFog",Vec3Offset(0,0,Height));
A_QuakeEx(8,8,8,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:1.);
mystats.buttslams++;
lastbump *= .8;
}
}
}
@ -1319,10 +1323,12 @@ Class Demolitionist : PlayerPawn
A_StartSound("demolitionist/bump",CHAN_DAMAGE,CHANF_OVERLAP);
if ( buttslam )
{
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.2);
A_StartSound("demolitionist/buttslam",CHAN_DAMAGE,CHANF_OVERLAP,1.,.4);
if ( swwm_buttsfx ) A_StartSound("demolitionist/buttslamx",CHAN_DAMAGE,CHAN_OVERLAP,1.,.2);
Spawn("SWWMItemFog",Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2)));
A_QuakeEx(8,8,8,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:1.);
mystats.buttslams++;
lastbump *= .8;
}
if ( raging ) continue; // don't stop
}