swwmgz_m/zscript/swwm_shame.zsc
Marisa Kirisame eb2ee7b29f Push to master all the current WIP stuff in 0.9.11b:
- Reduce number of collectibles (some might come back in the future).
 - Merge both DLC weaponsets into one, removing redundant weapons.
 - Readjust prices of some items.
 - Initial work on collectibles (currently Frispy Corn is done).
 - Added bigfont for main menu, based on Source Han Sans.
 - Reduced default HUD margin to 10.
 - Added blob shadows.
 - Added precise crosshair drawing.
 - Tweaked decals, imported more stuff from UT.
 - Swapped the Ynykron impact decal for something better.
 - Fixes to slope alignment code.
 - Implemented headpats for MBF Helper Dogs and Cacodemons.
 - Implemented partial HDoom support, with love and headpats.
 - Fix various string functions breaking on unicode.
 - Added cracktro-style text scroll to Titlemap.
 - Fixed handling of healthbars for friendly monsters.
 - Workaround for maps that use the old author name hack (" - by: " separator).
 - Fixed Silver Bullet not autoswitching on first pickup.
 - Fixed misalignment of Silver Bullet zoomed aim.
 - Silver Bullet is unchambered on first pickup, consistent with Candygun.
 - Adjusted collision sizes of all items across the board.
 - Implemented "Use To Pickup" to work around any issues introduced by the previous change.
 - Swapped CHANF_LOOPING for CHANF_LOOP in many cases, this was a typo.
 - Tweaked Biospark arc lengths, for balance and higher performance.
 - Fix misaligned fire offsets of some weapons (most noticeable on Wallbuster).
 - Prettified the loading disclaimers for BD and HDoom.
 - Add pickup flash to all items.
 - Add custom key models for Doom and Heretic.
 - Fix blown kisses giving you "need key" messages.
 - Fix worn armor and embiggeners not being removed on scripted inventory resets.
 - Remove all references to the no longer planned Radio.
 - Workaround for gzdoom devbuild quirk where MenuSound changed its argument type.
 - Added timezone to fake clock.
 - Fix some times and dates in said clock.
 - SWWM blood now also hits ceilings.
 - Added default properties to DLC ammo and weapon stubs.
 - Lore entries for collectibles and dlc weapons (incomplete).
 - Massive amount of typo fixes across the board.
2020-10-20 11:37:14 +02:00

248 lines
9.3 KiB
Text

// SHAMEFUL DISPLAY
// At this point there's no clearer way to tell people to stop combining
// incompatible mods.
// The BD crowd never listens, never learns, you can't just mix up gameplay
// mods and expect everything to work.
// You also can't expect modders to put in the effort needed to go and add
// compatibility for a mod that wouldn't even make any sense to add
// compatibility for because both replace the same things and are entirely
// different beasts with different styles altogether.
// Just stop. Put that gray matter to use. Do you really think it's worth it?
// Don't do this shit.
Class SWWMBrutalHandler : StaticEventHandler
{
ui int timer;
ui TextureID scr;
bool detected;
override void OnRegister()
{
for ( int i=0; i<AllActorClasses.size(); i++ )
{
if ( (AllActorClasses[i].GetClassName() != "BrutalWeapon")
&& (AllActorClasses[i].GetClassName() != "BrutalDoomer") ) continue;
detected = true;
break;
}
SetRandomSeed[bdscreen](Random[bdscreen]()+consoleplayer+MSTime());
if ( !detected ) return;
Console.Printf(
"\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n"
"\cx┃ \cfIf you have BD on your autoload you really shouldn't. \cx┃\n"
"\cx┃ \cfIf you manually loaded it with this mod, why would you? \cx┃\n"
"\cx┃ \cfThey're not compatible and never will be. \cx┃\n"
"\cx┃ \cfThis mod will now shit the bed once you go in-game, \cx┃\n"
"\cx┃ \cfand trust me, it's better this way. \cx┃\n"
"\cx┃ \cf<See you again, have a nice day> \cx┃\n"
"\cx┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛");
}
override void UiTick()
{
if ( !detected ) return;
if ( gamestate == GS_LEVEL )
{
if ( timer == 1 )
{
S_StartSound("brutal/ezmodo",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
S_StartSound("brutal/ezmodo",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
}
else if ( timer == 350 ) ThrowAbortException("This manual abort is for your own safety");
timer++;
}
else timer = 0;
}
override void WorldTick()
{
if ( !detected ) return;
for ( int i=0; i<MAXPLAYERS; i++ ) if ( playeringame[i] ) players[i].cheats |= CF_TOTALLYFROZEN;
}
override void RenderOverlay( RenderEvent e )
{
if ( !detected ) return;
if ( !scr ) scr = TexMan.CheckForTexture("graphics/bdscreen.png",TexMan.Type_Any);
Screen.Dim("Red",(timer/350.)-.2,0,0,Screen.GetWidth(),Screen.GetHeight());
double ar = Screen.GetAspectRatio();
Vector2 tsize = TexMan.GetScaledSize(scr);
Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight());
if ( (tsize.x > vsize.x) || (tsize.y > vsize.y) )
{
double sar = tsize.x/tsize.y;
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
else vsize = tsize;
}
Screen.DrawTexture(scr,false,(vsize.x-tsize.x)/2.+FRandom[bdscreen](-1,1)*max(timer-40,0)**3*.000003,(vsize.y-tsize.y)/2.+FRandom[bdscreen](-1,1)*max(timer-40,0)**3*.000003,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,min(1.,timer/50.));
Screen.Dim("Red",(timer/70.)-3.5,0,0,Screen.GetWidth(),Screen.GetHeight());
}
}
// HORNY
// Surprisingly, I've put in actual effort into this compatibility thing (even
// if it's just sort of partial).
// Demo-chan has no pp in this body that they can stick into the girls, so all
// they get is the headpats. There's some sort of crazy magic going on here,
// that makes the demon gals fall to their knees instantly. Saya thinks it
// might be a side effect of teaching them the "blow kiss" spell (which has the
// same effect).
// Obviously, all the standard weapons work, and these gals appear to be of the
// masochistic kind. This is generally not very effective compared to the pats
// and smooches, but it's there, if you're willing to hurt them (I wouldn't).
Class SWWMHDoomHandler : StaticEventHandler
{
ui int timer;
ui TextureID scr;
bool detected;
override void OnRegister()
{
for ( int i=0; i<AllActorClasses.size(); i++ )
{
if ( AllActorClasses[i].GetClassName() != "HDoomPlayer" ) continue;
detected = true;
break;
}
SetRandomSeed[hdscreen](Random[hdscreen]()+consoleplayer+MSTime());
if ( !detected ) return;
Console.Printf(
"\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n"
"\cx┃ \cfOh my, someone appears to be \cgH \ckO \cdR \cvN \chY \ct♥ \cx┃\n"
"\cx┃ \cfWell, all you'll be getting here is the power of headpats. \cx┃\n"
"\cx┃ \cfIf you want Demo-chan to actually fuck some hot demon girls, \cx┃\n"
"\cx┃ \cfjust go commission a porn artist or something, idk. \cx┃\n"
"\cx┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛");
}
static bool IsCuteGirl( Actor a )
{
Class p = a.GetClass();
while ( p.GetParentClass() && (p.GetParentClass() != 'Actor') )
{
p = p.GetParentClass();
if ( p.GetClassName() == 'HDoomMonster' )
return true;
}
return false;
}
static bool IsSexyTime( Actor a )
{
Class p = a.GetClass();
while ( p.GetParentClass() && (p.GetParentClass() != 'Actor') )
{
p = p.GetParentClass();
if ( p.GetClassName() == 'SexActor' )
return true;
}
return false;
}
static bool IsStaticSexyTime( Actor a )
{
Class p = a.GetClass();
while ( p.GetParentClass() && (p.GetParentClass() != 'Actor') )
{
p = p.GetParentClass();
if ( p.GetClassName() == 'StaticSexActor' )
return true;
}
return false;
}
override void WorldThingSpawned( WorldEvent e )
{
// demo can't sex the ladies (not with this body)
// spawn a headpat tracker, we can at least do this much for them
if ( IsSexyTime(e.Thing) )
{
e.Thing.bUSESPECIAL = false;
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
// sweet dreams, demon
HeadpatTracker(hp).patstate = e.Thing.FindState("TooLate");
HeadpatTracker(hp).deathstate = e.Thing.FindState("Finish");
// height fixes
String cname = e.Thing.GetClassName();
if ( cname.Left(12) ~== "Cacodemoness" )
HeadpatTracker(hp).hdoomheightfix = .2;
else if ( cname.Left(12) ~== "ImpEncounter" )
HeadpatTracker(hp).hdoomheightfix = .35;
else if ( cname.Left(8) ~== "Mancubus" )
HeadpatTracker(hp).hdoomheightfix = .1;
else if ( cname.Left(9) ~== "HLostSoul" )
HeadpatTracker(hp).hdoomheightfix = .5;
else if ( cname.Left(10) ~== "ArchViless" )
HeadpatTracker(hp).hdoomheightfix = -.1;
}
else if ( IsStaticSexyTime(e.Thing) )
{
e.Thing.bUSESPECIAL = false;
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
if ( e.Thing.GetClassName() == 'ImpInAChair' )
{
HeadpatTracker(hp).hdoomheightfix = .2;
HeadpatTracker(hp).hdoomangfix = 15;
}
}
else if ( IsCuteGirl(e.Thing) )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
// sweet dreams, demon
HeadpatTracker(hp).lethalpat = true;
String cname = e.Thing.GetClassName();
// height fixes
if ( cname.Left(12) ~== "ImpEncounter" )
HeadpatTracker(hp).hdoomheightfix = .1;
else if ( cname.Left(8) ~== "Mancubus" )
HeadpatTracker(hp).hdoomheightfix = -.1;
else if ( cname.Left(9) ~== "HLostSoul" )
HeadpatTracker(hp).hdoomheightfix = .5;
else if ( cname.Left(10) ~== "ArchViless" )
HeadpatTracker(hp).hdoomheightfix = -.3;
}
}
override void UiTick()
{
if ( !detected ) return;
if ( gamestate == GS_LEVEL )
{
if ( timer == 50 )
{
S_StartSound("bestsound",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
S_StartSound("bestsound",CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
}
else if ( timer == 70 )
{
int ngiggl = Random[hdscreen](1,14);
S_StartSound(String.Format("saya/giggle%d",ngiggl),CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
S_StartSound(String.Format("saya/giggle%d",ngiggl),CHAN_YOUDONEFUCKEDUP,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);
}
timer++;
}
else timer = 0;
}
override void RenderOverlay( RenderEvent e )
{
if ( !detected || (timer < 50) || (timer > 150) ) return;
if ( !scr ) scr = TexMan.CheckForTexture("graphics/hdscreen.png",TexMan.Type_Any);
double ar = Screen.GetAspectRatio();
Vector2 tsize = TexMan.GetScaledSize(scr);
Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight());
if ( (tsize.x > vsize.x) || (tsize.y > vsize.y) )
{
double sar = tsize.x/tsize.y;
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
else vsize = tsize;
}
double alph = clamp(2.5-(timer+e.FracTic)/50.,0.,.25)*4.;
Screen.DrawTexture(scr,false,(vsize.x-tsize.x)/2.,(vsize.y-tsize.y)/2.,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alph);
}
}