diff --git a/filter/game-hexen/zscript/items/swwm_armor_filtered.zsc b/filter/game-hexen/zscript/items/swwm_armor_filtered.zsc index 397037e5b..39abd703a 100644 --- a/filter/game-hexen/zscript/items/swwm_armor_filtered.zsc +++ b/filter/game-hexen/zscript/items/swwm_armor_filtered.zsc @@ -17,8 +17,8 @@ Class BlastSuitItem : SWWMSpareArmor Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png"; Inventory.PickupMessage "$T_BLASTSUIT"; Inventory.UseSound "armor/blastsuit"; - Inventory.RestrictedTo "Demolitionist"; - SWWMSpareArmor.GiveArmor "BlastSuit"; + Inventory.RestrictedTo 'Demolitionist'; + SWWMSpareArmor.GiveArmor 'BlastSuit'; +NOGRAVITY; } States @@ -44,8 +44,8 @@ Class WarArmorItem : SWWMSpareArmor Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png"; Inventory.PickupMessage "$T_WARARMOR"; Inventory.UseSound "armor/wararmor"; - Inventory.RestrictedTo "Demolitionist"; - SWWMSpareArmor.GiveArmor "WarArmor"; + Inventory.RestrictedTo 'Demolitionist'; + SWWMSpareArmor.GiveArmor 'WarArmor'; +NOGRAVITY; } States diff --git a/language.version b/language.version index 9be28acdc..85670a6ae 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1196 \cu(dom 09 mar 2025 17:08:51 CET)\c-"; -SWWM_SHORTVER="\cw1.3pre r1196 \cu(2025-03-09 17:08:51)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1198 \cu(jue 13 mar 2025 14:50:58 CET)\c-"; +SWWM_SHORTVER="\cw1.3pre r1198 \cu(2025-03-13 14:50:58)\c-"; diff --git a/zscript.txt b/zscript.txt index 10610a881..df71e1d32 100644 --- a/zscript.txt +++ b/zscript.txt @@ -1,4 +1,4 @@ -version "4.14" +version "4.14.1" /* DEMOLITIONIST Main Codebase diff --git a/zscript/compat/swwm_compat.zsc b/zscript/compat/swwm_compat.zsc index 2533f99e4..befa3d61d 100644 --- a/zscript/compat/swwm_compat.zsc +++ b/zscript/compat/swwm_compat.zsc @@ -58,7 +58,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor SetSectorSpecial(13,0); // paint it black for ( int i=1; i<4; i++ ) - level.Sectors[13].SetSpecialColor(i,"Black"); + level.Sectors[13].SetSpecialColor(i,0xFF000000); // teleport sequence for ( int i=299; i<=306; i++ ) SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT')); @@ -76,7 +76,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor SetSectorSpecial(66,0); // paint it black for ( int i=1; i<4; i++ ) - level.Sectors[66].SetSpecialColor(i,"Black"); + level.Sectors[66].SetSpecialColor(i,0xFF000000); // teleport sequence for ( int i=299; i<=306; i++ ) SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT')); @@ -95,7 +95,7 @@ Class SWWMLevelCompatibility : LevelPostProcessor SetSectorSpecial(538,0); // paint it black for ( int i=1; i<4; i++ ) - level.Sectors[538].SetSpecialColor(i,"Black"); + level.Sectors[538].SetSpecialColor(i,0xFF000000); // teleport sequence static const int exitlines[] = { diff --git a/zscript/compat/swwm_hdoom.zsc b/zscript/compat/swwm_hdoom.zsc index 3937e219d..392ac38ee 100644 --- a/zscript/compat/swwm_hdoom.zsc +++ b/zscript/compat/swwm_hdoom.zsc @@ -24,12 +24,8 @@ Class SWWMHDoomHandler : StaticEventHandler override void OnRegister() { - foreach ( cls:AllActorClasses ) - { - if ( cls.GetClassName() != "HDoomPlayer" ) continue; + if ( FindClass('HDoomPlayer','PlayerPawn') ) detected = true; - break; - } if ( !detected ) return; callout_len = int(ceil((S_GetLength("hdoom/horny")*GameTicRate)/16)*16); diff --git a/zscript/compat/swwm_shame.zsc b/zscript/compat/swwm_shame.zsc index e87c5b06d..f8bab78a1 100644 --- a/zscript/compat/swwm_shame.zsc +++ b/zscript/compat/swwm_shame.zsc @@ -36,27 +36,22 @@ Class SWWMBrutalHandler : StaticEventHandler override void OnRegister() { // check for brutal doom - foreach ( cls:AllActorClasses ) - { - if ( (cls.GetClassName() == 'Doomer') || (cls.GetClassName() == 'BDoomer') || (cls.GetClassName() == 'BEDoomer') ) - { - detected = true; - } - if ( !detected ) continue; - let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); - shnd.isbd = true; - Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, - "\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n" - "\cx┃ \cfIf you have BD on your autoload you really shouldn't.\cx ┃\c-\n" - "\cx┃ \cfIf you manually loaded it with this mod, why would you?\cx ┃\c-\n" - "\cx┃ \cfThey're not compatible and never will be.\cx ┃\c-\n" - "\cx┃ \cfThis mod will now shit the bed once you go in-game,\cx ┃\c-\n" - "\cx┃ \cfand trust me, it's better this way.\cx ┃\c-\n" - "\cx┃ \cf\cx ┃\c-\n" - "\cx┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\c-"); - S_StartSound("compat/warn",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE); - break; - } + if ( FindClass('Doomer','PlayerPawn') || FindClass('BDoomer','PlayerPawn') || FindClass('BEDoomer','PlayerPawn') ) + detected = true; + if ( !detected ) + return; + let shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); + shnd.isbd = true; + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, + "\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n" + "\cx┃ \cfIf you have BD on your autoload you really shouldn't.\cx ┃\c-\n" + "\cx┃ \cfIf you manually loaded it with this mod, why would you?\cx ┃\c-\n" + "\cx┃ \cfThey're not compatible and never will be.\cx ┃\c-\n" + "\cx┃ \cfThis mod will now shit the bed once you go in-game,\cx ┃\c-\n" + "\cx┃ \cfand trust me, it's better this way.\cx ┃\c-\n" + "\cx┃ \cf\cx ┃\c-\n" + "\cx┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\c-"); + S_StartSound("compat/warn",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE); } override void WorldLoaded( WorldEvent e ) @@ -95,12 +90,12 @@ Class SWWMBrutalHandler : StaticEventHandler eztextpos[2] = (80.,140.); eztextpos[3] = (100.,1660.); eztextpos[4] = (300.,1660.); - ezcolor[0] = Font.FindFontColor("BDSayaRed"); - ezcolor[1] = Font.FindFontColor("BDSayaRed"); - ezcolor[2] = Font.FindFontColor("BDDemoGreen"); - ezcolor[3] = Font.FindFontColor("BDDemoGreen"); - ezcolor[4] = Font.FindFontColor("BDSayaRed"); - fnt = Font.GetFont("TewiFontOutline"); + ezcolor[0] = Font.FindFontColor('BDSayaRed'); + ezcolor[1] = Font.FindFontColor('BDSayaRed'); + ezcolor[2] = Font.FindFontColor('BDDemoGreen'); + ezcolor[3] = Font.FindFontColor('BDDemoGreen'); + ezcolor[4] = Font.FindFontColor('BDSayaRed'); + fnt = Font.GetFont('TewiFontOutline'); for ( int i=0; i<5; i++ ) { ezlines[i] = fnt.BreakLines(eztext[i],1000); @@ -175,30 +170,30 @@ Class SWWMBrutalHandler : StaticEventHandler override void RenderOverlay( RenderEvent e ) { if ( !detected ) return; - Screen.Dim("Black",clamp((timer+e.fractic)/50.,0.,.5),0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFF000000,clamp((timer+e.fractic)/50.,0.,.5),0,0,Screen.GetWidth(),Screen.GetHeight()); if ( timer < 50 ) return; double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.)/6.; Vector2 pos = ((Screen.GetWidth()-(2800.*hs))/2.,(Screen.GetHeight()-(2100.*hs))/2.); if ( timer > 300 ) { double fact = clamp(((timer+e.fractic)-300.)/100.,0.,1.); - Screen.Dim("Red",fact,0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Add); + Screen.Dim(0xFFFF0000,fact,0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Add); rss = MSTime()/10; pos.x += RandomShiver()*128.*hs*fact*fact; pos.y += RandomShiver()*128.*hs*fact*fact; } Screen.SetClipRect(int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs)); - Screen.Dim("White",1.,int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs)); + Screen.Dim(0xFFFFFFFF,1.,int(pos.x),int(pos.y),int(2800.*hs),int(2100.*hs)); rss = MSTime()/40; for ( int i=0; i<6; i++ ) { double ypos = RandomOffset()*2100.*hs; - Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,8.*hs,"Black"); + Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,8.*hs,0xFF000000); } for ( int i=0; i<12; i++ ) { double ypos = RandomOffset()*2100.*hs; - Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,2.*hs,"Black"); + Screen.DrawThickLine(pos.x,pos.y+ypos,pos.x+2800.*hs,pos.y+ypos,2.*hs,0xFF000000); } if ( ezstate[1] ) Screen.DrawTexture(eztex[2],false,pos.x+SWWMUtility.Lerp(ezslide[3],ezslide[2],e.fractic),pos.y,DTA_ScaleX,hs,DTA_ScaleY,hs); @@ -218,6 +213,6 @@ Class SWWMBrutalHandler : StaticEventHandler Screen.ClearClipRect(); Screen.DrawTexture(eztex[0],false,pos.x,pos.y,DTA_ScaleX,hs,DTA_ScaleY,hs); if ( timer > 300 ) - Screen.Dim("Red",clamp(((timer+e.fractic)-350.)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Translucent); + Screen.Dim(0xFFFF0000,clamp(((timer+e.fractic)-350.)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Translucent); } } diff --git a/zscript/dlc/swwm_ammoitems_dlc.zsc b/zscript/dlc/swwm_ammoitems_dlc.zsc index 14ba08247..cd1e35ddf 100644 --- a/zscript/dlc/swwm_ammoitems_dlc.zsc +++ b/zscript/dlc/swwm_ammoitems_dlc.zsc @@ -215,7 +215,7 @@ Class RayBolt : MagAmmo Tag "$T_RAYBOLT"; MagAmmo.PickupTag "RAYBOLT"; Stamina -8000; - MagAmmo.ParentAmmo "RayAmmo"; + MagAmmo.ParentAmmo 'RayAmmo'; MagAmmo.ClipSize 10; MagAmmo.BackpackAmount 2; Inventory.MaxAmount 10; @@ -254,7 +254,7 @@ Class RayAmmo : SWWMAmmo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 5; Ammo.DropAmount 1; - SWWMAmmo.MagAmmoType "RayBolt"; + SWWMAmmo.MagAmmoType 'RayBolt'; Accuracy 90; } States @@ -272,7 +272,7 @@ Class MisterRound : MagAmmo Tag "$T_MRROUND"; MagAmmo.PickupTag "MRROUND"; Stamina -16000; - MagAmmo.ParentAmmo "MisterAmmo"; + MagAmmo.ParentAmmo 'MisterAmmo'; MagAmmo.ClipSize 12; MagAmmo.BackpackAmount 1; Inventory.MaxAmount 12; @@ -318,7 +318,7 @@ Class MisterAmmo : SWWMAmmo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 3; Ammo.DropAmount 1; - SWWMAmmo.MagAmmoType "MisterRound"; + SWWMAmmo.MagAmmoType 'MisterRound'; Accuracy 90; } States @@ -359,7 +359,7 @@ Class MisterGAmmo : SWWMAmmo MagAmmo.PickupTag "ULTIMATEPOD"; Stamina -400000; Inventory.PickupSound "misc/bullet_pkup_vip"; - MagAmmo.ParentAmmo "UltimateAmmo"; + MagAmmo.ParentAmmo 'UltimateAmmo'; MagAmmo.ClipSize 4; Inventory.MaxAmount 4; } @@ -384,7 +384,7 @@ Class UltimateAmmo : SWWMAmmo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 2; Ammo.DropAmount 1; - SWWMAmmo.MagAmmoType "UltimatePod"; + SWWMAmmo.MagAmmoType 'UltimatePod'; } States { diff --git a/zscript/dlc/swwm_blastin.zsc b/zscript/dlc/swwm_blastin.zsc index 03bca05e8..592617646 100644 --- a/zscript/dlc/swwm_blastin.zsc +++ b/zscript/dlc/swwm_blastin.zsc @@ -36,7 +36,7 @@ Class PlasmaBlast : SWWMWeapon Weapon.SlotPriority 3.; Weapon.SelectionOrder 1100; Inventory.MaxAmount 2; - Weapon.SisterWeapon "DualPlasmaBlast"; + Weapon.SisterWeapon 'DualPlasmaBlast'; Stamina 7000; PlasmaBlast.ClipCount 8; +WEAPON.EXPLOSIVE; @@ -66,7 +66,7 @@ Class DualPlasmaBlast : SWWMWeapon Weapon.SlotNumber 2; Weapon.SlotPriority 4.; Weapon.SelectionOrder 1050; - Weapon.SisterWeapon "PlasmaBlast"; + Weapon.SisterWeapon 'PlasmaBlast'; DualPlasmaBlast.ClipCount 8; +WEAPON.EXPLOSIVE; +SWWMWEAPON.HIDEINMENU; diff --git a/zscript/dlc/swwm_blueballs.zsc b/zscript/dlc/swwm_blueballs.zsc index cd67f21ad..2a8494729 100644 --- a/zscript/dlc/swwm_blueballs.zsc +++ b/zscript/dlc/swwm_blueballs.zsc @@ -39,11 +39,11 @@ Class ModernSparkster : SWWMWeapon Weapon.SlotNumber 7; Weapon.SlotPriority 2.; Weapon.SelectionOrder 550; - Weapon.AmmoType1 "SparksterBAmmo"; + Weapon.AmmoType1 'SparksterBAmmo'; Weapon.AmmoGive1 1; - Weapon.AmmoType2 "SparksterRAmmo"; + Weapon.AmmoType2 'SparksterRAmmo'; Weapon.AmmoGive2 1; - SWWMWeapon.DropAmmoType "SWWMCellAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMCellAmmoSmall'; ModernSparkster.ClipCount 4; ModernSparkster.ClipCount2 4; Stamina 220000; diff --git a/zscript/dlc/swwm_dlcweapons_canvas.zsc b/zscript/dlc/swwm_dlcweapons_canvas.zsc index 69649395d..65245ea9d 100644 --- a/zscript/dlc/swwm_dlcweapons_canvas.zsc +++ b/zscript/dlc/swwm_dlcweapons_canvas.zsc @@ -153,7 +153,7 @@ extend Class MisterRifle y -= pady/2; w += padx; h += pady; - TouchScreen.Dim("Black",.8,x,y,w,h); + TouchScreen.Dim(0xFF000000,.8,x,y,w,h); TouchScreen.DrawTexture(FrameTex,false,x,y,DTA_SrcX,0.,DTA_SrcY,0.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,1,DTA_DestHeight,1); if ( w > 2 ) TouchScreen.DrawTexture(FrameTex,false,x+1,y,DTA_SrcX,1.,DTA_SrcY,0.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,int(w-2),DTA_DestHeight,1); if ( h > 2 ) TouchScreen.DrawTexture(FrameTex,false,x,y+1,DTA_SrcX,0.,DTA_SrcY,1.,DTA_SrcWidth,1.,DTA_SrcHeight,1.,DTA_DestWidth,1,DTA_DestHeight,int(h-2)); @@ -182,14 +182,14 @@ extend Class MisterRifle oldgrenade = gstate; // Side touchscreen if ( !TouchScreen ) TouchScreen = TexMan.GetCanvas("MORTLED1"); - if ( !MortalFontSmall ) MortalFontSmall = Font.GetFont("MortalFont20"); - if ( !MortalFontMed ) MortalFontMed = Font.GetFont("MortalFont40"); - if ( !MortalFontBig ) MortalFontBig = Font.GetFont("MortalFont80"); + if ( !MortalFontSmall ) MortalFontSmall = Font.GetFont('MortalFont20'); + if ( !MortalFontMed ) MortalFontMed = Font.GetFont('MortalFont40'); + if ( !MortalFontBig ) MortalFontBig = Font.GetFont('MortalFont80'); if ( !MortalBG ) MortalBG = TexMan.CheckForTexture("models/canvas/MortalBG.png"); if ( !MortalIcons[0] ) MortalIcons[0] = TexMan.CheckForTexture("models/canvas/MortalFireIcons.png"); if ( !MortalIcons[1] ) MortalIcons[1] = TexMan.CheckForTexture("models/canvas/MortalGrenadeIcons.png"); TouchScreen.DrawTexture(MortalBG,false,0,0); - TouchScreen.Dim("Black",.8,0,0,256,22); + TouchScreen.Dim(0xFF000000,.8,0,0,256,22); String str = "MR\cu-\c-"..serialnum; TouchScreen.DrawText(MortalFontSmall,Font.CR_WHITE,8,0,str); str = DemolitionistMenu.CrimeTime(c_year,c_month,c_day,c_hour,c_minute,c_tz,true); @@ -200,20 +200,20 @@ extend Class MisterRifle int fw = MortalFontBig.StringWidth(str), fh = MortalFontBig.GetHeight(); DrawWindowFrame(80-fw/2,72-fh/2,fw,fh,32); bool blink = (ingun<=4)&&(gametic%16<=8); - if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniBlurp"),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000); + if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniBlurp'),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000); else { - TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniBlurp"),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000); - if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniBlurp"),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000); + TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniBlurp'),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000); + if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniBlurp'),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000); } if ( ammoflash && (gametic < ammoflash) ) { double alph = (increase?clamp((ammoflash-(gametic+e.fractic))/25.,0.,1.):clamp((ammoflash-(gametic+e.fractic))/5.,0.,1.))**2.; - if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniWhiteFlash"),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); + if ( ingun <= 0 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniWhiteFlash'),80-fw/2,72-fh/2,"00",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); else { - TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniWhiteFlash"),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); - if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniWhiteFlash"),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); + TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniWhiteFlash'),80-fw/2,72-fh/2,str,DTA_ColorOverlay,blink?0x80000000:0x00000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); + if ( ingun < 10 ) TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniWhiteFlash'),80-fw/2,72-fh/2,"0 ",DTA_ColorOverlay,blink?0xA0000000:0x80000000,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); } } fw = 64; @@ -242,7 +242,7 @@ extend Class MisterRifle fw = MortalFontMed.StringWidth(str); fh = MortalFontMed.GetHeight(); DrawWindowFrame(128-fw/2,72-fh/2,fw,fh,8,4); - TouchScreen.DrawText(MortalFontMed,Font.FindFontColor("MiniBrass"),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%8>=4)?0x80000000:0x000000); + TouchScreen.DrawText(MortalFontMed,Font.FindFontColor('MiniBrass'),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%8>=4)?0x80000000:0x000000); } if ( noammotic && (noammotic > gametic) ) { @@ -251,7 +251,7 @@ extend Class MisterRifle fw = MortalFontBig.StringWidth(str); fh = MortalFontBig.GetHeight(); DrawWindowFrame(128-fw/2,72-fh/2,fw,fh,16,8); - TouchScreen.DrawText(MortalFontBig,Font.FindFontColor("MiniRed"),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%16>=8)?0x80000000:0x000000); + TouchScreen.DrawText(MortalFontBig,Font.FindFontColor('MiniRed'),128-fw/2,72-fh/2,str,DTA_ColorOverlay,(gametic%16>=8)?0x80000000:0x000000); } if ( prefirecnt > 0 ) { @@ -279,12 +279,12 @@ extend Class MisterRifle double bw = PreFireInter.GetValue(e.FracTic); Color barcol = SWWMUtility.LerpColor(0xFF000080,0xFF00C0FF,bw/100.); TouchScreen.Dim(barcol,1.,128-50,72+(fh/2-12),int(bw),8); - TouchScreen.DrawText(fnt,Font.FindFontColor("MiniCyanblu"),128-strw/2,72-fh/2+fofs,str); + TouchScreen.DrawText(fnt,Font.FindFontColor('MiniCyanblu'),128-strw/2,72-fh/2+fofs,str); if ( (prefirecnt >= 100) && ((gametic-holdtic)%32 <= 16) ) { double alph = clamp(1.-((gametic-holdtic)%32)/16.,0.,1.)**2.; TouchScreen.Dim(0xFFFFFFFF,alph*.8,128-50,72+(fh/2-12),int(bw),8,STYLE_Add); - TouchScreen.DrawText(fnt,Font.FindFontColor("MiniWhiteFlash"),128-strw/2,72-fh/2+fofs,str,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); + TouchScreen.DrawText(fnt,Font.FindFontColor('MiniWhiteFlash'),128-strw/2,72-fh/2+fofs,str,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_Add); } } // Holo sub-screen diff --git a/zscript/dlc/swwm_dlcweapons_hud.zsc b/zscript/dlc/swwm_dlcweapons_hud.zsc index d90df2559..82e475d08 100644 --- a/zscript/dlc/swwm_dlcweapons_hud.zsc +++ b/zscript/dlc/swwm_dlcweapons_hud.zsc @@ -158,7 +158,7 @@ extend Class MisterRifle if ( !ModeFont ) ModeFont = Font.GetFont('MiniHUDShadow'); Screen.DrawTexture(WeaponBox,false,bx-23,by-32,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); static const int fmod[] = {0x0050,0x0043,0x0053,0x004F}; - Screen.DrawChar(ModeFont,Font.FindFontColor("MiniBrass"),bx-20,by-20,fmod[firemode],DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + Screen.DrawChar(ModeFont,Font.FindFontColor('MiniBrass'),bx-20,by-20,fmod[firemode],DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); if ( chambered ) Screen.DrawTexture(BulletTex[0],false,bx-12,by-30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,fired?0x80000000:0x00000000); for ( int i=0; i 100. ) { @@ -150,7 +150,7 @@ Class HeavyMahSheenGun : SWWMWeapon let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self); double a = FRandom[Sheen](0,360), s = FRandom[Sheen](.002,.02)*spreadfct; Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s); - if ( !invoker.st ) invoker.st = new("PiercingTracer"); + if ( !invoker.st ) invoker.st = new('PiercingTracer'); let st = invoker.st; // thanks zscript st.penetration = 25.+invoker.barrelheat/6.; st.resist = .6+invoker.barrelheat/600.; @@ -170,14 +170,14 @@ Class HeavyMahSheenGun : SWWMWeapon } foreach ( w:st.WaterHitList ) { - let b = Spawn("InvisibleSplasher",w.hitpos); + let b = Spawn('InvisibleSplasher',w.hitpos); b.target = self; b.A_CheckTerrain(); } for ( int i=5; i 0) && (player.cmd.buttons&BT_ATTACK) ) - return A_Jump(256,"SlowFire2","SlowFire3"); + return A_Jump(256,'SlowFire2','SlowFire3'); return ResolveState(null); } Goto StopFire; @@ -437,7 +437,7 @@ Class HeavyMahSheenGun : SWWMWeapon XZW2 Z 0 { if ( !invoker.incooldown &&(invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) ) - return A_Jump(256,"SlowFire1","SlowFire3"); + return A_Jump(256,'SlowFire1','SlowFire3'); return ResolveState(null); } Goto StopFire; @@ -447,7 +447,7 @@ Class HeavyMahSheenGun : SWWMWeapon XZW3 U 0 { if ( !invoker.incooldown &&(invoker.Ammo1.Amount > 0) && (player.cmd.buttons&BT_ATTACK) ) - return A_Jump(256,"SlowFire1","SlowFire2"); + return A_Jump(256,'SlowFire1','SlowFire2'); return ResolveState(null); } Goto StopFire; @@ -457,7 +457,7 @@ Class HeavyMahSheenGun : SWWMWeapon XZW3 X 0 { A_CheckContinueFire(); - if ( !invoker.stopfire ) return A_Jump(256,"FastFire2","FastFire3"); + if ( !invoker.stopfire ) return A_Jump(256,'FastFire2','FastFire3'); A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); return ResolveState(null); @@ -469,7 +469,7 @@ Class HeavyMahSheenGun : SWWMWeapon XZW4 A 0 { A_CheckContinueFire(); - if ( !invoker.stopfire ) return A_Jump(256,"FastFire1","FastFire3"); + if ( !invoker.stopfire ) return A_Jump(256,'FastFire1','FastFire3'); A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); return ResolveState(null); @@ -481,7 +481,7 @@ Class HeavyMahSheenGun : SWWMWeapon XZW4 D 0 { A_CheckContinueFire(); - if ( !invoker.stopfire ) return A_Jump(256,"FastFire1","FastFire2"); + if ( !invoker.stopfire ) return A_Jump(256,'FastFire1','FastFire2'); A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); return ResolveState(null); @@ -496,7 +496,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast1"); + return ResolveState('EndFireFast1'); } A_SheenFire(); return ResolveState(null); @@ -508,7 +508,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast2"); + return ResolveState('EndFireFast2'); } A_SheenFire(); return ResolveState(null); @@ -520,7 +520,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast3"); + return ResolveState('EndFireFast3'); } A_SheenFire(); return ResolveState(null); @@ -532,7 +532,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast4"); + return ResolveState('EndFireFast4'); } A_SheenFire(); return ResolveState(null); @@ -544,7 +544,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast5"); + return ResolveState('EndFireFast5'); } A_SheenFire(); return ResolveState(null); @@ -556,7 +556,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast6"); + return ResolveState('EndFireFast6'); } A_SheenFire(); return ResolveState(null); @@ -569,7 +569,7 @@ Class HeavyMahSheenGun : SWWMWeapon { A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("sheen/fire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6,starttime:.2); - return ResolveState("EndFireFast7"); + return ResolveState('EndFireFast7'); } A_SheenFire(); return ResolveState(null); @@ -688,7 +688,7 @@ Class HeavyMahSheenGun : SWWMWeapon psp.frame = Random[GunFlash](0,23); if ( (invoker.firespeed != 2) || !(invoker.shotcnt%3) ) { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.target = self; l.Args[3] -= (psp.frame%3)*20; } diff --git a/zscript/dlc/swwm_heavymahsheengun_fx.zsc b/zscript/dlc/swwm_heavymahsheengun_fx.zsc index cadaf7d91..ca464348a 100644 --- a/zscript/dlc/swwm_heavymahsheengun_fx.zsc +++ b/zscript/dlc/swwm_heavymahsheengun_fx.zsc @@ -14,7 +14,7 @@ Class SheenPhantom : SWWMNonInteractiveActor { +INTERPOLATEANGLES; Alpha .5; - RenderStyle "Add"; + RenderStyle 'Add'; } override void Tick() { @@ -44,7 +44,7 @@ Class SheenTrail : SWWMNonInteractiveActor +FORCERADIUSDMG; +NODAMAGETHRUST; Speed 200; - RenderStyle "Add"; + RenderStyle 'Add'; } override void Tick() @@ -63,7 +63,7 @@ Class SheenTrail : SWWMNonInteractiveActor special1++; for ( int i=0; i<4; i++ ) { - let p = Spawn("SheenPhantom",level.Vec3Offset(oldpos,dir*(i+1)*50.)); + let p = Spawn('SheenPhantom',level.Vec3Offset(oldpos,dir*(i+1)*50.)); p.angle = angle; p.pitch = pitch; p.frame = special2; @@ -81,7 +81,7 @@ Class SheenTrail : SWWMNonInteractiveActor prev = oldpos; // interpolation SetOrigin(newpos,true); specialf1 -= speed; - if ( specialf1 <= 0 ) SetStateLabel("Death"); + if ( specialf1 <= 0 ) SetStateLabel('Death'); return; } if ( !CheckNoDelay() || (tics == -1) ) return; diff --git a/zscript/dlc/swwm_mister.zsc b/zscript/dlc/swwm_mister.zsc index 014e700d8..4a4e45ed1 100644 --- a/zscript/dlc/swwm_mister.zsc +++ b/zscript/dlc/swwm_mister.zsc @@ -33,19 +33,19 @@ Class MisterRailTracer : LineTracer // liquid splashes if ( Results.CrossedWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.CrossedWaterPos; WaterHitList.Push(hl); } else if ( Results.Crossed3DWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.Crossed3DWaterPos; WaterHitList.Push(hl); } if ( Results.HitType == TRACE_CrossingPortal ) { - let seg = new("MRRailSeg"); + let seg = new('MRRailSeg'); seg.enter = Results.HitPos; seg.exit = Results.SrcFromTarget; portalseg.Push(seg); @@ -54,7 +54,7 @@ Class MisterRailTracer : LineTracer { if ( Results.HitActor.bSHOOTABLE ) { - let ent = new("MRHitListEntry"); + let ent = new('MRHitListEntry'); ent.hitactor = Results.HitActor; ent.hitlocation = Results.HitPos; ent.x = Results.HitVector; @@ -63,7 +63,7 @@ Class MisterRailTracer : LineTracer hitlist.Push(ent); // also include exit point Vector3 exit = SWWMUtility.TraceExit(Results.HitActor,Results.HitPos,Results.HitVector); - ent = new("MRHitListEntry"); + ent = new('MRHitListEntry'); ent.hitactor = Results.HitActor; ent.hitlocation = exit; ent.x = Results.HitVector; @@ -233,13 +233,13 @@ Class MisterRifle : SWWMWeapon override bool ReportHUDAmmo() { - return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv("MisterRound")>0)||(gchambered&&!gfired)||(Ammo2.Amount>0); + return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv('MisterRound')>0)||(gchambered&&!gfired)||(Ammo2.Amount>0); } override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount ) { if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true; - if ( firemode == PrimaryFire ) return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv("MisterRound")>0); + if ( firemode == PrimaryFire ) return (chambered&&!fired)||(clipcount>0)||(Ammo1.Amount>0)||(Owner.CountInv('MisterRound')>0); if ( firemode == AltFire ) return (gchambered&&!gfired)||(Ammo2.Amount>0); return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount); } @@ -253,10 +253,10 @@ Class MisterRifle : SWWMWeapon // give bullets? if ( (clipcount > 0) || (chambered && !fired) ) { - Inventory cur = Owner.FindInventory("MisterRound"); + Inventory cur = Owner.FindInventory('MisterRound'); if ( !cur ) { - cur = Inventory(Spawn("MisterRound")); + cur = Inventory(Spawn('MisterRound')); cur.Amount = 0; cur.AttachToOwner(Owner); } @@ -270,10 +270,10 @@ Class MisterRifle : SWWMWeapon // give grenade? if ( gchambered && !gfired ) { - Inventory cur = Owner.FindInventory("MisterGAmmo"); + Inventory cur = Owner.FindInventory('MisterGAmmo'); if ( !cur ) { - cur = Inventory(Spawn("MisterGAmmo")); + cur = Inventory(Spawn('MisterGAmmo')); cur.Amount = 0; cur.AttachToOwner(Owner); } @@ -344,7 +344,7 @@ Class MisterRifle : SWWMWeapon // brass it up (though it's not made of brass) let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,2,3,-18); - let c = Spawn("MisterCasing",origin); + let c = Spawn('MisterCasing',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.25,.25)+y*FRandom[Junk](-.25,.25)-(0,0,FRandom[Junk](4.,6.)); @@ -365,16 +365,16 @@ Class MisterRifle : SWWMWeapon A_PlayerReload(); A_StartSound("mister/magout",CHAN_WEAPON,CHANF_OVERLAP); A_ChangeModel("",1,"","",7,"models",(invoker.clipcount>0)?"MortalMag.png":"MortalMag_Empty.png",CMDL_USESURFACESKIN,-1); - MagAmmo ma = MagAmmo(FindInventory("MisterRound")); + MagAmmo ma = MagAmmo(FindInventory('MisterRound')); if ( !ma ) { - ma = MagAmmo(Spawn("MisterRound")); + ma = MagAmmo(Spawn('MisterRound')); ma.Amount = 0; ma.AttachToOwner(self); } int maxgiveamt = min(ma.MaxAmount-ma.Amount,invoker.clipcount); int dropamt = invoker.clipcount-maxgiveamt; - if ( dropamt > 0 ) invoker.BufferMagAmmo("MisterRound",dropamt); + if ( dropamt > 0 ) invoker.BufferMagAmmo('MisterRound',dropamt); ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount); ma.MagFill(); invoker.clipcount = 0; @@ -388,7 +388,7 @@ Class MisterRifle : SWWMWeapon // drop it let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,6,3,-18); - let c = Spawn("MisterMag",origin); + let c = Spawn('MisterMag',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2.,4.)); @@ -404,7 +404,7 @@ Class MisterRifle : SWWMWeapon action void A_MagIn() { - MagAmmo sb = MagAmmo(FindInventory("MisterRound")); + MagAmmo sb = MagAmmo(FindInventory('MisterRound')); if ( sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) ) invoker.clipcount = invoker.default.clipcount; else if ( (invoker.Ammo1.Amount <= 0) || (sb.Amount >= sb.ClipSize) ) @@ -413,9 +413,9 @@ Class MisterRifle : SWWMWeapon invoker.clipcount = takeamt; sb.Amount -= takeamt; int req = invoker.default.ClipCount-invoker.clipcount; - if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo("MisterRound",req); + if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo('MisterRound',req); } - else if ( invoker.FetchBufferedMagAmmo("MisterRound",sb.ClipSize,true) ) + else if ( invoker.FetchBufferedMagAmmo('MisterRound',sb.ClipSize,true) ) invoker.clipcount = invoker.default.clipcount; else { @@ -432,13 +432,13 @@ Class MisterRifle : SWWMWeapon { // auto-chamber just in case (rarely ever happens) if ( invoker.ClipCount > 0 ) - return ResolveState("AutoCycle"); + return ResolveState('AutoCycle'); // auto-reload if we're out - if ( (invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || (CountInv("MisterRound") > 0) || sv_infiniteammo || FindInventory("PowerInfiniteAmmo")) ) - return ResolveState("Reload"); + if ( (invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || (CountInv('MisterRound') > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo')) ) + return ResolveState('Reload'); } // this one is handled separately - if ( invoker.firemode >= 3 ) return ResolveState("FireOverpressure"); + if ( invoker.firemode >= 3 ) return ResolveState('FireOverpressure'); A_PlayerFire(); A_SWWMFlash(); invoker.fired = true; @@ -450,7 +450,7 @@ Class MisterRifle : SWWMWeapon SWWMHandler.DoFlash(self,Color(32,64,224,255),2); A_AlertMonsters(swwm_uncapalert?0:4000); A_MisterFireStream(0); - return ResolveState("FireStream"); + return ResolveState('FireStream'); } SWWMHandler.DoFlash(self,Color(48,64,224,255),3); Vector3 x = SWWMUtility.GetPlayerViewDir(self); @@ -465,7 +465,7 @@ Class MisterRifle : SWWMWeapon A_AlertMonsters(swwm_uncapalert?0:8000); for ( int i=0; i<10; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .6; s.alpha *= .15; s.speed *= .8; @@ -498,12 +498,12 @@ Class MisterRifle : SWWMWeapon { if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT ) { - let p = Spawn("SpreadImpact",d.HitLocation); + let p = Spawn('SpreadImpact',d.HitLocation); p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.pitch = asin(d.HitDir.z); p.target = self; } - let b = Spawn("MisterBuckshotImpact",d.HitLocation-d.HitDir*4.); + let b = Spawn('MisterBuckshotImpact',d.HitLocation-d.HitDir*4.); b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.pitch = asin(d.HitDir.z); b.target = self; @@ -512,12 +512,12 @@ Class MisterRifle : SWWMWeapon else if ( d.HitType != TRACE_HitNone ) { Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); - let p = Spawn("SpreadImpact",d.HitLocation+hitnormal*0.01); + let p = Spawn('SpreadImpact',d.HitLocation+hitnormal*0.01); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); - let b = Spawn("MisterBuckshotImpact",d.HitLocation+hitnormal*4.); + let b = Spawn('MisterBuckshotImpact',d.HitLocation+hitnormal*4.); b.angle = atan2(hitnormal.y,hitnormal.x); b.pitch = asin(-hitnormal.z); b.target = self; @@ -525,7 +525,7 @@ Class MisterRifle : SWWMWeapon if ( swwm_omnibust ) BusterWall.BustLinetrace(d,444,self,d.HitDir,d.HitLocation.z); } } - return ResolveState("FireCluster"); + return ResolveState('FireCluster'); } // precision shot A_StartSound("mister/firesemi",CHAN_WEAPON,CHANF_OVERLAP); @@ -535,7 +535,7 @@ Class MisterRifle : SWWMWeapon A_AlertMonsters(swwm_uncapalert?0:6000); for ( int i=0; i<6; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .4; s.alpha *= .1; s.speed *= .5; @@ -550,12 +550,12 @@ Class MisterRifle : SWWMWeapon { if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT ) { - let p = Spawn("SWWMBulletImpact",d.HitLocation); + let p = Spawn('SWWMBulletImpact',d.HitLocation); p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.pitch = asin(d.HitDir.z); p.target = self; } - let b = Spawn("MisterBulletImpact",d.HitLocation-d.HitDir*4.); + let b = Spawn('MisterBulletImpact',d.HitLocation-d.HitDir*4.); b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.pitch = asin(d.HitDir.z); b.target = self; @@ -564,12 +564,12 @@ Class MisterRifle : SWWMWeapon else if ( d.HitType != TRACE_HitNone ) { Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); - let p = Spawn("SWWMBulletImpact",d.HitLocation+hitnormal*0.01); + let p = Spawn('SWWMBulletImpact',d.HitLocation+hitnormal*0.01); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); - let b = Spawn("MisterBulletImpact",d.HitLocation+hitnormal*4.); + let b = Spawn('MisterBulletImpact',d.HitLocation+hitnormal*4.); b.angle = atan2(hitnormal.y,hitnormal.x); b.pitch = asin(-hitnormal.z); b.target = self; @@ -585,7 +585,7 @@ Class MisterRifle : SWWMWeapon { A_PlayerFire(); SWWMHandler.DoFlash(self,Color(32,64,224,255),2); - A_SWWMFlash("FastFlash"); + A_SWWMFlash('FastFlash'); } Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-2.4); @@ -595,7 +595,7 @@ Class MisterRifle : SWWMWeapon if ( index == 0 ) A_AlertMonsters(swwm_uncapalert?0:5000); for ( int i=0; i<3; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .4; s.alpha *= .1; s.speed *= .5; @@ -613,12 +613,12 @@ Class MisterRifle : SWWMWeapon { if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT ) { - let p = Spawn("SWWMBulletImpact",d.HitLocation); + let p = Spawn('SWWMBulletImpact',d.HitLocation); p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.pitch = asin(d.HitDir.z); p.target = self; } - let b = Spawn("MisterStreamImpact",d.HitLocation-d.HitDir*4.); + let b = Spawn('MisterStreamImpact',d.HitLocation-d.HitDir*4.); b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.pitch = asin(d.HitDir.z); b.target = self; @@ -627,12 +627,12 @@ Class MisterRifle : SWWMWeapon else if ( d.HitType != TRACE_HitNone ) { Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); - let p = Spawn("SWWMBulletImpact",d.HitLocation+hitnormal*0.01); + let p = Spawn('SWWMBulletImpact',d.HitLocation+hitnormal*0.01); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); - let b = Spawn("MisterStreamImpact",d.HitLocation+hitnormal*4.); + let b = Spawn('MisterStreamImpact',d.HitLocation+hitnormal*4.); b.angle = atan2(hitnormal.y,hitnormal.x); b.pitch = asin(-hitnormal.z); b.target = self; @@ -669,7 +669,7 @@ Class MisterRifle : SWWMWeapon invoker.prefirecnt = 0; A_StopSound(CHAN_WEAPONEXTRA); A_StartSound("mister/cancelover",CHAN_WEAPON,CHANF_OVERLAP); - return ResolveState("FireOverpressureCancel"); + return ResolveState('FireOverpressureCancel'); } if ( invoker.prefirecnt < 100 ) { @@ -684,7 +684,7 @@ Class MisterRifle : SWWMWeapon A_SoundPitch(CHAN_WEAPONEXTRA,clamp(.5+invoker.prefirecnt*.005,.5,1.)**.5); if ( (invoker.prefirecnt >= 100) && !((gametic-invoker.holdtic)%32) && CheckLocalView() ) A_StartSound("mister/beepover",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf((invoker.prefirecnt>=100)&&!(player.cmd.buttons&BT_ATTACK),"FireOverpressureRelease"); + return A_JumpIf((invoker.prefirecnt>=100)&&!(player.cmd.buttons&BT_ATTACK),'FireOverpressureRelease'); } action void A_MisterFireRail() @@ -695,7 +695,7 @@ Class MisterRifle : SWWMWeapon Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-2.4); SWWMHandler.DoFlash(self,Color(64,64,224,255),9); - A_SWWMFlash("RailFlash"); + A_SWWMFlash('RailFlash'); invoker.fired = true; A_StartSound("mister/fireover",CHAN_WEAPON,CHANF_OVERLAP); SWWMUtility.DoKnockback(self,-x,90000.); @@ -704,7 +704,7 @@ Class MisterRifle : SWWMWeapon A_AlertMonsters(swwm_uncapalert?0:12000); for ( int i=0; i<12; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .4; s.alpha *= .1; s.vel += vel*.5+x*FRandom[Mister](1.,12.); @@ -712,7 +712,7 @@ Class MisterRifle : SWWMWeapon } Vector3 dir, startdir; startdir = dir = SWWMUtility.GetPlayerAimDir(self); - let mrt = new("MisterRailTracer"); // I pity the fool + let mrt = new('MisterRailTracer'); // I pity the fool mrt.hitlist.Clear(); mrt.shootthroughlist.Clear(); mrt.waterhitlist.Clear(); @@ -732,7 +732,7 @@ Class MisterRifle : SWWMWeapon dir = mrt.Results.HitVector; } while ( !mrt.fullstop ); - let mrc = new("MisterRailCounter"); + let mrc = new('MisterRailCounter'); mrc.ChangeStatNum(STAT_USER); // so it can tick mrc.player = player; Vector3 sstart = origin; @@ -745,7 +745,7 @@ Class MisterRifle : SWWMWeapon Actor b; if ( sdist > 32 ) { - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); b.target = self; b.frame = 1; b.speed = 32; @@ -754,11 +754,11 @@ Class MisterRifle : SWWMWeapon mrc.effectors.Push(b); sstart += sdir*32; sdist -= 32; - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); } else { - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); b.frame = 1; } b.target = self; @@ -777,7 +777,7 @@ Class MisterRifle : SWWMWeapon { if ( sdist > 32 ) { - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); b.target = self; b.frame = 1; b.speed = 32; @@ -786,15 +786,15 @@ Class MisterRifle : SWWMWeapon mrc.effectors.Push(b); sstart += sdir*32; sdist -= 32; - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); } else { - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); b.frame = 1; } } - else b = Spawn("MisterRailBeam",sstart); + else b = Spawn('MisterRailBeam',sstart); b.target = self; b.speed = sdist; [b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist); @@ -806,7 +806,7 @@ Class MisterRifle : SWWMWeapon sdir = mrt.Results.HitPos-sstart; sdist = sdir.length(); sdir /= sdist; - b = Spawn("MisterRailBeam",sstart); + b = Spawn('MisterRailBeam',sstart); b.target = self; b.speed = sdist; [b.angle, b.pitch, b.scale.y] = SWWMUtility.CalcYBeam(sdir,sdist); @@ -821,7 +821,7 @@ Class MisterRifle : SWWMWeapon } foreach ( w:mrt.WaterHitList ) { - let b = Spawn("InvisibleSplasher",w.hitpos); + let b = Spawn('InvisibleSplasher',w.hitpos); b.target = self; b.A_CheckTerrain(); } @@ -850,7 +850,7 @@ Class MisterRifle : SWWMWeapon } if ( mrt.HitList[i].bExit ) { - let b = MisterBulletImpact(Spawn("MisterRailExitImpact",mrt.hitlist[i].HitLocation-mrt.hitlist[i].x*4.)); + let b = MisterBulletImpact(Spawn('MisterRailExitImpact',mrt.hitlist[i].HitLocation-mrt.hitlist[i].x*4.)); b.angle = atan2(mrt.HitList[i].x.y,mrt.HitList[i].x.x); b.pitch = asin(-mrt.HitList[i].x.z); b.target = self; @@ -860,7 +860,7 @@ Class MisterRifle : SWWMWeapon bi.Push(b); continue; } - let b = MisterBulletImpact(Spawn("MisterRailEntryImpact",mrt.hitlist[i].HitLocation+mrt.hitlist[i].x*4.)); + let b = MisterBulletImpact(Spawn('MisterRailEntryImpact',mrt.hitlist[i].HitLocation+mrt.hitlist[i].x*4.)); b.angle = atan2(mrt.HitList[i].x.y,mrt.HitList[i].x.x)+180; b.pitch = asin(mrt.HitList[i].x.z); b.target = self; @@ -869,7 +869,7 @@ Class MisterRifle : SWWMWeapon mrc.effectors.Push(b); bi.Push(b); } - LineTracer faketracer = new("LineTracer"); + LineTracer faketracer = new('LineTracer'); for ( int i=0; i 0 ) { @@ -945,7 +945,7 @@ Class MisterRifle : SWWMWeapon mrh.Explode(); continue; } - mrh = MisterRailHit(Spawn("MisterRailHit",ofs)); + mrh = MisterRailHit(Spawn('MisterRailHit',ofs)); mrh.target = self; mrh.mrc = mrc; mrc.effectors.Push(mrh); @@ -956,7 +956,7 @@ Class MisterRifle : SWWMWeapon if ( !Random[ExploS](0,1) ) continue; Vector3 ofs = level.Vec3Offset(start,tdir*d); if ( !level.IsPointInLevel(ofs) ) continue; - let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs); b.Scale *= FRandom[ExploS](.7,1.4); b.alpha *= .2; b.framestep = Random[ExploS](2,4); @@ -980,7 +980,7 @@ Class MisterRifle : SWWMWeapon mrh.Explode(); continue; } - mrh = MisterRailHit(Spawn("MisterRailHit",ofs)); + mrh = MisterRailHit(Spawn('MisterRailHit',ofs)); mrh.target = self; mrh.mrc = mrc; mrc.effectors.Push(mrh); @@ -991,7 +991,7 @@ Class MisterRifle : SWWMWeapon if ( !Random[ExploS](0,1) ) continue; Vector3 ofs = level.Vec3Offset(start,tdir*d); if ( !level.IsPointInLevel(ofs) ) continue; - let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs); b.Scale *= FRandom[ExploS](.7,1.4); b.alpha *= .2; b.framestep = Random[ExploS](2,4); @@ -1012,7 +1012,7 @@ Class MisterRifle : SWWMWeapon mrh.Explode(); continue; } - mrh = MisterRailHit(Spawn("MisterRailHit",ofs)); + mrh = MisterRailHit(Spawn('MisterRailHit',ofs)); mrh.target = self; mrh.mrc = mrc; mrc.effectors.Push(mrh); @@ -1023,7 +1023,7 @@ Class MisterRifle : SWWMWeapon if ( !Random[ExploS](0,1) ) continue; Vector3 ofs = level.Vec3Offset(origin,startdir*d); if ( !level.IsPointInLevel(ofs) ) continue; - let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs); b.Scale *= FRandom[ExploS](.7,1.4); b.alpha *= .2; b.framestep = Random[ExploS](2,4); @@ -1038,7 +1038,7 @@ Class MisterRifle : SWWMWeapon Vector3 x = SWWMUtility.GetPlayerViewDir(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,2.8,-4); SWWMHandler.DoFlash(self,Color(64,64,224,255),3); - A_SWWMFlash("AltFlash"); + A_SWWMFlash('AltFlash'); invoker.gfired = true; A_StartSound("mister/grenade",CHAN_WEAPON,CHANF_OVERLAP); SWWMUtility.DoKnockback(self,-x,12000.); @@ -1047,14 +1047,14 @@ Class MisterRifle : SWWMWeapon A_AlertMonsters(swwm_uncapalert?0:5000); for ( int i=0; i<9; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .4; s.alpha *= .1; s.vel += vel*.5+x*FRandom[Mister](1.,4.); s.SetShade(Color(0,3,4)*Random[ExploS](48,63)); } Vector3 dir = SWWMUtility.GetPlayerAimDir(self); - let p = Spawn("MisterGrenade",origin); + let p = Spawn('MisterGrenade',origin); p.target = self; p.angle = atan2(dir.y,dir.x); p.pitch = asin(-dir.z); @@ -1092,7 +1092,7 @@ Class MisterRifle : SWWMWeapon // droppage let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,8,3,-18); - let c = Spawn("MisterGCasing",origin); + let c = Spawn('MisterGCasing',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2.,4.)); @@ -1110,7 +1110,7 @@ Class MisterRifle : SWWMWeapon action void A_GrenadeIn() { A_StartSound("mister/grenadein",CHAN_WEAPON,CHANF_OVERLAP); - if ( !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') ) invoker.Ammo2.Amount = max(0,invoker.Ammo2.Amount-1); invoker.gchambered = true; invoker.gfired = false; @@ -1199,11 +1199,11 @@ Class MisterRifle : SWWMWeapon Weapon.SlotPriority 2.; Weapon.SelectionOrder 850; Weapon.UpSound "mister/select"; - Weapon.AmmoType1 "MisterAmmo"; + Weapon.AmmoType1 'MisterAmmo'; Weapon.AmmoGive1 1; - Weapon.AmmoType2 "MisterGAmmo"; + Weapon.AmmoType2 'MisterGAmmo'; Weapon.AmmoGive2 0; - SWWMWeapon.DropAmmoType "SWWMCellAmmoBig"; + SWWMWeapon.DropAmmoType 'SWWMCellAmmoBig'; MisterRifle.ClipCount 12; Stamina 1600000; +SWWMWEAPON.NOFIRSTGIVE; @@ -1217,9 +1217,9 @@ Class MisterRifle : SWWMWeapon { A_ChangeModel("",1,"","",7,"models","MortalMag.png",CMDL_USESURFACESKIN,-1); A_FullRaise(); - if ( invoker.boltlock ) return ResolveState("SelectLock"); + if ( invoker.boltlock ) return ResolveState('SelectLock'); if ( (invoker.clipcount > 0) && (!invoker.chambered || invoker.fired) ) - return ResolveState("SelectCycle"); + return ResolveState('SelectCycle'); return ResolveState(null); } XZW2 QRSTUV 2; @@ -1250,7 +1250,7 @@ Class MisterRifle : SWWMWeapon { int flg = (WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1); // can't alt-fire if we have no grenades left - if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) + if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') ) flg |= WRF_NOSECONDARY; A_WeaponReady(flg); if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) ) @@ -1262,10 +1262,10 @@ Class MisterRifle : SWWMWeapon { int flg = (WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1); // can't alt-fire if we have no grenades left - if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) + if ( (!invoker.gchambered || invoker.gfired) && (invoker.Ammo2.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') ) flg |= WRF_NOSECONDARY; // can't use primary fire if we have no ammo to reload from - if ( (invoker.Ammo1.Amount <= 0) && (CountInv("MisterRound") <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo") ) + if ( (invoker.Ammo1.Amount <= 0) && (CountInv('MisterRound') <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') ) flg |= WRF_NOPRIMARY; A_WeaponReady(flg); if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) ) @@ -1273,7 +1273,7 @@ Class MisterRifle : SWWMWeapon } Wait; AutoCycle: - XZW2 A 1 A_JumpIf(invoker.clipcount<=0,"AutoCycleLock"); + XZW2 A 1 A_JumpIf(invoker.clipcount<=0,'AutoCycleLock'); XZW6 H 2 A_BoltBack(true); XZW6 IJ 2; XZW6 K 2 A_BoltForward(); @@ -1323,9 +1323,9 @@ Class MisterRifle : SWWMWeapon XZW2 A 1 { if ( !invoker.gchambered || invoker.gfired ) - return invoker.boltlock?ResolveState("AltReloadLock"):ResolveState("AltReload"); + return invoker.boltlock?ResolveState('AltReloadLock'):ResolveState('AltReload'); A_MisterFireGrenade(); - return A_JumpIf(invoker.boltlock,"AltFireLock"); + return A_JumpIf(invoker.boltlock,'AltFireLock'); } XZW4 OP 1; XZW4 QR 2; @@ -1380,10 +1380,10 @@ Class MisterRifle : SWWMWeapon Reload: XZW2 A 2 { - if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && (CountInv("MisterRound") <= 0) && !sv_infiniteammo && !FindInventory("PowerInfiniteAmmo")) ) - return invoker.boltlock?ResolveState("IdleLock"):ResolveState("Idle"); + if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && (CountInv('MisterRound') <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo')) ) + return invoker.boltlock?ResolveState('IdleLock'):ResolveState('Idle'); A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.boltlock,"ReloadLock"); + return A_JumpIf(invoker.boltlock,'ReloadLock'); } XZW9 KLMNOPQRST 2; XZW9 U 2 A_MagOut(); @@ -1461,13 +1461,13 @@ Class MisterRifle : SWWMWeapon XZW2 A 2 { A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.boltlock,"ZoomLock"); + return A_JumpIf(invoker.boltlock,'ZoomLock'); } XZW6 PQRSTUVW 2; XZW6 X 2 A_FireSelect(); XZW6 YZ 2; XZW7 A 2; - XZW7 B 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,"ReZoom"); + XZW7 B 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,'ReZoom'); XZW7 CD 2; XZW7 E 2 A_StartSound("mister/meleeend",CHAN_WEAPON,CHANF_OVERLAP,starttime:.35); XZW7 FGHI 2; @@ -1480,7 +1480,7 @@ Class MisterRifle : SWWMWeapon XZWE BCDEFGHI 2; XZWE J 2 A_FireSelect(); XZWE KLM 2; - XZWE N 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,"ReZoomLock"); + XZWE N 2 A_JumpIf(player.cmd.buttons&BT_ZOOM,'ReZoomLock'); XZWE OP 2; XZWE Q 2 A_StartSound("mister/meleeend",CHAN_WEAPON,CHANF_OVERLAP,starttime:.35); XZWE RSTU 2; @@ -1492,7 +1492,7 @@ Class MisterRifle : SWWMWeapon XZW2 A 2 { A_StartSound("mister/meleestart",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.boltlock,"User1Lock"); + return A_JumpIf(invoker.boltlock,'User1Lock'); } XZW8 MN 2; XZW8 O 2 @@ -1530,7 +1530,7 @@ Class MisterRifle : SWWMWeapon XZW2 A 2 { A_StartSound("mister/deselect",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.boltlock,"DeselectLock"); + return A_JumpIf(invoker.boltlock,'DeselectLock'); } XZW2 BCDE 2; XZW2 FGHIJKLMNO 1; @@ -1546,7 +1546,7 @@ Class MisterRifle : SWWMWeapon { let psp = player.FindPSprite(PSP_FLASH); psp.frame = Random[GunFlash](0,3); - let l = Spawn("MisterWeaponLight",pos); + let l = Spawn('MisterWeaponLight',pos); l.target = self; } Stop; @@ -1562,7 +1562,7 @@ Class MisterRifle : SWWMWeapon { let psp = player.FindPSprite(PSP_FLASH); psp.frame = Random[GunFlash](4,7); - let l = Spawn("MisterWeaponLight",pos); + let l = Spawn('MisterWeaponLight',pos); l.target = self; A_OverlayFlags(PSP_FLASH,PSPF_ALPHA|PSPF_FORCEALPHA,true); } @@ -1580,7 +1580,7 @@ Class MisterRifle : SWWMWeapon { let psp = player.FindPSprite(PSP_FLASH); psp.frame = Random[GunFlash](8,11); - let l = Spawn("MisterWeaponLight",pos); + let l = Spawn('MisterWeaponLight',pos); l.target = self; } Stop; diff --git a/zscript/dlc/swwm_mister_fx.zsc b/zscript/dlc/swwm_mister_fx.zsc index 4b635fcf8..70ec9e313 100644 --- a/zscript/dlc/swwm_mister_fx.zsc +++ b/zscript/dlc/swwm_mister_fx.zsc @@ -81,7 +81,7 @@ Class MisterRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 1.5; +FORCEXYBILLBOARD; } @@ -131,7 +131,7 @@ Class MisterBulletImpactPop : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 6.; +NODAMAGETHRUST; +FORCERADIUSDMG; @@ -178,7 +178,7 @@ Class MisterFuzzy : SWWMNonInteractiveActor { Obituary "$O_MORTALRIFLE"; DamageType 'CoAb44'; - RenderStyle "Add"; + RenderStyle 'Add'; +NODAMAGETHRUST; +FORCERADIUSDMG; +FOILINVUL; @@ -256,7 +256,7 @@ Class MisterFuzzy : SWWMNonInteractiveActor traildir /= len; for ( double i=0.; i candidates; - let tt = new("TargetTracer"); + let tt = new('TargetTracer'); tt.target = target; foreach ( s:level.Sectors ) for ( Actor t=s.thinglist; t; t=t.snext ) { @@ -1172,7 +1173,7 @@ Class MisterGrenade : Actor double ang = j; double pt = i; Vector3 dir = SWWMUtility.Vec3FromAngles(ang,pt); - let p = MisterSubGrenade(Spawn("MisterSubGrenade",pos)); + let p = MisterSubGrenade(Spawn('MisterSubGrenade',pos)); p.angle = ang; p.pitch = pt; p.vel = dir*p.speed; @@ -1184,8 +1185,8 @@ Class MisterGrenade : Actor k = (k+1)%candidates.Size(); } } - Spawn("MisterExLightBig",pos); - Spawn("MisterRing",pos); + Spawn('MisterExLightBig',pos); + Spawn('MisterRing',pos); } virtual void A_GrenadeSubExplode() @@ -1198,7 +1199,7 @@ Class MisterGrenade : Actor { Vector3 np = level.Vec3Offset(pos,SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](2,20)*special2); if ( !level.IsPointInLevel(np) ) continue; - let p = Spawn("MisterPop",np); + let p = Spawn('MisterPop',np); p.target = target; } } @@ -1300,7 +1301,7 @@ Class MisterSubGrenade : MisterGrenade for ( int i=0; i= invoker.Ammo1.MaxAmount ) { - let a = Inventory(Spawn("QuadravolAmmo",origin)); + let a = Inventory(Spawn('QuadravolAmmo',origin)); a.bDROPPED = true; a.DropTime = 30; a.bSpecial = a.bSolid = false; @@ -426,9 +426,9 @@ Class Quadravol : SWWMWeapon Weapon.SlotPriority 2.; Weapon.SelectionOrder 650; Weapon.UpSound "quadshot/select"; - Weapon.AmmoType1 "QuadravolAmmo"; + Weapon.AmmoType1 'QuadravolAmmo'; Weapon.AmmoGive1 3; - SWWMWeapon.DropAmmoType "SWWMRocketAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMRocketAmmoSmall'; Quadravol.ClipCount 5; Stamina 80000; +SWWMWEAPON.NOFIRSTGIVE; @@ -444,7 +444,7 @@ Class Quadravol : SWWMWeapon XZW2 R 1 { A_FullRaise(); - return A_JumpIf(invoker.onehand,"Select1H"); + return A_JumpIf(invoker.onehand,'Select1H'); } XZW2 STUVWXYZ 1; XZW3 ABCDEFGHI 1; @@ -467,9 +467,9 @@ Class Quadravol : SWWMWeapon { if ( invoker.chargelevel <= 0 ) { - if ( invoker.clipcount > 0 ) return ResolveState("AltFire"); + if ( invoker.clipcount > 0 ) return ResolveState('AltFire'); invoker.fromfire = true; - return ResolveState("Reload"); + return ResolveState('Reload'); } return A_QuadFire(); } @@ -506,7 +506,7 @@ Class Quadravol : SWWMWeapon XZW2 A 2 { A_PlayerCheckGun(); - return A_JumpIf(invoker.onehand,"AltFire1H"); + return A_JumpIf(invoker.onehand,'AltFire1H'); } XZW5 C 2; XZW5 D 2 A_LeverForward(); @@ -527,8 +527,8 @@ Class Quadravol : SWWMWeapon XZW2 A 2 { if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) ) - return invoker.onehand?ResolveState("Idle1H"):ResolveState("Idle"); - if ( invoker.onehand ) return ResolveState("Reload1H"); + return invoker.onehand?ResolveState('Idle1H'):ResolveState('Idle'); + if ( invoker.onehand ) return ResolveState('Reload1H'); A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP); return ResolveState(null); } @@ -547,12 +547,12 @@ Class Quadravol : SWWMWeapon XZW5 P 2 { if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) ) - return A_JumpIf(invoker.onehand,"ReloadEnd1H"); + return A_JumpIf(invoker.onehand,'ReloadEnd1H'); if ( invoker.fromfire && (player.cmd.buttons&BT_ATTACK) ) - return ResolveState("ReloadHold"); + return ResolveState('ReloadHold'); invoker.fromfire = false; - if ( player.cmd.buttons&BT_RELOAD ) return ResolveState("ReloadHold"); - return A_JumpIf(invoker.onehand,"ReloadEnd1H"); + if ( player.cmd.buttons&BT_RELOAD ) return ResolveState('ReloadHold'); + return A_JumpIf(invoker.onehand,'ReloadEnd1H'); } XZW6 B 2 A_StartSound("quadshot/twohand",CHAN_WEAPON,CHANF_OVERLAP); XZW6 CDEF 2; @@ -578,7 +578,7 @@ Class Quadravol : SWWMWeapon if ( invoker.onehand ) { invoker.onehand = false; - return ResolveState("Zoom1H"); + return ResolveState('Zoom1H'); } A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP); invoker.onehand = true; @@ -591,7 +591,7 @@ Class Quadravol : SWWMWeapon XZW2 A 1 { A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.onehand,"User11H"); + return A_JumpIf(invoker.onehand,'User11H'); } XZW7 BCD 1; XZW7 E 2 @@ -602,14 +602,14 @@ Class Quadravol : SWWMWeapon XZW7 FG 2; XZW7 H 2 A_Parry(6); XZW7 I 1; - XZW7 J 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),"Bayonet"); + XZW7 J 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),'Bayonet'); XZW7 KLM 1; XZW7 NOPQRSTUVWX 2; Goto Ready; Bayonet: XZW7 J 1 A_FireBayonet(); - XZW7 YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire"); - XZW8 ABC 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire"); + XZW7 YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire'); + XZW8 ABC 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire'); XZW8 D 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP); XZW8 EFGH 1; XZW8 IJKL 2; @@ -625,7 +625,7 @@ Class Quadravol : SWWMWeapon XZW2 A 1 { A_StartSound(invoker.onehand?"quadshot/deselectfast":"quadshot/deselect",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.onehand,"Deselect1H"); + return A_JumpIf(invoker.onehand,'Deselect1H'); } XZW2 BCDEFGHIJKLMNOPQ 1; XZW2 R -1 A_FullLower(); @@ -635,7 +635,7 @@ Class Quadravol : SWWMWeapon { let psp = player.GetPSprite(PSP_FLASH); psp.frame = Random[GunFlash](0,9)+invoker.onehand*10; - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.target = self; } Stop; @@ -741,15 +741,15 @@ Class Quadravol : SWWMWeapon XZWD DE 2; XZWD F 2 A_Parry(6); XZWD G 1; - XZWD H 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),"Bayonet1H"); + XZWD H 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),'Bayonet1H'); XZWD IJK 1; XZWD LMNOPQRSTUV 2; Goto Ready1H; Bayonet1H: XZWD H 1 A_FireBayonet(); - XZWD WX 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H"); - XZWD YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H"); - XZWE A 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H"); + XZWD WX 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire1H'); + XZWD YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire1H'); + XZWE A 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),'BayonetFire1H'); XZWE B 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP); XZWE CDEF 1; XZWE GHIJ 2; diff --git a/zscript/dlc/swwm_notashotgun_fx.zsc b/zscript/dlc/swwm_notashotgun_fx.zsc index 68c47d8d1..bf1537eb1 100644 --- a/zscript/dlc/swwm_notashotgun_fx.zsc +++ b/zscript/dlc/swwm_notashotgun_fx.zsc @@ -47,7 +47,7 @@ Class QuadFlare : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; Alpha .5; +FORCEXYBILLBOARD; } @@ -89,7 +89,7 @@ Class QuadTrail : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; Alpha .5; Scale 1.5; +FORCEXYBILLBOARD; @@ -178,7 +178,7 @@ Class QuadExplRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 1.2; +FORCEXYBILLBOARD; } @@ -202,7 +202,7 @@ Class QuadProj : Actor { Super.PostBeginPlay(); A_StartSound("quadshot/fly",CHAN_BODY,CHANF_LOOP); - let t = Spawn("QuadFlare",pos); + let t = Spawn('QuadFlare',pos); t.master = self; t.scale = scale*2.; } @@ -224,17 +224,17 @@ Class QuadProj : Actor virtual void A_QuadTrail() { - let t = Spawn("QuadTrail",pos); + let t = Spawn('QuadTrail',pos); t.scale *= .6; t.vel = vel*.2; - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.vel = SWWMUtility.Vec3FromAngles(FRandom[Quadravol](0,360),FRandom[Quadravol](-90,90))*.4; s.vel += vel*.3; s.alpha *= .4; int numpt = Random[Quadravol](5,15); for ( int i=0; i 0 ) { - let c = SWWMAnimSprite.SpawnAt("OnFireTrail",tpos); + let c = SWWMAnimSprite.SpawnAt('OnFireTrail',tpos); c.scale *= max(.35,mult*.6); c.vel = Owner.vel*.5+SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[FlameT](.5,2.)*c.scale.x; } if ( Random[FlameT](0,3) ) continue; - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",tpos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',tpos); s.scale *= max(.35,mult*.5); s.alpha *= min(amount+30,100)*.005; s.vel = Owner.vel*.5+SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[FlameT](.2,.6)*s.scale.x; @@ -1000,7 +1000,7 @@ Class OnFire : Inventory static OnFire Apply( Actor victim, Actor instigator, int amount ) { - let t = OnFire(victim.FindInventory("OnFire")); + let t = OnFire(victim.FindInventory('OnFire')); if ( t ) { t.instigator = instigator; @@ -1008,7 +1008,7 @@ Class OnFire : Inventory t.cnt = min(t.cnt,5); return t; } - t = OnFire(Spawn("ONFire")); + t = OnFire(Spawn('OnFire')); t.AttachToOwner(victim); t.instigator = instigator; t.amount = min(t.maxamount,amount); @@ -1022,7 +1022,7 @@ Class OnFire : Inventory static clearscope OnFire IsOnFire( Actor victim ) { - let t = OnFire(victim.FindInventory("OnFire")); + let t = OnFire(victim.FindInventory('OnFire')); if ( t && (t.amount > 0) ) return t; return null; } @@ -1064,7 +1064,7 @@ Class OnFireTrail : SWWMAnimSprite } if ( !Random[FlameT](0,int(40*(.3-alpha))) ) { - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.vel = SWWMUtility.Vec3FromAngles(FRandom[FlameT](0,360),FRandom[FlameT](-90,90))*.2; s.vel += vel*.3; s.alpha *= alpha*.5; diff --git a/zscript/dlc/swwm_rebolber.zsc b/zscript/dlc/swwm_rebolber.zsc index aba5fdcda..5a56fbcf2 100644 --- a/zscript/dlc/swwm_rebolber.zsc +++ b/zscript/dlc/swwm_rebolber.zsc @@ -31,9 +31,9 @@ Class PuntzerBeta : SWWMWeapon Weapon.SlotNumber 3; Weapon.SlotPriority 2.; Weapon.SelectionOrder 450; - Weapon.AmmoType1 "SMW05Ammo"; + Weapon.AmmoType1 'SMW05Ammo'; Weapon.AmmoGive1 6; - SWWMWeapon.DropAmmoType "SWWMShellAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMShellAmmoSmall'; Stamina 10000; +SWWMWEAPON.NOFIRSTGIVE; } diff --git a/zscript/dlc/swwm_supermarioworld.zsc b/zscript/dlc/swwm_supermarioworld.zsc index c79f58803..926aa0035 100644 --- a/zscript/dlc/swwm_supermarioworld.zsc +++ b/zscript/dlc/swwm_supermarioworld.zsc @@ -28,9 +28,9 @@ Class PuntzerGamma : SWWMWeapon Weapon.SlotPriority 2.; Weapon.SelectionOrder 350; PuntzerGamma.ClipCount 30; - Weapon.AmmoType1 "SMW05Ammo"; + Weapon.AmmoType1 'SMW05Ammo'; Weapon.AmmoGive1 30; - SWWMWeapon.DropAmmoType "SWWMShellAmmoBig"; + SWWMWeapon.DropAmmoType 'SWWMShellAmmoBig'; Stamina 30000; +SWWMWEAPON.NOFIRSTGIVE; +SWWMWEAPON.HASSCRTEX; diff --git a/zscript/dlc/swwm_thiccbolts.zsc b/zscript/dlc/swwm_thiccbolts.zsc index 9bf3c6a8a..797e677e6 100644 --- a/zscript/dlc/swwm_thiccbolts.zsc +++ b/zscript/dlc/swwm_thiccbolts.zsc @@ -46,9 +46,9 @@ Class RayKhom : SWWMWeapon Weapon.SlotNumber 8; Weapon.SlotPriority 2.; Weapon.SelectionOrder 750; - Weapon.AmmoType1 "RayAmmo"; + Weapon.AmmoType1 'RayAmmo'; Weapon.AmmoGive1 1; - SWWMWeapon.DropAmmoType "SWWMCellAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMCellAmmoSmall'; RayKhom.ClipCount 10; Stamina 500000; +SWWMWEAPON.NOFIRSTGIVE; diff --git a/zscript/dlc/swwm_ultimate.zsc b/zscript/dlc/swwm_ultimate.zsc index afb89c92a..fdb3bc036 100644 --- a/zscript/dlc/swwm_ultimate.zsc +++ b/zscript/dlc/swwm_ultimate.zsc @@ -41,9 +41,9 @@ Class RafanKos : SWWMWeapon Weapon.SlotNumber 0; Weapon.SlotPriority 2.; Weapon.SelectionOrder 8000; - Weapon.AmmoType1 "UltimateAmmo"; + Weapon.AmmoType1 'UltimateAmmo'; Weapon.AmmoGive1 1; - SWWMWeapon.DropAmmoType "SWWMCellAmmoBig"; + SWWMWeapon.DropAmmoType 'SWWMCellAmmoBig'; RafanKos.ClipCount 4; Stamina -5000000; +SWWMWEAPON.NOFIRSTGIVE; diff --git a/zscript/handler/swwm_handler.zsc b/zscript/handler/swwm_handler.zsc index 8283e2d65..5c44f351d 100644 --- a/zscript/handler/swwm_handler.zsc +++ b/zscript/handler/swwm_handler.zsc @@ -82,13 +82,13 @@ Class SWWMHandler : EventHandler static play void ToggleStore( bool val ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check hnd.gdat.disablestore = !val; } static play void ToggleRevive( bool val ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check hnd.gdat.disablerevive = !val; } @@ -103,17 +103,9 @@ Class SWWMHandler : EventHandler indoomvacation = -1; inultdoom2 = -1; // class-checking ones can be initialized here easily - foreach ( cls:AllActorClasses ) - { - if ( cls.GetClassName() == "RLMonster" ) hasdrlamonsters = true; - else if ( cls.GetClassName() == "LOBZombieman" ) haslegionofbones = true; - } - foreach ( cls:AllClasses ) - { - if ( cls.GetClassName() != "CCards_Global" ) continue; - ccloaded = true; - break; - } + if ( FindClass('RLMonster','Actor') ) hasdrlamonsters = true; + if ( FindClass('LOBZombieman','Actor') ) haslegionofbones = true; + if ( FindClass('CCards_Global','Thinker') ) ccloaded = true; if ( LevelInfo.MapExists("Z1M1") && (LevelInfo.MapChecksum("Z1M1") ~== "2B7744234ED2C162AD08A3255E979F65") ) iskdizd = true; // read bludtype files if they can be found @@ -155,10 +147,10 @@ Class SWWMHandler : EventHandler // cache various services into the handler on register // this dramatically reduces overhead by not having to use an iterator every time they're needed // especially noticeable for fun tags, as they're looked up for every monster on map load - let si = ServiceIterator.Find("FunTagService"); + let si = ServiceIterator.Find('FunTagService'); Service sv; while ( sv = si.Next() ) funtagsv.Push(sv); - si = ServiceIterator.Find("MergeMonsterService"); + si = ServiceIterator.Find('MergeMonsterService'); while ( sv = si.Next() ) mergemonstersv.Push(sv); // start profiling if ( swwm_profstart <= 0 ) return; @@ -181,7 +173,7 @@ Class SWWMHandler : EventHandler if ( !mnotify && (level.maptime >= 5) ) { mnotify = true; - let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMStats',Thinker.STAT_STATIC); SWWMStats s; while ( s = SWWMStats(ti.Next()) ) { diff --git a/zscript/handler/swwm_handler_cheats.zsc b/zscript/handler/swwm_handler_cheats.zsc index 748ecfc4e..881ea768e 100644 --- a/zscript/handler/swwm_handler_cheats.zsc +++ b/zscript/handler/swwm_handler_cheats.zsc @@ -91,9 +91,9 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/w_pkup",CHAN_VOICE,CHANF_UI); } - if ( players[e.Args[0]].mo.FindInventory("Ynykron") ) - players[e.Args[0]].mo.GiveInventory("YnykronAmmo",1); - else players[e.Args[0]].mo.GiveInventory("Ynykron",1); + if ( players[e.Args[0]].mo.FindInventory('Ynykron') ) + players[e.Args[0]].mo.GiveInventory('YnykronAmmo',1); + else players[e.Args[0]].mo.GiveInventory('Ynykron',1); } else if ( e.Name ~== "swwmgravcheat" ) { @@ -103,9 +103,9 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); } - let g = GravityPower(players[e.Args[0]].mo.FindInventory("GravityPower")); + let g = GravityPower(players[e.Args[0]].mo.FindInventory('GravityPower')); if ( g ) g.EffectTics += g.default.EffectTics; - else players[e.Args[0]].mo.GiveInventory("GravityPower",1); + else players[e.Args[0]].mo.GiveInventory('GravityPower',1); } else if ( e.Name ~== "swwminvischeat" ) { @@ -115,9 +115,9 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); } - let g = GhostPower(players[e.Args[0]].mo.FindInventory("GhostPower")); + let g = GhostPower(players[e.Args[0]].mo.FindInventory('GhostPower')); if ( g ) g.EffectTics += g.default.EffectTics; - else players[e.Args[0]].mo.GiveInventory("GhostPower",1); + else players[e.Args[0]].mo.GiveInventory('GhostPower',1); } else if ( e.Name ~== "swwmbarriercheat" ) { @@ -127,9 +127,9 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); } - let b = BarrierPower(players[e.Args[0]].mo.FindInventory("BarrierPower")); + let b = BarrierPower(players[e.Args[0]].mo.FindInventory('BarrierPower')); if ( b ) b.EffectTics += b.default.EffectTics; - else players[e.Args[0]].mo.GiveInventory("BarrierPower",1); + else players[e.Args[0]].mo.GiveInventory('BarrierPower',1); } else if ( e.Name ~== "swwmammocheat" ) { @@ -139,7 +139,7 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/ammo_pkup",CHAN_VOICE,CHANF_UI); } - players[e.Args[0]].mo.GiveInventory("TradedHammerspaceEmbiggener",8,true); + players[e.Args[0]].mo.GiveInventory('TradedHammerspaceEmbiggener',8,true); for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv ) { if ( !(i is 'Ammo') ) continue; @@ -171,7 +171,7 @@ extend Class SWWMHandler S_StartSound("fabricator/use",CHAN_VOICE,CHANF_UI); } players[e.Args[0]].health = players[e.Args[0]].mo.health = 1000; - players[e.Args[0]].mo.GiveInventory("TradedHammerspaceEmbiggener",8,true); + players[e.Args[0]].mo.GiveInventory('TradedHammerspaceEmbiggener',8,true); for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv ) { if ( !(i is 'Ammo') ) continue; @@ -200,14 +200,14 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); } let mo = players[e.Args[0]].mo; - Actor f = Actor(ThinkerIterator.Create("SWWMFlag").Next()); - if ( !f ) f = mo.Spawn("SWWMFlag"); + Actor f = Actor(ThinkerIterator.Create('SWWMFlag').Next()); + if ( !f ) f = mo.Spawn('SWWMFlag'); Vector2 spos = mo.Vec2Angle(40.,mo.angle); Sector sat = level.PointInSector(spos); double sz = sat.NextLowestFloorAt(spos.x,spos.y,mo.player.viewz-32.); f.SetOrigin((spos.x,spos.y,sz),false); f.A_SetAngle(mo.angle); - f.Spawn("SWWMItemFog",f.pos); + f.Spawn('SWWMItemFog',f.pos); f.A_StartSound("bestsound",CHAN_ITEMEXTRA); } else if ( e.Name ~== "swwmballcheat" ) @@ -268,7 +268,7 @@ extend Class SWWMHandler S_StartSound("misc/omgfart",CHAN_VOICE,CHANF_UI); } else mo.A_StartSound("misc/omgfart",CHAN_VOICE,CHANF_OVERLAP,1.,.5); - let f = mo.Spawn("SWWMGasCloudSpawner",mo.Vec3Angle(mo.radius*.5,mo.angle-180,mo.Height*.4)); + let f = mo.Spawn('SWWMGasCloudSpawner',mo.Vec3Angle(mo.radius*.5,mo.angle-180,mo.Height*.4)); f.target = mo; f.angle = mo.angle+180; f.pitch = -mo.pitch; @@ -281,9 +281,9 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/p_pkup",CHAN_VOICE,CHANF_UI); } - let i = InvinciballPower(players[e.Args[0]].mo.FindInventory("InvinciballPower")); + let i = InvinciballPower(players[e.Args[0]].mo.FindInventory('InvinciballPower')); if ( i ) i.EffectTics += i.default.EffectTics; - else players[e.Args[0]].mo.GiveInventory("InvinciballPower",1); + else players[e.Args[0]].mo.GiveInventory('InvinciballPower',1); } else if ( e.Name ~== "swwmstonecheat" ) { @@ -301,12 +301,12 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); } let mo = players[e.Args[0]].mo; - Actor f = Actor(ThinkerIterator.Create("FroggyChair").Next()); - if ( !f ) f = mo.Spawn("FroggyChair"); + Actor f = Actor(ThinkerIterator.Create('FroggyChair').Next()); + if ( !f ) f = mo.Spawn('FroggyChair'); Vector2 ofs = Actor.AngleToVector(mo.angle,40.); f.SetOrigin(mo.Vec2OffsetZ(ofs.x,ofs.y,mo.player.viewz-32.),false); f.A_SetAngle(f.AngleTo(mo)); - f.Spawn("SWWMItemFog",f.pos); + f.Spawn('SWWMItemFog',f.pos); f.A_StartSound("bestsound",CHAN_ITEMEXTRA); } else if ( e.Name ~== "swwmamnesiacheat" ) @@ -317,7 +317,7 @@ extend Class SWWMHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("bestsound",CHAN_VOICE,CHANF_UI); } - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a; while ( a = Actor(ti.Next()) ) { @@ -332,10 +332,10 @@ extend Class SWWMHandler Console.Printf("\cyLet's mop up that big mess over there.\c-"); S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); } - let cc = SWWMCorpseCleaner(ThinkerIterator.Create("SWWMCorpseCleaner",Thinker.STAT_USER).Next()); + let cc = SWWMCorpseCleaner(ThinkerIterator.Create('SWWMCorpseCleaner',Thinker.STAT_USER).Next()); if ( !cc ) { - cc = new("SWWMCorpseCleaner"); + cc = new('SWWMCorpseCleaner'); cc.ChangeStatNum(Thinker.STAT_USER); cc.Init(players[e.Args[0]].mo); } @@ -343,7 +343,7 @@ extend Class SWWMHandler } else if ( e.Name ~== "swwmonfirecheat" ) { - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a; bool burned = false; while ( a = Actor(ti.Next()) ) @@ -481,7 +481,7 @@ extend Class SWWMHandler double shine = clamp((klinger-(gametic+e.fractic+40))/20.,0.,1.); int col = (kcode>4)?0:(kfail)?2:1; int tlen = chstr.CodePointCount(); - if ( !CheatFont ) CheatFont = Font.GetFont("TewiFontOutline"); + if ( !CheatFont ) CheatFont = Font.GetFont('TewiFontOutline'); int width = (CheatFont.StringWidth(chstr)+3*(tlen-1)); double xx = int(Screen.GetWidth()-width*scl)/2; double yy = int(Screen.GetHeight()-CheatFont.GetHeight()*scl)/2; diff --git a/zscript/handler/swwm_handler_crosshair.zsc b/zscript/handler/swwm_handler_crosshair.zsc index 483da11c5..dacd69251 100644 --- a/zscript/handler/swwm_handler_crosshair.zsc +++ b/zscript/handler/swwm_handler_crosshair.zsc @@ -51,7 +51,7 @@ extend Class SWWMHandler tactive[i] = true; } let mo = players[consoleplayer].mo; - if ( !ctr ) ctr = new("SWWMCrosshairTracer"); + if ( !ctr ) ctr = new('SWWMCrosshairTracer'); Vector3 ofs, origin; Color col; let [x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll); diff --git a/zscript/handler/swwm_handler_damage.zsc b/zscript/handler/swwm_handler_damage.zsc index 1b159e4a5..3a3c83e09 100644 --- a/zscript/handler/swwm_handler_damage.zsc +++ b/zscript/handler/swwm_handler_damage.zsc @@ -19,16 +19,16 @@ extend Class SWWMHandler if ( (e.DamageType == 'Ynykron') || (e.DamageType == 'Massacre') ) return; int gibhealth = e.Thing.GetGibHealth(); bool gotgibbed = (!e.Thing.bDONTGIB && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.DamageSource && e.DamageSource.bEXTREMEDEATH) || (e.DamageType == 'Extreme') || (e.Thing.Health < gibhealth)) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) && (!e.DamageSource || !e.DamageSource.bNOEXTREMEDEATH)); - if ( !e.Thing.FindState("XDeath",true) && !e.Thing.FindState("Death.Extreme",true) ) + if ( !e.Thing.FindState('XDeath',true) && !e.Thing.FindState('Death.Extreme',true) ) gotgibbed = false; // only do special handling if they use our blood - if ( (e.Thing.GetBloodType(0) != "mkBlood") || e.Thing.bNOBLOOD ) + if ( (e.Thing.GetBloodType(0) != 'mkBlood') || e.Thing.bNOBLOOD ) return; CorpseFallTracker.TrackBody(e.Thing); // special handling of some monsters - if ( e.Thing.GetClass() == "Cyberdemon" ) + if ( e.Thing.GetClass() == 'Cyberdemon' ) { - let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR); + let [b, a] = e.Thing.A_SpawnItemEx('mkGibber',flags:SXF_USEBLOODCOLOR); if ( !b ) return; mkGibber(a).gibbed = e.Thing; mkGibber(a).delay = 40; @@ -37,9 +37,9 @@ extend Class SWWMHandler a.A_SetSize(e.Thing.default.radius,e.Thing.default.height); return; } - else if ( e.Thing.GetClass() == "SpiderMastermind" ) + else if ( e.Thing.GetClass() == 'SpiderMastermind' ) { - let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR); + let [b, a] = e.Thing.A_SpawnItemEx('mkGibber',flags:SXF_USEBLOODCOLOR); if ( !b ) return; mkGibber(a).gibbed = e.Thing; mkGibber(a).delay = 60; @@ -49,7 +49,7 @@ extend Class SWWMHandler } else if ( gotgibbed ) { - let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR); + let [b, a] = e.Thing.A_SpawnItemEx('mkGibber',flags:SXF_USEBLOODCOLOR); if ( !b ) return; mkGibber(a).gibbed = e.Thing; a.A_SetSize(e.Thing.default.radius,e.Thing.default.height); @@ -92,17 +92,17 @@ extend Class SWWMHandler if ( e.Damage > s.topdealt ) s.topdealt = e.Damage; } SWWMFlyTracker.Track(e.Thing,e.DamageSource); - if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) + if ( e.Thing.bBOSS || e.Thing.FindInventory('BossMarker') ) { - let tk = e.Thing.FindInventory("DeepImpactOnlyToken"); + let tk = e.Thing.FindInventory('DeepImpactOnlyToken'); if ( !tk ) { - tk = Inventory(Actor.Spawn("DeepImpactOnlyToken")); + tk = Inventory(Actor.Spawn('DeepImpactOnlyToken')); tk.AttachToOwner(e.Thing); tk.special1 = 0; } Inventory pb; - if ( (tk.special1 != -1) && ((e.DamageType == 'Push') || (e.Inflictor && (pb = e.Inflictor.FindInventory("ParriedBuff")) && pb.bAMBUSH)) ) + if ( (tk.special1 != -1) && ((e.DamageType == 'Push') || (e.Inflictor && (pb = e.Inflictor.FindInventory('ParriedBuff')) && pb.bAMBUSH)) ) tk.special1 = 1; else tk.special1 = -1; } @@ -121,7 +121,7 @@ extend Class SWWMHandler { if ( e.Thing.IsFriend(e.DamageSource) ) lastcombat = AddOneliner("friendhit",1,10); - else if ( (!lastcombat || (gametic > lastcombat+90)) && !Random[DemoLines](0,(e.DamageSource.bBOSS||e.DamageSource.FindInventory("BossMarker"))?2:5) ) + else if ( (!lastcombat || (gametic > lastcombat+90)) && !Random[DemoLines](0,(e.DamageSource.bBOSS||e.DamageSource.FindInventory('BossMarker'))?2:5) ) lastcombat = AddOneliner("gethit",1,15); } highesttic = gametic; @@ -176,13 +176,13 @@ extend Class SWWMHandler int lc = 0; Inventory buff = inflictor?inflictor.FindInventory('ParriedBuff'):null; if ( !Random[DemoLines](0,2) && buff && (e.Thing is 'Cyberdemon') && (inflictor is 'Rocket') && (buff.tracer == e.Thing) ) lc = AddOneliner("cybully",1,15); - else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?1:2) && (e.DamageType == 'CriticalConcussion') ) lc = AddOneliner("ballskill",1,15); - else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?2:4) && (e.DamageType == 'Buttslam') ) lc = AddOneliner("asskill",1,15); - else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?3:5) && ((inflictor is 'HeavyMahSheenGun') || (inflictor is 'SheenTrail')) ) + else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?1:2) && (e.DamageType == 'CriticalConcussion') ) lc = AddOneliner("ballskill",1,15); + else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?2:4) && (e.DamageType == 'Buttslam') ) lc = AddOneliner("asskill",1,15); + else if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?3:5) && ((inflictor is 'HeavyMahSheenGun') || (inflictor is 'SheenTrail')) ) lc = AddOneliner("sheenkill",1,15); if ( !lc ) { - if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory("BossMarker"))?2:4) ) + if ( !Random[DemoLines](0,(e.Thing.bBOSS||e.Thing.FindInventory('BossMarker'))?2:4) ) lastcombat = AddOneliner("scorekill",1,15); } else lastcombat = lc; @@ -193,7 +193,7 @@ extend Class SWWMHandler // achievement stuff if ( e.Thing.IsHostile(src) && (e.Thing.bISMONSTER || e.Thing.player) ) { - if ( (e.Thing.bBOSS||e.Thing.FindInventory("BossMarker")) && ((e.DamageType == 'Dash') || (e.DamageType == 'Buttslam')) ) + if ( (e.Thing.bBOSS||e.Thing.FindInventory('BossMarker')) && ((e.DamageType == 'Dash') || (e.DamageType == 'Buttslam')) ) SWWMUtility.AchievementProgressInc("bossdash",1,src.player); if ( (inflictor is 'DeepImpact') && (e.DamageType == 'Push') ) SWWMUtility.AchievementProgressInc("sneeze",1,src.player); @@ -213,7 +213,7 @@ extend Class SWWMHandler SWWMUtility.MarkAchievement("cybully",src.player); } Inventory tk; - if ( (tk = e.Thing.FindInventory("DeepImpactOnlyToken")) && (tk.special1 == 1) ) + if ( (tk = e.Thing.FindInventory('DeepImpactOnlyToken')) && (tk.special1 == 1) ) SWWMUtility.MarkAchievement("shame",src.player); SWWMUtility.AchievementProgressInc("mega",1,src.player); if ( src.player.Health == 1 ) @@ -295,7 +295,7 @@ extend Class SWWMHandler if ( (spreecount[pnum] > 0) && scr ) scr.AppendXString(StringTable.Localize("$SWWM_SPREEKILL"),spreecount[pnum]); } - if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) + if ( e.Thing.bBOSS || e.Thing.FindInventory('BossMarker') ) { score += 2000; if ( scr ) scr.AppendXString(StringTable.Localize("$SWWM_BOSSKILL")); diff --git a/zscript/handler/swwm_handler_debugrender.zsc b/zscript/handler/swwm_handler_debugrender.zsc index a56b52050..7b2a3fda0 100644 --- a/zscript/handler/swwm_handler_debugrender.zsc +++ b/zscript/handler/swwm_handler_debugrender.zsc @@ -66,27 +66,27 @@ extend Class SWWMHandler Vector3 b1, b2; b1 = pos-(a.radius,a.radius,0); b2 = pos+(a.radius,a.radius,a.height); - DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b2.y,b1.z),"White"); - DrawWorldLine(e,(b1.x,b2.y,b1.z),(b2.x,b2.y,b1.z),"White"); - DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b1.y,b1.z),"White"); - DrawWorldLine(e,(b2.x,b1.y,b1.z),(b1.x,b1.y,b1.z),"White"); - DrawWorldLine(e,(b1.x,b1.y,b2.z),(b1.x,b2.y,b2.z),"White"); - DrawWorldLine(e,(b1.x,b2.y,b2.z),(b2.x,b2.y,b2.z),"White"); - DrawWorldLine(e,(b2.x,b2.y,b2.z),(b2.x,b1.y,b2.z),"White"); - DrawWorldLine(e,(b2.x,b1.y,b2.z),(b1.x,b1.y,b2.z),"White"); - DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b1.y,b2.z),"White"); - DrawWorldLine(e,(b2.x,b1.y,b1.z),(b2.x,b1.y,b2.z),"White"); - DrawWorldLine(e,(b1.x,b2.y,b1.z),(b1.x,b2.y,b2.z),"White"); - DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b2.y,b2.z),"White"); + DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b2.y,b1.z),0xFFFFFFFF); + DrawWorldLine(e,(b1.x,b2.y,b1.z),(b2.x,b2.y,b1.z),0xFFFFFFFF); + DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b1.y,b1.z),0xFFFFFFFF); + DrawWorldLine(e,(b2.x,b1.y,b1.z),(b1.x,b1.y,b1.z),0xFFFFFFFF); + DrawWorldLine(e,(b1.x,b1.y,b2.z),(b1.x,b2.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b1.x,b2.y,b2.z),(b2.x,b2.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b2.x,b2.y,b2.z),(b2.x,b1.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b2.x,b1.y,b2.z),(b1.x,b1.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b1.x,b1.y,b1.z),(b1.x,b1.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b2.x,b1.y,b1.z),(b2.x,b1.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b1.x,b2.y,b1.z),(b1.x,b2.y,b2.z),0xFFFFFFFF); + DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b2.y,b2.z),0xFFFFFFFF); } let [x, y, z] = SWWMUtility.GetAxes(a.angle,a.pitch,a.roll); - DrawWorldLine(e,pos,pos+x*16,"Red"); - DrawWorldLine(e,pos,pos+y*16,"Green"); - DrawWorldLine(e,pos,pos+z*16,"Blue"); - if ( a.vel != (0,0,0) ) DrawWorldLine(e,pos,pos+a.vel*GameTicRate,"Yellow"); - if ( a.target ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.target.prev,a.target.pos,e.FracTic),"Gold"); - if ( a.tracer ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.tracer.prev,a.tracer.pos,e.FracTic),"Orange"); - if ( a.master ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.master.prev,a.master.pos,e.FracTic),"Purple"); + DrawWorldLine(e,pos,pos+x*16,0xFFFF0000); + DrawWorldLine(e,pos,pos+y*16,0xFF00FF00); + DrawWorldLine(e,pos,pos+z*16,0xFF0000FF); + if ( a.vel != (0,0,0) ) DrawWorldLine(e,pos,pos+a.vel*GameTicRate,0xFFFFFF00); + if ( a.target ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.target.prev,a.target.pos,e.FracTic),0xFFFFA000); + if ( a.tracer ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.tracer.prev,a.tracer.pos,e.FracTic),0xFFFF8000); + if ( a.master ) DrawWorldLine(e,pos,SWWMUtility.LerpVector3(a.master.prev,a.master.pos,e.FracTic),0xFF8000FF); double hdiff = a.Height/2; if ( a.bFLOATBOB ) hdiff += a.GetBobOffset(); Vector3 ndc = SWWMUtility.ProjectPoint(projdata,e.viewpos+level.Vec3Diff(e.viewpos,pos+(0,0,hdiff))); diff --git a/zscript/handler/swwm_handler_flash.zsc b/zscript/handler/swwm_handler_flash.zsc index 851a1efa3..bf30f906b 100644 --- a/zscript/handler/swwm_handler_flash.zsc +++ b/zscript/handler/swwm_handler_flash.zsc @@ -11,14 +11,14 @@ extend Class SWWMHandler static void HealthFlash( int p ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || (p == -1) ) return; hnd.hflash[p] = gametic+5; } static void ArmorFlash( int p ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || (p == -1) ) return; hnd.aflash[p] = gametic+5; } @@ -27,7 +27,7 @@ extend Class SWWMHandler { // don't flash when paused if ( menuactive && (menuactive != Menu.OnNoPause) ) return; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.flash_camera = camera; hnd.flash_color = c; diff --git a/zscript/handler/swwm_handler_iwantdie.zsc b/zscript/handler/swwm_handler_iwantdie.zsc index 2c46d55ee..1430226a4 100644 --- a/zscript/handler/swwm_handler_iwantdie.zsc +++ b/zscript/handler/swwm_handler_iwantdie.zsc @@ -19,7 +19,7 @@ extend Class SWWMHandler dmult = acsre-3; } if ( iwantdie <= 0 ) return; - if ( SWWMUtility.ValidProjectile(e.Thing) && !e.Thing.FindInventory("DontDuplicate") && (e.Thing.target && e.Thing.target.bISMONSTER && !e.Thing.target.player) ) + if ( SWWMUtility.ValidProjectile(e.Thing) && !e.Thing.FindInventory('DontDuplicate') && (e.Thing.target && e.Thing.target.bISMONSTER && !e.Thing.target.player) ) { e.Thing.speed *= smult; e.Thing.vel *= smult; @@ -33,7 +33,7 @@ extend Class SWWMHandler double s = FRandom[ExtraMissiles](0,.1); Vector3 dir = SWWMUtility.ConeSpread(x,y,z,a,s); let p = Actor.Spawn(e.Thing.GetClass(),e.Thing.pos); - p.GiveInventory("DontDuplicate",1); + p.GiveInventory('DontDuplicate',1); p.target = e.Thing.target; p.tracer = e.Thing.tracer; p.master = e.Thing.master; @@ -48,7 +48,7 @@ extend Class SWWMHandler // avoid if it has some sort of special handling if ( e.Thing.special || e.Thing.tid || e.Thing.bDORMANT ) return; // random chance to spawn doubles - if ( e.Thing.FindInventory("DontDuplicate") || Random[ExtraMissiles](0,2) ) return; + if ( e.Thing.FindInventory('DontDuplicate') || Random[ExtraMissiles](0,2) ) return; int numpt = Random[ExtraMissiles](1,dmult); for ( int i=0; i k = kname; if ( k ) { - let kg = new("KeyGet"); + let kg = new('KeyGet'); kg.got = k; kg.flashtime = gametic+25; bar.keyflash.Push(kg); @@ -155,7 +155,7 @@ extend Class SWWMHandler bar.cstip.Poke(wa,wb); return; } - let tt = new("SWWMWeaponSwapTip").Init(wa,wb); + let tt = new('SWWMWeaponSwapTip').Init(wa,wb); bar.cstip = tt; bar.AttachMessage(tt,-2911); } @@ -169,7 +169,7 @@ extend Class SWWMHandler } else if ( e.Name ~== "swwmdoflash" ) { - GenericFlash gf = new("GenericFlash").Setup(flash_camera,flash_color,flash_duration); + GenericFlash gf = new('GenericFlash').Setup(flash_camera,flash_color,flash_duration); StatusBar.AttachMessage(gf,0,BaseStatusBar.HUDMSGLayer_UnderHUD); } else if ( e.Name ~== "swwmsendplayerstep" ) @@ -374,7 +374,7 @@ extend Class SWWMHandler { if ( !playeringame[i] || !players[i].mo ) continue; let mo = players[i].mo; - Inventory hams = mo.FindInventory("HammerspaceEmbiggener"); + Inventory hams = mo.FindInventory('HammerspaceEmbiggener'); if ( hams ) { if ( hams.MaxAmount != hams.default.MaxAmount ) @@ -490,8 +490,8 @@ extend Class SWWMHandler if ( item is 'Weapon' ) { // special case, select dual guns if we bought a second one - if ( (item is 'ExplodiumGun') && (players[e.Args[0]].mo.CountInv("ExplodiumGun") > 1) ) - players[e.Args[0]].mo.A_SelectWeapon("DualExplodiumGun"); + if ( (item is 'ExplodiumGun') && (players[e.Args[0]].mo.CountInv('ExplodiumGun') > 1) ) + players[e.Args[0]].mo.A_SelectWeapon('DualExplodiumGun'); else players[e.Args[0]].mo.A_SelectWeapon((Class)(item)); } } @@ -519,7 +519,7 @@ extend Class SWWMHandler if ( c && c.SisterWeapon && (players[e.Args[0]].ReadyWeapon == c.SisterWeapon) ) { players[e.Args[0]].ReadyWeapon = c; - players[e.Args[0]].SetPSprite(PSP_WEAPON,c.FindState("Ready")); + players[e.Args[0]].SetPSprite(PSP_WEAPON,c.FindState('Ready')); players[e.Args[0]].SetPSprite(PSP_WEAPON+1,null); // delete left weapon psprite } } @@ -691,7 +691,7 @@ extend Class SWWMHandler // only if player owns any selectable weapons if ( !wsel && SWWMWeaponSelect.PlayerHasWeapons(players[consoleplayer].mo) ) { - wsel = new("SWWMWeaponSelect").Init(players[consoleplayer].mo); + wsel = new('SWWMWeaponSelect').Init(players[consoleplayer].mo); StatusBar.AttachMessage(wsel,-2920,layer:StatusBar.HUDMSGLayer_UnderHUD); if ( WeapSel == 1 ) wsel.WeapNext(); else if ( WeapSel == -1 ) wsel.WeapPrev(); diff --git a/zscript/handler/swwm_handler_queues.zsc b/zscript/handler/swwm_handler_queues.zsc index eb148a75f..5533a8851 100644 --- a/zscript/handler/swwm_handler_queues.zsc +++ b/zscript/handler/swwm_handler_queues.zsc @@ -15,7 +15,7 @@ extend Class SWWMHandler static void QueueCasing( SWWMCasing c ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.casings_cnt++; if ( !hnd.casings ) @@ -35,7 +35,7 @@ extend Class SWWMHandler } static void DeQueueCasing( SWWMCasing c ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || !hnd.casings ) return; if ( (hnd.casings != c) && !c.prevcasing && !c.nextcasing ) return; hnd.casings_cnt--; @@ -49,7 +49,7 @@ extend Class SWWMHandler } static void QueueChip( SWWMChip c ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.chips_cnt++; if ( !hnd.chips ) @@ -69,7 +69,7 @@ extend Class SWWMHandler } static void DeQueueChip( SWWMChip c ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || !hnd.chips ) return; if ( (hnd.chips != c) && !c.prevchip && !c.nextchip ) return; hnd.chips_cnt--; @@ -83,7 +83,7 @@ extend Class SWWMHandler } static void QueueBlod( mkBloodDrop b ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.blods_cnt++; if ( !hnd.blods ) @@ -103,7 +103,7 @@ extend Class SWWMHandler } static void DeQueueBlod( mkBloodDrop b ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || !hnd.blods ) return; if ( (hnd.blods != b) && !b.prevblod && !b.nextblod ) return; hnd.blods_cnt--; @@ -117,7 +117,7 @@ extend Class SWWMHandler } static void QueueMeat( mkFlyingGib m ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.meats_cnt++; if ( !hnd.meats ) @@ -137,7 +137,7 @@ extend Class SWWMHandler } static void DeQueueMeat( mkFlyingGib m ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd || !hnd.meats ) return; if ( (hnd.meats != m) && !m.prevmeat && !m.nextmeat ) return; hnd.meats_cnt--; diff --git a/zscript/handler/swwm_handler_replacements.zsc b/zscript/handler/swwm_handler_replacements.zsc index 2a4cc2070..d1d0b3c83 100644 --- a/zscript/handler/swwm_handler_replacements.zsc +++ b/zscript/handler/swwm_handler_replacements.zsc @@ -6,203 +6,203 @@ extend Class SWWMHandler private Class GetDRLAReplacee( Class a ) { - static const String refpool[] = + static const Name refpool[] = { - "Zombieman", - "Shotgunguy", - "Chaingunguy", - "DoomImp", - "Demon", - "Spectre", - "LostSoul", - "Cacodemon", - "HellKnight", - "BaronOfHell", - "Arachnotron", - "PainElemental", - "Revenant", - "Fatso", - "Archvile", - "Cyberdemon", - "SpiderMastermind", - "BossEye", - "BossBrain" + 'Zombieman', + 'Shotgunguy', + 'Chaingunguy', + 'DoomImp', + 'Demon', + 'Spectre', + 'LostSoul', + 'Cacodemon', + 'HellKnight', + 'BaronOfHell', + 'Arachnotron', + 'PainElemental', + 'Revenant', + 'Fatso', + 'Archvile', + 'Cyberdemon', + 'SpiderMastermind', + 'BossEye', + 'BossBrain' }; - static const String babypool[] = + static const Name babypool[] = { - "RLFormerHumanPistol", - "RLFormerSergeantShotgun", - "RLFormerCommandoChaingun", - "RLImp", - "RLDemon", - "RLSpectre", - "RLLostSoul", - "RLCacodemon", - "RLHellKnight", - "RLBaronOfHell", - "RLArachnotron", - "RLPainElemental", - "RLRevenant", - "RLMancubus", - "RLArchvile", - "RLCyberdemon", - "RLSpiderMastermindVariantSpawner", - "RLEasyBossEye", - "RLBossBrain" + 'RLFormerHumanPistol', + 'RLFormerSergeantShotgun', + 'RLFormerCommandoChaingun', + 'RLImp', + 'RLDemon', + 'RLSpectre', + 'RLLostSoul', + 'RLCacodemon', + 'RLHellKnight', + 'RLBaronOfHell', + 'RLArachnotron', + 'RLPainElemental', + 'RLRevenant', + 'RLMancubus', + 'RLArchvile', + 'RLCyberdemon', + 'RLSpiderMastermindVariantSpawner', + 'RLEasyBossEye', + 'RLBossBrain' }; - static const String easypool[] = + static const Name easypool[] = { - "RLFormerHumanNoArmageddonSpawner", - "RLFormerSergeantNoArmageddonSpawner", - "RLFormerCommandoNoArmageddonSpawner", - "RLImpNoArmageddonSpawner", - "RLDemonNoArmageddonSpawner", - "RLSpectreNoArmageddonSpawner", - "RLLostSoulNoArmageddonSpawner", - "RLCacodemonNoArmageddonSpawner", - "RLHellKnightNoArmageddonSpawner", - "RLBaronOfHellNoArmageddonSpawner", - "RLArachnotronNoArmageddonSpawner", - "RLPainElementalNoArmageddonSpawner", - "RLRevenantNoArmageddonSpawner", - "RLMancubusNoArmageddonSpawner", - "RLArchvileNoArmageddonSpawner", - "RLCyberdemonNoArmageddonSpawner", - "RLSpiderMastermindNoArmageddonSpawner", - "RLBossEye", - "RLBossBrain" + 'RLFormerHumanNoArmageddonSpawner', + 'RLFormerSergeantNoArmageddonSpawner', + 'RLFormerCommandoNoArmageddonSpawner', + 'RLImpNoArmageddonSpawner', + 'RLDemonNoArmageddonSpawner', + 'RLSpectreNoArmageddonSpawner', + 'RLLostSoulNoArmageddonSpawner', + 'RLCacodemonNoArmageddonSpawner', + 'RLHellKnightNoArmageddonSpawner', + 'RLBaronOfHellNoArmageddonSpawner', + 'RLArachnotronNoArmageddonSpawner', + 'RLPainElementalNoArmageddonSpawner', + 'RLRevenantNoArmageddonSpawner', + 'RLMancubusNoArmageddonSpawner', + 'RLArchvileNoArmageddonSpawner', + 'RLCyberdemonNoArmageddonSpawner', + 'RLSpiderMastermindNoArmageddonSpawner', + 'RLBossEye', + 'RLBossBrain' }; - static const String normalpool[] = + static const Name normalpool[] = { - "RLFormerHumanNoArmageddonSpawner", - "RLFormerSergeantNoArmageddonSpawner", - "RLFormerCommandoNoArmageddonSpawner", - "RLImpNoArmageddonSpawner", - "RLDemonNoArmageddonSpawner", - "RLSpectreNoArmageddonSpawner", - "RLLostSoulNoArmageddonSpawner", - "RLCacodemonNoArmageddonSpawner", - "RLHellKnightNoArmageddonSpawner", - "RLBaronOfHellNoArmageddonSpawner", - "RLArachnotronNoArmageddonSpawner", - "RLPainElementalNoArmageddonSpawner", - "RLRevenantNoArmageddonSpawner", - "RLMancubusNoArmageddonSpawner", - "RLArchvileNoArmageddonSpawner", - "RLCyberdemonNoArmageddonSpawner", - "RLSpiderMastermindNoArmageddonSpawner", - "RLBossEye", - "RLBossBrain" + 'RLFormerHumanNoArmageddonSpawner', + 'RLFormerSergeantNoArmageddonSpawner', + 'RLFormerCommandoNoArmageddonSpawner', + 'RLImpNoArmageddonSpawner', + 'RLDemonNoArmageddonSpawner', + 'RLSpectreNoArmageddonSpawner', + 'RLLostSoulNoArmageddonSpawner', + 'RLCacodemonNoArmageddonSpawner', + 'RLHellKnightNoArmageddonSpawner', + 'RLBaronOfHellNoArmageddonSpawner', + 'RLArachnotronNoArmageddonSpawner', + 'RLPainElementalNoArmageddonSpawner', + 'RLRevenantNoArmageddonSpawner', + 'RLMancubusNoArmageddonSpawner', + 'RLArchvileNoArmageddonSpawner', + 'RLCyberdemonNoArmageddonSpawner', + 'RLSpiderMastermindNoArmageddonSpawner', + 'RLBossEye', + 'RLBossBrain' }; - static const String hardpool[] = + static const Name hardpool[] = { - "RLFormerHumanSpawner", - "RLFormerSergeantSpawner", - "RLFormerCommandoSpawner", - "RLImpSpawner", - "RLDemonSpawner", - "RLSpectreSpawner", - "RLLostSoulSpawner", - "RLCacodemonSpawner", - "RLHellKnightSpawner", - "RLBaronOfHellSpawner", - "RLArachnotronSpawner", - "RLPainElementalSpawner", - "RLRevenantSpawner", - "RLMancubusSpawner", - "RLArchvileSpawner", - "RLCyberdemonSpawner", - "RLSpiderMastermindSpawner", - "RLUVBossEye", - "RLBossBrain" + 'RLFormerHumanSpawner', + 'RLFormerSergeantSpawner', + 'RLFormerCommandoSpawner', + 'RLImpSpawner', + 'RLDemonSpawner', + 'RLSpectreSpawner', + 'RLLostSoulSpawner', + 'RLCacodemonSpawner', + 'RLHellKnightSpawner', + 'RLBaronOfHellSpawner', + 'RLArachnotronSpawner', + 'RLPainElementalSpawner', + 'RLRevenantSpawner', + 'RLMancubusSpawner', + 'RLArchvileSpawner', + 'RLCyberdemonSpawner', + 'RLSpiderMastermindSpawner', + 'RLUVBossEye', + 'RLBossBrain' }; - static const String nightmarepool[] = + static const Name nightmarepool[] = { - "RLEliteFormerHumanSpawner", - "RLEliteFormerSergeantSpawner", - "RLEliteFormerCommandoSpawner", - "RLNightmareImp", - "RLNightmareDemon", - "RLNightmareSpectre", - "RLNightmareLostSoul", - "RLNightmareCacodemon", - "RLNightmareHellKnight", - "RLNightmareBaronOfHell", - "RLNightmareArachnotron", - "RLNightmarePainElemental", - "RLNightmareRevenant", - "RLNightmareMancubus", - "RLNightmareArchvile", - "RLNightmareCyberdemonSpawner", - "RLNightmareSpiderMastermindSpawner", - "RLNightmareBossEye", - "RLNightmareBossBrain" + 'RLEliteFormerHumanSpawner', + 'RLEliteFormerSergeantSpawner', + 'RLEliteFormerCommandoSpawner', + 'RLNightmareImp', + 'RLNightmareDemon', + 'RLNightmareSpectre', + 'RLNightmareLostSoul', + 'RLNightmareCacodemon', + 'RLNightmareHellKnight', + 'RLNightmareBaronOfHell', + 'RLNightmareArachnotron', + 'RLNightmarePainElemental', + 'RLNightmareRevenant', + 'RLNightmareMancubus', + 'RLNightmareArchvile', + 'RLNightmareCyberdemonSpawner', + 'RLNightmareSpiderMastermindSpawner', + 'RLNightmareBossEye', + 'RLNightmareBossBrain' }; - static const String technophobiapool[] = + static const Name technophobiapool[] = { - "RLFormerCyborgBattleRifle", - "RLFormerCyborgBattleRifle", - "RLFormerCyborgBattleRifle", - "RLCyberneticImp", - "RLCyberneticDemon", - "RLCyberneticSpectre", - "RLCyberneticLostSoul", - "RLCacodemon", - "RLCyberneticHellKnight", - "RLCyberneticBaronOfHell", - "RLCyberneticArachnotron", - "RLCyberneticPainElemental", - "RLCyberneticRevenant", - "RLCyberneticMancubus", - "RLCyberneticArchvile", - "RLCyberneticCyberdemonSpawner", - "RLCyberneticSpiderMastermindSpawner", - "RLTechnophobiaBossEye", - "RLTechnophobiaBossBrain" + 'RLFormerCyborgBattleRifle', + 'RLFormerCyborgBattleRifle', + 'RLFormerCyborgBattleRifle', + 'RLCyberneticImp', + 'RLCyberneticDemon', + 'RLCyberneticSpectre', + 'RLCyberneticLostSoul', + 'RLCacodemon', + 'RLCyberneticHellKnight', + 'RLCyberneticBaronOfHell', + 'RLCyberneticArachnotron', + 'RLCyberneticPainElemental', + 'RLCyberneticRevenant', + 'RLCyberneticMancubus', + 'RLCyberneticArchvile', + 'RLCyberneticCyberdemonSpawner', + 'RLCyberneticSpiderMastermindSpawner', + 'RLTechnophobiaBossEye', + 'RLTechnophobiaBossBrain' }; - static const String armageddonpool[] = + static const Name armageddonpool[] = { - "RLFormerAssaultTrooper", - "RLFormerOverwatch", - "RLFormerShocktrooper", - "RLArmageddonImp", - "RLArmageddonDemon", - "RLArmageddonSpectreSpawner", - "RLTheHungrySpawner", - "RLArmageddonCacodemon", - "RLArmageddonHellKnightSpawner", - "RLArmageddonBaronOfHell", - "RLArmageddonArachnotron", - "RLArmageddonPainElemental", - "RLArmageddonRevenant", - "RLArmageddonMancubus", - "RLArmageddonArchvileSpawner", - "RLArmageddonCyberdemonSpawner", - "RLArmageddonSpiderMastermindSpawner", - "RLArmageddonBossEye", - "RLArmageddonBossBrain" + 'RLFormerAssaultTrooper', + 'RLFormerOverwatch', + 'RLFormerShocktrooper', + 'RLArmageddonImp', + 'RLArmageddonDemon', + 'RLArmageddonSpectreSpawner', + 'RLTheHungrySpawner', + 'RLArmageddonCacodemon', + 'RLArmageddonHellKnightSpawner', + 'RLArmageddonBaronOfHell', + 'RLArmageddonArachnotron', + 'RLArmageddonPainElemental', + 'RLArmageddonRevenant', + 'RLArmageddonMancubus', + 'RLArmageddonArchvileSpawner', + 'RLArmageddonCyberdemonSpawner', + 'RLArmageddonSpiderMastermindSpawner', + 'RLArmageddonBossEye', + 'RLArmageddonBossBrain' }; - static const String adaptivepool[] = + static const Name adaptivepool[] = { - "RLAdaptiveFormerHuman", - "RLAdaptiveFormerSergeant", - "RLAdaptiveFormerCommando", - "RLAdaptiveImp", - "RLAdaptiveDemon", - "RLAdaptiveSpectre", - "RLAdaptiveLostSoul", - "RLAdaptiveCacodemon", - "RLAdaptiveHellKnight", - "RLAdaptiveBaronOfHell", - "RLAdaptiveArachnotron", - "RLAdaptivePainElemental", - "RLAdaptiveRevenant", - "RLAdaptiveMancubus", - "RLAdaptiveArchvile", - "RLAdaptiveCyberdemon", - "RLAdaptiveSpiderMastermind", - "RLUVBossEye", - "RLBossBrain" + 'RLAdaptiveFormerHuman', + 'RLAdaptiveFormerSergeant', + 'RLAdaptiveFormerCommando', + 'RLAdaptiveImp', + 'RLAdaptiveDemon', + 'RLAdaptiveSpectre', + 'RLAdaptiveLostSoul', + 'RLAdaptiveCacodemon', + 'RLAdaptiveHellKnight', + 'RLAdaptiveBaronOfHell', + 'RLAdaptiveArachnotron', + 'RLAdaptivePainElemental', + 'RLAdaptiveRevenant', + 'RLAdaptiveMancubus', + 'RLAdaptiveArchvile', + 'RLAdaptiveCyberdemon', + 'RLAdaptiveSpiderMastermind', + 'RLUVBossEye', + 'RLBossBrain' }; switch ( swwm_drlaskill ) { @@ -269,37 +269,37 @@ extend Class SWWMHandler private Class GetLOBReplacee( Class a ) { - static const String refpool[] = + static const Name refpool[] = { - "Zombieman", - "Shotgunguy", - "Chaingunguy", - "DoomImp", - "Demon", - "Spectre", - "Cacodemon", - "HellKnight", - "BaronOfHell", - "Revenant", - "Fatso", - "Arachnotron", - "Archvile" + 'Zombieman', + 'Shotgunguy', + 'Chaingunguy', + 'DoomImp', + 'Demon', + 'Spectre', + 'Cacodemon', + 'HellKnight', + 'BaronOfHell', + 'Revenant', + 'Fatso', + 'Arachnotron', + 'Archvile' }; - static const String reppool[] = + static const Name reppool[] = { - "LOBZombieman", - "LOBShotgunguy", - "LOBChaingunguy", - "LOBDoomImp", - "LOBDemon", - "LOBSpectre", - "LOBCacodemon", - "LOBHellKnight", - "LOBBaronOfHell", - "LOBRevenant", - "LOBFatso", - "LOBArachnotron", - "LOBArchvile" + 'LOBZombieman', + 'LOBShotgunguy', + 'LOBChaingunguy', + 'LOBDoomImp', + 'LOBDemon', + 'LOBSpectre', + 'LOBCacodemon', + 'LOBHellKnight', + 'LOBBaronOfHell', + 'LOBRevenant', + 'LOBFatso', + 'LOBArachnotron', + 'LOBArchvile' }; for ( int i=0; i<13; i++ ) { @@ -315,7 +315,7 @@ extend Class SWWMHandler // these are all needed so boss deaths work if ( e.Replacement is 'DSparilHax' ) e.Replacee = 'Sorcerer2'; - // LOB "double death" stuff + // LOB 'double death' stuff if ( haslegionofbones && swwm_lobdoubled ) { let rep = GetLOBReplacee(e.Replacement); @@ -339,203 +339,203 @@ extend Class SWWMHandler private Class GetDRLAReplacement( Class a ) { - static const String refpool[] = + static const Name refpool[] = { - "Zombieman", - "Shotgunguy", - "Chaingunguy", - "DoomImp", - "Demon", - "Spectre", - "LostSoul", - "Cacodemon", - "HellKnight", - "BaronOfHell", - "Arachnotron", - "PainElemental", - "Revenant", - "Fatso", - "Archvile", - "Cyberdemon", - "SpiderMastermind", - "BossEye", - "BossBrain" + 'Zombieman', + 'Shotgunguy', + 'Chaingunguy', + 'DoomImp', + 'Demon', + 'Spectre', + 'LostSoul', + 'Cacodemon', + 'HellKnight', + 'BaronOfHell', + 'Arachnotron', + 'PainElemental', + 'Revenant', + 'Fatso', + 'Archvile', + 'Cyberdemon', + 'SpiderMastermind', + 'BossEye', + 'BossBrain' }; - static const String babypool[] = + static const Name babypool[] = { - "RLFormerHumanPistol", - "RLFormerSergeantShotgun", - "RLFormerCommandoChaingun", - "RLImp", - "RLDemon", - "RLSpectre", - "RLLostSoul", - "RLCacodemon", - "RLHellKnight", - "RLBaronOfHell", - "RLArachnotron", - "RLPainElemental", - "RLRevenant", - "RLMancubus", - "RLArchvile", - "RLCyberdemon", - "RLSpiderMastermindVariantSpawner", - "RLEasyBossEye", - "RLBossBrain" + 'RLFormerHumanPistol', + 'RLFormerSergeantShotgun', + 'RLFormerCommandoChaingun', + 'RLImp', + 'RLDemon', + 'RLSpectre', + 'RLLostSoul', + 'RLCacodemon', + 'RLHellKnight', + 'RLBaronOfHell', + 'RLArachnotron', + 'RLPainElemental', + 'RLRevenant', + 'RLMancubus', + 'RLArchvile', + 'RLCyberdemon', + 'RLSpiderMastermindVariantSpawner', + 'RLEasyBossEye', + 'RLBossBrain' }; - static const String easypool[] = + static const Name easypool[] = { - "RLFormerHumanNoArmageddonSpawner", - "RLFormerSergeantNoArmageddonSpawner", - "RLFormerCommandoNoArmageddonSpawner", - "RLImpNoArmageddonSpawner", - "RLDemonNoArmageddonSpawner", - "RLSpectreNoArmageddonSpawner", - "RLLostSoulNoArmageddonSpawner", - "RLCacodemonNoArmageddonSpawner", - "RLHellKnightNoArmageddonSpawner", - "RLBaronOfHellNoArmageddonSpawner", - "RLArachnotronNoArmageddonSpawner", - "RLPainElementalNoArmageddonSpawner", - "RLRevenantNoArmageddonSpawner", - "RLMancubusNoArmageddonSpawner", - "RLArchvileNoArmageddonSpawner", - "RLCyberdemonNoArmageddonSpawner", - "RLSpiderMastermindNoArmageddonSpawner", - "RLBossEye", - "RLBossBrain" + 'RLFormerHumanNoArmageddonSpawner', + 'RLFormerSergeantNoArmageddonSpawner', + 'RLFormerCommandoNoArmageddonSpawner', + 'RLImpNoArmageddonSpawner', + 'RLDemonNoArmageddonSpawner', + 'RLSpectreNoArmageddonSpawner', + 'RLLostSoulNoArmageddonSpawner', + 'RLCacodemonNoArmageddonSpawner', + 'RLHellKnightNoArmageddonSpawner', + 'RLBaronOfHellNoArmageddonSpawner', + 'RLArachnotronNoArmageddonSpawner', + 'RLPainElementalNoArmageddonSpawner', + 'RLRevenantNoArmageddonSpawner', + 'RLMancubusNoArmageddonSpawner', + 'RLArchvileNoArmageddonSpawner', + 'RLCyberdemonNoArmageddonSpawner', + 'RLSpiderMastermindNoArmageddonSpawner', + 'RLBossEye', + 'RLBossBrain' }; - static const String normalpool[] = + static const Name normalpool[] = { - "RLFormerHumanNoArmageddonSpawner", - "RLFormerSergeantNoArmageddonSpawner", - "RLFormerCommandoNoArmageddonSpawner", - "RLImpNoArmageddonSpawner", - "RLDemonNoArmageddonSpawner", - "RLSpectreNoArmageddonSpawner", - "RLLostSoulNoArmageddonSpawner", - "RLCacodemonNoArmageddonSpawner", - "RLHellKnightNoArmageddonSpawner", - "RLBaronOfHellNoArmageddonSpawner", - "RLArachnotronNoArmageddonSpawner", - "RLPainElementalNoArmageddonSpawner", - "RLRevenantNoArmageddonSpawner", - "RLMancubusNoArmageddonSpawner", - "RLArchvileNoArmageddonSpawner", - "RLCyberdemonNoArmageddonSpawner", - "RLSpiderMastermindNoArmageddonSpawner", - "RLBossEye", - "RLBossBrain" + 'RLFormerHumanNoArmageddonSpawner', + 'RLFormerSergeantNoArmageddonSpawner', + 'RLFormerCommandoNoArmageddonSpawner', + 'RLImpNoArmageddonSpawner', + 'RLDemonNoArmageddonSpawner', + 'RLSpectreNoArmageddonSpawner', + 'RLLostSoulNoArmageddonSpawner', + 'RLCacodemonNoArmageddonSpawner', + 'RLHellKnightNoArmageddonSpawner', + 'RLBaronOfHellNoArmageddonSpawner', + 'RLArachnotronNoArmageddonSpawner', + 'RLPainElementalNoArmageddonSpawner', + 'RLRevenantNoArmageddonSpawner', + 'RLMancubusNoArmageddonSpawner', + 'RLArchvileNoArmageddonSpawner', + 'RLCyberdemonNoArmageddonSpawner', + 'RLSpiderMastermindNoArmageddonSpawner', + 'RLBossEye', + 'RLBossBrain' }; - static const String hardpool[] = + static const Name hardpool[] = { - "RLFormerHumanSpawner", - "RLFormerSergeantSpawner", - "RLFormerCommandoSpawner", - "RLImpSpawner", - "RLDemonSpawner", - "RLSpectreSpawner", - "RLLostSoulSpawner", - "RLCacodemonSpawner", - "RLHellKnightSpawner", - "RLBaronOfHellSpawner", - "RLArachnotronSpawner", - "RLPainElementalSpawner", - "RLRevenantSpawner", - "RLMancubusSpawner", - "RLArchvileSpawner", - "RLCyberdemonSpawner", - "RLSpiderMastermindSpawner", - "RLUVBossEye", - "RLBossBrain" + 'RLFormerHumanSpawner', + 'RLFormerSergeantSpawner', + 'RLFormerCommandoSpawner', + 'RLImpSpawner', + 'RLDemonSpawner', + 'RLSpectreSpawner', + 'RLLostSoulSpawner', + 'RLCacodemonSpawner', + 'RLHellKnightSpawner', + 'RLBaronOfHellSpawner', + 'RLArachnotronSpawner', + 'RLPainElementalSpawner', + 'RLRevenantSpawner', + 'RLMancubusSpawner', + 'RLArchvileSpawner', + 'RLCyberdemonSpawner', + 'RLSpiderMastermindSpawner', + 'RLUVBossEye', + 'RLBossBrain' }; - static const String nightmarepool[] = + static const Name nightmarepool[] = { - "RLEliteFormerHumanSpawner", - "RLEliteFormerSergeantSpawner", - "RLEliteFormerCommandoSpawner", - "RLNightmareImp", - "RLNightmareDemon", - "RLNightmareSpectre", - "RLNightmareLostSoul", - "RLNightmareCacodemon", - "RLNightmareHellKnight", - "RLNightmareBaronOfHell", - "RLNightmareArachnotron", - "RLNightmarePainElemental", - "RLNightmareRevenant", - "RLNightmareMancubus", - "RLNightmareArchvile", - "RLNightmareCyberdemonSpawner", - "RLNightmareSpiderMastermindSpawner", - "RLNightmareBossEye", - "RLNightmareBossBrain" + 'RLEliteFormerHumanSpawner', + 'RLEliteFormerSergeantSpawner', + 'RLEliteFormerCommandoSpawner', + 'RLNightmareImp', + 'RLNightmareDemon', + 'RLNightmareSpectre', + 'RLNightmareLostSoul', + 'RLNightmareCacodemon', + 'RLNightmareHellKnight', + 'RLNightmareBaronOfHell', + 'RLNightmareArachnotron', + 'RLNightmarePainElemental', + 'RLNightmareRevenant', + 'RLNightmareMancubus', + 'RLNightmareArchvile', + 'RLNightmareCyberdemonSpawner', + 'RLNightmareSpiderMastermindSpawner', + 'RLNightmareBossEye', + 'RLNightmareBossBrain' }; - static const String technophobiapool[] = + static const Name technophobiapool[] = { - "RLFormerCyborgBattleRifle", - "RLFormerCyborgBattleRifle", - "RLFormerCyborgBattleRifle", - "RLCyberneticImp", - "RLCyberneticDemon", - "RLCyberneticSpectre", - "RLCyberneticLostSoul", - "RLCacodemon", - "RLCyberneticHellKnight", - "RLCyberneticBaronOfHell", - "RLCyberneticArachnotron", - "RLCyberneticPainElemental", - "RLCyberneticRevenant", - "RLCyberneticMancubus", - "RLCyberneticArchvile", - "RLCyberneticCyberdemonSpawner", - "RLCyberneticSpiderMastermindSpawner", - "RLTechnophobiaBossEye", - "RLTechnophobiaBossBrain" + 'RLFormerCyborgBattleRifle', + 'RLFormerCyborgBattleRifle', + 'RLFormerCyborgBattleRifle', + 'RLCyberneticImp', + 'RLCyberneticDemon', + 'RLCyberneticSpectre', + 'RLCyberneticLostSoul', + 'RLCacodemon', + 'RLCyberneticHellKnight', + 'RLCyberneticBaronOfHell', + 'RLCyberneticArachnotron', + 'RLCyberneticPainElemental', + 'RLCyberneticRevenant', + 'RLCyberneticMancubus', + 'RLCyberneticArchvile', + 'RLCyberneticCyberdemonSpawner', + 'RLCyberneticSpiderMastermindSpawner', + 'RLTechnophobiaBossEye', + 'RLTechnophobiaBossBrain' }; - static const String armageddonpool[] = + static const Name armageddonpool[] = { - "RLFormerAssaultTrooper", - "RLFormerOverwatch", - "RLFormerShocktrooper", - "RLArmageddonImp", - "RLArmageddonDemon", - "RLArmageddonSpectreSpawner", - "RLTheHungrySpawner", - "RLArmageddonCacodemon", - "RLArmageddonHellKnightSpawner", - "RLArmageddonBaronOfHell", - "RLArmageddonArachnotron", - "RLArmageddonPainElemental", - "RLArmageddonRevenant", - "RLArmageddonMancubus", - "RLArmageddonArchvileSpawner", - "RLArmageddonCyberdemonSpawner", - "RLArmageddonSpiderMastermindSpawner", - "RLArmageddonBossEye", - "RLArmageddonBossBrain" + 'RLFormerAssaultTrooper', + 'RLFormerOverwatch', + 'RLFormerShocktrooper', + 'RLArmageddonImp', + 'RLArmageddonDemon', + 'RLArmageddonSpectreSpawner', + 'RLTheHungrySpawner', + 'RLArmageddonCacodemon', + 'RLArmageddonHellKnightSpawner', + 'RLArmageddonBaronOfHell', + 'RLArmageddonArachnotron', + 'RLArmageddonPainElemental', + 'RLArmageddonRevenant', + 'RLArmageddonMancubus', + 'RLArmageddonArchvileSpawner', + 'RLArmageddonCyberdemonSpawner', + 'RLArmageddonSpiderMastermindSpawner', + 'RLArmageddonBossEye', + 'RLArmageddonBossBrain' }; - static const String adaptivepool[] = + static const Name adaptivepool[] = { - "RLAdaptiveFormerHuman", - "RLAdaptiveFormerSergeant", - "RLAdaptiveFormerCommando", - "RLAdaptiveImp", - "RLAdaptiveDemon", - "RLAdaptiveSpectre", - "RLAdaptiveLostSoul", - "RLAdaptiveCacodemon", - "RLAdaptiveHellKnight", - "RLAdaptiveBaronOfHell", - "RLAdaptiveArachnotron", - "RLAdaptivePainElemental", - "RLAdaptiveRevenant", - "RLAdaptiveMancubus", - "RLAdaptiveArchvile", - "RLAdaptiveCyberdemon", - "RLAdaptiveSpiderMastermind", - "RLUVBossEye", - "RLBossBrain" + 'RLAdaptiveFormerHuman', + 'RLAdaptiveFormerSergeant', + 'RLAdaptiveFormerCommando', + 'RLAdaptiveImp', + 'RLAdaptiveDemon', + 'RLAdaptiveSpectre', + 'RLAdaptiveLostSoul', + 'RLAdaptiveCacodemon', + 'RLAdaptiveHellKnight', + 'RLAdaptiveBaronOfHell', + 'RLAdaptiveArachnotron', + 'RLAdaptivePainElemental', + 'RLAdaptiveRevenant', + 'RLAdaptiveMancubus', + 'RLAdaptiveArchvile', + 'RLAdaptiveCyberdemon', + 'RLAdaptiveSpiderMastermind', + 'RLUVBossEye', + 'RLBossBrain' }; switch ( swwm_drlaskill ) { @@ -602,37 +602,37 @@ extend Class SWWMHandler private Class GetLOBReplacement( Class a ) { - static const String refpool[] = + static const Name refpool[] = { - "Zombieman", - "Shotgunguy", - "Chaingunguy", - "DoomImp", - "Demon", - "Spectre", - "Cacodemon", - "HellKnight", - "BaronOfHell", - "Revenant", - "Fatso", - "Arachnotron", - "Archvile" + 'Zombieman', + 'Shotgunguy', + 'Chaingunguy', + 'DoomImp', + 'Demon', + 'Spectre', + 'Cacodemon', + 'HellKnight', + 'BaronOfHell', + 'Revenant', + 'Fatso', + 'Arachnotron', + 'Archvile' }; - static const String reppool[] = + static const Name reppool[] = { - "LOBZombieman", - "LOBShotgunguy", - "LOBChaingunguy", - "LOBDoomImp", - "LOBDemon", - "LOBSpectre", - "LOBCacodemon", - "LOBHellKnight", - "LOBBaronOfHell", - "LOBRevenant", - "LOBFatso", - "LOBArachnotron", - "LOBArchvile" + 'LOBZombieman', + 'LOBShotgunguy', + 'LOBChaingunguy', + 'LOBDoomImp', + 'LOBDemon', + 'LOBSpectre', + 'LOBCacodemon', + 'LOBHellKnight', + 'LOBBaronOfHell', + 'LOBRevenant', + 'LOBFatso', + 'LOBArachnotron', + 'LOBArchvile' }; for ( int i=0; i<13; i++ ) { @@ -663,7 +663,7 @@ extend Class SWWMHandler return; } } - // LOB "double death" stuff + // LOB 'double death' stuff if ( haslegionofbones && swwm_lobdoubled ) { let rep = GetLOBReplacement(e.Replacee); @@ -729,10 +729,10 @@ extend Class SWWMHandler else if ( e.Replacee is 'Crossbow' ) e.Replacement = SWWMUtility.PickDoomSlot3(); else if ( (e.Replacee is 'Chaingun') || (e.Replacee is 'Blaster') || (e.Replacee is 'FWeaponPiece3') ) e.Replacement = SWWMUtility.PickSWWMSlot5(); else if ( (e.Replacee is 'RocketLauncher') || (e.Replacee is 'PhoenixRod') || (e.Replacee is 'FWeapHammer') ) e.Replacement = SWWMUtility.PickSWWMSlot6(); - else if ( (e.Replacee is 'PlasmaRifle') || (e.Replacee is 'SkullRod') ) e.Replacement = SWWMUtility.PickDoomSlot6(); + else if ( (e.Replacee is 'PlasmaRifle') || (e.Replacee is 'ID24Incinerator') || (e.Replacee is 'SkullRod') ) e.Replacement = SWWMUtility.PickDoomSlot6(); else if ( e.Replacee is 'CWeapFlame' ) e.Replacement = SWWMUtility.PickSWWMSlot7(); else if ( e.Replacee is 'MWeapLightning' ) e.Replacement = SWWMUtility.PickSWWMSlot8(); - else if ( (e.Replacee is 'BFG9000') || (e.Replacee is 'Mace') ) e.Replacement = SWWMUtility.PickDoomSlot7(); + else if ( (e.Replacee is 'BFG9000') || (e.Replacee is 'ID24CalamityBlade') || (e.Replacee is 'Mace') ) e.Replacement = SWWMUtility.PickDoomSlot7(); else if ( e.Replacee is 'CWeaponPiece2' ) e.Replacement = SWWMUtility.PickSWWMSlot9(); else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = SWWMUtility.PickSWWMSlot0(); else if ( (e.Replacee is 'ShellBox') || (e.Replacee is 'CrossbowHefty') ) e.Replacement = 'SWWMShellAmmoBig'; @@ -743,8 +743,8 @@ extend Class SWWMHandler else if ( e.Replacee is 'BlasterAmmo' ) e.Replacement = 'SWWMBlastAmmoSmall'; else if ( (e.Replacee is 'RocketBox') || (e.Replacee is 'PhoenixRodHefty') || (e.Replacee is 'MaceHefty') ) e.Replacement = 'SWWMRocketAmmoBig'; else if ( (e.Replacee is 'RocketAmmo') || (e.Replacee is 'PhoenixRodAmmo') || (e.Replacee is 'MaceAmmo') ) e.Replacement = 'SWWMRocketAmmoSmall'; - else if ( (e.Replacee is 'CellPack') || (e.Replacee is 'SkullRodHefty') ) e.Replacement = 'SWWMCellAmmoBig'; - else if ( (e.Replacee is 'Cell') || (e.Replacee is 'SkullRodAmmo') ) e.Replacement = 'SWWMCellAmmoSmall'; + else if ( (e.Replacee is 'CellPack') || (e.Replacee is 'ID24FuelTank') || (e.Replacee is 'SkullRodHefty') ) e.Replacement = 'SWWMCellAmmoBig'; + else if ( (e.Replacee is 'Cell') || (e.Replacee is 'ID24Fuel') || (e.Replacee is 'SkullRodAmmo') ) e.Replacement = 'SWWMCellAmmoSmall'; else if ( e.Replacee is 'Mana1' ) e.Replacement = 'FabricatorTier1'; else if ( e.Replacee is 'Mana2' ) e.Replacement = 'FabricatorTier2'; else if ( e.Replacee is 'Mana3' ) e.Replacement = 'FabricatorTier3'; diff --git a/zscript/handler/swwm_handler_shaders.zsc b/zscript/handler/swwm_handler_shaders.zsc index 4edeb0fc8..a441e2c21 100644 --- a/zscript/handler/swwm_handler_shaders.zsc +++ b/zscript/handler/swwm_handler_shaders.zsc @@ -39,7 +39,7 @@ extend Class SWWMHandler PPShader.SetUniform1f("BokehSel","strength",salph); } else PPShader.SetEnabled("BokehSel",false); - let divi = DivineSpriteEffect(mo.FindInventory("DivineSpriteEffect")); + let divi = DivineSpriteEffect(mo.FindInventory('DivineSpriteEffect')); if ( divi ) { PPShader.SetEnabled("DivineShader",true); @@ -48,7 +48,7 @@ extend Class SWWMHandler PPShader.SetUniform1f("DivineShader","str",str); } else PPShader.SetEnabled("DevastationShader",false); - let deva = AngeryPower(mo.FindInventory("AngeryPower")); + let deva = AngeryPower(mo.FindInventory('AngeryPower')); if ( deva ) { PPShader.SetEnabled("DevastationShader",true); @@ -57,7 +57,7 @@ extend Class SWWMHandler PPShader.SetUniform1f("DevastationShader","xtrastr",xstrastr**2.); } else PPShader.SetEnabled("DevastationShader",false); - let rage = RagekitPower(mo.FindInventory("RagekitPower")); + let rage = RagekitPower(mo.FindInventory('RagekitPower')); if ( rage ) { PPShader.SetEnabled("RagekitShader",true); @@ -66,10 +66,10 @@ extend Class SWWMHandler PPShader.SetUniform1f("RagekitShader","xtrastr",xstrastr**2.); } else PPShader.SetEnabled("RagekitShader",false); - let ghost = GhostPower(mo.FindInventory("GhostPower")); + let ghost = GhostPower(mo.FindInventory('GhostPower')); if ( ghost ) PPShader.SetEnabled("GhostShader",true); else PPShader.SetEnabled("GhostShader",false); - let sunny = InvinciballPower(mo.FindInventory("InvinciballPower")); + let sunny = InvinciballPower(mo.FindInventory('InvinciballPower')); if ( sunny ) { PPShader.SetEnabled("InvinciShader",true); @@ -77,7 +77,7 @@ extend Class SWWMHandler PPShader.SetUniform1f("InvinciShader","str",str); } else PPShader.SetEnabled("InvinciShader",false); - let coat = BarrierPower(mo.FindInventory("BarrierPower")); + let coat = BarrierPower(mo.FindInventory('BarrierPower')); if ( coat ) { PPShader.SetEnabled("BarrierShader",true); @@ -154,7 +154,7 @@ extend Class SWWMHandler } } else PPShader.SetEnabled("WindBlur",false); - if ( !demo.InStateSequence(demo.CurState,demo.FindState("Dash")) ) + if ( !demo.InStateSequence(demo.CurState,demo.FindState('Dash')) ) { PPShader.SetEnabled("ZoomBlur",false); return; diff --git a/zscript/handler/swwm_handler_vanillaboss.zsc b/zscript/handler/swwm_handler_vanillaboss.zsc index ee3440a4a..488d8446c 100644 --- a/zscript/handler/swwm_handler_vanillaboss.zsc +++ b/zscript/handler/swwm_handler_vanillaboss.zsc @@ -60,15 +60,15 @@ Class ROM3R0Death : Inventory override void OwnerDied() { // copied from boss brain - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a; while ( a = Actor(ti.Next()) ) { - if ( a is 'BossEye' ) a.SetStateLabel("Null"); + if ( a is 'BossEye' ) a.SetStateLabel('Null'); else if ( a is 'SpawnShot' ) { - a.Spawn("SpawnFire",a.pos,ALLOW_REPLACE); - a.SetStateLabel("Null"); + a.Spawn('SpawnFire',a.pos,ALLOW_REPLACE); + a.SetStateLabel('Null'); } else if ( (a.Health > 0) && (a.bBossSpawned || a.bCOUNTKILL) ) a.DamageMobj(self,self,a.Health,'EndMii',DMG_FORCED|DMG_THRUSTLESS); @@ -129,7 +129,7 @@ extend Class SWWMHandler static play void AddBoss( int tid, String tag, bool endgame = false ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.bossactors.Clear(); hnd.initialized = false; @@ -144,7 +144,7 @@ extend Class SWWMHandler { hnd.bossbrainactor = a; // look for boss eyes - let eye = Actor(ThinkerIterator.Create("BossEye").Next()); + let eye = Actor(ThinkerIterator.Create('BossEye').Next()); hnd.bossviewactor = eye; } } @@ -155,7 +155,7 @@ extend Class SWWMHandler static play void AddBossActor( Actor a, String tag, bool endgame = false ) { if ( !a ) return; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.bossactors.Clear(); hnd.initialized = false; @@ -167,7 +167,7 @@ extend Class SWWMHandler { hnd.bossbrainactor = a; // look for boss eyes - let eye = Actor(ThinkerIterator.Create("BossEye").Next()); + let eye = Actor(ThinkerIterator.Create('BossEye').Next()); hnd.bossviewactor = eye; } } @@ -438,14 +438,14 @@ extend Class SWWMHandler } else if ( bossmap == MAP_EVMAP30 ) { - if ( e.Thing.GetClassName() == "Archangelus" ) + if ( e.Thing.GetClassName() == 'Archangelus' ) { bossactors.Push(e.Thing); bossviewactor = e.Thing; bosstag = "$BT_ARCHANGELUS"; e.Thing.GiveInventory('ArchangelusMessage',1); } - else if ( e.Thing.GetClassName() == "ArchangelusA" ) + else if ( e.Thing.GetClassName() == 'ArchangelusA' ) { // first phase bossactors.Clear(); @@ -457,7 +457,7 @@ extend Class SWWMHandler e.Thing.GiveInventory('BossMarker',1); e.Thing.GiveInventory('EndgameBossMarker',1); } - else if ( e.Thing.GetClassName() == "ArchangelusB" ) + else if ( e.Thing.GetClassName() == 'ArchangelusB' ) { // second phase bossactors.Clear(); @@ -474,7 +474,7 @@ extend Class SWWMHandler } else if ( bossmap == MAP_EVIIMAP30 ) { - if ( (e.Thing.GetClassName() == "The_Origin_Phase_1_Spawner") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1_Spawner") ) + if ( (e.Thing.GetClassName() == 'The_Origin_Phase_1_Spawner') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1_Spawner') ) { bossactors.Push(e.Thing); bossviewactor = e.Thing; @@ -482,7 +482,7 @@ extend Class SWWMHandler // hack to avoid "all clear" between phases level.total_monsters += 3; } - else if ( (e.Thing.GetClassName() == "The_Origin_Phase_1") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1") ) + else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_1') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1') ) { // first phase bossactors.Clear(); @@ -496,7 +496,7 @@ extend Class SWWMHandler // undo the hack (part 1) level.total_monsters--; } - else if ( (e.Thing.GetClassName() == "The_Origin_Phase_2") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_2") ) + else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_2') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_2') ) { // second phase bossactors.Clear(); @@ -516,7 +516,7 @@ extend Class SWWMHandler // undo the hack (part 2) level.total_monsters--; } - else if ( (e.Thing.GetClassName() == "The_Origin_Phase_3") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_3") ) + else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_3') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_3') ) { // third phase bossactors.Clear(); @@ -538,7 +538,7 @@ extend Class SWWMHandler level.total_monsters--; } } - if ( ccloaded && (e.Thing.GetClassName() == "CCards_Boss_Romero") ) + if ( ccloaded && (e.Thing.GetClassName() == 'CCards_Boss_Romero') ) { bossactors.Push(e.Thing); e.Thing.StartHealth = e.Thing.Health *= 10; @@ -584,11 +584,11 @@ extend Class SWWMHandler else if ( bossmap == MAP_EVIIMAP30 ) { highesttic = gametic; - if ( (a.GetClassName() == "The_Origin_Phase_1") || (a.GetClassName() == "The_Absolute_Origin_Phase_1") ) + if ( (a.GetClassName() == 'The_Origin_Phase_1') || (a.GetClassName() == 'The_Absolute_Origin_Phase_1') ) lastcombat = AddOneliner("origin1",1,40); - else if ( (a.GetClassName() == "The_Origin_Phase_2") || (a.GetClassName() == "The_Absolute_Origin_Phase_2") ) + else if ( (a.GetClassName() == 'The_Origin_Phase_2') || (a.GetClassName() == 'The_Absolute_Origin_Phase_2') ) lastcombat = AddOneliner("origin2",1,40); - else if ( (a.GetClassName() == "The_Origin_Phase_3") || (a.GetClassName() == "The_Absolute_Origin_Phase_3") ) + else if ( (a.GetClassName() == 'The_Origin_Phase_3') || (a.GetClassName() == 'The_Absolute_Origin_Phase_3') ) lastcombat = AddOneliner("origin3",1,40); } break; diff --git a/zscript/handler/swwm_handler_worldload.zsc b/zscript/handler/swwm_handler_worldload.zsc index 54221ba08..9f86b4e20 100644 --- a/zscript/handler/swwm_handler_worldload.zsc +++ b/zscript/handler/swwm_handler_worldload.zsc @@ -59,7 +59,7 @@ extend Class SWWMHandler // level end stats override void WorldUnloaded( WorldEvent e ) { - let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMStats',Thinker.STAT_STATIC); SWWMStats s; while ( s = SWWMStats(ti.Next()) ) { @@ -113,7 +113,7 @@ extend Class SWWMHandler s.AddLevelStats(); s.lastcluster = level.cluster; // nazi cleanup - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a; bool hasnazis = false; bool livenazis = false; @@ -219,7 +219,7 @@ extend Class SWWMHandler sbounds.Resize(level.Sectors.Size()); foreach ( s:level.Sectors ) { - let sb = new("SectorBounds"); + let sb = new('SectorBounds'); sb.portalgroup = s.portalgroup; sb.bounds = ( 32767, 32767, -32768, -32768 ); foreach ( l:s.Lines ) @@ -267,15 +267,10 @@ extend Class SWWMHandler SendInterfaceEvent(consoleplayer,"swwmsetdialogue.DIMPLE"); break; case MAP_DMAP30: - bool rampancy = false; - foreach ( cls:AllActorClasses ) - { - if ( cls.GetClassName() != "Robot_BossBrain" ) continue; - rampancy = true; - break; - } - if ( rampancy ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.RAMPANCY"); - else SendInterfaceEvent(consoleplayer,"swwmsetdialogue.IOS"); + if ( FindClass('Robot_BossBrain','Actor') ) + SendInterfaceEvent(consoleplayer,"swwmsetdialogue.RAMPANCY"); + else + SendInterfaceEvent(consoleplayer,"swwmsetdialogue.IOS"); break; case MAP_DLVL08: SendInterfaceEvent(consoleplayer,"swwmsetdialogue.NERVE"); @@ -418,14 +413,14 @@ extend Class SWWMHandler || (level.GetChecksum() ~== "A52BD2038CF814101AAB7D9C78F9ACE2") ) level.ExecuteSpecial(ACS_Execute,null,null,false,-Int('DVACATION_UNSCREW')); // rampancy boss brain fix (repeatedly triggering "map clear") - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a, brain; bool haseye = false; while ( a = Actor(ti.Next()) ) { - if ( a.GetClassName() == "Robot_BossEye" ) + if ( a.GetClassName() == 'Robot_BossEye' ) haseye = true; - if ( a.GetClassName() == "Robot_BossBrain" ) + if ( a.GetClassName() == 'Robot_BossBrain' ) brain = a; } if ( haseye && brain ) @@ -433,7 +428,7 @@ extend Class SWWMHandler brain.bCOUNTKILL = true; level.total_monsters++; // while we're at it - Actor.Spawn("RampancyLogonDummy"); + Actor.Spawn('RampancyLogonDummy'); } // KDiKDiZD abort fix due to voodoo doll post-spawn replacement // (we have our own mikoportal compatibility, anyway) @@ -442,18 +437,15 @@ extend Class SWWMHandler // since KDiKDiZD requires software rendering, while this is a // hardware-only mod... but hey, they can sort-of-work together // (with broken visual effects, but still... somewhat working) - foreach ( cls:AllClasses ) + if ( FindClass('KdikdizdCompatEventHandler','EventHandler') ) { - if ( cls.GetClassName() != 'KdikdizdCompatEventHandler' ) - continue; - ti = ThinkerIterator.Create("Thinker"); + ti = ThinkerIterator.Create('Thinker'); foreach ( t:ti ) { if ( t.GetClassName() != 'VoodooPusher' ) continue; t.Destroy(); } - break; } // Eviternity II MAP33 fix. Player movement physics need to // have ground anchoring disabled, as it will make some @@ -478,7 +470,7 @@ extend Class SWWMHandler // while we're at it, add teleporter sparks if ( SWWMUtility.IsTeleportLine(l) ) { - let a = SWWMTeleportLine(Actor.Spawn("SWWMTeleportLine")); + let a = SWWMTeleportLine(Actor.Spawn('SWWMTeleportLine')); a.tline = l; } let [isexit, exittype] = SWWMUtility.IsExitLine(l); @@ -533,7 +525,7 @@ extend Class SWWMHandler if ( !deathmatch ) Chancebox.SpawnChanceboxes(); // list map keys maphaskeys = false; - ti = ThinkerIterator.Create("Key"); + ti = ThinkerIterator.Create('Key'); Key k; while ( k = Key(ti.Next()) ) { diff --git a/zscript/handler/swwm_handler_worldthings.zsc b/zscript/handler/swwm_handler_worldthings.zsc index ed4a8ee46..aef3020ba 100644 --- a/zscript/handler/swwm_handler_worldthings.zsc +++ b/zscript/handler/swwm_handler_worldthings.zsc @@ -16,7 +16,7 @@ extend Class SWWMHandler || SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) ) { // you can pet the dog, and you can also pet the caco (and friends) - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; } if ( !(e.Thing is 'PlayerPawn') ) @@ -53,12 +53,12 @@ extend Class SWWMHandler for ( int i=0; i= 1000) || e.Thing.FindInventory("BossMarker")) && (alreadygold.Find(e.Thing) == alreadygold.Size()) ) + if ( e.Thing.default.bISMONSTER && e.Thing.default.bCOUNTKILL && ((e.Thing.default.bBOSS) || (e.Thing.GetSpawnHealth() >= 1000) || e.Thing.FindInventory('BossMarker')) && (alreadygold.Find(e.Thing) == alreadygold.Size()) ) { // make sure we can't farm drops from revivable enemies // (or cause some things to spam-spawn gold shells) @@ -89,7 +89,7 @@ extend Class SWWMHandler int gchance = int(ceil(ShouldSpawnGold()/2.)); if ( !Random[GoldDrop](0,dropweight) && Random[GoldDrop](0,gchance) ) { - let g = Actor.Spawn("GoldShell",e.Thing.Vec3Offset(0,0,e.Thing.Height/2.)); + let g = Actor.Spawn('GoldShell',e.Thing.Vec3Offset(0,0,e.Thing.Height/2.)); double ang = FRandom[SpareShells](0.,360.); g.vel.xy = Actor.AngleToVector(ang,FRandom[SpareShells](.4,.8)); g.vel.z = FRandom[SpareShells](2.,4.); @@ -113,21 +113,21 @@ extend Class SWWMHandler level.ExecuteSpecial(Door_Open,e.Thing,null,false,10,16); // keep the portal closed, you can't leave unless you // kill everyone else - let t = new("KoraxYeeted"); + let t = new('KoraxYeeted'); t.ChangeStatNum(Thinker.STAT_USER); } // Archangelus instakill - if ( (e.Thing.GetClassName() == "ArchangelusA") && (e.Thing.DamageType == 'Ynykron') ) + if ( (e.Thing.GetClassName() == 'ArchangelusA') && (e.Thing.DamageType == 'Ynykron') ) { // this will skip the second phase dialogue // (note that you can only have an Ynykron in this fight by cheating, tho) archangelus_zapped = true; } // Archangelus death - if ( e.Thing.GetClassName() == "ArchangelusB" ) + if ( e.Thing.GetClassName() == 'ArchangelusB' ) { // kill all other monsters - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a; while ( a = Actor(ti.Next()) ) { @@ -136,8 +136,8 @@ extend Class SWWMHandler } } // Origin instakill - if ( ((e.Thing.GetClassName() == "The_Origin_Phase_1") || (e.Thing.GetClassName() == "The_Origin_Phase_2") - || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1") || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_2")) + if ( ((e.Thing.GetClassName() == 'The_Origin_Phase_1') || (e.Thing.GetClassName() == 'The_Origin_Phase_2') + || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1') || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_2')) && (e.Thing.DamageType == 'Ynykron') ) { // this will trigger special dialogue on the next phase @@ -145,7 +145,7 @@ extend Class SWWMHandler } if ( swwm_partytime ) { - let pt = Actor.Spawn("PartyTime",e.Thing.pos); + let pt = Actor.Spawn('PartyTime',e.Thing.pos); pt.target = e.Thing; } if ( profiling ) ProfileTock(PT_WORLDTHINGDIED); @@ -180,7 +180,7 @@ extend Class SWWMHandler // tempfix keys have no tags static void KeyTagFix( Actor a ) { - let hnd = SWWMHandler(Find("SWWMHandler")); + let hnd = SWWMHandler(Find('SWWMHandler')); if ( hnd ) hnd.DoKeyTagFix(a); } @@ -234,7 +234,7 @@ extend Class SWWMHandler IWantDieSpawn(e); if ( (e.Thing is 'TeleportDest') || (e.Thing is 'BossTarget') ) { - let d = Actor.Spawn("SWWMTeleportDest",e.Thing.pos); + let d = Actor.Spawn('SWWMTeleportDest',e.Thing.pos); d.bNOGRAVITY = e.Thing.bNOGRAVITY; } if ( e.Thing is 'Inventory' ) @@ -244,10 +244,10 @@ extend Class SWWMHandler { let p = Actor.Spawn(Inventory(e.Thing).PickupFlash,e.Thing.pos); p.target = e.Thing; - p.SetStateLabel("Pickup"); + p.SetStateLabel('Pickup'); } // for notification - if ( e.Thing.GetClassName() == "LDLegendaryMonsterTransformed" ) + if ( e.Thing.GetClassName() == 'LDLegendaryMonsterTransformed' ) legtrack.Push(Inventory(e.Thing)); } if ( swwm_doomfall && e.Thing.bISMONSTER && !e.Thing.bBOSS ) @@ -262,132 +262,132 @@ extend Class SWWMHandler if ( e.Thing.GetClass() == 'Pig' ) e.Thing.SetTag("$FN_PIG"); // missing in gzdoom // eviternity stuff - else if ( (e.Thing.GetClassName() == "Archangelus") - || (e.Thing.GetClassName() == "ArchangelusA") - || (e.Thing.GetClassName() == "ArchangelusB") ) + else if ( (e.Thing.GetClassName() == 'Archangelus') + || (e.Thing.GetClassName() == 'ArchangelusA') + || (e.Thing.GetClassName() == 'ArchangelusB') ) e.Thing.SetTag("$FN_ANGEL"); - else if ( e.Thing.GetClassName() == "AstralCaco" ) + else if ( e.Thing.GetClassName() == 'AstralCaco' ) e.Thing.SetTag("$FN_ASTRAL"); - else if ( e.Thing.GetClassName() == "Annihilator" ) + else if ( e.Thing.GetClassName() == 'Annihilator' ) e.Thing.SetTag("$FN_ANNIHIL"); - else if ( e.Thing.GetClassName() == "FormerCaptain" ) + else if ( e.Thing.GetClassName() == 'FormerCaptain' ) e.Thing.SetTag("$FN_FCAPTAIN"); - else if ( e.Thing.GetClassName() == "NightmareDemon" ) + else if ( e.Thing.GetClassName() == 'NightmareDemon' ) e.Thing.SetTag("$FN_NDEMON"); // eviternity 2 stuff - else if ( e.Thing.GetClassName() == "FormerCorporal" ) + else if ( e.Thing.GetClassName() == 'FormerCorporal' ) e.Thing.SetTag("$FN_FCORPORAL"); - else if ( e.Thing.GetClassName() == "AstralArachnotron" ) + else if ( e.Thing.GetClassName() == 'AstralArachnotron' ) e.Thing.SetTag("$FN_ASTRALARACH"); - else if ( e.Thing.GetClassName() == "AstralCacodemon" ) + else if ( e.Thing.GetClassName() == 'AstralCacodemon' ) e.Thing.SetTag("$FN_ASTRAL"); - else if ( e.Thing.GetClassName() == "Veilimp" ) + else if ( e.Thing.GetClassName() == 'Veilimp' ) e.Thing.SetTag("$FN_VEILIMP"); - else if ( (e.Thing.GetClassName() == "GoldenAstralCaco") - || (e.Thing.GetClassName() == "GoldenAstralCacoBoss") ) + else if ( (e.Thing.GetClassName() == 'GoldenAstralCaco') + || (e.Thing.GetClassName() == 'GoldenAstralCacoBoss') ) e.Thing.SetTag("$FN_ASTRALGOLD"); - else if ( e.Thing.GetClassName() == "DukeOfHell" ) + else if ( e.Thing.GetClassName() == 'DukeOfHell' ) e.Thing.SetTag("$FN_DUKE"); - else if ( e.Thing.GetClassName() == "AstralBabycaco" ) + else if ( e.Thing.GetClassName() == 'AstralBabycaco' ) e.Thing.SetTag("$FN_ASTRALBABY"); - else if ( e.Thing.GetClassName() == "NightmareCacodemon" ) + else if ( e.Thing.GetClassName() == 'NightmareCacodemon' ) e.Thing.SetTag("$FN_NAC"); - else if ( e.Thing.GetClassName() == "AstralMancubus" ) + else if ( e.Thing.GetClassName() == 'AstralMancubus' ) e.Thing.SetTag("$FN_ASTRALFATSO"); - else if ( (e.Thing.GetClassName() == "NecromenaceA") - || (e.Thing.GetClassName() == "NecromenaceB") - || (e.Thing.GetClassName() == "NecromenaceC") - || (e.Thing.GetClassName() == "NecromenaceD") ) + else if ( (e.Thing.GetClassName() == 'NecromenaceA') + || (e.Thing.GetClassName() == 'NecromenaceB') + || (e.Thing.GetClassName() == 'NecromenaceC') + || (e.Thing.GetClassName() == 'NecromenaceD') ) e.Thing.SetTag("$FN_NECROMENACE"); - else if ( (e.Thing.GetClassName() == "The_Origin_Phase_1") - || (e.Thing.GetClassName() == "The_Origin_Phase_2") - || (e.Thing.GetClassName() == "The_Origin_Phase_3") - || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_1") - || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_2") - || (e.Thing.GetClassName() == "The_Absolute_Origin_Phase_3") ) + else if ( (e.Thing.GetClassName() == 'The_Origin_Phase_1') + || (e.Thing.GetClassName() == 'The_Origin_Phase_2') + || (e.Thing.GetClassName() == 'The_Origin_Phase_3') + || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_1') + || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_2') + || (e.Thing.GetClassName() == 'The_Absolute_Origin_Phase_3') ) e.Thing.SetTag("$FN_ORIGIN"); - else if ( e.Thing.GetClassName() == "SpectralAstralCacodemon" ) + else if ( e.Thing.GetClassName() == 'SpectralAstralCacodemon' ) e.Thing.SetTag("$FN_SAC"); - else if ( e.Thing.GetClassName() == "GrandDukeofHell" ) + else if ( e.Thing.GetClassName() == 'GrandDukeofHell' ) e.Thing.SetTag("$FN_GDUKE"); // doom vacation stuff else if ( indoomvacation ) { - if ( e.Thing.GetClassName() == "Babe" ) + if ( e.Thing.GetClassName() == 'Babe' ) { e.Thing.bSHOOTABLE = false; // no hurt let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .2; } - else if ( e.Thing.GetClassName() == "CommanderKeen" ) + else if ( e.Thing.GetClassName() == 'CommanderKeen' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .4; HeadpatTracker(hp).angfix = 5; } - else if ( e.Thing.GetClassName() == "BBChair" ) + else if ( e.Thing.GetClassName() == 'BBChair' ) { e.Thing.bUSESPECIAL = false; - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .2; HeadpatTracker(hp).angfix = 15; HeadpatTracker(hp).patstate = e.Thing.MeleeState; } - else if ( e.Thing.GetClassName() == "EvilEye" ) + else if ( e.Thing.GetClassName() == 'EvilEye' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .1; } - else if ( e.Thing.GetClassName() == "HeadCandles" ) + else if ( e.Thing.GetClassName() == 'HeadCandles' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).angfix = 20; } - else if ( e.Thing.GetClassName() == "HeartColumn" ) + else if ( e.Thing.GetClassName() == 'HeartColumn' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = -.3; } - else if ( e.Thing.GetClassName() == "Meat2" ) + else if ( e.Thing.GetClassName() == 'Meat2' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .6; HeadpatTracker(hp).angfix = -15; HeadpatTracker(hp).dvacationarghack = true; } - else if ( e.Thing.GetClassName() == "Meat3" ) + else if ( e.Thing.GetClassName() == 'Meat3' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .6; HeadpatTracker(hp).angfix = 20; HeadpatTracker(hp).dvacationarghack = true; } - else if ( e.Thing.GetClassName() == "LegsBabe" ) + else if ( e.Thing.GetClassName() == 'LegsBabe' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = -1.5; HeadpatTracker(hp).angfix = 20; HeadpatTracker(hp).dvacationarghack = true; } - else if ( e.Thing.GetClassName() == "Meat4" ) + else if ( e.Thing.GetClassName() == 'Meat4' ) { - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; HeadpatTracker(hp).heightfix = .6; HeadpatTracker(hp).angfix = 15; HeadpatTracker(hp).dvacationarghack = true; } } - else if ( inultdoom2 && (e.Thing.GetClassName() == "WolfensteinSS") ) + else if ( inultdoom2 && (e.Thing.GetClassName() == 'WolfensteinSS') ) { e.Thing.SetTag("$FN_ELITEZOMBIE"); //e.Thing.Obituary = "$OB_ELITEZOMBIE"; @@ -397,7 +397,7 @@ extend Class SWWMHandler e.Thing.DeathSound = "grunt/death"; e.Thing.ActiveSound = "grunt/active"; } - else if ( ccloaded && (e.Thing.GetClassName() == "CCards_Token_Glitched") ) + else if ( ccloaded && (e.Thing.GetClassName() == 'CCards_Token_Glitched') ) { if ( !gdat.cclilithonce ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.LILITH"); gdat.cclilithonce = true; @@ -406,29 +406,29 @@ extend Class SWWMHandler || SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) ) { // you can pet the dog, and you can also pet the caco (and friends) - let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos); + let hp = Actor.Spawn('HeadpatTracker',e.Thing.pos); hp.target = e.Thing; } // vanilla blood color changes - if ( (e.Thing.GetClass() == "BaronOfHell") || (e.Thing.GetClass() == "HellKnight") || (e.Thing.GetClass() == "Bishop") || (e.Thing.GetClass() == "Korax") ) + if ( (e.Thing.GetClassName() == 'BaronOfHell') || (e.Thing.GetClassName() == 'HellKnight') || (e.Thing.GetClassName() == 'Bishop') || (e.Thing.GetClassName() == 'Korax') ) { - let gb = Actor.Spawn("GreenBloodReference"); + let gb = Actor.Spawn('GreenBloodReference'); e.Thing.CopyBloodColor(gb); gb.Destroy(); } - else if ( e.Thing.GetClass() == "Cacodemon" ) + else if ( e.Thing.GetClassName() == 'Cacodemon' ) { - let bb = Actor.Spawn("BlueBloodReference"); + let bb = Actor.Spawn('BlueBloodReference'); e.Thing.CopyBloodColor(bb); bb.Destroy(); } - else if ( (e.Thing.GetClass() == "Wizard") || (e.Thing.GetClass() == "Heresiarch") || (e.Thing.GetClass() == "Sorcerer2") ) + else if ( (e.Thing.GetClassName() == 'Wizard') || (e.Thing.GetClassName() == 'Heresiarch') || (e.Thing.GetClassName() == 'Sorcerer2') ) { - let pb = Actor.Spawn("PurpleBloodReference"); + let pb = Actor.Spawn('PurpleBloodReference'); e.Thing.CopyBloodColor(pb); pb.Destroy(); } - else if ( e.Thing.GetClass() == "LostSoul" ) + else if ( e.Thing.GetClassName() == 'LostSoul' ) e.Thing.bNOBLOOD = true; VanillaBossSpawn(e); if ( profiling ) ProfileTock(PT_WORLDTHINGSPAWNED); diff --git a/zscript/handler/swwm_handler_worldtick.zsc b/zscript/handler/swwm_handler_worldtick.zsc index 80c663c64..689a63f0e 100644 --- a/zscript/handler/swwm_handler_worldtick.zsc +++ b/zscript/handler/swwm_handler_worldtick.zsc @@ -24,7 +24,7 @@ extend Class SWWMHandler if ( (language != curlang) || (swwm_funtags != curfuntags) ) { // manually refresh some tags if language has changed - if ( !qti ) qti = ThinkerIterator.Create("SWWMQuickCombatTracker",Thinker.STAT_INVENTORY); + if ( !qti ) qti = ThinkerIterator.Create('SWWMQuickCombatTracker',Thinker.STAT_INVENTORY); else qti.Reinit(); SWWMQuickCombatTracker qt; while ( qt=SWWMQuickCombatTracker(qti.Next()) ) @@ -126,12 +126,12 @@ extend Class SWWMHandler combatactors.Push(a); combattics.Push(gametic); enteredcombat = true; - if ( a.bBOSS || a.FindInventory("BossMarker") ) + if ( a.bBOSS || a.FindInventory('BossMarker') ) bossfound = true; } } // be smart, demo-chan, don't shout if you're invisible, or you'll make it worse - if ( enteredcombat && ((bossfound && (!lastcombat || (gametic > lastcombat+240))) || (!bossfound && (!highesttic || (gametic > highesttic+700)))) && !players[consoleplayer].mo.FindInventory("GhostPower") ) + if ( enteredcombat && ((bossfound && (!lastcombat || (gametic > lastcombat+240))) || (!bossfound && (!highesttic || (gametic > highesttic+700)))) && !players[consoleplayer].mo.FindInventory('GhostPower') ) lastcombat = AddOneliner("fightstart",1,10); } @@ -203,7 +203,7 @@ extend Class SWWMHandler for ( int i=0; i menustate; // used by Demolitionist Menu to restore old menu positions // title stuff ui bool titlefirst; // map title stuff @@ -39,7 +39,7 @@ Class SWWMStaticHandler : StaticEventHandler override void NewGame() { // set save version every new session - let svd = new("SWWMSaveVerData"); + let svd = new('SWWMSaveVerData'); svd.ChangeStatNum(Thinker.STAT_STATIC); svd.ver = StringTable.Localize("$SWWM_SHORTVER"); uid = 0; @@ -68,7 +68,7 @@ Class SWWMStaticHandler : StaticEventHandler } // sanity check Array stinkers; - if ( !sti ) sti = ThinkerIterator.Create("SWWMStaticThinker"); + if ( !sti ) sti = ThinkerIterator.Create('SWWMStaticThinker'); else sti.Reinit(); foreach ( t:sti ) stinkers.Push(t); if ( stinkers.Size() > 0 ) @@ -101,7 +101,7 @@ Class SWWMStaticHandler : StaticEventHandler tainted = false; taintver = ""; checktic = gametic+5; - let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC); let svd = SWWMSaveVerData(ti.Next()); if ( !svd ) { @@ -256,7 +256,7 @@ Class SWWMStaticHandler : StaticEventHandler if ( aprilfools && (gamestate == GS_LEVEL) ) { String str = "Unregistered Ultracam"; - if ( !aprfnt ) aprfnt = Font.GetFont("TewiFontOutline"); + if ( !aprfnt ) aprfnt = Font.GetFont('TewiFontOutline'); Screen.DrawText(aprfnt,Font.CR_WHITE,(Screen.GetWidth()-aprfnt.StringWidth(str)*CleanXFac_1)/2,2*CleanYFac_1,str,DTA_CleanNoMove_1,true); } } @@ -267,7 +267,7 @@ Class SWWMStaticHandler : StaticEventHandler if ( e.Name ~== "swwmmaptitle" ) { if ( (gamestate != GS_LEVEL) || !swwm_showmaptitle ) return; - StatusBar.AttachMessage(new("DSMapTitle").Init(),-7777); + StatusBar.AttachMessage(new('DSMapTitle').Init(),-7777); } else if ( e.Name ~== "swwmflushhud" ) { @@ -367,7 +367,7 @@ Class SWWMStaticHandler : StaticEventHandler } else if ( e.Name ~== "swwmgetversion" ) { - let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC); let svd = SWWMSaveVerData(ti.Next()); if ( svd ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cj%s\c-",svd.ver); else Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cg(no version data)\c-"); @@ -398,7 +398,7 @@ Class SWWMStaticHandler : StaticEventHandler stink.Resize(sdefs.Size()); for ( int i=Thinker.STAT_INFO; i 0) ) { double dimalph = goner?1.:min(deadtimer/80.,.8); - Screen.Dim("Black",dimalph,0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFF000000,dimalph,0,0,Screen.GetWidth(),Screen.GetHeight()); if ( demo && (demo.revivefail > level.maptime) ) { - Screen.Dim("Red",clamp((demo.revivefail-(level.maptime+fractic))/60.,0.,.2),0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFFFF0000,clamp((demo.revivefail-(level.maptime+fractic))/60.,0.,.2),0,0,Screen.GetWidth(),Screen.GetHeight()); str = StringTable.Localize("$SWWM_REFAIL"); len = mSmallFont.StringWidth(str); xx = int((ss0.x-len)/2.); @@ -630,7 +630,7 @@ Class SWWMStatusBar : BaseStatusBar } Super.Draw(state,TicFrac); FrameTime = (CurFrame-PrevFrame)/1000.; - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); hsA = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.); hsT = max(min(floor(Screen.GetWidth()/480.),floor(Screen.GetHeight()/270.)),1.); ymargin = clamp(swwm_hudmargin,0,10); diff --git a/zscript/hud/swwm_hud_messages.zsc b/zscript/hud/swwm_hud_messages.zsc index 57be661a8..912267982 100644 --- a/zscript/hud/swwm_hud_messages.zsc +++ b/zscript/hud/swwm_hud_messages.zsc @@ -244,7 +244,7 @@ extend Class SWWMStatusBar if ( (rprintlevel < PRINT_LOW) || (rprintlevel > PRINT_TEAMCHAT) ) rprintlevel = PRINT_HIGH; // strip trailing newline (all Printf type messages have this) outline.DeleteLastCharacter(); - let m = new("MsgLine"); + let m = new('MsgLine'); m.str = outline; m.type = rprintlevel; m.tic = level.totaltime; @@ -322,7 +322,7 @@ extend Class SWWMStatusBar yy = ss0.y-(ymargin0+50); int len = mSmallFont.StringWidth(ntagstr); double xx = (ss0.x-len)/2.; - Screen.Dim("Black",.8*nalph,int((xx-6)*hs0),int(yy*hs0),int((len+12)*hs0),int((h+4)*hs0)); + Screen.Dim(0xFF000000,.8*nalph,int((xx-6)*hs0),int(yy*hs0),int((len+12)*hs0),int((h+4)*hs0)); Screen.DrawText(mSmallFont,ntagcol,int(xx),yy+2,ntagstr,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true,DTA_Alpha,nalph); } if ( PickupQueue.Size() <= 0 ) return; @@ -344,7 +344,7 @@ extend Class SWWMStatusBar if ( len > maxlen ) maxlen = len; } double xx = (ss0.x-maxlen)/2.; - Screen.Dim("Black",.8*alph,int((xx-6)*hs0),int((yy-h*(l.Count()-1))*hs0),int((maxlen+12)*hs0),int((h*l.Count()+4)*hs0)); + Screen.Dim(0xFF000000,.8*alph,int((xx-6)*hs0),int((yy-h*(l.Count()-1))*hs0),int((maxlen+12)*hs0),int((h*l.Count()+4)*hs0)); for ( int j=l.Count()-1; j>=0; j-- ) { int len = mSmallFont.StringWidth(l.StringAt(j)); @@ -378,7 +378,7 @@ extend Class SWWMStatusBar xx = int((ss0.x*ssp-maxlen)/2.); yy = int(ss0.y*ssp*.375); yy -= (h*midl.Count()+4)/2; // center - Screen.Dim("Black",.8*alph,int((xx-6)*hs0*hsp),int(yy*hs0*hsp),int((maxlen+12)*hs0*hsp),int((h*midl.Count()+4)*hs0*hsp)); + Screen.Dim(0xFF000000,.8*alph,int((xx-6)*hs0*hsp),int(yy*hs0*hsp),int((maxlen+12)*hs0*hsp),int((h*midl.Count()+4)*hs0*hsp)); for ( int i=0; i= FS_PAIN) ) return 12; + if ( (isInvulnerable() || demo.FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 12; if ( facestate == FS_OUCH ) return 10; if ( facestate == FS_PAIN ) return (paindir==1)?8:(paindir==-1)?9:7; if ( facestate == FS_GRIN ) return 5; @@ -111,18 +111,18 @@ extend Class SWWMStatusBar double paintime = clamp((demo.lastdamagetimer-(gametic+Fractic))/double(GameTicRate),0.,1.); double noiz = min(demo.lastdamage*.5*paintime,3.); Vector2 shake = (RandomShiver(),RandomShiver())*noiz; - if ( !CPlayer.mo.FindInventory("GhostPower") ) + if ( !CPlayer.mo.FindInventory('GhostPower') ) { int facecol = CVar.GetCVar('swwm_tagcolor',CPlayer).GetInt(); if ( (facecol < 0) || (facecol > 15) ) facecol = 0; Screen.DrawTexture(FaceTex[0],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,32,DTA_SrcHeight,32,DTA_DestWidth,32,DTA_DestHeight,32,DTA_SrcX,32*(facecol%4),DTA_SrcY,32*(facecol/4)); - bool raging = CPlayer.mo.FindInventory("RagekitPower"); - bool angy = CPlayer.mo.FindInventory("AngeryPower"); + bool raging = CPlayer.mo.FindInventory('RagekitPower'); + bool angy = CPlayer.mo.FindInventory('AngeryPower'); if ( raging && angy ) Screen.DrawTexture(FaceTex[16],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); else if ( raging ) Screen.DrawTexture(FaceTex[15],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); else if ( angy ) Screen.DrawTexture(FaceTex[13],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Color,Color(255,255,0,0),DTA_Alpha,min(1.,noiz)); - if ( (CPlayer.Health > 0) && (isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower")) ) + if ( (CPlayer.Health > 0) && (isInvulnerable() || CPlayer.mo.FindInventory('InvinciballPower')) ) Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.8+.1*sin(gametic+fractic)); } else @@ -131,7 +131,7 @@ extend Class SWWMStatusBar Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_FillColor,Color(255,0,0),DTA_Alpha,.25*min(1.,noiz)); } Screen.DrawTexture(FaceTex[GetFaceTex(demo)],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); - if ( CPlayer.mo.FindInventory("BarrierPower") ) Screen.DrawTexture(FaceTex[14],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.5,DTA_LegacyRenderStyle,STYLE_Add); + if ( CPlayer.mo.FindInventory('BarrierPower') ) Screen.DrawTexture(FaceTex[14],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.5,DTA_LegacyRenderStyle,STYLE_Add); } private void DrawStatus() @@ -149,7 +149,7 @@ extend Class SWWMStatusBar if ( round(ht) > 500 ) hcolor = MCR_GOLD; else if ( round(ht) > 200 ) hcolor = MCR_PURPLE; else if ( round(ht) > 100 ) hcolor = MCR_AQUA; - if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") ) + if ( isInvulnerable() || CPlayer.mo.FindInventory('InvinciballPower') ) { Screen.DrawTexture(HealthTex[0],false,xmargin+3+ox,ss.y-(ymargin+19+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0)); Screen.DrawTexture(HealthTex[4],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); @@ -175,7 +175,7 @@ extend Class SWWMStatusBar Screen.DrawTexture(HealthTex[3],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); } } - if ( CPlayer.mo.FindInventory("DivineSpriteEffect") ) + if ( CPlayer.mo.FindInventory('DivineSpriteEffect') ) { double falph = clamp((ht-1000)/6000.,0.,1.); Screen.DrawTexture(HealthTex[5],false,xmargin+2+ox,ss.y-(ymargin+20+oy),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add); diff --git a/zscript/hud/swwm_hud_target.zsc b/zscript/hud/swwm_hud_target.zsc index 68e808740..890699148 100644 --- a/zscript/hud/swwm_hud_target.zsc +++ b/zscript/hud/swwm_hud_target.zsc @@ -118,8 +118,8 @@ extend Class SWWMStatusBar { for ( Inventory i=a.inv; i; i=i.inv ) { - if ( (i.GetClassName() == "LDLegendaryMonsterToken") && swwm_ldspoil ) return true; - else if ( i.GetClassName() == "LDLegendaryMonsterTransformed" ) return true; + if ( (i.GetClassName() == 'LDLegendaryMonsterToken') && swwm_ldspoil ) return true; + else if ( i.GetClassName() == 'LDLegendaryMonsterTransformed' ) return true; } return false; } @@ -127,7 +127,7 @@ extend Class SWWMStatusBar private void DrawTrackers( Vector3 viewvec, bool &projinit ) { let cam = players[consoleplayer].camera; - if ( !cti ) cti = ThinkerIterator.Create("SWWMQuickCombatTracker",Thinker.STAT_INVENTORY); + if ( !cti ) cti = ThinkerIterator.Create('SWWMQuickCombatTracker',Thinker.STAT_INVENTORY); else cti.Reinit(); SWWMQuickCombatTracker ct; bool onlymonsters = (swwm_targeter >= 2); @@ -197,7 +197,7 @@ extend Class SWWMStatusBar if ( StringTable.Localize("$SWWM_LEGPREFIX") == "R" ) tag = tag..StringTable.Localize("$SWWM_LEG"); else tag = StringTable.Localize("$SWWM_LEG")..tag; } - if ( ct.Owner.bBOSS || ct.Owner.FindInventory("BossMarker") ) + if ( ct.Owner.bBOSS || ct.Owner.FindInventory('BossMarker') ) { if ( swwm_bigtags ) tag = "\cx★\c- "..tag.." \cx★\c-"; else tag = "\cx*\c- "..tag.." \cx*\c-"; // miniwi has no stars @@ -262,9 +262,9 @@ extend Class SWWMStatusBar String val = String.Format("%d",clamp(ct.lasthealth,0,999)); int valw = MiniHUDFontOutline.StringWidth(val); int col = (ct.lasthealth>500)?mhudfontcol[MCR_GOLD]:(ct.lasthealth>200)?mhudfontcol[MCR_PURPLE]:(ct.lasthealth>100)?mhudfontcol[MCR_AQUA]:mhudfontcol[MCR_RED]; - if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory("InvinciballPower") ) + if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory('InvinciballPower') ) col = mhudfontcol[MCR_WHITE]; - if ( ct.Owner.FindInventory("DivineSpriteEffect") ) + if ( ct.Owner.FindInventory('DivineSpriteEffect') ) { double falph = clamp((ct.intp.GetValue(fractic)-1000)/6000.,0.,1.); String tst; @@ -295,7 +295,7 @@ extend Class SWWMStatusBar double ht = clamp(ct.intp.GetValue(fractic),0,10000); double hw = (ht*50.)/100.; double ohw = hw; - if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory("InvinciballPower") ) + if ( ct.Owner.bINVULNERABLE || (ct.Owner.player.cheats&(CF_GODMODE|CF_GODMODE2)) || ct.Owner.FindInventory('InvinciballPower') ) Screen.DrawTexture(EnemyHTex[1],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); else { @@ -316,7 +316,7 @@ extend Class SWWMStatusBar Screen.DrawTexture(EnemyHTex[5],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw); } } - if ( ct.Owner.FindInventory("DivineSpriteEffect") ) + if ( ct.Owner.FindInventory('DivineSpriteEffect') ) { double falph = clamp((ht-1000)/6000.,0.,1.); Screen.DrawTexture(EnemyHTex[6],false,barpos.x+2,barpos.y+2,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph,DTA_LegacyRenderStyle,STYLE_Add); diff --git a/zscript/hud/swwm_hud_topstuff.zsc b/zscript/hud/swwm_hud_topstuff.zsc index 445aafe8b..960f99f30 100644 --- a/zscript/hud/swwm_hud_topstuff.zsc +++ b/zscript/hud/swwm_hud_topstuff.zsc @@ -481,7 +481,7 @@ extend Class SWWMStatusBar int hsz = smol?HALFMAPSIZE_SMALL:HALFMAPSIZE; Vector2 cpos = SWWMUtility.LerpVector2(players[consoleplayer].Camera.prev.xy,players[consoleplayer].Camera.pos.xy,FracTic); Sector csec = players[consoleplayer].Camera.CurSector; - if ( !mi ) mi = ThinkerIterator.Create("MapMarker",Thinker.STAT_MAPMARKER); + if ( !mi ) mi = ThinkerIterator.Create('MapMarker',Thinker.STAT_MAPMARKER); else mi.Reinit(); MapMarker m; while ( m = MapMarker(mi.Next()) ) diff --git a/zscript/hud/swwm_hudextra.zsc b/zscript/hud/swwm_hudextra.zsc index c151c61bb..df5c96813 100644 --- a/zscript/hud/swwm_hudextra.zsc +++ b/zscript/hud/swwm_hudextra.zsc @@ -13,7 +13,7 @@ Class PayRespects : HUDMessageBase static PayRespects PressF() { - let f = new("PayRespects"); + let f = new('PayRespects'); f.basepos = (FRandom[FInTheChat](0.,1.),FRandom[FInTheChat](1.02,1.05)); f.scale = FRandom[FInTheChat](.5,2.); f.lifespan = f.initialspan = Random[FInTheChat](20,80); @@ -64,7 +64,7 @@ Class SWWMOneLiner : HUDMessageBase static SWWMOneLiner Make( String whichline, int lifespan ) { - let l = new("SWWMOneLiner"); + let l = new('SWWMOneLiner'); if ( StringTable.Localize(whichline) == "" ) l.whichline = ""; else l.whichline = StringTable.Localize("$SWWM_LQUOTE")..StringTable.Localize(whichline)..StringTable.Localize("$SWWM_RQUOTE"); l.curtime = l.lifespan = lifespan; @@ -117,7 +117,7 @@ Class SWWMOneLiner : HUDMessageBase double fcurtime = curtime-fractic; double alph = clamp((fcurtime/20.)+1.,0.,1.); alph *= clamp((lifespan-fcurtime)/10.,0.,1.); - Screen.Dim("Black",alph*.8,int((Screen.GetWidth()-(maxlen+12)*hs)/2.),int(bottom-(ymargin+2+fh)*hs),int((maxlen+12)*hs),int((fh+4)*hs)); + Screen.Dim(0xFF000000,alph*.8,int((Screen.GetWidth()-(maxlen+12)*hs)/2.),int(bottom-(ymargin+2+fh)*hs),int((maxlen+12)*hs),int((fh+4)*hs)); int yy = ymargin+fh; for ( int i=0; i)(FindClass('AstralCacodemon','Actor')); + if ( cacoclass ) thecaco = Actor(ThinkerIterator.Create(cacoclass).Next()); if ( !thecaco ) { Destroy(); @@ -1166,7 +1162,7 @@ Class DSMapTitle : HUDMessageBase } if ( ch != 256 ) ThrowAbortException("sub font definition does not list all 256 glyphs"); // this is for compat with the dialogues, and should not go into other mods - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) hnd.mapmsg = self; bDontDeleteMe = true; return self; @@ -1349,7 +1345,7 @@ Class SWWMWeaponSelect : HUDMessageBase S_StartSound("menu/demotab",CHAN_AUTO,CHANF_UI); stage = 0; alph = 0.; - fnt = Font.FindFont("TewiFontOutline"); + fnt = Font.FindFont('TewiFontOutline'); olsmoothY = smoothY = curY = CalcHeight(); return self; } @@ -1575,7 +1571,7 @@ Class SWWMWeaponSelect : HUDMessageBase double fractic = System.GetTimeFrac(); double ssmoothY = SWWMUtility.Lerp(olsmoothY,smoothY,fractic); double salph = SWWMUtility.Lerp(olalph,alph,fractic); - Screen.Dim("Black",.4*salph,0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFF000000,.4*salph,0,0,Screen.GetWidth(),Screen.GetHeight()); double hs; Vector2 ss; if ( SWWMStatusBar(StatusBar) ) diff --git a/zscript/hud/swwm_hudobjects.zsc b/zscript/hud/swwm_hudobjects.zsc index ee75a3739..75eb79a1a 100644 --- a/zscript/hud/swwm_hudobjects.zsc +++ b/zscript/hud/swwm_hudobjects.zsc @@ -19,7 +19,7 @@ Class SWWMScoreObj play static SWWMScoreObj SpawnAtActorBunch( int score, Actor a, int tcolor = -1 ) { if ( !a ) return null; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return null; Vector3 pos = level.Vec3Offset(a.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,a.Height/2)); return SpawnFromHandler(hnd,score,pos,tcolor); @@ -28,7 +28,7 @@ Class SWWMScoreObj play static SWWMScoreObj SpawnAtActor( int score, Actor a, int tcolor = -1 ) { if ( !a ) return null; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return null; Vector3 pos = a.Vec3Offset(0,0,a.Height/2); return SpawnFromHandler(hnd,score,pos,tcolor); @@ -36,7 +36,7 @@ Class SWWMScoreObj play static SWWMScoreObj Spawn( int score, Vector3 pos, int tcolor = -1 ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return null; return SpawnFromHandler(hnd,score,pos,tcolor); } @@ -57,7 +57,7 @@ Class SWWMScoreObj play static SWWMScoreObj SpawnFromHandler( SWWMHandler hnd, int score, Vector3 pos, int tcolor = -1 ) { - let o = new("SWWMScoreObj"); + let o = new('SWWMScoreObj'); o.score = score; o.pos = pos; o.lifespan = o.initialspan = 60; @@ -100,7 +100,7 @@ Class SWWMDamNum play static SWWMDamNum SpawnAtActor( int damage, Actor a, Name type = '' ) { if ( !a ) return null; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return null; Vector3 pos = level.Vec3Offset(a.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,a.Height/2)); return SpawnFromHandler(hnd,damage,pos,type); @@ -108,7 +108,7 @@ Class SWWMDamNum play static SWWMDamNum Spawn( int damage, Vector3 pos, Name type = '' ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return null; return SpawnFromHandler(hnd,damage,pos,type); } @@ -122,10 +122,10 @@ Class SWWMDamNum play static SWWMDamNum SpawnFromHandler( SWWMHandler hnd, int damage, Vector3 pos, Name type = '' ) { - let o = new("SWWMDamNum"); + let o = new('SWWMDamNum'); o.damage = damage; o.pos = pos; - o.tcolor = Font.FindFontColor("MiniRed"); + o.tcolor = Font.FindFontColor('MiniRed'); if ( swwm_damnums_color ) for ( int i=0; i k = thekey.species; @@ -205,7 +205,7 @@ Class SWWMInterest play { i.type = INT_Exit; i.exittype = theexit; - i.marker = Actor.Spawn("SWWMInterestMarker",pos); + i.marker = Actor.Spawn('SWWMInterestMarker',pos); i.marker.SetState(i.marker.SpawnState+theexit); i.marker.bDORMANT = !level.allmap; } @@ -258,7 +258,7 @@ Class SWWMItemSense play s.pos = item.Vec3Offset(0,0,item.height); return s; } - let i = new("SWWMItemSense"); + let i = new('SWWMItemSense'); i.item = item; if ( item is 'SWWMRespawnTimer' ) { @@ -398,7 +398,7 @@ Class SWWMSimpleTracker play t.Update(); return t; } - t = new("SWWMSimpleTracker"); + t = new('SWWMSimpleTracker'); t.target = target; t.Update(); t.next = hnd.strackers; diff --git a/zscript/items/swwm_ammoextra.zsc b/zscript/items/swwm_ammoextra.zsc index 6bdba8c17..abda0e758 100644 --- a/zscript/items/swwm_ammoextra.zsc +++ b/zscript/items/swwm_ammoextra.zsc @@ -216,7 +216,7 @@ Class AmmoFabricator : Inventory abstract +FLOATBOB; +DONTGIB; Inventory.UseSound "fabricator/use"; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; Inventory.MaxAmount 0; FloatBobStrength 0.25; } @@ -544,7 +544,7 @@ Class HammerspaceEmbiggener : Inventory Amount = min(tamount,MaxAmount); return; } - let n = Spawn("BulkHammerspaceEmbiggener",pos); + let n = Spawn('BulkHammerspaceEmbiggener',pos); Inventory(n).Amount = min(tamount,MaxAmount); SWWMUtility.TransferItemProp(self,n); ClearCounters(); @@ -558,7 +558,7 @@ Class HammerspaceEmbiggener : Inventory Inventory.PickupMessage "$T_EMBIGGENER"; Inventory.MaxAmount 8; Inventory.InterHubAmount 8; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; +INVENTORY.UNDROPPABLE; +INVENTORY.UNTOSSABLE; +INVENTORY.ALWAYSPICKUP; diff --git a/zscript/items/swwm_ammoitems.zsc b/zscript/items/swwm_ammoitems.zsc index 981b4b49e..c4a1cfdb6 100644 --- a/zscript/items/swwm_ammoitems.zsc +++ b/zscript/items/swwm_ammoitems.zsc @@ -66,7 +66,7 @@ Class GoldShellSparkle : SWWMNonInteractiveActor } Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 0.05; +FORCEXYBILLBOARD; } @@ -83,7 +83,7 @@ Class GoldShell : SWWMAmmo action void A_GoldShellTrail() { if ( Random[Goldy](0,2) ) return; - Spawn("GoldShellSparkle",Vec3Offset(FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](10,18))); + Spawn('GoldShellSparkle',Vec3Offset(FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](10,18))); } Default @@ -267,7 +267,7 @@ Class SilverBulletAmmo : SWWMAmmo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 9; Ammo.DropAmount 1; - SWWMAmmo.MagAmmoType "SilverBullets"; + SWWMAmmo.MagAmmoType 'SilverBullets'; Accuracy 75; } States @@ -285,7 +285,7 @@ Class SilverBullets : MagAmmo Tag "$T_XSBBULLET"; MagAmmo.PickupTag "XSBBULLET"; Stamina -12000; - MagAmmo.ParentAmmo "SilverBulletAmmo"; + MagAmmo.ParentAmmo 'SilverBulletAmmo'; MagAmmo.ClipSize 5; MagAmmo.BackpackAmount 2; Inventory.MaxAmount 5; @@ -328,7 +328,7 @@ Class CandyGunAmmo : SWWMAmmo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 3; Ammo.DropAmount 1; - SWWMAmmo.MagAmmoType "CandyGunBullets"; + SWWMAmmo.MagAmmoType 'CandyGunBullets'; Accuracy 90; } States @@ -346,7 +346,7 @@ Class CandyGunBullets : MagAmmo Tag "$T_CANDYBULLET"; MagAmmo.PickupTag "CANDYBULLET"; Stamina -14000; - MagAmmo.ParentAmmo "CandyGunAmmo"; + MagAmmo.ParentAmmo 'CandyGunAmmo'; MagAmmo.ClipSize 7; MagAmmo.BackpackAmount 1; Inventory.MaxAmount 7; @@ -409,11 +409,11 @@ Class CandyGunSpares : SWWMAmmo Super.DoEffect(); if ( !Owner ) return; // auto-give an empty gun if the player does not own one - if ( Owner.FindInventory("CandyGun") || (Amount <= 0) ) return; + if ( Owner.FindInventory('CandyGun') || (Amount <= 0) ) return; // don't do this if the player owns a Mortal Rifle and swapweapons are enabled - if ( Owner.FindInventory("MisterRifle") && swwm_swapweapons ) return; + if ( Owner.FindInventory('MisterRifle') && swwm_swapweapons ) return; Amount--; - let g = CandyGun(Spawn("CandyGun")); + let g = CandyGun(Spawn('CandyGun')); g.bInitialized = true; g.ammogive1 = 0; g.ammogive2 = 0; diff --git a/zscript/items/swwm_armor.zsc b/zscript/items/swwm_armor.zsc index 058547855..4b51ee099 100644 --- a/zscript/items/swwm_armor.zsc +++ b/zscript/items/swwm_armor.zsc @@ -8,7 +8,7 @@ Class ArmorNugget : SWWMArmor Inventory.MaxAmount 200; Inventory.InterHubAmount 200; SWWMArmor.ArmorPriority 3; - SWWMArmor.GiverArmor "ArmorNuggetItem"; + SWWMArmor.GiverArmor 'ArmorNuggetItem'; } override int HandleDamage( int damage, Name damageType, int flags ) @@ -53,7 +53,7 @@ Class ArmorNuggetItem : SWWMSpareArmor Inventory.MaxAmount 0; Inventory.InterHubAmount 0; Inventory.UseSound "misc/armor_pkup"; - SWWMSpareArmor.GiveArmor "ArmorNugget"; + SWWMSpareArmor.GiveArmor 'ArmorNugget'; +INVENTORY.ALWAYSPICKUP; } States @@ -78,10 +78,10 @@ Class BlastSuit : SWWMArmor Inventory.Amount 150; Inventory.MaxAmount 150; Inventory.InterHubAmount 150; - Inventory.RestrictedTo "Demolitionist"; + Inventory.RestrictedTo 'Demolitionist'; SWWMArmor.ArmorPriority 4; SWWMArmor.DrainMessage "$D_BLASTSUIT"; - SWWMArmor.GiverArmor "BlastSuitItem"; + SWWMArmor.GiverArmor 'BlastSuitItem'; } override int HandleDamage( int damage, Name damageType, int flags ) @@ -100,10 +100,10 @@ Class WarArmor : SWWMArmor Inventory.Amount 250; Inventory.MaxAmount 250; Inventory.InterHubAmount 250; - Inventory.RestrictedTo "Demolitionist"; + Inventory.RestrictedTo 'Demolitionist'; SWWMArmor.ArmorPriority 5; SWWMArmor.DrainMessage "$D_WARARMOR"; - SWWMArmor.GiverArmor "WarArmorItem"; + SWWMArmor.GiverArmor 'WarArmorItem'; } override int HandleDamage( int damage, Name damageType, int flags ) diff --git a/zscript/items/swwm_armor_filtered.zsc b/zscript/items/swwm_armor_filtered.zsc index e8bb5ade4..bdfdc7bd7 100644 --- a/zscript/items/swwm_armor_filtered.zsc +++ b/zscript/items/swwm_armor_filtered.zsc @@ -17,8 +17,8 @@ Class BlastSuitItem : SWWMSpareArmor Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png"; Inventory.PickupMessage "$T_BLASTSUIT"; Inventory.UseSound "armor/blastsuit"; - Inventory.RestrictedTo "Demolitionist"; - SWWMSpareArmor.GiveArmor "BlastSuit"; + Inventory.RestrictedTo 'Demolitionist'; + SWWMSpareArmor.GiveArmor 'BlastSuit'; } States { @@ -43,8 +43,8 @@ Class WarArmorItem : SWWMSpareArmor Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png"; Inventory.PickupMessage "$T_WARARMOR"; Inventory.UseSound "armor/wararmor"; - Inventory.RestrictedTo "Demolitionist"; - SWWMSpareArmor.GiveArmor "WarArmor"; + Inventory.RestrictedTo 'Demolitionist'; + SWWMSpareArmor.GiveArmor 'WarArmor'; } States { diff --git a/zscript/items/swwm_baseammo.zsc b/zscript/items/swwm_baseammo.zsc index 1d358f186..b59a93004 100644 --- a/zscript/items/swwm_baseammo.zsc +++ b/zscript/items/swwm_baseammo.zsc @@ -19,7 +19,7 @@ Class SWWMAmmo : Ammo override Class GetParentAmmo() { Class type = GetClass(); - while ( (type.GetParentClass() != "SWWMAmmo") && type.GetParentClass() ) + while ( (type.GetParentClass() != 'SWWMAmmo') && type.GetParentClass() ) type = type.GetParentClass(); return (Class)(type); } @@ -267,7 +267,7 @@ Class SWWMAmmo : Ammo { +INVENTORY.IGNORESKILL; +DONTGIB; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; +FLOATBOB; FloatBobStrength 0.25; } @@ -299,7 +299,7 @@ Class MagAmmo : Inventory abstract +DONTGIB; Inventory.PickupSound "misc/bullet_pkup"; Inventory.Amount 1; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; +FLOATBOB; FloatBobStrength 0.25; } @@ -307,7 +307,7 @@ Class MagAmmo : Inventory abstract virtual Class GetParentMagAmmo() { Class type = GetClass(); - while ( (type.GetParentClass() != "MagAmmo") && type.GetParentClass() ) + while ( (type.GetParentClass() != 'MagAmmo') && type.GetParentClass() ) type = type.GetParentClass(); return (Class)(type); } diff --git a/zscript/items/swwm_basearmor.zsc b/zscript/items/swwm_basearmor.zsc index b5508d95a..0a62fd396 100644 --- a/zscript/items/swwm_basearmor.zsc +++ b/zscript/items/swwm_basearmor.zsc @@ -94,7 +94,7 @@ Class SWWMArmor : Armor abstract if ( healed > 0 ) Owner.GiveBody(healed); if ( (swwm_strictuntouchable == 1) && (saved > 0) && Owner.player ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true; } if ( !bNODRAIN ) amount -= saved; @@ -158,7 +158,7 @@ Class SWWMSpareArmor : Inventory abstract bool bPlayMe = true; if ( self is 'ArmorNuggetItem' ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) { if ( hnd.lastnuggettic[Owner.PlayerNumber()] == gametic ) @@ -184,7 +184,7 @@ Class SWWMSpareArmor : Inventory abstract +INVENTORY.AUTOACTIVATE; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMGreenPickupFlash"; + Inventory.PickupFlash 'SWWMGreenPickupFlash'; +FLOATBOB; +DONTGIB; FloatBobStrength 0.25; diff --git a/zscript/items/swwm_basehealth.zsc b/zscript/items/swwm_basehealth.zsc index aaf433058..13b88b4fe 100644 --- a/zscript/items/swwm_basehealth.zsc +++ b/zscript/items/swwm_basehealth.zsc @@ -81,7 +81,7 @@ Class SWWMHealth : Inventory abstract bool bPlayMe = true; if ( self is 'HealthNuggetItem' ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) { if ( hnd.lastnuggettic[Owner.PlayerNumber()] == gametic ) @@ -130,7 +130,7 @@ Class SWWMHealth : Inventory abstract return; if ( (swwm_strictuntouchable == 1) && Owner.player ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true; } if ( ((Owner.player == players[consoleplayer]) || bBigPowerup) && (lastautousetic < gametic) ) @@ -165,7 +165,7 @@ Class SWWMHealth : Inventory abstract Inventory.MaxAmount 5; Inventory.InterHubAmount 5; Inventory.UseSound "misc/health_pkup"; - Inventory.PickupFlash "SWWMBluePickupFlash"; + Inventory.PickupFlash 'SWWMBluePickupFlash'; +FLOATBOB; FloatBobStrength 0.25; } diff --git a/zscript/items/swwm_baseitem.zsc b/zscript/items/swwm_baseitem.zsc index faded08a0..8f4fcc819 100644 --- a/zscript/items/swwm_baseitem.zsc +++ b/zscript/items/swwm_baseitem.zsc @@ -86,7 +86,7 @@ Mixin Class SWWMUseToPickup Vector3 tracedir = level.Vec3Diff(userpos,itempos); double dist = tracedir.length(); tracedir /= dist; - let cf = new("CrossLineFinder"); + let cf = new('CrossLineFinder'); cf.Trace(userpos,level.PointInSector(userpos.xy),tracedir,dist,0,ignoreallactors:true); // trigger all player cross lines found between user and item for ( int i=0; i 1) && !Random[Gesture](0,12-realmoth.uses) ) @@ -287,7 +287,7 @@ Class KirinPlushGesture : SWWMItemGesture int numpt = Random[ExploS](6,9); for ( int i=0; i= 3 ) { // there's three boxes in the map already - let b = Spawn("HealthNuggetItem",pos); + let b = Spawn('HealthNuggetItem',pos); SWWMUtility.TransferItemProp(self,b); ClearCounters(); Destroy(); @@ -703,13 +703,13 @@ Class ChanceboxSpawner : Actor if ( tbox[1] > l.bbox[0] ) continue; if ( Level.BoxOnLineSide(pos.xy,32,l) != -1 ) continue; // there isn't enough space to spawn a box here - let b = Spawn("HealthNuggetItem",pos); + let b = Spawn('HealthNuggetItem',pos); SWWMUtility.TransferItemProp(self,b); ClearCounters(); Destroy(); return; } - let b = Spawn("Chancebox",pos); + let b = Spawn('Chancebox',pos); // copy all our stuff SWWMUtility.TransferItemProp(self,b); ClearCounters(); @@ -742,7 +742,7 @@ Class CBoxLight : SpotLightAttenuated override void Tick() { Super.Tick(); - if ( !target || target.InStateSequence(target.CurState,target.FindState("BlowUp")) ) + if ( !target || target.InStateSequence(target.CurState,target.FindState('BlowUp')) ) { Destroy(); return; @@ -799,14 +799,14 @@ Class RewardVIPItems : ChanceboxReward override void SpawnReward( Vector3 pos ) { Class vipammodrop = null; - if ( SWWMUtility.ItemExists("Ynykron",ownedonly:true) && SWWMUtility.CheckNeedsItem("YnykronAmmo",true) && Random[Chancebox](0,1) ) vipammodrop = "YnykronAmmo"; - //if ( SWWMUtility.ItemExists("RafanKos",ownedonly:true) && SWWMUtility.CheckNeedsItem("UltimateAmmo",true) && Random[Chancebox](0,1) && !vipammodrop ) vipammodrop = "UltimateAmmo"; - if ( SWWMUtility.ItemExists("Spreadgun",ownedonly:true) && SWWMUtility.CheckNeedsItem("GoldShell",true) && !vipammodrop ) vipammodrop = "GoldShell"; + if ( SWWMUtility.ItemExists('Ynykron',ownedonly:true) && SWWMUtility.CheckNeedsItem('YnykronAmmo',true) && Random[Chancebox](0,1) ) vipammodrop = 'YnykronAmmo'; + //if ( SWWMUtility.ItemExists("RafanKos',ownedonly:true) && SWWMUtility.CheckNeedsItem('UltimateAmmo',true) && Random[Chancebox](0,1) && !vipammodrop ) vipammodrop = 'UltimateAmmo'; + if ( SWWMUtility.ItemExists('Spreadgun',ownedonly:true) && SWWMUtility.CheckNeedsItem('GoldShell',true) && !vipammodrop ) vipammodrop = 'GoldShell'; Class vipitemdrop = null; - if ( SWWMUtility.CheckNeedsItem("Mykradvo",true) && !SWWMUtility.ItemExists("Mykradvo",worldonly:true) && Random[Chancebox](0,1) ) vipitemdrop = "Mykradvo"; - if ( SWWMUtility.CheckNeedsItem("AngerySigil",true) && !SWWMUtility.ItemExists("AngerySigil",worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = "AngerySigil"; - if ( SWWMUtility.CheckNeedsItem("DivineSprite",true) && !SWWMUtility.ItemExists("DivineSprite",worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = "DivineSprite"; - if ( !vipitemdrop ) vipitemdrop = "GrilledCheeseSandwich"; + if ( SWWMUtility.CheckNeedsItem('Mykradvo',true) && !SWWMUtility.ItemExists('Mykradvo',worldonly:true) && Random[Chancebox](0,1) ) vipitemdrop = 'Mykradvo'; + if ( SWWMUtility.CheckNeedsItem('AngerySigil',true) && !SWWMUtility.ItemExists('AngerySigil',worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = 'AngerySigil'; + if ( SWWMUtility.CheckNeedsItem('DivineSprite',true) && !SWWMUtility.ItemExists('DivineSprite',worldonly:true) && Random[Chancebox](0,1) && !vipitemdrop ) vipitemdrop = 'DivineSprite'; + if ( !vipitemdrop ) vipitemdrop = 'GrilledCheeseSandwich'; SpawnCenter(pos,(!Random[Chancebox](0,2)&&vipammodrop)?vipammodrop:vipitemdrop); } } @@ -816,12 +816,12 @@ Class RewardHammer : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.CheckNeedsItem("ItamexHammer"); + return SWWMUtility.CheckNeedsItem('ItamexHammer'); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"ItamexHammer"); + SpawnCenter(pos,'ItamexHammer'); } } // mortal rifle ammo treats @@ -829,14 +829,14 @@ Class RewardMisterRifle : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("MisterRifle",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("MisterGAmmo",true)||SWWMUtility.CheckNeedsItem("MisterAmmo",true)||SWWMUtility.CheckNeedsItem("MisterRound",true)); + return SWWMUtility.ItemExists('MisterRifle',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('MisterGAmmo',true)||SWWMUtility.CheckNeedsItem('MisterAmmo',true)||SWWMUtility.CheckNeedsItem('MisterRound',true)); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"MisterGAmmo"); - SpawnCircle(pos,4,"MisterRound"); - SpawnCircle(pos,8,"MisterRound",3.); + SpawnCenter(pos,'MisterGAmmo'); + SpawnCircle(pos,4,'MisterRound'); + SpawnCircle(pos,8,'MisterRound',3.); } } // a spare candy gun and some bullets @@ -844,13 +844,13 @@ Class RewardCandyGun : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("CandyGun",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("CandyGunAmmo",true)||SWWMUtility.CheckNeedsItem("CandyGunBullets",true)||SWWMUtility.CheckNeedsItem("CandyGunSpares",true)); + return SWWMUtility.ItemExists('CandyGun',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('CandyGunAmmo',true)||SWWMUtility.CheckNeedsItem('CandyGunBullets',true)||SWWMUtility.CheckNeedsItem('CandyGunSpares',true)); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"CandyGun"); - SpawnCircle(pos,7,"CandyGunBullets"); + SpawnCenter(pos,'CandyGun'); + SpawnCircle(pos,7,'CandyGunBullets'); } } // them big bolts @@ -858,14 +858,14 @@ Class RewardCandyGun : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("RayKhom",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("RayAmmo",true)||SWWMUtility.CheckNeedsItem("RayBolt",true)); + return SWWMUtility.ItemExists('RayKhom',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('RayAmmo',true)||SWWMUtility.CheckNeedsItem('RayBolt',true)); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"RayAmmo",true); - SpawnCircle(pos,4,"RayBolt"); - SpawnCircle(pos,6,"RayBolt",3.); + SpawnCenter(pos,'RayAmmo',true); + SpawnCircle(pos,4,'RayBolt'); + SpawnCircle(pos,6,'RayBolt',3.); } }*/ // them silver bullets @@ -873,13 +873,13 @@ Class RewardSilverBullets : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("SilverBullet",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("SilverBulletAmmo",true)||SWWMUtility.CheckNeedsItem("SilverBullets",true)); + return SWWMUtility.ItemExists('SilverBullet',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('SilverBulletAmmo',true)||SWWMUtility.CheckNeedsItem('SilverBullets',true)); } override void SpawnReward( Vector3 pos ) { - SpawnCircle(pos,4,"SilverBullets"); - SpawnCircle(pos,6,"SilverBullets",3.); + SpawnCircle(pos,4,'SilverBullets'); + SpawnCircle(pos,6,'SilverBullets',3.); } } // blues 'n reds @@ -887,12 +887,12 @@ Class RewardSilverBullets : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("ModernSparkster",ownedonly:true)&&(SWWMUtility.CheckNeedsItem("SparksterBAmmo",true)||SWWMUtility.CheckNeedsItem("SparksterRAmmo",true)); + return SWWMUtility.ItemExists('ModernSparkster',ownedonly:true)&&(SWWMUtility.CheckNeedsItem('SparksterBAmmo',true)||SWWMUtility.CheckNeedsItem('SparksterRAmmo',true)); } override void SpawnReward( Vector3 pos ) { - SpawnCircle(pos,6,"SparksterBAmmo",item2:"SparksterRAmmo"); + SpawnCircle(pos,6,'SparksterBAmmo',item2:'SparksterRAmmo'); } }*/ // buncha spark units @@ -900,13 +900,13 @@ Class RewardSparkUnits : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("Sparkster",ownedonly:true)&&SWWMUtility.CheckNeedsItem("SparkUnit",true); + return SWWMUtility.ItemExists('Sparkster',ownedonly:true)&&SWWMUtility.CheckNeedsItem('SparkUnit',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"SparkUnit2",true); - SpawnCircle(pos,3,"SparkUnit"); + SpawnCenter(pos,'SparkUnit2',true); + SpawnCircle(pos,3,'SparkUnit'); } } // assortment of Quadravol cells @@ -914,14 +914,14 @@ Class RewardQuadCells : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("Quadravol",ownedonly:true)&&SWWMUtility.CheckNeedsItem("QuadravolAmmo",true); + return SWWMUtility.ItemExists('Quadravol',ownedonly:true)&&SWWMUtility.CheckNeedsItem('QuadravolAmmo',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"QuadravolAmmo3",true); - SpawnCircle(pos,3,"QuadravolAmmo"); - SpawnCircle(pos,6,"QuadravolAmmo",3.); + SpawnCenter(pos,'QuadravolAmmo3',true); + SpawnCircle(pos,3,'QuadravolAmmo'); + SpawnCircle(pos,6,'QuadravolAmmo',3.); } } // lotta hellblazers @@ -929,14 +929,14 @@ Class RewardHellblazers : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("Hellblazer",ownedonly:true)&&SWWMUtility.CheckNeedsItem("HellblazerMissiles",true); + return SWWMUtility.ItemExists('Hellblazer',ownedonly:true)&&SWWMUtility.CheckNeedsItem('HellblazerMissiles',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"HellblazerMissiles3",true); - SpawnCircle(pos,3,"HellblazerMissiles"); - SpawnCircle(pos,6,"HellblazerMissiles",3.); + SpawnCenter(pos,'HellblazerMissiles3',true); + SpawnCircle(pos,3,'HellblazerMissiles'); + SpawnCircle(pos,6,'HellblazerMissiles',3.); } } // BOOLETS @@ -944,14 +944,14 @@ Class RewardSheenAmmo : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("HeavyMahSheenGun",ownedonly:true)&&SWWMUtility.CheckNeedsItem("SheenAmmo",true); + return SWWMUtility.ItemExists('HeavyMahSheenGun',ownedonly:true)&&SWWMUtility.CheckNeedsItem('SheenAmmo',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"SheenBigAmmo",true); - SpawnCircle(pos,5,"SheenSmallAmmo",3.); - SpawnCircle(pos,8,"SheenAmmo3",5.,item2:"SheenAmmo2"); + SpawnCenter(pos,'SheenBigAmmo',true); + SpawnCircle(pos,5,'SheenSmallAmmo',3.); + SpawnCircle(pos,8,'SheenAmmo3',5.,item2:'SheenAmmo2'); } } // Flak'em @@ -959,13 +959,13 @@ Class RewardFlakShells : ChanceboxReward { override bool CheckRequirements() { - return SWWMUtility.ItemExists("Eviscerator",ownedonly:true)&&SWWMUtility.CheckNeedsItem("EvisceratorShell",true); + return SWWMUtility.ItemExists('Eviscerator',ownedonly:true)&&SWWMUtility.CheckNeedsItem('EvisceratorShell',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"EvisceratorSixPack",true); - SpawnCircle(pos,6,"EvisceratorShell",3.); + SpawnCenter(pos,'EvisceratorSixPack',true); + SpawnCircle(pos,6,'EvisceratorShell',3.); } } // screwbullet droppage @@ -973,14 +973,14 @@ Class RewardFlakShells : ChanceboxReward { override bool CheckRequirements() { - return (SWWMUtility.ItemExists("PuntzerBeta",ownedonly:true)||SWWMUtility.ItemExists("PuntzerGamma",ownedonly:true))&&SWWMUtility.CheckNeedsItem("SMW05Ammo",true); + return (SWWMUtility.ItemExists('PuntzerBeta',ownedonly:true)||SWWMUtility.ItemExists('PuntzerGamma',ownedonly:true))&&SWWMUtility.CheckNeedsItem('SMW05Ammo',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"SMW05SmallAmmo",true); - SpawnCircle(pos,6,"SMW05Ammo2",2.); - SpawnCircle(pos,12,"SMW05Ammo",4.); + SpawnCenter(pos,'SMW05SmallAmmo',true); + SpawnCircle(pos,6,'SMW05Ammo2',2.); + SpawnCircle(pos,12,'SMW05Ammo',4.); } }*/ // Lotta shells @@ -988,14 +988,14 @@ Class RewardShells : ChanceboxReward { override bool CheckRequirements() { - return (SWWMUtility.ItemExists("Spreadgun",ownedonly:true)||SWWMUtility.ItemExists("Wallbuster",ownedonly:true))&&SWWMUtility.CheckNeedsItem("RedShell",true); + return (SWWMUtility.ItemExists('Spreadgun',ownedonly:true)||SWWMUtility.ItemExists('Wallbuster',ownedonly:true))&&SWWMUtility.CheckNeedsItem('RedShell',true); } override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"RedShell4",true); - SpawnCircle(pos,4,"RedShell2",2.); - SpawnCircle(pos,8,"RedShell",4.); + SpawnCenter(pos,'RedShell4',true); + SpawnCircle(pos,4,'RedShell2',2.); + SpawnCircle(pos,8,'RedShell',4.); } } // Buncha nuggets @@ -1003,7 +1003,7 @@ Class RewardNuggets : ChanceboxReward { override void SpawnReward( Vector3 pos ) { - SpawnCircle(pos,20,Random[ChanceBox](0,1)?"HealthNuggetItem":"ArmorNuggetItem",1.,7.); + SpawnCircle(pos,20,Random[ChanceBox](0,1)?'HealthNuggetItem':'ArmorNuggetItem',1.,7.); } } // Healing surprise @@ -1011,8 +1011,8 @@ Class RewardSuperHealth : ChanceboxReward { override void SpawnReward( Vector3 pos ) { - SpawnCenter(pos,"RefresherItem"); - SpawnCircle(pos,15,"HealthNuggetItem",3.); + SpawnCenter(pos,'RefresherItem'); + SpawnCircle(pos,15,'HealthNuggetItem',3.); } } @@ -1103,7 +1103,7 @@ Class Chancebox : Actor break; } if ( blockedff ) continue; - let sp = new("BoxSpawnSpot"); + let sp = new('BoxSpawnSpot'); sp.pos = (testpos.x,testpos.y,fz); sp.angle = k+180; spots.Push(sp); @@ -1121,7 +1121,7 @@ Class Chancebox : Actor break; } if ( blocked ) continue; - let sp = new("BoxSpawnSpot"); + let sp = new('BoxSpawnSpot'); sp.pos = testpos; sp.angle = k+180; spots.Push(sp); @@ -1130,7 +1130,7 @@ Class Chancebox : Actor } if ( spots.Size() < 10 ) continue; int ws = Random[Chancebox](0,spots.Size()-1); - let c = Spawn("ChanceboxSpawner",spots[ws].pos); + let c = Spawn('ChanceboxSpawner',spots[ws].pos); c.angle = spots[ws].angle; tboxes++; if ( tboxes >= 3 ) break; // already spawned 3 boxes in one map (which is a lot) @@ -1150,7 +1150,7 @@ Class Chancebox : Actor if ( !def.ValidGame() ) continue; candidates.Push(c); } - let ti = ThinkerIterator.Create("SWWMCollectible"); + let ti = ThinkerIterator.Create('SWWMCollectible'); SWWMCollectible c; while ( c = SWWMCollectible(ti.Next()) ) { @@ -1165,7 +1165,7 @@ Class Chancebox : Actor { // spawn another smaller chancebox // (chance increases for the inner box, up until a scale factor of 50% is reached) - let a = Spawn("Chancebox",pos+(0,0,3*scale.y)); + let a = Spawn('Chancebox',pos+(0,0,3*scale.y)); a.vel.z = FRandom[Chancebox](2,4); a.angle = angle; a.scale *= scale.x-.125; @@ -1197,7 +1197,7 @@ Class Chancebox : Actor for ( int i=0; i 0) && !Random[Chancebox](0,alldudchance) ) { // all boxes are duds - let ti = ThinkerIterator.Create("Chancebox"); + let ti = ThinkerIterator.Create('Chancebox'); Chancebox c; while ( c = Chancebox(ti.Next()) ) { @@ -1277,7 +1277,7 @@ Class Chancebox : Actor { int nbox = 0, ndud = 0; // this one's a dud (unless all the others are) - let ti = ThinkerIterator.Create("Chancebox"); + let ti = ThinkerIterator.Create('Chancebox'); Chancebox c; while ( c = Chancebox(ti.Next()) ) { @@ -1290,7 +1290,7 @@ Class Chancebox : Actor else { // the others are duds - let ti = ThinkerIterator.Create("Chancebox"); + let ti = ThinkerIterator.Create('Chancebox'); Chancebox c; bool onemore = !Random[Chancebox](0,2); // unless... while ( c = Chancebox(ti.Next()) ) @@ -1310,7 +1310,7 @@ Class Chancebox : Actor } SWWMLoreLibrary.Add(user.player,"Chancebox"); specialf2 = AngleTo(user); - SetStateLabel("PreActive"); + SetStateLabel('PreActive'); target = user; return true; } @@ -1319,15 +1319,15 @@ Class Chancebox : Actor Super.PostBeginPlay(); for ( int i=0; i<4; i++ ) { - let l = Spawn("CBoxLight",pos); + let l = Spawn('CBoxLight',pos); l.special1 = i; l.target = self; } - let ti = ThinkerIterator.Create("Chancebox"); + let ti = ThinkerIterator.Create('Chancebox'); Chancebox c; while ( c = Chancebox(ti.Next()) ) { - if ( c.dud || (c.CurState == c.FindState("Spawn")) ) + if ( c.dud || (c.CurState == c.FindState('Spawn')) ) continue; // automatically become a dud if collectible has been found dud = true; @@ -1360,7 +1360,7 @@ Class Chancebox : Actor int sign = (delta>=0.)?1:-1; delta = clamp(abs(delta)*.15,.1,10.)*sign; angle += delta; - return A_JumpIf(abs(deltaangle(angle,specialf2))<1.,"Active"); + return A_JumpIf(abs(deltaangle(angle,specialf2))<1.,'Active'); } Wait; Active: @@ -1377,7 +1377,7 @@ Class Chancebox : Actor pitch = FRandom[Chancebox](-5,5); roll = FRandom[Chancebox](-5,5); special1++; - return A_JumpIf(special1>int(40*scale.x),"BlowUp"); + return A_JumpIf(special1>int(40*scale.x),'BlowUp'); } Wait; BlowUp: @@ -1388,13 +1388,13 @@ Class Chancebox : Actor A_StartSound("chancebox/explode",CHAN_VOICE,pitch:1./scale.x); angle = specialf1; pitch = roll = 0; - let t = Spawn("ChanceboxTop",Vec3Offset(0,0,20*scale.y)); + let t = Spawn('ChanceboxTop',Vec3Offset(0,0,20*scale.y)); t.angle = angle; t.scale = scale; - let s1 = Spawn("ChanceboxSide",level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle+90),0))); + let s1 = Spawn('ChanceboxSide',level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle+90),0))); s1.angle = angle+90; s1.scale = scale; - let s2 = Spawn("ChanceboxSide",level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle-90),0))); + let s2 = Spawn('ChanceboxSide',level.Vec3Offset(pos,(RotateVector((12*scale.x,0),angle-90),0))); s2.angle = angle-90; s2.scale = scale; A_DropSomething(); @@ -1437,7 +1437,7 @@ Class ChanceboxTop : Actor } Wait; Death: - TNT1 A 1 A_SpawnItemEx("ExplodiumBulletImpact"); + TNT1 A 1 A_SpawnItemEx('ExplodiumBulletImpact'); Stop; } } @@ -1474,7 +1474,7 @@ Class ChanceboxSide : Actor } Wait; Death: - TNT1 A 1 A_SpawnItemEx("ExplodiumBulletImpact"); + TNT1 A 1 A_SpawnItemEx('ExplodiumBulletImpact'); Stop; } } diff --git a/zscript/items/swwm_health.zsc b/zscript/items/swwm_health.zsc index fcad6103d..70d759306 100644 --- a/zscript/items/swwm_health.zsc +++ b/zscript/items/swwm_health.zsc @@ -97,7 +97,7 @@ Class HealthNuggetItem : SWWMHealth Inventory.PickupMessage "$T_NUGGETH"; Inventory.MaxAmount 0; Inventory.InterHubAmount 0; - SWWMHealth.GiveHealth "HealthNugget"; + SWWMHealth.GiveHealth 'HealthNugget'; +INVENTORY.ALWAYSPICKUP; -INVENTORY.INVBAR; } @@ -131,7 +131,7 @@ Class TetraHealthItem : SWWMHealth Inventory.PickupMessage "$T_TETRAHEALTH"; Inventory.MaxAmount 15; Inventory.InterHubAmount 15; - SWWMHealth.GiveHealth "TetraHealth"; + SWWMHealth.GiveHealth 'TetraHealth'; } States { @@ -156,7 +156,7 @@ Class CubeHealthItem : SWWMHealth Inventory.PickupMessage "$T_CUBEHEALTH"; Inventory.MaxAmount 10; Inventory.InterHubAmount 10; - SWWMHealth.GiveHealth "CubeHealth"; + SWWMHealth.GiveHealth 'CubeHealth'; } States { @@ -178,9 +178,9 @@ Class RefresherItem : SWWMHealth SWWMUtility.AchievementProgressInc("refresh",1,Owner.player); // regen effect doesn't stack if we autoactivated recursively if ( recursive ) return; - let p = Powerup(Owner.FindInventory("RefresherRegen")); + let p = Powerup(Owner.FindInventory('RefresherRegen')); if ( p ) p.EffectTics += p.default.EffectTics; - else Owner.GiveInventory("RefresherRegen",1); + else Owner.GiveInventory('RefresherRegen',1); SWWMHandler.DoFlash(Owner,Color(80,224,128,255),20); if ( Owner is 'Demolitionist' ) Demolitionist(Owner).lastbump *= 0.95; @@ -199,7 +199,7 @@ Class RefresherItem : SWWMHealth Inventory.PickupMessage "$T_REFRESHER"; Inventory.PickupSound "misc/p_pkup"; Inventory.UseSound "powerup/refresheruse"; - SWWMHealth.GiveHealth "RefresherHealth"; + SWWMHealth.GiveHealth 'RefresherHealth'; +COUNTITEM; +INVENTORY.BIGPOWERUP; +INVENTORY.ALWAYSPICKUP; diff --git a/zscript/items/swwm_keys.zsc b/zscript/items/swwm_keys.zsc index 6e93422d5..67b49dfcd 100644 --- a/zscript/items/swwm_keys.zsc +++ b/zscript/items/swwm_keys.zsc @@ -38,7 +38,7 @@ Class SWWMRedCard : SWWMKey Tag "$T_REDCARD"; Species "RedCard"; Inventory.PickupMessage "$T_REDCARD"; - Inventory.PickupFlash "SWWMRedPickupFlash"; + Inventory.PickupFlash 'SWWMRedPickupFlash'; } States { @@ -54,7 +54,7 @@ Class SWWMYellowCard : SWWMKey Tag "$T_YELLOWCARD"; Species "YellowCard"; Inventory.PickupMessage "$T_YELLOWCARD"; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; } States { @@ -70,7 +70,7 @@ Class SWWMBlueCard : SWWMKey Tag "$T_BLUECARD"; Species "BlueCard"; Inventory.PickupMessage "$T_BLUECARD"; - Inventory.PickupFlash "SWWMBluePickupFlash"; + Inventory.PickupFlash 'SWWMBluePickupFlash'; } States { @@ -86,7 +86,7 @@ Class SWWMSilverCardKDiZD : SWWMKey Tag "$T_SILVERCARD"; Species "BlueSkull"; Inventory.PickupMessage "$T_SILVERCARD"; - Inventory.PickupFlash "SWWMWhitePickupFlash"; + Inventory.PickupFlash 'SWWMWhitePickupFlash'; } States { @@ -102,7 +102,7 @@ Class SWWMGreenCardKDiZD : SWWMKey Tag "$T_GREENCARD"; Species "YellowSkull"; Inventory.PickupMessage "$T_GREENCARD"; - Inventory.PickupFlash "SWWMGreenPickupFlash"; + Inventory.PickupFlash 'SWWMGreenPickupFlash'; } States { @@ -118,7 +118,7 @@ Class SWWMOrangeCardKDiZD : SWWMKey Tag "$T_ORANGECARD"; Species "RedSkull"; Inventory.PickupMessage "$T_ORANGECARD"; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; } States { @@ -134,7 +134,7 @@ Class SWWMGreenCard : SWWMKey Tag "$T_GREENCARD"; Species "GreenCard"; Inventory.PickupMessage "$T_GREENCARD"; - Inventory.PickupFlash "SWWMGreenPickupFlash"; + Inventory.PickupFlash 'SWWMGreenPickupFlash'; } States { @@ -152,7 +152,7 @@ Class SWWMRedSkull : SWWMKey Tag "$T_REDSKULL"; Species "RedSkull"; Inventory.PickupMessage "$T_REDSKULL"; - Inventory.PickupFlash "SWWMRedPickupFlash"; + Inventory.PickupFlash 'SWWMRedPickupFlash'; } States { @@ -168,7 +168,7 @@ Class SWWMBlueSkull : SWWMKey Tag "$T_BLUESKULL"; Species "BlueSkull"; Inventory.PickupMessage "$T_BLUESKULL"; - Inventory.PickupFlash "SWWMBluePickupFlash"; + Inventory.PickupFlash 'SWWMBluePickupFlash'; } States { @@ -184,7 +184,7 @@ Class SWWMYellowSkull : SWWMKey Tag "$T_YELLOWSKULL"; Species "YellowSkull"; Inventory.PickupMessage "$T_YELLOWSKULL"; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; } States { @@ -200,7 +200,7 @@ Class SWWMPurpleSkull : SWWMKey Tag "$T_PURPLESKULL"; Species "PurpleSkull"; Inventory.PickupMessage "$T_PURPLESKULL"; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; } States { @@ -283,7 +283,7 @@ Class SWWMKeyGreen : SWWMKey Tag "$T_KEYGREEN"; Species "KeyGreen"; Inventory.PickupMessage "$T_KEYGREEN"; - Inventory.PickupFlash "SWWMGreenPickupFlash"; + Inventory.PickupFlash 'SWWMGreenPickupFlash'; } States { @@ -299,7 +299,7 @@ Class SWWMKeyBlue : SWWMKey Tag "$T_KEYBLUE"; Species "KeyBlue"; Inventory.PickupMessage "$T_KEYBLUE"; - Inventory.PickupFlash "SWWMBluePickupFlash"; + Inventory.PickupFlash 'SWWMBluePickupFlash'; } States { @@ -315,7 +315,7 @@ Class SWWMKeyYellow : SWWMKey Tag "$T_KEYYELLOW"; Species "KeyYellow"; Inventory.PickupMessage "$T_KEYYELLOW"; - Inventory.PickupFlash "SWWMPickupFlash"; + Inventory.PickupFlash 'SWWMPickupFlash'; } States { @@ -331,7 +331,7 @@ Class SWWMKeyRed : SWWMKey Tag "$T_KEYRED"; Species "KeyRed"; Inventory.PickupMessage "$T_KEYRED"; - Inventory.PickupFlash "SWWMRedPickupFlash"; + Inventory.PickupFlash 'SWWMRedPickupFlash'; } States { diff --git a/zscript/items/swwm_lamp.zsc b/zscript/items/swwm_lamp.zsc index 92f12c3e6..ea3edddfa 100644 --- a/zscript/items/swwm_lamp.zsc +++ b/zscript/items/swwm_lamp.zsc @@ -60,7 +60,7 @@ Class LampMoth : Actor { // look for nearby lamps double mindist = 62500.; - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); foreach ( s:level.Sectors ) { // don't check sectors that aren't within bounds, saves some time @@ -111,12 +111,12 @@ Class LampMoth : Actor if ( !target || (target.Health <= 0) || target.IsFriend(self) ) { A_ClearTarget(); - SetStateLabel("Spawn"); + SetStateLabel('Spawn'); return; } if ( CheckMeleeRange() ) { - SetStateLabel("Melee"); + SetStateLabel('Melee'); return; } Vector3 dest = target.Vec3Offset(0,0,target.height*.75); @@ -145,7 +145,7 @@ Class LampMoth : Actor { if ( !lamp ) { - SetStateLabel("Spawn"); + SetStateLabel('Spawn'); return; } double dst = level.Vec3Diff(pos,trail).length(); @@ -219,7 +219,7 @@ Class LampMoth : Actor lifespan--; if ( lifespan <= 0 ) { - let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos); s.alpha *= .3; Destroy(); } @@ -227,7 +227,7 @@ Class LampMoth : Actor States { Spawn: - XZW1 B 0 A_JumpIf(isEntranced(),"See.Entranced"); + XZW1 B 0 A_JumpIf(isEntranced(),'See.Entranced'); XZW1 BC 1 { A_SmoothWander(); @@ -235,11 +235,11 @@ Class LampMoth : Actor } Loop; See: // go for enemies - XZW1 B 0 A_JumpIf(isEntranced(),"See.Entranced"); + XZW1 B 0 A_JumpIf(isEntranced(),'See.Entranced'); XZW1 BC 1 A_SmoothChase(); Loop; See.Entranced: // follow the lamp - XZW1 B 0 A_JumpIf(!isEntranced(),"Spawn"); + XZW1 B 0 A_JumpIf(!isEntranced(),'Spawn'); XZW1 BC 1 { A_FollowLamp(); @@ -255,7 +255,7 @@ Class LampMoth : Actor TNT1 A 1 { A_StartSound("moth/die",CHAN_VOICE,CHANF_OVERLAP,.6,2.5); - let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',pos); s.alpha *= .3; } Stop; @@ -314,14 +314,14 @@ Class CompanionLamp : Actor Vector3 spawnpos = level.Vec3Offset(Vec3Offset(0,0,height/2),ofs); if ( !level.IsPointInLevel(spawnpos) ) return; // higher chance of white moths if carrying the plush - int mchance = parent.FindInventory("MothPlushy")?3:9; - let m = LampMoth(Spawn(Random[Moth](0,mchance)?"LampMoth":"LampMoth2",spawnpos)); + int mchance = parent.FindInventory('MothPlushy')?3:9; + let m = LampMoth(Spawn(Random[Moth](0,mchance)?'LampMoth':'LampMoth2',spawnpos)); if ( !m.TestMobjLocation() ) { m.Destroy(); return; } - let s = SWWMAnimSprite.SpawnAt("SWWMSmallSmoke",m.pos); + let s = SWWMAnimSprite.SpawnAt('SWWMSmallSmoke',m.pos); s.alpha *= .3; m.master = parent; m.lamp = self; @@ -337,7 +337,7 @@ Class CompanionLamp : Actor Destroy(); return; } - Spawn("SWWMItemFog",pos); + Spawn('SWWMItemFog',pos); Trail = pos; } @@ -392,7 +392,7 @@ Class CompanionLamp : Actor { Vector3 rel = level.Vec3Diff(pos,trail); justteleport = false; - Actor f = Spawn("SWWMItemFog",pos); + Actor f = Spawn('SWWMItemFog',pos); f.A_StartSound("lamp/disappear",CHAN_VOICE); // carry over the moths foreach ( m:moff ) @@ -409,7 +409,7 @@ Class CompanionLamp : Actor SetOrigin(trail,false); angle = AngleTo(parent); vel *= 0.; - f = Spawn("SWWMItemFog",pos); + f = Spawn('SWWMItemFog',pos); f.A_StartSound("lamp/appear",CHAN_VOICE); return; } @@ -477,7 +477,7 @@ Class CompanionLamp : Actor if ( SWWMLamp(master) && SWWMLamp(master).bActive ) { A_StartSound("lamp/on",CHAN_ITEMEXTRA,CHANF_OVERLAP); - return ResolveState("Active"); + return ResolveState('Active'); } return ResolveState(null); } @@ -489,7 +489,7 @@ Class CompanionLamp : Actor if ( !SWWMLamp(master) || !SWWMLamp(master).bActive ) { A_StartSound("lamp/off",CHAN_ITEMEXTRA,CHANF_OVERLAP); - return ResolveState("Spawn"); + return ResolveState('Spawn'); } return ResolveState(null); } @@ -591,10 +591,10 @@ Class SWWMLamp : Inventory Super.DoEffect(); if ( !thelamp && bActivated ) { - thelamp = Spawn("CompanionLamp",level.Vec3Offset(Owner.pos,SWWMUtility.RotateVector3((20,0,24),Owner.angle))); + thelamp = Spawn('CompanionLamp',level.Vec3Offset(Owner.pos,SWWMUtility.RotateVector3((20,0,24),Owner.angle))); CompanionLamp(thelamp).parent = Owner; thelamp.master = self; - let f = Spawn("SWWMItemFog",thelamp.pos); + let f = Spawn('SWWMItemFog',thelamp.pos); f.A_StartSound("lamp/appear",CHAN_VOICE); } if ( bActive && !(level.maptime%35) && !isFrozen() ) Charge--; @@ -604,7 +604,7 @@ Class SWWMLamp : Inventory inactivetime++; if ( inactivetime > 350 ) // hide the lamp after 10 seconds of inactivity, so it doesn't get in your way { - let f = Spawn("SWWMItemFog",thelamp.pos); + let f = Spawn('SWWMItemFog',thelamp.pos); f.A_StartSound("lamp/disappear",CHAN_VOICE); thelamp.Destroy(); bActivated = false; @@ -622,7 +622,7 @@ Class SWWMLamp : Inventory Super.DetachFromOwner(); if ( thelamp ) { - let f = Spawn("SWWMItemFog",thelamp.pos); + let f = Spawn('SWWMItemFog',thelamp.pos); f.A_StartSound("lamp/disappear",CHAN_VOICE); thelamp.Destroy(); } @@ -643,7 +643,7 @@ Class SWWMLamp : Inventory Inventory.Amount 1; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; diff --git a/zscript/items/swwm_miscitems.zsc b/zscript/items/swwm_miscitems.zsc index 6fc0cdd18..0f10b925e 100644 --- a/zscript/items/swwm_miscitems.zsc +++ b/zscript/items/swwm_miscitems.zsc @@ -20,7 +20,7 @@ Class Omnisight : Inventory Demolitionist(rt).lastbump *= 1.1; level.allmap = true; // activate all interest markers - let ti = ThinkerIterator.Create("SWWMInterestMarker",STAT_MAPMARKER); + let ti = ThinkerIterator.Create('SWWMInterestMarker',STAT_MAPMARKER); Actor a; while ( a = Actor(ti.Next()) ) a.bDORMANT = false; // "spread" to all players @@ -44,8 +44,8 @@ Class Omnisight : Inventory Tag "$T_OMNISIGHT"; Inventory.PickupSound "misc/p_pkup"; Inventory.PickupMessage "$I_OMNISIGHT"; - Inventory.RestrictedTo "Demolitionist"; - Inventory.PickupFlash "SWWMCyanPickupFlash"; + Inventory.RestrictedTo 'Demolitionist'; + Inventory.PickupFlash 'SWWMCyanPickupFlash'; +INVENTORY.ALWAYSPICKUP; +COUNTITEM; +INVENTORY.BIGPOWERUP; @@ -91,7 +91,7 @@ Class SafetyTether : Inventory { let p = Spawn(PickupFlash,pos); p.target = self; - p.SetStateLabel("Pickup"); + p.SetStateLabel('Pickup'); } return ret; } @@ -122,11 +122,11 @@ Class SafetyTether : Inventory if ( Owner.player == players[consoleplayer] ) Console.Printf(StringTable.Localize("$D_TETHERFAIL")); return; } - let s = Spawn("DemolitionistShockwave",oldpos); + let s = Spawn('DemolitionistShockwave',oldpos); s.target = Owner; s.special1 = 120; s.A_AlertMonsters(0,AMF_EMITFROMTARGET); - s = Spawn("DemolitionistShockwave",Owner.pos); + s = Spawn('DemolitionistShockwave',Owner.pos); s.target = Owner; s.special1 = 120; s.A_AlertMonsters(0,AMF_EMITFROMTARGET); @@ -178,7 +178,7 @@ Class SafetyTether : Inventory Inventory.PickupMessage "$T_SAFETY"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMCyanPickupFlash"; + Inventory.PickupFlash 'SWWMCyanPickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; @@ -212,7 +212,7 @@ Class BallImpact : SWWMNonInteractiveActor for ( int i=0; i 15. ) { - let s = Spawn("BallImpact",pos); + let s = Spawn('BallImpact',pos); s.angle = atan2(dir.y,dir.x); s.pitch = asin(-dir.z); } @@ -331,7 +332,7 @@ Class TheBall : Actor // make it so the crit does not propagate to friendlies unless we bonked a friend (you monster!) if ( crit ) SWWMUtility.DoExplosion(self,dmg/2,25000,150,80,((victim.isFriend(target))?0:DE_NOHURTFRIEND)|DE_NONEXPLOSIVE,crit?'CriticalConcussion':'Concussion',target,DMG_FOILINVUL); - if ( crit && victim && (victim.Health <= 0) && (victim.bBOSS || victim.FindInventory("BossMarker")) && target ) + if ( crit && victim && (victim.Health <= 0) && (victim.bBOSS || victim.FindInventory('BossMarker')) && target ) SWWMUtility.MarkAchievement("clonk",target.player); // only rip shootables if ( (slamforce > girth) && is_schutt ) @@ -357,7 +358,7 @@ Class TheBall : Actor oldvel = vel; Super.Tick(); if ( isFrozen() || (freezetics > 0) ) return; - if ( InStateSequence(CurState,ResolveState("Death")) ) + if ( InStateSequence(CurState,ResolveState('Death')) ) { deadtimer++; if ( deadtimer > 300 ) @@ -366,7 +367,7 @@ Class TheBall : Actor for ( int i=0; i 15 ) { - let s = Spawn("BallImpact",pos); + let s = Spawn('BallImpact',pos); s.angle = atan2(HitNormal.y,HitNormal.x); s.pitch = asin(-HitNormal.z); } @@ -452,13 +453,13 @@ Class SaltTracer : LineTracer // liquid splashes if ( Results.CrossedWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.CrossedWaterPos; WaterHitList.Push(hl); } else if ( Results.Crossed3DWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.Crossed3DWaterPos; WaterHitList.Push(hl); } @@ -503,7 +504,7 @@ Class SaltImpact : SWWMNonInteractiveActor { Obituary "$O_SALTSHOT"; DamageType 'Salt'; - RenderStyle "Add"; + RenderStyle 'Add'; Scale 1.8; +NODAMAGETHRUST; +FORCERADIUSDMG; @@ -524,7 +525,7 @@ Class SaltImpact : SWWMNonInteractiveActor for ( int i=0; i 20) && !Random[Spreadgun](0,800/args[0]) ) { - let i = Spawn("SaltImpact",level.Vec3Offset(pos,x*speed)); + let i = Spawn('SaltImpact',level.Vec3Offset(pos,x*speed)); i.angle = atan2(x.y,x.x); i.pitch = asin(-x.z); i.target = target; @@ -643,8 +644,8 @@ Class SaltBeam : SWWMNonInteractiveActor } // next beam if ( !(special2%4) && !Random[Spreadgun](0,Stamina) ) - Spawn("SaltLight",level.Vec3Offset(pos,x*speed/2)); - let next = Spawn("SaltBeam",level.Vec3Offset(pos,x*speed)); + Spawn('SaltLight',level.Vec3Offset(pos,x*speed/2)); + let next = Spawn('SaltBeam',level.Vec3Offset(pos,x*speed)); double a = FRandom[Spreadgun](0,360), s = FRandom[Spreadgun](0,.06); Vector3 dir = SWWMUtility.ConeSpread(x,y,z,a,s); next.angle = atan2(dir.y,dir.x); @@ -653,7 +654,7 @@ Class SaltBeam : SWWMNonInteractiveActor next.special2 = (special2+1)%10; next.args[0] = args[0]+1; next.args[1] = args[1]; - next.SetStateLabel("TrailSpawn"); + next.SetStateLabel('TrailSpawn'); } override void PostBeginPlay() @@ -690,13 +691,13 @@ Class SaltBeam : SWWMNonInteractiveActor Spawn: XZW1 A -1 Bright NoDelay { - return FindState("StarterDev")+Random[Spreadgun](0,11)*2; + return FindState('StarterDev')+Random[Spreadgun](0,11)*2; } Stop; TrailSpawn: XZW2 A -1 Bright { - return FindState("TrailerDev")+Random[Spreadgun](0,11)*2; + return FindState('TrailerDev')+Random[Spreadgun](0,11)*2; } Stop; StarterDev: diff --git a/zscript/items/swwm_powerups.zsc b/zscript/items/swwm_powerups.zsc index 36a021d9f..7ecc74726 100644 --- a/zscript/items/swwm_powerups.zsc +++ b/zscript/items/swwm_powerups.zsc @@ -47,24 +47,24 @@ Class GrilledCheeseSandwich : Inventory SWWMScoreObj.SpawnAtActorBunch(1000,Owner,Font.CR_BLUE); if ( Owner is 'Demolitionist' ) { - let n = Owner.FindInventory("ArmorNugget"); - if ( !n ) Owner.GiveInventory("ArmorNugget",GetDefaultByType("ArmorNugget").MaxAmount); + let n = Owner.FindInventory('ArmorNugget'); + if ( !n ) Owner.GiveInventory('ArmorNugget',GetDefaultByType('ArmorNugget').MaxAmount); else { n.Amount = n.MaxAmount; if ( Owner.player == players[consoleplayer] ) SWWMScoreObj.SpawnAtActorBunch(n.MaxAmount,Owner,Font.CR_GREEN); } - let b = Owner.FindInventory("BlastSuit"); - if ( !b ) Owner.GiveInventory("BlastSuit",GetDefaultByType("BlastSuit").MaxAmount); + let b = Owner.FindInventory('BlastSuit'); + if ( !b ) Owner.GiveInventory('BlastSuit',GetDefaultByType('BlastSuit').MaxAmount); else { b.Amount = b.MaxAmount; if ( Owner.player == players[consoleplayer] ) SWWMScoreObj.SpawnAtActorBunch(b.MaxAmount,Owner,Font.CR_GREEN); } - let w = Owner.FindInventory("WarArmor"); - if ( !w ) Owner.GiveInventory("WarArmor",GetDefaultByType("WarArmor").MaxAmount); + let w = Owner.FindInventory('WarArmor'); + if ( !w ) Owner.GiveInventory('WarArmor',GetDefaultByType('WarArmor').MaxAmount); else { w.Amount = w.MaxAmount; @@ -76,11 +76,11 @@ Class GrilledCheeseSandwich : Inventory SWWMLoreLibrary.Add(Owner.player,"WarArmor"); Demolitionist(Owner).lastbump *= 1.2; } - let f = Spawn("SWWMItemFog",Owner.Vec3Offset(0,0,Owner.Height/2)); + let f = Spawn('SWWMItemFog',Owner.Vec3Offset(0,0,Owner.Height/2)); f.bAMBUSH = true; if ( !extrasafe ) return; - let s = Owner.FindInventory("GrilledCheeseSafeguard"); - if ( !s ) Owner.GiveInventory("GrilledCheeseSafeguard",1); + let s = Owner.FindInventory('GrilledCheeseSafeguard'); + if ( !s ) Owner.GiveInventory('GrilledCheeseSafeguard',1); else Powerup(s).EffectTics = Powerup(s).default.EffectTics; } override bool Use( bool pickup ) @@ -98,7 +98,7 @@ Class GrilledCheeseSandwich : Inventory } override void AbsorbDamage( int damage, Name damageType, int &newdamage, Actor inflictor, Actor source, int flags ) { - if ( Owner.FindInventory("GrilledCheeseSafeguard") ) + if ( Owner.FindInventory('GrilledCheeseSafeguard') ) return; // the safeguard absorbs all if ( Owner.ApplyDamageFactor(damageType,damage) <= 0 ) return; // this damage type is ignored by the player, so it does not affect us @@ -115,7 +115,7 @@ Class GrilledCheeseSandwich : Inventory { if ( (swwm_strictuntouchable == 1) && Owner.player ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) hnd.tookdamage[Owner.PlayerNumber()] = true; } if ( damageType == 'InstantDeath' ) @@ -128,7 +128,7 @@ Class GrilledCheeseSandwich : Inventory } void SafeTeleport( bool tostart = false ) { - Spawn("SWWMItemFog",Owner.Vec3Offset(0,0,Owner.Height/2)); + Spawn('SWWMItemFog',Owner.Vec3Offset(0,0,Owner.Height/2)); Vector3 safepos; double safeangle; if ( tostart || !lastsafevalid ) @@ -236,7 +236,7 @@ Class GrilledCheeseSandwich : Inventory Inventory.PickupMessage "$T_SANDWICH"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; @@ -340,7 +340,7 @@ Class GhostTarget : Actor } bt.Destroy(); // player made noise or is visible again - if ( !master || (LastHeard == master) || !master.FindInventory("GhostPower") ) + if ( !master || (LastHeard == master) || !master.FindInventory('GhostPower') ) { // note: this is faster than using a thinkeriterator foreach ( s:level.Sectors ) for ( Actor a=s.thinglist; a; a=a.snext ) @@ -419,14 +419,14 @@ Class GhostPower : Powerup if ( a.target != Owner ) continue; if ( !gt ) { - gt = Spawn("GhostTarget",Owner.pos); + gt = Spawn('GhostTarget',Owner.pos); if ( Owner.bFRIENDLY || Owner.player ) gt.bFRIENDLY = true; } a.target = gt; a.LastHeard = gt; gt.master = Owner; } - if ( !snd ) snd = Spawn("GhostSnd",Owner.pos); + if ( !snd ) snd = Spawn('GhostSnd',Owner.pos); snd.target = Owner; snd.master = self; } @@ -454,7 +454,7 @@ Class GhostArtifact : Inventory Inventory.PickupMessage "$T_GHOSTARTI"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; @@ -469,14 +469,14 @@ Class GhostArtifact : Inventory { if ( pickup && !deathmatch ) return false; if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); - let g = GhostPower(Owner.FindInventory("GhostPower")); + let g = GhostPower(Owner.FindInventory('GhostPower')); if ( g ) { g.EffectTics += g.default.EffectTics; if ( Owner is 'Demolitionist' ) Demolitionist(Owner).lastbump *= 1.04; } - else Owner.GiveInventory("GhostPower",1); + else Owner.GiveInventory('GhostPower',1); SWWMUtility.AchievementProgressInc("ghost",1,Owner.player); return true; } @@ -488,7 +488,7 @@ Class GhostArtifact : Inventory override void Travelled() { if ( tracer ) return; - tracer = Spawn("GhostArtifactX",pos); + tracer = Spawn('GhostArtifactX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -497,7 +497,7 @@ Class GhostArtifact : Inventory override void PostBeginPlay() { Super.PostBeginPlay(); - tracer = Spawn("GhostArtifactX",pos); + tracer = Spawn('GhostArtifactX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -591,7 +591,7 @@ Class GravityPower : Powerup if ( !Owner ) return; Owner.bFLY = true; Owner.bNOGRAVITY = true; - if ( !snd ) snd = Spawn("GravSnd",Owner.pos); + if ( !snd ) snd = Spawn('GravSnd',Owner.pos); snd.target = Owner; snd.master = self; } @@ -602,7 +602,7 @@ Class GravityX : SWWMItemOverlay { Default { - RenderStyle "Normal"; + RenderStyle 'Normal'; } } @@ -620,14 +620,14 @@ Class GravitySuppressor : Inventory { if ( pickup && !deathmatch ) return false; if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); - let g = GravityPower(Owner.FindInventory("GravityPower")); + let g = GravityPower(Owner.FindInventory('GravityPower')); if ( g ) { g.EffectTics += g.default.EffectTics; if ( Owner is 'Demolitionist' ) Demolitionist(Owner).lastbump *= 1.04; } - else Owner.GiveInventory("GravityPower",1); + else Owner.GiveInventory('GravityPower',1); SWWMUtility.AchievementProgressInc("gravity",1,Owner.player); return true; } @@ -638,7 +638,7 @@ Class GravitySuppressor : Inventory override void Travelled() { if ( tracer ) return; - tracer = Spawn("GravityX",pos); + tracer = Spawn('GravityX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -646,7 +646,7 @@ Class GravitySuppressor : Inventory override void PostBeginPlay() { Super.PostBeginPlay(); - tracer = Spawn("GravityX",pos); + tracer = Spawn('GravityX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -662,7 +662,7 @@ Class GravitySuppressor : Inventory Inventory.PickupMessage "$T_GRAVITYS"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; @@ -780,7 +780,7 @@ Class InvinciballPower : Powerup Super.InitEffect(); if ( !Owner ) return; lasteffect = int.min; - l = Spawn("InvinciballLight",Owner.pos); + l = Spawn('InvinciballLight',Owner.pos); l.target = Owner; l.master = self; lastpulse = max(lastpulse,gametic+35); @@ -793,14 +793,14 @@ Class InvinciballPower : Powerup { Super.DoEffect(); if ( !Owner ) return; - if ( !snd ) snd = Spawn("InvinciSnd",Owner.pos); + if ( !snd ) snd = Spawn('InvinciSnd',Owner.pos); snd.target = Owner; snd.master = self; if ( am ) return; - am = Owner.FindInventory("InvinciballArmor"); + am = Owner.FindInventory('InvinciballArmor'); if ( !am ) { - am = Inventory(Spawn("InvinciballArmor")); + am = Inventory(Spawn('InvinciballArmor')); am.AttachToOwner(Owner); } am.master = self; @@ -835,7 +835,7 @@ Class InvinciballX : SWWMItemOverlay { Default { - RenderStyle "Normal"; + RenderStyle 'Normal'; } } @@ -859,7 +859,7 @@ Class FuckingInvinciball : Inventory { if ( pickup && !deathmatch ) return false; if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); - let i = InvinciballPower(Owner.FindInventory("InvinciballPower")); + let i = InvinciballPower(Owner.FindInventory('InvinciballPower')); if ( i ) { i.EffectTics += i.default.EffectTics; @@ -870,7 +870,7 @@ Class FuckingInvinciball : Inventory } else { - Owner.GiveInventory("InvinciballPower",1); + Owner.GiveInventory('InvinciballPower',1); SWWMHandler.AddOneliner("invinciball",2,40); } SWWMUtility.AchievementProgressInc("sunny",1,Owner.player); @@ -883,7 +883,7 @@ Class FuckingInvinciball : Inventory override void Travelled() { if ( tracer ) return; - tracer = Spawn("InvinciballX",pos); + tracer = Spawn('InvinciballX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -891,7 +891,7 @@ Class FuckingInvinciball : Inventory override void PostBeginPlay() { Super.PostBeginPlay(); - tracer = Spawn("InvinciballX",pos); + tracer = Spawn('InvinciballX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -907,7 +907,7 @@ Class FuckingInvinciball : Inventory Inventory.PickupMessage "$T_INVINCIBALL"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; @@ -1043,7 +1043,7 @@ Class RagekitPower : Powerup lasteffect = int.min; lastpulse = max(lastpulse,gametic+35); Demolitionist(Owner).lastbump *= .95; - l = Spawn("RagekitLight",Owner.pos); + l = Spawn('RagekitLight',Owner.pos); l.target = Owner; l.master = self; } @@ -1052,7 +1052,7 @@ Class RagekitPower : Powerup { Super.DoEffect(); if ( !Owner ) return; - if ( !snd ) snd = Spawn("RageSnd",Owner.pos); + if ( !snd ) snd = Spawn('RageSnd',Owner.pos); snd.target = Owner; snd.master = self; if ( !(level.maptime%30) ) @@ -1071,10 +1071,10 @@ Class RagekitPower : Powerup Demolitionist(Owner).lastbump *= .995; } if ( am ) return; - am = Owner.FindInventory("RagekitArmor"); + am = Owner.FindInventory('RagekitArmor'); if ( !am ) { - am = Inventory(Spawn("RagekitArmor")); + am = Inventory(Spawn('RagekitArmor')); am.AttachToOwner(Owner); } } @@ -1125,7 +1125,7 @@ Class RagekitX : SWWMItemOverlay { Default { - RenderStyle "Normal"; + RenderStyle 'Normal'; } } @@ -1153,7 +1153,7 @@ Class Ragekit : Inventory Owner.A_QuakeEx(8.,8.,8.,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:1.); return true; } - let r = RagekitPower(Owner.FindInventory("RagekitPower")); + let r = RagekitPower(Owner.FindInventory('RagekitPower')); if ( r ) { r.EffectTics += r.default.EffectTics; @@ -1162,7 +1162,7 @@ Class Ragekit : Inventory r.lastpulse = max(r.lastpulse,gametic+35); Demolitionist(Owner).lastbump *= .95; } - else Owner.GiveInventory("RagekitPower",1); + else Owner.GiveInventory('RagekitPower',1); return true; } override void PreTravelled() @@ -1172,7 +1172,7 @@ Class Ragekit : Inventory override void Travelled() { if ( tracer ) return; - tracer = Spawn("RagekitX",pos); + tracer = Spawn('RagekitX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -1180,7 +1180,7 @@ Class Ragekit : Inventory override void PostBeginPlay() { Super.PostBeginPlay(); - tracer = Spawn("RagekitX",pos); + tracer = Spawn('RagekitX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -1196,7 +1196,7 @@ Class Ragekit : Inventory Inventory.PickupMessage "$T_RAGEKIT"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMPurplePickupFlash"; + Inventory.PickupFlash 'SWWMPurplePickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; @@ -1303,7 +1303,7 @@ Class BarrierPower : PowerIronFeet Inventory.Icon "graphics/HUD/Icons/I_Barrier.png"; Powerup.Duration -60; Powerup.Color "20 FF 00", 0.1; - Powerup.Mode "Full"; // no leaky damage + Powerup.Mode 'Full'; // no leaky damage +INVENTORY.ADDITIVETIME; } @@ -1311,7 +1311,7 @@ Class BarrierPower : PowerIronFeet { Super.InitEffect(); if ( !Owner ) return; - l = Spawn("BarrierLight",Owner.pos); + l = Spawn('BarrierLight',Owner.pos); l.target = Owner; l.master = self; if ( Owner is 'Demolitionist' ) @@ -1332,15 +1332,15 @@ Class BarrierPower : PowerIronFeet // don't reset air supply like PowerIronFeet, call parent instead Powerup.DoEffect(); if ( !Owner ) return; - if ( !snd ) snd = Spawn("BarrierSnd",Owner.pos); + if ( !snd ) snd = Spawn('BarrierSnd',Owner.pos); snd.target = Owner; snd.master = self; if ( !am ) { - am = Owner.FindInventory("BarrierArmor"); + am = Owner.FindInventory('BarrierArmor'); if ( !am ) { - am = Inventory(Spawn("BarrierArmor")); + am = Inventory(Spawn('BarrierArmor')); am.AttachToOwner(Owner); } } @@ -1390,14 +1390,14 @@ Class EBarrier : Inventory { if ( pickup && !deathmatch ) return false; if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP); - let b = BarrierPower(Owner.FindInventory("BarrierPower")); + let b = BarrierPower(Owner.FindInventory('BarrierPower')); if ( b ) { b.EffectTics += b.default.EffectTics; if ( Owner is 'Demolitionist' ) Demolitionist(Owner).lastbump *= 0.95; } - else Owner.GiveInventory("BarrierPower",1); + else Owner.GiveInventory('BarrierPower',1); SWWMUtility.AchievementProgressInc("barrier",1,Owner.player); return true; } @@ -1409,7 +1409,7 @@ Class EBarrier : Inventory { Super.Travelled(); if ( tracer ) return; - tracer = Spawn("EBarrierX",pos); + tracer = Spawn('EBarrierX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -1417,7 +1417,7 @@ Class EBarrier : Inventory override void PostBeginPlay() { Super.PostBeginPlay(); - tracer = Spawn("EBarrierX",pos); + tracer = Spawn('EBarrierX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -1427,10 +1427,10 @@ Class EBarrier : Inventory Super.DoEffect(); if ( !Owner || (Owner.Health <= 0) ) return; // do not auto-use if we're invincible, that'd be a waste - if ( Owner.bINVULNERABLE || (Owner.player && (Owner.player.cheats&(CF_GODMODE|CF_GODMODE2))) || Owner.FindInventory("InvinciballPower") ) + if ( Owner.bINVULNERABLE || (Owner.player && (Owner.player.cheats&(CF_GODMODE|CF_GODMODE2))) || Owner.FindInventory('InvinciballPower') ) return; // check terrain for auto-use - let b = Powerup(Owner.FindInventory("BarrierPower")); + let b = Powerup(Owner.FindInventory('BarrierPower')); if ( b && (b.EffectTics > 5) ) { terrainwait = 20; @@ -1483,7 +1483,7 @@ Class EBarrier : Inventory Inventory.PickupMessage "$T_BARRIER"; Inventory.MaxAmount 5; Inventory.InterHubAmount 5; - Inventory.PickupFlash "SWWMCyanPickupFlash"; + Inventory.PickupFlash 'SWWMCyanPickupFlash'; +INVENTORY.ALWAYSPICKUP; +INVENTORY.AUTOACTIVATE; +INVENTORY.INVBAR; diff --git a/zscript/items/swwm_powerups_vip.zsc b/zscript/items/swwm_powerups_vip.zsc index 67eed769d..dfbc534eb 100644 --- a/zscript/items/swwm_powerups_vip.zsc +++ b/zscript/items/swwm_powerups_vip.zsc @@ -11,7 +11,7 @@ Class TendrilTracer : LineTracer { if ( Results.HitActor.bSHOOTABLE ) { - let ent = new("HitListEntry"); + let ent = new('HitListEntry'); ent.hitactor = Results.HitActor; ent.hitlocation = Results.HitPos; ent.x = Results.HitVector; @@ -46,7 +46,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll); if ( !bSTANDSTILL ) { - let t = new("TendrilTracer"); + let t = new('TendrilTracer'); t.hitlist.Clear(); t.ShootThroughList.Clear(); t.Trace(pos,CurSector,x,speed,0,ignore:target); @@ -59,7 +59,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor { if ( hit.hitactor.IsFriend(target) ) continue; if ( (hit.hitactor == tracer) && IsBig() ) bDoSplit = true; // we split - int dmg = (hit.hitactor.bBOSS||hit.hitactor.FindInventory("BossMarker"))?(GetMissileDamage(0,0)*4):max(hit.hitactor.Health,GetMissileDamage(0,0)); + int dmg = (hit.hitactor.bBOSS||hit.hitactor.FindInventory('BossMarker'))?(GetMissileDamage(0,0)*4):max(hit.hitactor.Health,GetMissileDamage(0,0)); SWWMUtility.DoKnockback(hit.hitactor,-hit.x+(0,0,.5),((hit.hitactor.Health-dmg)<=0)?60000:8000); let p = SWWMPuff.Setup(hit.hitlocation,hit.x,self,target,hit.hitactor); hit.hitactor.DamageMobj(p,target,dmg,'Plasma',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF); @@ -68,7 +68,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor } } nextpos = level.Vec3Offset(pos,x*speed); - if ( !bSTANDSTILL && (!tracer || !tracer.bSHOOTABLE || (tracer.Health <= 0) || ((tracer.bBOSS || tracer.FindInventory("BossMarker")) && !IsBig())) ) + if ( !bSTANDSTILL && (!tracer || !tracer.bSHOOTABLE || (tracer.Health <= 0) || ((tracer.bBOSS || tracer.FindInventory('BossMarker')) && !IsBig())) ) { ReactionTime--; if ( ReactionTime <= 0 ) @@ -103,14 +103,14 @@ Class MykradvoTendril : SWWMNonInteractiveActor int ntendies = tracer?clamp(tracer.GetSpawnHealth()/400,2,10):2; for ( int i=0; i 0) ) { - let t = Spawn("MykradvoTendril",pos); + let t = Spawn('MykradvoTendril',pos); t.angle = t.AngleTo(targ); t.pitch = t.PitchTo(targ,0,targ.Height/2); t.target = target; @@ -555,13 +555,13 @@ Class Mykradvo : Inventory if ( !FindTargets(Owner) ) { int numpt = Random[ExploS](8,12); - let f = Spawn("SWWMPurplePickupFlash",spawnpos-(0,0,16)); + let f = Spawn('SWWMPurplePickupFlash',spawnpos-(0,0,16)); f.Scale *= .5; for ( int i=0; i deftabs[] = @@ -195,16 +195,12 @@ Class DemolitionistMenu : GenericMenu t.Ticker(); tabs.Push(t); } - if ( shnd.menustate ) + curtab = -1; + if ( shnd.menustate.CheckKey("LastTab") ) { - Class saved = shnd.menustate.At("LastTab"); + Class saved = shnd.menustate.Get("LastTab"); if ( saved ) curtab = FindTabType(saved,true); } - else - { - shnd.menustate = Dictionary.Create(); - curtab = -1; - } if ( curtab == -1 ) curtab = GetFirstTab(); tabs[curtab].OnSelect(); } @@ -546,7 +542,7 @@ Class DemolitionistMenu : GenericMenu double rox = int(ss.x-rwsx)/2; double roy = int(ss.y-rwsy)/2; // copy the menu dim below the window during animations, so the transition looks smoother - Screen.Dim((dimamount<0)?Color("Black"):dimcolor,(dimamount<0)?.5:dimamount,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs)); + Screen.Dim((dimamount<0)?0xFF000000:dimcolor,(dimamount<0)?.5:dimamount,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs)); // draw the background and main frame if ( swwm_fuzz ) { @@ -557,7 +553,7 @@ Class DemolitionistMenu : GenericMenu Screen.DrawTexture(FancyBg,false,origin.x,origin.y+400.*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5); Screen.ClearClipRect(); } - Screen.Dim("Black",.8,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs)); + Screen.Dim(0xFF000000,.8,int(rox*hs),int(roy*hs),int(rwsx*hs),int(rwsy*hs)); DrawFrame(rox-origin.x,roy-origin.y,rwsx,rwsy,true); return; } @@ -571,7 +567,7 @@ Class DemolitionistMenu : GenericMenu Screen.DrawTexture(FancyBg,false,origin.x,origin.y+400.*i,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5); Screen.ClearClipRect(); } - Screen.Dim("Black",.8,int(origin.x*hs),int(origin.y*hs),int(ws.x*hs),int(ws.y*hs)); + Screen.Dim(0xFF000000,.8,int(origin.x*hs),int(origin.y*hs),int(ws.x*hs),int(ws.y*hs)); DrawFrame(0,0,ws.x,ws.y,true); // draw top and bottom separators DrawHSeparator(0,14,ws.x); diff --git a/zscript/kbase/swwm_kbasetab_help.zsc b/zscript/kbase/swwm_kbasetab_help.zsc index d626014ba..facbc1606 100644 --- a/zscript/kbase/swwm_kbasetab_help.zsc +++ b/zscript/kbase/swwm_kbasetab_help.zsc @@ -9,7 +9,7 @@ Class DemolitionistHelpTab : DemolitionistMenuTab { title = StringTable.Localize("$SWWM_HELPTAB"); bHidden = true; - mtext = new("DemolitionistMenuTextBox").Init(master,StringTable.Localize("$SWWM_HELPTXT")); + mtext = new('DemolitionistMenuTextBox').Init(master,StringTable.Localize("$SWWM_HELPTXT")); return Super.Init(master); } override void OnDestroy() diff --git a/zscript/kbase/swwm_kbasetab_inventory.zsc b/zscript/kbase/swwm_kbasetab_inventory.zsc index 22acd92b6..a6ccfb065 100644 --- a/zscript/kbase/swwm_kbasetab_inventory.zsc +++ b/zscript/kbase/swwm_kbasetab_inventory.zsc @@ -231,7 +231,7 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab mustsort = true; skipsel = true; // initialize - invlist = new("DemolitionistMenuList"); + invlist = new('DemolitionistMenuList'); invlist.master = master; invlist.selected = 0; for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv ) @@ -245,11 +245,11 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag(); if ( tag > tag2 ) continue; greater = true; - invlist.items.Insert(j,new("DemolitionistMenuInvItem").Init(master,i)); + invlist.items.Insert(j,new('DemolitionistMenuInvItem').Init(master,i)); break; } if ( greater ) continue; - invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i)); + invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,i)); } } else @@ -284,12 +284,12 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab String tag2 = DemolitionistMenuInvItem(invlist.items[j]).inv.GetTag(); if ( tag > tag2 ) continue; greater = true; - invlist.items.Insert(j,new("DemolitionistMenuInvItem").Init(master,inv)); + invlist.items.Insert(j,new('DemolitionistMenuInvItem').Init(master,inv)); mustsort = true; break; } if ( greater ) continue; - invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,inv)); + invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,inv)); mustsort = true; } } @@ -641,7 +641,7 @@ Class DemolitionistMenuInvItem : DemolitionistMenuListItem master.tmsgtic = Menu.MenuTime()+70; return; } - let t = new("MenuTransaction"); + let t = new('MenuTransaction'); t.uid = master.GenTUID(); t.type = MenuTransaction.TT_ITEMUSE; t.used = inv.GetClass(); @@ -654,7 +654,7 @@ Class DemolitionistMenuInvItem : DemolitionistMenuListItem void DropItem() { if ( !inv || (inv is 'Key') || (inv is 'SWWMCollectible') ) return; - let t = new("MenuTransaction"); + let t = new('MenuTransaction'); t.uid = master.GenTUID(); t.type = MenuTransaction.TT_ITEMDROP; t.skipresult = false; diff --git a/zscript/kbase/swwm_kbasetab_keychain.zsc b/zscript/kbase/swwm_kbasetab_keychain.zsc index f57e2a530..09e8ef13a 100644 --- a/zscript/kbase/swwm_kbasetab_keychain.zsc +++ b/zscript/kbase/swwm_kbasetab_keychain.zsc @@ -105,14 +105,14 @@ Class DemolitionistKeychainTab : DemolitionistMenuTab mustsort = true; skipsel = true; // initialize - invlist = new("DemolitionistMenuList"); + invlist = new('DemolitionistMenuList'); invlist.master = master; invlist.selected = 0; int j = 0; for ( Inventory i=players[consoleplayer].mo.inv; i; i=i.inv ) { if ( FilterInventory(i) ) continue; - invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i)); + invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,i)); } } else @@ -139,7 +139,7 @@ Class DemolitionistKeychainTab : DemolitionistMenuTab break; } if ( skipme ) continue; - invlist.items.Push(new("DemolitionistMenuInvItem").Init(master,i)); + invlist.items.Push(new('DemolitionistMenuInvItem').Init(master,i)); mustsort = true; } } diff --git a/zscript/kbase/swwm_kbasetab_library.zsc b/zscript/kbase/swwm_kbasetab_library.zsc index b6d5119bd..9f8fc1f22 100644 --- a/zscript/kbase/swwm_kbasetab_library.zsc +++ b/zscript/kbase/swwm_kbasetab_library.zsc @@ -53,13 +53,13 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab { sname[i] = StringTable.Localize("$SWWM_LORETAB"..i); lwidth = max(lwidth,master.mSmallFont.StringWidth("<‼ "..sname[i].." ‼>")+6); - lists[i] = new("DemolitionistMenuList"); + lists[i] = new('DemolitionistMenuList'); lists[i].master = master; } loresz = lore.ent.Size(); foreach ( e:lore.ent ) { - let le = new("DemolitionistMenuLoreItem").Init(master,e); + let le = new('DemolitionistMenuLoreItem').Init(master,e); lists[e.tab].items.Push(le); lwidth = max(lwidth,master.mSmallFont.StringWidth("‼"..le.label)+6); } @@ -83,7 +83,7 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab } override void OnSelect() { - section = master.shnd.menustate.At("LastLoreSection").ToInt(); + section = master.shnd.menustate.Get("LastLoreSection").ToInt(); smofs[section] = ofs[section]; } override void OnDeselect() @@ -102,7 +102,7 @@ Class DemolitionistLibraryTab : DemolitionistMenuTab for ( int i=loresz; i0)?8:0)); + if ( !ltext ) ltext = new('DemolitionistMenuTextBox').Init(master,StringTable.Localize(clore.text),lwidth+((maxofs[section]>0)?8:0)); else ltext.Reinit(StringTable.Localize(clore.text),lwidth+((maxofs[section]>0)?8:0)); ltext.img = clore.img; master.MenuSound("menu/demosel"); diff --git a/zscript/kbase/swwm_kbasetab_mission.zsc b/zscript/kbase/swwm_kbasetab_mission.zsc index 451402116..4345a3243 100644 --- a/zscript/kbase/swwm_kbasetab_mission.zsc +++ b/zscript/kbase/swwm_kbasetab_mission.zsc @@ -18,7 +18,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab if ( mlog ) { for ( int i=(mlog.entries.Size()-1); i>=0; i-- ) - mtext.Push(new("DemolitionistMenuTextBox").Init(master,mlog.entries[i])); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,mlog.entries[i])); return Super.Init(master); } // saves time @@ -85,7 +85,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab missionstr = "$SWWM_MISSION_DOOM5_FROMDOOM1"; if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) ) missionstr = "$SWWM_MISSION_NONE"; - mtext.Push(new("DemolitionistMenuTextBox").Init(master,missionstr)); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,missionstr)); bool firstskip = false; for ( int i=csiz-1; i>=0; i-- ) { @@ -103,7 +103,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab } if ( StringTable.Localize(xstr) ~== xstr.Mid(1) ) continue; - mtext.Push(new("DemolitionistMenuTextBox").Init(master,xstr)); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,xstr)); } } else if ( (gameinfo.gametype&GAME_Heretic) && SWWMUtility.IsKnownMap() ) @@ -111,7 +111,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab missionstr = String.Format("$SWWM_MISSION_HERETIC%d",level.cluster); if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) ) missionstr = "$SWWM_MISSION_NONE"; - mtext.Push(new("DemolitionistMenuTextBox").Init(master,missionstr)); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,missionstr)); int csiz = stats.clustervisit.Size(); bool firstskip = false; for ( int i=csiz-1; i>=0; i-- ) @@ -122,7 +122,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab String xstr = String.Format("$SWWM_MISSION_HERETIC%d",stats.clustervisit[i]); if ( StringTable.Localize(xstr) ~== xstr.Mid(1) ) continue; - mtext.Push(new("DemolitionistMenuTextBox").Init(master,xstr)); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,xstr)); } } else if ( (gameinfo.gametype&GAME_Hexen) && SWWMUtility.IsKnownMap() ) @@ -133,7 +133,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab missionstr = String.Format("$SWWM_MISSION_%s%d",gstr,level.cluster); if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) ) missionstr = "$SWWM_MISSION_NONE"; - mtext.Push(new("DemolitionistMenuTextBox").Init(master,missionstr)); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,missionstr)); int csiz = stats.clustervisit.Size(); bool firstskip = false; for ( int i=csiz-1; i>=0; i-- ) @@ -144,7 +144,7 @@ Class DemolitionistMissionTab : DemolitionistMenuTab String xstr = String.Format("$SWWM_MISSION_%s%d",gstr,stats.clustervisit[i]); if ( StringTable.Localize(xstr) ~== xstr.Mid(1) ) continue; - mtext.Push(new("DemolitionistMenuTextBox").Init(master,xstr)); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,xstr)); } } return Super.Init(master); @@ -265,13 +265,13 @@ Class DemolitionistMissionTab : DemolitionistMenuTab if ( mtext.Size() == 0 ) { for ( int i=(mlog.entries.Size()-1); i>=0; i-- ) - mtext.Push(new("DemolitionistMenuTextBox").Init(master,mlog.entries[i])); + mtext.Push(new('DemolitionistMenuTextBox').Init(master,mlog.entries[i])); sel = 0; newent = true; } else for ( int i=(mlog.entries.Size()-1); i>=mtext.Size(); i-- ) { - mtext.Insert(0,new("DemolitionistMenuTextBox").Init(master,mlog.entries[i])); + mtext.Insert(0,new('DemolitionistMenuTextBox').Init(master,mlog.entries[i])); sel++; newent = true; } diff --git a/zscript/kbase/swwm_kbasetab_stats.zsc b/zscript/kbase/swwm_kbasetab_stats.zsc index 0c66a4e40..ce37569c9 100644 --- a/zscript/kbase/swwm_kbasetab_stats.zsc +++ b/zscript/kbase/swwm_kbasetab_stats.zsc @@ -20,7 +20,7 @@ Class DemolitionistStatsTab : DemolitionistMenuTab { sname[i] = StringTable.Localize("$SWWM_STATTAB"..i); lwidth = max(lwidth,master.mSmallFont.StringWidth(sname[i])); - lists[i] = new("DemolitionistMenuList"); + lists[i] = new('DemolitionistMenuList'); lists[i].master = master; lists[i].selected = -1; } @@ -28,42 +28,42 @@ Class DemolitionistStatsTab : DemolitionistMenuTab stats = Demolitionist(players[consoleplayer].mo)?Demolitionist(players[consoleplayer].mo).mystats:null; if ( !stats ) return Super.Init(master); // the general stats are always the same in the same order, so init them all here in one go - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATUPTIME",stats,stat_uptime)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATONFOOT",stats,stat_onfoot)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFLIGHT",stats,stat_flight)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSWIM",stats,stat_swim)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATTELE",stats,stat_tele)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATBOOST",stats,stat_boost)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDASH",stats,stat_dash)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSTOMP",stats,stat_stomp)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFUEL",stats,stat_fuel)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSPEED",stats,stat_speed)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATAIRTIME",stats,stat_airtime)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATPARRY",stats,stat_parry)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATPPARRY",stats,stat_pparry)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATWPONCH",stats,stat_wponch)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATBUSTS",stats,stat_busts)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATBUTTS",stats,stat_butts)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATPATS",stats,stat_pats)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATKISS",stats,stat_kiss)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFRIENDS",stats,stat_friends)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATITEMS",stats,stat_items)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSECRETS",stats,stat_secrets)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATKILLS",stats,stat_kills)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDEATHS",stats,stat_deaths)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDDEALT",stats,stat_ddealt)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATDTAKEN",stats,stat_dtaken)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATTDEALT",stats,stat_tdealt)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATTTAKEN",stats,stat_ttaken)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATMKILL",stats,stat_mkill)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATSKILL",stats,stat_skill)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATFAVWEAP",stats,stat_favweap)); - lists[0].items.Push(new("DemolitionistMenuStatItem").Init(master,"$SWWM_STATHISCORE",stats,stat_hiscore)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATUPTIME",stats,stat_uptime)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATONFOOT",stats,stat_onfoot)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFLIGHT",stats,stat_flight)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSWIM",stats,stat_swim)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATTELE",stats,stat_tele)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATBOOST",stats,stat_boost)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDASH",stats,stat_dash)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSTOMP",stats,stat_stomp)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFUEL",stats,stat_fuel)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSPEED",stats,stat_speed)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATAIRTIME",stats,stat_airtime)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATPARRY",stats,stat_parry)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATPPARRY",stats,stat_pparry)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATWPONCH",stats,stat_wponch)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATBUSTS",stats,stat_busts)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATBUTTS",stats,stat_butts)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATPATS",stats,stat_pats)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATKISS",stats,stat_kiss)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFRIENDS",stats,stat_friends)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATITEMS",stats,stat_items)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSECRETS",stats,stat_secrets)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATKILLS",stats,stat_kills)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDEATHS",stats,stat_deaths)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDDEALT",stats,stat_ddealt)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATDTAKEN",stats,stat_dtaken)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATTDEALT",stats,stat_tdealt)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATTTAKEN",stats,stat_ttaken)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATMKILL",stats,stat_mkill)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATSKILL",stats,stat_skill)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATFAVWEAP",stats,stat_favweap)); + lists[0].items.Push(new('DemolitionistMenuStatItem').Init(master,"$SWWM_STATHISCORE",stats,stat_hiscore)); for ( int i=0; i abs(inv2.Stamina) ) continue; greater = true; - invlist[bSell].items.Insert(j,new("DemolitionistMenuStoreItem").Init(master,type,bSell)); + invlist[bSell].items.Insert(j,new('DemolitionistMenuStoreItem').Init(master,type,bSell)); mustsort = true; break; } if ( greater ) continue; - invlist[bSell].items.Push(new("DemolitionistMenuStoreItem").Init(master,type,bSell)); + invlist[bSell].items.Push(new('DemolitionistMenuStoreItem').Init(master,type,bSell)); mustsort = true; } // don't do anything if empty @@ -542,7 +542,7 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem if ( bSell ) { pricelabel = String.Format("\cd¥%d\c-",price); - int cur = (inv is 'CandyGun')?(players[consoleplayer].mo.CountInv("CandyGunSpares")+1):players[consoleplayer].mo.CountInv(inv); + int cur = (inv is 'CandyGun')?(players[consoleplayer].mo.CountInv('CandyGunSpares')+1):players[consoleplayer].mo.CountInv(inv); if ( (cur > 1) || (inv is 'Ammo') || (inv is 'MagAmmo') ) label = String.Format("%s (%d/%d)",def.GetTag(),amt,cur); else label = def.GetTag(); } diff --git a/zscript/menu/swwm_achievementmenu.zsc b/zscript/menu/swwm_achievementmenu.zsc index e6e77a8ad..62cfce373 100644 --- a/zscript/menu/swwm_achievementmenu.zsc +++ b/zscript/menu/swwm_achievementmenu.zsc @@ -20,7 +20,7 @@ Class SWWMAchievementMenu : GenericMenu Super.Init(parent); mTitle = StringTable.Localize("$SWWM_ATITLE"); mSelected = 0; - hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) ThrowAbortException("SWWMStaticHandler not found???"); mItems.Copy(hnd.achievementinfo); total = mItems.Size(); diff --git a/zscript/menu/swwm_credits.zsc b/zscript/menu/swwm_credits.zsc index b37b86118..29ec4b5ad 100644 --- a/zscript/menu/swwm_credits.zsc +++ b/zscript/menu/swwm_credits.zsc @@ -146,42 +146,42 @@ Class SWWMCreditsMenu : GenericMenu slocal = StringTable.Localize("$SWWM_CLOCAL"); spatrons = StringTable.Localize("$SWWM_CPATRON"); sthanks = StringTable.Localize("$SWWM_CTHANK"); - cdev.Push(new("SWWMCreditsEntry").Init("Marisa the Magician","$SWWM_CDEV2",s:"graphics/Credits/MariSprite.png")); - cassets.Push(new("SWWMCreditsEntry").Init("Bethesda Game Studios","Fallout: New Vegas\nFallout 4")); - cassets.Push(new("SWWMCreditsEntry").Init("Epic Games","Unreal\nUnreal Tournament\nUnreal Tournament 2004\nUnreal Tournament 3")); - cassets.Push(new("SWWMCreditsEntry").Init("Ion Storm","Deus Ex")); - cassets.Push(new("SWWMCreditsEntry").Init("Looking Glass Studios","Thief\nSystem Shock 2")); - cassets.Push(new("SWWMCreditsEntry").Init("People Can Fly","Painkiller")); - cassets.Push(new("SWWMCreditsEntry").Init("Tripwire Interactive","Killing Floor")); - cassets.Push(new("SWWMCreditsEntry").Init("From Software","Dark Souls\nDark Souls II\nDark Souls III")); - cassets.Push(new("SWWMCreditsEntry").Init("SiFi270","$SWWM_ASSKEEN")); - cassets.Push(new("SWWMCreditsEntry").Init("Nash","WidePix")); - cmusic.Push(new("SWWMCreditsEntry").Init("Teque","Traumatic State\nDragony\nHidden Tune #242\nHypercardish 1.1")); - cmusic.Push(new("SWWMCreditsEntry").Init("BouncyTEM","Solitary Apprehension")); - cvoice.Push(new("SWWMCreditsEntry").Init("Vyolette","$T_DEMOLITIONIST")); - clocal.Push(new("SWWMCreditsEntry").Init("Marisa the Magician","$SWWM_LOCES")); - cpatrons.Push(new("SWWMCreditsEntry").Init("Bean")); - cpatrons.Push(new("SWWMCreditsEntry").Init("Snacks")); - cpatrons.Push(new("SWWMCreditsEntry").Init("john")); - cpatrons.Push(new("SWWMCreditsEntry").Init("bouncytem")); - cpatrons.Push(new("SWWMCreditsEntry").Init("Pietro Gagliardi")); - cpatrons.Push(new("SWWMCreditsEntry").Init("Pope King Joe")); - cpatrons.Push(new("SWWMCreditsEntry").Init("Zardoz")); - cpatrons.Push(new("SWWMCreditsEntry").Init("NekoMithos")); - cpatrons.Push(new("SWWMCreditsEntry").Init("Antlason Widowz")); - cpatrons.Push(new("SWWMCreditsEntry").Init("YaGirlJuniper")); - cthanks.Push(new("SWWMCreditsEntry").Init("KynikossDragonn","$SWWM_CDRAGON2")); - cthanks.Push(new("SWWMCreditsEntry").Init("Vyolette","$SWWM_CVYOLETTE2")); - cthanks.Push(new("SWWMCreditsEntry").Init("Lucy","$SWWM_CLUCY2")); - cthanks.Push(new("SWWMCreditsEntry").Init("Gutawer","$SWWM_CGUTA2")); - cthanks.Push(new("SWWMCreditsEntry").Init("Mikolah","$SWWM_CMIKO2")); - cthanks.Push(new("SWWMCreditsEntry").Init("KeksDose","$SWWM_CKEKS2")); - cthanks.Push(new("SWWMCreditsEntry").Init("ZZYZX & Nash","$SWWM_CZN2")); - cthanks.Push(new("SWWMCreditsEntry").Init("BouncyTEM","$SWWM_CBOUNCY2")); - cthanks.Push(new("SWWMCreditsEntry").Init("\ctCptSledge\c- & \cdBunray\c-","$SWWM_CSLEDGE2")); - cthanks.Push(new("SWWMCreditsEntry").Init("$SWWM_CINSP1","$SWWM_CINSP2")); - cthanks.Push(new("SWWMCreditsEntry").Init("$SWWM_CCOMMUNITY1","$SWWM_CCOMMUNITY2")); - cthanks.Push(new("SWWMCreditsEntry").Init("$SWWM_CYOU1","$SWWM_CYOU2")); + cdev.Push(new('SWWMCreditsEntry').Init("Marisa the Magician","$SWWM_CDEV2",s:"graphics/Credits/MariSprite.png")); + cassets.Push(new('SWWMCreditsEntry').Init("Bethesda Game Studios","Fallout: New Vegas\nFallout 4")); + cassets.Push(new('SWWMCreditsEntry').Init("Epic Games","Unreal\nUnreal Tournament\nUnreal Tournament 2004\nUnreal Tournament 3")); + cassets.Push(new('SWWMCreditsEntry').Init("Ion Storm","Deus Ex")); + cassets.Push(new('SWWMCreditsEntry').Init("Looking Glass Studios","Thief\nSystem Shock 2")); + cassets.Push(new('SWWMCreditsEntry').Init("People Can Fly","Painkiller")); + cassets.Push(new('SWWMCreditsEntry').Init("Tripwire Interactive","Killing Floor")); + cassets.Push(new('SWWMCreditsEntry').Init("From Software","Dark Souls\nDark Souls II\nDark Souls III")); + cassets.Push(new('SWWMCreditsEntry').Init("SiFi270","$SWWM_ASSKEEN")); + cassets.Push(new('SWWMCreditsEntry').Init("Nash","WidePix")); + cmusic.Push(new('SWWMCreditsEntry').Init("Teque","Traumatic State\nDragony\nHidden Tune #242\nHypercardish 1.1")); + cmusic.Push(new('SWWMCreditsEntry').Init("BouncyTEM","Solitary Apprehension")); + cvoice.Push(new('SWWMCreditsEntry').Init("Vyolette","$T_DEMOLITIONIST")); + clocal.Push(new('SWWMCreditsEntry').Init("Marisa the Magician","$SWWM_LOCES")); + cpatrons.Push(new('SWWMCreditsEntry').Init("Bean")); + cpatrons.Push(new('SWWMCreditsEntry').Init("Snacks")); + cpatrons.Push(new('SWWMCreditsEntry').Init("john")); + cpatrons.Push(new('SWWMCreditsEntry').Init("bouncytem")); + cpatrons.Push(new('SWWMCreditsEntry').Init("Pietro Gagliardi")); + cpatrons.Push(new('SWWMCreditsEntry').Init("Pope King Joe")); + cpatrons.Push(new('SWWMCreditsEntry').Init("Zardoz")); + cpatrons.Push(new('SWWMCreditsEntry').Init("NekoMithos")); + cpatrons.Push(new('SWWMCreditsEntry').Init("Antlason Widowz")); + cpatrons.Push(new('SWWMCreditsEntry').Init("YaGirlJuniper")); + cthanks.Push(new('SWWMCreditsEntry').Init("KynikossDragonn","$SWWM_CDRAGON2")); + cthanks.Push(new('SWWMCreditsEntry').Init("Vyolette","$SWWM_CVYOLETTE2")); + cthanks.Push(new('SWWMCreditsEntry').Init("Lucy","$SWWM_CLUCY2")); + cthanks.Push(new('SWWMCreditsEntry').Init("Gutawer","$SWWM_CGUTA2")); + cthanks.Push(new('SWWMCreditsEntry').Init("Mikolah","$SWWM_CMIKO2")); + cthanks.Push(new('SWWMCreditsEntry').Init("KeksDose","$SWWM_CKEKS2")); + cthanks.Push(new('SWWMCreditsEntry').Init("ZZYZX & Nash","$SWWM_CZN2")); + cthanks.Push(new('SWWMCreditsEntry').Init("BouncyTEM","$SWWM_CBOUNCY2")); + cthanks.Push(new('SWWMCreditsEntry').Init("\ctCptSledge\c- & \cdBunray\c-","$SWWM_CSLEDGE2")); + cthanks.Push(new('SWWMCreditsEntry').Init("$SWWM_CINSP1","$SWWM_CINSP2")); + cthanks.Push(new('SWWMCreditsEntry').Init("$SWWM_CCOMMUNITY1","$SWWM_CCOMMUNITY2")); + cthanks.Push(new('SWWMCreditsEntry').Init("$SWWM_CYOU1","$SWWM_CYOU2")); speed = 16.; spos = ss.y-logosz.y; // calc total height @@ -260,7 +260,7 @@ Class SWWMCreditsMenu : GenericMenu Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.8); } - else Screen.Dim("Black",.8,0,0,Screen.GetWidth(),Screen.GetHeight()); + else Screen.Dim(0xFF000000,.8,0,0,Screen.GetWidth(),Screen.GetHeight()); Super.Drawer(); UpdateSize(); // logo diff --git a/zscript/menu/swwm_help.zsc b/zscript/menu/swwm_help.zsc index c889f3c7a..101a5c37e 100644 --- a/zscript/menu/swwm_help.zsc +++ b/zscript/menu/swwm_help.zsc @@ -198,7 +198,7 @@ Class SWWMHelpMenu : GenericMenu Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; Screen.DrawTexture(bgtex,false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0),DTA_Alpha,.8); } - else Screen.Dim("Black",.8,0,0,Screen.GetWidth(),Screen.GetHeight()); + else Screen.Dim(0xFF000000,.8,0,0,Screen.GetWidth(),Screen.GetHeight()); double alph = clamp(((MenuTime()+System.GetTimeFrac())-fadetic)*(5./GameTicRate),0.,1.); if ( (prevpage == -1) || (alph >= 1.) ) DrawPage(curpage); else diff --git a/zscript/menu/swwm_inter.zsc b/zscript/menu/swwm_inter.zsc index d10b0de48..378fa2af2 100644 --- a/zscript/menu/swwm_inter.zsc +++ b/zscript/menu/swwm_inter.zsc @@ -132,7 +132,7 @@ Class SWWMStatScreen : StatusScreen ry -= 2*hs; rw += 8*hs; rh += 4*hs; - Screen.Dim("Black",.8,rx,ry,rw,rh); + Screen.Dim(0xFF000000,.8,rx,ry,rw,rh); // border outside rx -= hs; ry -= hs; @@ -280,7 +280,7 @@ Class SWWMStatScreen : StatusScreen private void drawSWWMBg() { - if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !whichart ) { int no = StringTable.Localize("$SWWM_NRENDER").ToInt(); @@ -314,7 +314,7 @@ Class SWWMStatScreen : StatusScreen } double ar = Screen.GetAspectRatio(), sar; Vector2 tsize, vsize; - Screen.Clear(0,0,Screen.GetWidth(),Screen.GetHeight(),"Black"); + Screen.Clear(0,0,Screen.GetWidth(),Screen.GetHeight(),0xFF000000); // background pics if ( whichart ) { @@ -330,7 +330,7 @@ Class SWWMStatScreen : StatusScreen } private void drawSWWMFg() { - if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + if ( !shnd ) shnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); // intermission tips at the bottom if ( !whichtip ) { diff --git a/zscript/menu/swwm_menus.zsc b/zscript/menu/swwm_menus.zsc index 43a9275ab..5b619339e 100644 --- a/zscript/menu/swwm_menus.zsc +++ b/zscript/menu/swwm_menus.zsc @@ -232,7 +232,7 @@ Class SWWMOptionMenu : OptionMenu // draw at the bottom unless the selected option could be covered by the tooltip int ypos = Screen.GetHeight()-height; if ( cy > ypos ) ypos = 0; - Screen.Dim("Black",.75,0,ypos,Screen.GetWidth(),height); + Screen.Dim(0xFF000000,.75,0,ypos,Screen.GetWidth(),height); ypos += 2*CleanYFac_1; for ( int i=0; i -330 ) alf = clamp(1.-(titletimer+330)/30.,0.,1.); @@ -163,7 +163,7 @@ Class SWWMTitleStuff : EventHandler if ( !tex[3] ) tex[3] = TexMan.CheckForTexture((gameinfo.gametype&GAME_Raven)?"TITLE":"TITLEPIC",TexMan.Type_MiscPatch); if ( titletimer < 0 ) { - Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFF000000,1.,0,0,Screen.GetWidth(),Screen.GetHeight()); if ( titletimer < -20 ) { rss = int(MSTime()*(GameTicRate/1000.)); @@ -173,9 +173,9 @@ Class SWWMTitleStuff : EventHandler Screen.DrawTexture(tex[3],true,ofs.x,ofs.y,DTA_VirtualWidthF,tsize.x,DTA_VirtualHeightF,tsize.y,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_TopLeft,true); RenderExplosions(); } - if ( titletimer > -20 ) Screen.Dim("White",1.-clamp((20+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); - else if ( titletimer > -80 ) Screen.Dim("White",clamp((80+titletimer+e.FracTic)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); - if ( titletimer <= -250 ) Screen.Dim("Black",1.-clamp((270+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + if ( titletimer > -20 ) Screen.Dim(0xFFFFFFFF,1.-clamp((20+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + else if ( titletimer > -80 ) Screen.Dim(0xFFFFFFFF,clamp((80+titletimer+e.FracTic)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + if ( titletimer <= -250 ) Screen.Dim(0xFF000000,1.-clamp((270+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); return; } double GameSecs = (titletimer+e.FracTic)/GameTicRate; @@ -185,9 +185,9 @@ Class SWWMTitleStuff : EventHandler double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y)); vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0)); - Screen.Dim("Black",clamp(1.-GameSecs*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFF000000,clamp(1.-GameSecs*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); } - else Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight()); + else Screen.Dim(0xFF000000,1.,0,0,Screen.GetWidth(),Screen.GetHeight()); double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.); Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs; Render_NewTitle(e,GameSecs); @@ -277,7 +277,7 @@ Class SWWMTitleStuff : EventHandler double alf1 = clamp((GameSecs-26.5)*.5,0.,1.); double alf2 = (GameSecs>28)?clamp((GameSecs-3)%5,0.,1.):0.; lfade.Clear(0,0,4,4,Color(int(255*alf1),int(255*alf2),0)); - if ( bFadeIn ) Screen.Dim("Black",1.-clamp(GameSecs-22,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + if ( bFadeIn ) Screen.Dim(0xFF000000,1.-clamp(GameSecs-22,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); if ( GameSecs < 27 ) { static const int lofs[] = @@ -346,7 +346,7 @@ Class SWWMTitleStuff : EventHandler if ( (GameSecs >= 23.) && (GameSecs < 25.6) ) { double alf = 1.-SWWMUtility.fract(GameSecs*5.); - Screen.Dim("White",.05*alf,0,0,Screen.GetWidth(),Screen.GetHeight()); + Screen.Dim(0xFFFFFFFF,.05*alf,0,0,Screen.GetWidth(),Screen.GetHeight()); } } } diff --git a/zscript/player/swwm_player.zsc b/zscript/player/swwm_player.zsc index 434433e66..46796f3d1 100644 --- a/zscript/player/swwm_player.zsc +++ b/zscript/player/swwm_player.zsc @@ -142,10 +142,10 @@ Class Demolitionist : PlayerPawn Player.DisplayName "$T_DEMOLITIONIST"; // StartItem array is defined but not used directly // just declared here for mod compat - Player.StartItem "ExplodiumGun"; - Player.StartItem "DeepImpact"; - Player.StartItem "AlmasteelPlating"; - Player.StartItem "SayaCollar"; + Player.StartItem 'ExplodiumGun'; + Player.StartItem 'DeepImpact'; + Player.StartItem 'AlmasteelPlating'; + Player.StartItem 'SayaCollar'; Player.ViewHeight 52; Player.AirCapacity 0; Player.GruntSpeed 20; @@ -196,7 +196,7 @@ Class Demolitionist : PlayerPawn // swap ourselves for a voodoo doll if ( !player || (player.mo != self) ) { - let v = Spawn("SWWMVoodooDoll",pos); + let v = Spawn('SWWMVoodooDoll',pos); v.angle = angle; v.player = player; // give it a face if it belongs to a player @@ -211,7 +211,7 @@ Class Demolitionist : PlayerPawn oldsinglefirst = swwm_singlefirst; // super already sets up the slots, so save the cvar value now mystats = SWWMStats.Find(player); // sanity checks - if ( !EventHandler.Find("SWWMHandler") || !StaticEventHandler.Find("SWWMStaticHandler") ) + if ( !EventHandler.Find('SWWMHandler') || !StaticEventHandler.Find('SWWMStaticHandler') ) ThrowAbortException("Panic! SWWM event handlers not detected!"); } @@ -258,7 +258,7 @@ Class Demolitionist : PlayerPawn } // adjust fov from dashing double spd = vel.length(); - if ( InStateSequence(CurState,FindState("Dash")) && (spd > 10.) ) + if ( InStateSequence(CurState,FindState('Dash')) && (spd > 10.) ) { Vector3 facedir = SWWMUtility.Vec3FromAngles(angle,pitch); if ( spd > 0. ) @@ -298,23 +298,23 @@ Class Demolitionist : PlayerPawn if ( ceilse && florse ) { // snap both planes - let q = Spawn("BustedQuake",(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot))); + let q = Spawn('BustedQuake',(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot))); q.specialf1 = 6.; - q = Spawn("BustedQuake",(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot))); + q = Spawn('BustedQuake',(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot))); q.specialf1 = 6.; SWWMCrusherBroken.Create(flor,ceil,diffh/2.); } else if ( ceilse ) { // snap ceiling - let q = Spawn("BustedQuake",(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot))); + let q = Spawn('BustedQuake',(ceil.centerspot.x,ceil.centerspot.y,ceil.ceilingplane.ZAtPoint(ceil.centerspot))); q.specialf1 = 10.; SWWMCrusherBroken.Create(null,ceil,diffh); } else if ( florse ) { // snap floor - let q = Spawn("BustedQuake",(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot))); + let q = Spawn('BustedQuake',(flor.centerspot.x,flor.centerspot.y,flor.floorplane.ZAtPoint(flor.centerspot))); q.specialf1 = 10.; SWWMCrusherBroken.Create(flor,null,diffh); } @@ -369,7 +369,7 @@ Class Demolitionist : PlayerPawn damage = 0; if ( (swwm_strictuntouchable >= 2) && (damage > 0) && player ) { - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) hnd.tookdamage[PlayerNumber()] = true; } if ( (mod == 'Crush') && player && (player.mo == self) ) @@ -384,12 +384,12 @@ Class Demolitionist : PlayerPawn // break a spike trap else if ( source is 'ThrustFloor' ) { - let q = Spawn("BustedQuake",source.pos); + let q = Spawn('BustedQuake',source.pos); q.specialf1 = 4.; int numpt = Random[ExploS](30,40); for ( int i=0; i maxstepheight) ) - SetStateLabel("Fall"); - else if ( InStateSequence(CurState,FindState("Crouch")) - || InStateSequence(CurState,FindState("CrouchMove")) - || InStateSequence(CurState,FindState("CrouchMoveRun")) - || InStateSequence(CurState,FindState("CrouchMoveFast")) ) - SetStateLabel("EndCrouch"); - else if ( InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("SwimEnd"); + SetStateLabel('Fall'); + else if ( InStateSequence(CurState,FindState('Crouch')) + || InStateSequence(CurState,FindState('CrouchMove')) + || InStateSequence(CurState,FindState('CrouchMoveRun')) + || InStateSequence(CurState,FindState('CrouchMoveFast')) ) + SetStateLabel('EndCrouch'); + else if ( InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('SwimEnd'); } } else @@ -110,46 +110,46 @@ extend Class Demolitionist if ( player.crouchdir == -1 ) { // Crouching - if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun")) - || InStateSequence(CurState,FindState("SeeFast")) - || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("Jump")) - || InStateSequence(CurState,FindState("Float")) - || InStateSequence(CurState,FindState("Fall")) - || InStateSequence(CurState,FindState("FallLoop")) - || InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("StartCrouch"); + if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun')) + || InStateSequence(CurState,FindState('SeeFast')) + || InStateSequence(CurState,FindState('SeeFastLoop')) + || InStateSequence(CurState,FindState('SeeFastEnd')) + || InStateSequence(CurState,FindState('Jump')) + || InStateSequence(CurState,FindState('Float')) + || InStateSequence(CurState,FindState('Fall')) + || InStateSequence(CurState,FindState('FallLoop')) + || InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('StartCrouch'); } else { - if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun")) - || InStateSequence(CurState,FindState("SeeFast")) - || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("Jump")) - || InStateSequence(CurState,FindState("Fall")) - || InStateSequence(CurState,FindState("FallLoop")) ) - SetStateLabel("Float"); - else if ( InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("SwimEnd"); - else if ( InStateSequence(CurState,FindState("Crouch")) - || InStateSequence(CurState,FindState("CrouchMove")) - || InStateSequence(CurState,FindState("CrouchMoveRun")) - || InStateSequence(CurState,FindState("CrouchMoveFast")) ) - SetStateLabel("EndCrouch"); + if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun')) + || InStateSequence(CurState,FindState('SeeFast')) + || InStateSequence(CurState,FindState('SeeFastLoop')) + || InStateSequence(CurState,FindState('SeeFastEnd')) + || InStateSequence(CurState,FindState('Jump')) + || InStateSequence(CurState,FindState('Fall')) + || InStateSequence(CurState,FindState('FallLoop')) ) + SetStateLabel('Float'); + else if ( InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('SwimEnd'); + else if ( InStateSequence(CurState,FindState('Crouch')) + || InStateSequence(CurState,FindState('CrouchMove')) + || InStateSequence(CurState,FindState('CrouchMoveRun')) + || InStateSequence(CurState,FindState('CrouchMoveFast')) ) + SetStateLabel('EndCrouch'); } } } @@ -158,8 +158,8 @@ extend Class Demolitionist { if ( !player ) { - if ( !InStateSequence(CurState,FindState("SeeRun")) ) - SetStateLabel("SeeRun"); + if ( !InStateSequence(CurState,FindState('SeeRun')) ) + SetStateLabel('SeeRun'); return; } if ( player.health <= 0 ) return; @@ -169,61 +169,61 @@ extend Class Demolitionist if ( player.crouchdir == -1 ) { // Crouching - if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun")) - || InStateSequence(CurState,FindState("SeeFast")) - || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("Fall")) - || InStateSequence(CurState,FindState("FallLoop")) - || InStateSequence(CurState,FindState("Float")) - || InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("StartCrouch"); - else if ( InStateSequence(CurState,FindState("Crouch")) ) + if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun')) + || InStateSequence(CurState,FindState('SeeFast')) + || InStateSequence(CurState,FindState('SeeFastLoop')) + || InStateSequence(CurState,FindState('SeeFastEnd')) + || InStateSequence(CurState,FindState('Fall')) + || InStateSequence(CurState,FindState('FallLoop')) + || InStateSequence(CurState,FindState('Float')) + || InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('StartCrouch'); + else if ( InStateSequence(CurState,FindState('Crouch')) ) { switch( FastCheck() ) { case 2: - SetStateLabel("CrouchMoveFast"); + SetStateLabel('CrouchMoveFast'); break; case 1: - SetStateLabel("CrouchMoveRun"); + SetStateLabel('CrouchMoveRun'); break; default: - SetStateLabel("CrouchMove"); + SetStateLabel('CrouchMove'); break; } } } else { - if ( InStateSequence(CurState,FindState("Crouch")) - || InStateSequence(CurState,FindState("CrouchMove")) - || InStateSequence(CurState,FindState("CrouchMoveRun")) - || InStateSequence(CurState,FindState("CrouchMoveFast")) ) - SetStateLabel("EndCrouch"); - else if ( InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("SwimEnd"); + if ( InStateSequence(CurState,FindState('Crouch')) + || InStateSequence(CurState,FindState('CrouchMove')) + || InStateSequence(CurState,FindState('CrouchMoveRun')) + || InStateSequence(CurState,FindState('CrouchMoveFast')) ) + SetStateLabel('EndCrouch'); + else if ( InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('SwimEnd'); else if ( (FastCheck() == 2) - && (InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun"))) ) - SetStateLabel("SeeFast"); - else if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Float")) - || InStateSequence(CurState,FindState("Turn")) ) + && (InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun'))) ) + SetStateLabel('SeeFast'); + else if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Float')) + || InStateSequence(CurState,FindState('Turn')) ) { - if ( FastCheck() == 1 ) SetStateLabel("SeeRun"); - else SetStateLabel("See"); + if ( FastCheck() == 1 ) SetStateLabel('SeeRun'); + else SetStateLabel('See'); A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP,.2); } } @@ -239,34 +239,34 @@ extend Class Demolitionist if ( player.crouchdir == -1 ) { // Crouching - if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun")) - || InStateSequence(CurState,FindState("SeeFast")) - || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("Jump")) - || InStateSequence(CurState,FindState("Fall")) - || InStateSequence(CurState,FindState("FallLoop")) - || InStateSequence(CurState,FindState("Float")) - || InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("StartCrouch"); - else if ( InStateSequence(CurState,FindState("Crouch")) ) + if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun')) + || InStateSequence(CurState,FindState('SeeFast')) + || InStateSequence(CurState,FindState('SeeFastLoop')) + || InStateSequence(CurState,FindState('SeeFastEnd')) + || InStateSequence(CurState,FindState('Jump')) + || InStateSequence(CurState,FindState('Fall')) + || InStateSequence(CurState,FindState('FallLoop')) + || InStateSequence(CurState,FindState('Float')) + || InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('StartCrouch'); + else if ( InStateSequence(CurState,FindState('Crouch')) ) { switch( FastCheck() ) { case 2: - SetStateLabel("CrouchMoveFast"); + SetStateLabel('CrouchMoveFast'); break; case 1: - SetStateLabel("CrouchMoveRun"); + SetStateLabel('CrouchMoveRun'); break; default: - SetStateLabel("CrouchMove"); + SetStateLabel('CrouchMove'); break; } } @@ -274,46 +274,46 @@ extend Class Demolitionist else if ( bFlyCheat || (player.cheats&CF_NOCLIP2) ) { // Special case, fly cheats don't play a swim animation, only float - // (this fixes Demo "swimming" on the library ladder in Spooktober, for example) - if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun")) - || InStateSequence(CurState,FindState("SeeFast")) - || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("Jump")) - || InStateSequence(CurState,FindState("Fall")) - || InStateSequence(CurState,FindState("FallLoop")) - || InStateSequence(CurState,FindState("Swim")) - || InStateSequence(CurState,FindState("SwimLoop")) - || InStateSequence(CurState,FindState("SwimLoopRun")) - || InStateSequence(CurState,FindState("SwimLoopFast")) ) - SetStateLabel("Float"); - else if ( InStateSequence(CurState,FindState("Crouch")) - || InStateSequence(CurState,FindState("CrouchMove")) - || InStateSequence(CurState,FindState("CrouchMoveRun")) - || InStateSequence(CurState,FindState("CrouchMoveFast")) ) - SetStateLabel("EndCrouch"); + // (this fixes Demo 'swimming' on the library ladder in Spooktober, for example) + if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun')) + || InStateSequence(CurState,FindState('SeeFast')) + || InStateSequence(CurState,FindState('SeeFastLoop')) + || InStateSequence(CurState,FindState('SeeFastEnd')) + || InStateSequence(CurState,FindState('Jump')) + || InStateSequence(CurState,FindState('Fall')) + || InStateSequence(CurState,FindState('FallLoop')) + || InStateSequence(CurState,FindState('Swim')) + || InStateSequence(CurState,FindState('SwimLoop')) + || InStateSequence(CurState,FindState('SwimLoopRun')) + || InStateSequence(CurState,FindState('SwimLoopFast')) ) + SetStateLabel('Float'); + else if ( InStateSequence(CurState,FindState('Crouch')) + || InStateSequence(CurState,FindState('CrouchMove')) + || InStateSequence(CurState,FindState('CrouchMoveRun')) + || InStateSequence(CurState,FindState('CrouchMoveFast')) ) + SetStateLabel('EndCrouch'); } else { - if ( InStateSequence(CurState,FindState("Spawn")) - || InStateSequence(CurState,FindState("Turn")) - || InStateSequence(CurState,FindState("See")) - || InStateSequence(CurState,FindState("SeeRun")) - || InStateSequence(CurState,FindState("SeeFast")) - || InStateSequence(CurState,FindState("SeeFastLoop")) - || InStateSequence(CurState,FindState("SeeFastEnd")) - || InStateSequence(CurState,FindState("Jump")) - || InStateSequence(CurState,FindState("Fall")) - || InStateSequence(CurState,FindState("FallLoop")) - || InStateSequence(CurState,FindState("Float")) ) - SetStateLabel("Swim"); - else if ( InStateSequence(CurState,FindState("Crouch")) - || InStateSequence(CurState,FindState("CrouchMoveRun")) - || InStateSequence(CurState,FindState("CrouchMoveFast")) ) - SetStateLabel("EndCrouch"); + if ( InStateSequence(CurState,FindState('Spawn')) + || InStateSequence(CurState,FindState('Turn')) + || InStateSequence(CurState,FindState('See')) + || InStateSequence(CurState,FindState('SeeRun')) + || InStateSequence(CurState,FindState('SeeFast')) + || InStateSequence(CurState,FindState('SeeFastLoop')) + || InStateSequence(CurState,FindState('SeeFastEnd')) + || InStateSequence(CurState,FindState('Jump')) + || InStateSequence(CurState,FindState('Fall')) + || InStateSequence(CurState,FindState('FallLoop')) + || InStateSequence(CurState,FindState('Float')) ) + SetStateLabel('Swim'); + else if ( InStateSequence(CurState,FindState('Crouch')) + || InStateSequence(CurState,FindState('CrouchMoveRun')) + || InStateSequence(CurState,FindState('CrouchMoveFast')) ) + SetStateLabel('EndCrouch'); } } } @@ -323,11 +323,11 @@ extend Class Demolitionist // Do nothing if it's a SWWM weapon, since those do things themselves if ( player && (player.ReadyWeapon is 'SWWMWeapon') ) return; - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMissile"); - else SetStateLabel("Missile"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchMissile'); + else SetStateLabel('Missile'); } override void PlayAttacking2() @@ -337,62 +337,62 @@ extend Class Demolitionist void PlayFire() { - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMissile"); - else SetStateLabel("Missile"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchMissile'); + else SetStateLabel('Missile'); } void PlayMelee() { - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchMelee"); - else SetStateLabel("Melee"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchMelee'); + else SetStateLabel('Melee'); } void PlayFastMelee() { - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchFastMelee"); - else SetStateLabel("FastMelee"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchFastMelee'); + else SetStateLabel('FastMelee'); } void PlayReload() { - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchReload"); - else SetStateLabel("Reload"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchReload'); + else SetStateLabel('Reload'); } void PlayFastReload() { - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchFastReload"); - else SetStateLabel("FastReload"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchFastReload'); + else SetStateLabel('FastReload'); } void PlayCheckGun() { - if ( InStateSequence(CurState,FindState("Dash")) - || InStateSequence(CurState,FindState("Boost")) ) + if ( InStateSequence(CurState,FindState('Dash')) + || InStateSequence(CurState,FindState('Boost')) ) return; // don't cancel dash/boost - if ( player && (player.crouchdir == -1) ) SetStateLabel("CrouchCheckGun"); - else SetStateLabel("CheckGun"); + if ( player && (player.crouchdir == -1) ) SetStateLabel('CrouchCheckGun'); + else SetStateLabel('CheckGun'); } void A_DMFade() { if ( player ) return; - Spawn("TeleportFog",pos,ALLOW_REPLACE); + Spawn('TeleportFog',pos,ALLOW_REPLACE); Destroy(); } @@ -492,7 +492,7 @@ extend Class Demolitionist if ( (dashfuel <= 0.) && fullfuel ) SWWMUtility.AchievementProgressInc("brake",1,player); if ( (dashfuel <= 0.) || (dashboost <= 0.) ) - SetStateLabel("DashEnd"); + SetStateLabel('DashEnd'); } void A_BoostUp( bool initial = false ) @@ -514,7 +514,7 @@ extend Class Demolitionist { if ( !initial ) { - if ( player.onground ) SetStateLabel("JumpEnd"); + if ( player.onground ) SetStateLabel('JumpEnd'); else SetStateLabel("Fall"); } return; @@ -563,16 +563,16 @@ extend Class Demolitionist Spawn: // normal idle #### # 2; - XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(abs(player.cmd.yaw|player.cmd.pitch)>128),"Turn"); + XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(abs(player.cmd.yaw|player.cmd.pitch)>128),'Turn'); Wait; See: // normal walking #### # 2; - XZW1 BCD 2 A_FastJump(null,"SeeRun","SeeFast"); + XZW1 BCD 2 A_FastJump(null,'SeeRun','SeeFast'); XZW1 E 0 A_Footstep(1); - XZW1 EFGHIJKL 2 A_FastJump(null,"SeeRun","SeeFast"); + XZW1 EFGHIJKL 2 A_FastJump(null,'SeeRun','SeeFast'); XZW1 M 0 A_Footstep(-1); - XZW1 MNOPA 2 A_FastJump(null,"SeeRun","SeeFast"); + XZW1 MNOPA 2 A_FastJump(null,'SeeRun','SeeFast'); Goto See+1; Turn: #### # 8 A_StartSound("demolitionist/runstart",CHAN_FOOTSTEP,CHANF_OVERLAP,.1); @@ -582,12 +582,12 @@ extend Class Demolitionist Goto Spawn+1; SeeRun: #### # 2; - XZWI PQR 2 A_FastJump("See",null,"SeeFast"); + XZWI PQR 2 A_FastJump('See',null,'SeeFast'); XZWI S 0 A_Footstep(1,1); - XZWI STUVWX 2 A_FastJump("See",null,"SeeFast"); + XZWI STUVWX 2 A_FastJump('See',null,'SeeFast'); XZWI Y 0 A_Footstep(-1,1); - XZWI YZ 2 A_FastJump("See",null,"SeeFast"); - XZW1 A 2 A_FastJump("See",null,"SeeFast"); + XZWI YZ 2 A_FastJump('See',null,'SeeFast'); + XZW1 A 2 A_FastJump('See',null,'SeeFast'); Goto SeeRun+1; SeeFast: // sprinting @@ -596,22 +596,22 @@ extend Class Demolitionist Goto SeeFastLoop; SeeFastLoop: // keep sprinting - XZW1 T 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW1 U 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); + XZW1 T 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW1 U 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); XZW1 V 0 A_Footstep(1,2); - XZW1 V 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW1 W 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW1 X 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW1 Y 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW1 Z 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW2 A 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW2 B 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); + XZW1 V 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW1 W 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW1 X 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW1 Y 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW1 Z 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW2 A 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW2 B 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); XZW2 C 0 A_Footstep(-1,2); - XZW2 C 1 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW2 D 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW2 E 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW2 F 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); - XZW2 G 2 A_JumpIf(FastCheck()!=2,"SeeFastEnd"); + XZW2 C 1 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW2 D 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW2 E 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW2 F 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); + XZW2 G 2 A_JumpIf(FastCheck()!=2,'SeeFastEnd'); Goto SeeFastLoop; SeeFastEnd: // brake @@ -620,14 +620,14 @@ extend Class Demolitionist Goto Spawn+1; Pain: // ouchy - XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),"CrouchPain"); + XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),'CrouchPain'); XZW2 M 1 A_DemoPain(); XZW2 NOPQ 1; Goto Spawn+1; Death: XDeath: // ded - XZW1 A 0 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),"CrouchDeath"); + XZW1 A 0 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),'CrouchDeath'); XZW1 A 2 { A_DemoScream(); @@ -643,7 +643,7 @@ extend Class Demolitionist XZW3 IJKLMNO 2 { if ( player.onground||bNoGravity ) - return ResolveState("BoostEnd"); + return ResolveState('BoostEnd'); A_BoostUp(true); return ResolveState(null); } @@ -651,11 +651,11 @@ extend Class Demolitionist XZW3 P 1 { if ( player.onground||bNoGravity ) - return ResolveState("BoostEnd"); + return ResolveState('BoostEnd'); A_BoostUp(false); return ResolveState(null); } - XZW3 P 1 A_JumpIf((vel.z<-10)&&(pos.z>(floorz+80)),"Fall"); + XZW3 P 1 A_JumpIf((vel.z<-10)&&(pos.z>(floorz+80)),'Fall'); Goto Boost+8; BoostEnd: // stop boost @@ -664,17 +664,17 @@ extend Class Demolitionist Goto Spawn+1; Jump: #### # 2; - XZWJ ABCDEF 2 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); + XZWJ ABCDEF 2 A_JumpIf(player.onground&&!bNoGravity,'FallEnd'); Goto FallLoop; Fall: // start fall #### # 4; - XZW3 XYZ 2 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); - XZW4 AB 2 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); + XZW3 XYZ 2 A_JumpIf(player.onground&&!bNoGravity,'FallEnd'); + XZW4 AB 2 A_JumpIf(player.onground&&!bNoGravity,'FallEnd'); Goto FallLoop; FallLoop: // falling - XZW4 CDEFGH 3 A_JumpIf(player.onground&&!bNoGravity,"FallEnd"); + XZW4 CDEFGH 3 A_JumpIf(player.onground&&!bNoGravity,'FallEnd'); Goto FallLoop; FallEnd: // landing @@ -806,27 +806,27 @@ extend Class Demolitionist Stop; CrouchMove: #### # 4; - XZW7 MN 4 A_FastJump(null,"CrouchMoveRun","CrouchMoveFast"); + XZW7 MN 4 A_FastJump(null,'CrouchMoveRun','CrouchMoveFast'); XZW7 O 0 A_Crawl(.1,false); - XZW7 OPQRS 4 A_FastJump(null,"CrouchMoveRun","CrouchMoveFast"); + XZW7 OPQRS 4 A_FastJump(null,'CrouchMoveRun','CrouchMoveFast'); XZW7 T 0 A_Crawl(.1,true); - XZW7 TUV 4 A_FastJump(null,"CrouchMoveRun","CrouchMoveFast"); + XZW7 TUV 4 A_FastJump(null,'CrouchMoveRun','CrouchMoveFast'); Goto CrouchMove+1; CrouchMoveRun: #### # 3; - XZW7 MN 3 A_FastJump("CrouchMove",null,"CrouchMoveFast"); + XZW7 MN 3 A_FastJump('CrouchMove',null,'CrouchMoveFast'); XZW7 O 0 A_Crawl(.2,false); - XZW7 OPQRS 3 A_FastJump("CrouchMove",null,"CrouchMoveFast"); + XZW7 OPQRS 3 A_FastJump('CrouchMove',null,'CrouchMoveFast'); XZW7 T 0 A_Crawl(.2,true); - XZW7 TUV 3 A_FastJump("CrouchMove",null,"CrouchMoveFast"); + XZW7 TUV 3 A_FastJump('CrouchMove',null,'CrouchMoveFast'); Goto CrouchMoveRun+1; CrouchMoveFast: #### # 2; - XZW7 MN 2 A_FastJump("CrouchMove","CrouchMoveRun",null); + XZW7 MN 2 A_FastJump('CrouchMove','CrouchMoveRun',null); XZW7 O 0 A_Crawl(.4,false); - XZW7 OPQRS 2 A_FastJump("CrouchMove","CrouchMoveRun",null); + XZW7 OPQRS 2 A_FastJump('CrouchMove','CrouchMoveRun',null); XZW7 T 0 A_Crawl(.4,true); - XZW7 TUV 2 A_FastJump("CrouchMove","CrouchMoveRun",null); + XZW7 TUV 2 A_FastJump('CrouchMove','CrouchMoveRun',null); Goto CrouchMoveFast+2; CrouchWave: #### # 3; @@ -914,27 +914,27 @@ extend Class Demolitionist Goto SwimLoop; SwimLoop: #### # 5; - XZWE MNO 5 A_FastJump(null,"SwimLoopRun","SwimLoopFast"); + XZWE MNO 5 A_FastJump(null,'SwimLoopRun','SwimLoopFast'); XZWE P 0 A_Crawl(.1,false); - XZWE PQRSTU 5 A_FastJump(null,"SwimLoopRun","SwimLoopFast"); + XZWE PQRSTU 5 A_FastJump(null,'SwimLoopRun','SwimLoopFast'); XZWE V 0 A_Crawl(.1,true); - XZWE VWX 5 A_FastJump(null,"SwimLoopRun","SwimLoopFast"); + XZWE VWX 5 A_FastJump(null,'SwimLoopRun','SwimLoopFast'); Goto SwimLoop+1; SwimLoopRun: #### # 3; - XZWE MNO 3 A_FastJump("SwimLoop",null,"SwimLoopFast"); + XZWE MNO 3 A_FastJump('SwimLoop',null,'SwimLoopFast'); XZWE P 0 A_Crawl(.2,false); - XZWE PQRSTU 3 A_FastJump("SwimLoop",null,"SwimLoopFast"); + XZWE PQRSTU 3 A_FastJump('SwimLoop',null,'SwimLoopFast'); XZWE V 0 A_Crawl(.2,true); - XZWE VWX 3 A_FastJump("SwimLoop",null,"SwimLoopFast"); + XZWE VWX 3 A_FastJump('SwimLoop',null,'SwimLoopFast'); Goto SwimLoopRun+1; SwimLoopFast: #### # 2; - XZWE MNO 2 A_FastJump("SwimLoop","SwimLoopRun",null); + XZWE MNO 2 A_FastJump('SwimLoop','SwimLoopRun',null); XZWE P 0 A_Crawl(.4,false); - XZWE PQRSTU 2 A_FastJump("SwimLoop","SwimLoopRun",null); + XZWE PQRSTU 2 A_FastJump('SwimLoop','SwimLoopRun',null); XZWE V 0 A_Crawl(.4,true); - XZWE VWX 2 A_FastJump("SwimLoop","SwimLoopRun",null); + XZWE VWX 2 A_FastJump('SwimLoop','SwimLoopRun',null); Goto SwimLoopFast+1; SwimEnd: #### # 2; diff --git a/zscript/player/swwm_player_cheats.zsc b/zscript/player/swwm_player_cheats.zsc index 747c21d42..6c87d7c9d 100644 --- a/zscript/player/swwm_player_cheats.zsc +++ b/zscript/player/swwm_player_cheats.zsc @@ -92,13 +92,13 @@ extend Class Demolitionist foreach ( cls:AllActorClasses ) { let type = (class)(cls); - if ( !type || (type == "Weapon") ) continue; + if ( !type || (type == 'Weapon') ) continue; // Don't give already owned weapons let owned = FindInventory(type); if ( owned && (owned.Amount >= owned.MaxAmount) ) continue; // Don't give replaced weapons unless the replacement was done by Dehacked. let rep = GetReplacement(type); - if ( (rep == type) || (rep is "DehackedPickup") ) + if ( (rep == type) || (rep is 'DehackedPickup') ) { // Give the weapon only if it is set in a weapon slot. if ( !player.weapons.LocateWeapon(type) ) continue; diff --git a/zscript/player/swwm_player_face.zsc b/zscript/player/swwm_player_face.zsc index 1e8c709cf..0a50ffc27 100644 --- a/zscript/player/swwm_player_face.zsc +++ b/zscript/player/swwm_player_face.zsc @@ -92,7 +92,7 @@ extend Class Demolitionist facetimer = 50; } facesad = false; - if ( FindInventory("RagekitPower") && (facestate < FS_PAIN) ) + if ( FindInventory('RagekitPower') && (facestate < FS_PAIN) ) { facestate = FS_EVIL; facetimer = 10; @@ -137,7 +137,7 @@ extend Class Demolitionist private int GetFaceTex() { if ( player.Health <= 0 ) return 3; - if ( (bInvulnerable || (player.cheats&(CF_GODMODE|CF_GODMODE2)) || FindInventory("InvinciballPower")) && (facestate >= FS_PAIN) ) return 14; + if ( (bInvulnerable || (player.cheats&(CF_GODMODE|CF_GODMODE2)) || FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 14; if ( facestate == FS_OUCH ) return 12; if ( facestate == FS_PAIN ) return (paindir==1)?10:(paindir==-1)?9:8; if ( facestate == FS_GRIN ) return 7; diff --git a/zscript/player/swwm_player_fx.zsc b/zscript/player/swwm_player_fx.zsc index 61890dd74..6c1e8aed5 100644 --- a/zscript/player/swwm_player_fx.zsc +++ b/zscript/player/swwm_player_fx.zsc @@ -94,7 +94,7 @@ Class DashTrail : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale .3; +MASTERNOSEE; +FORCEXYBILLBOARD; @@ -102,12 +102,12 @@ Class DashTrail : SWWMNonInteractiveActor override void PostBeginPlay() { Super.PostBeginPlay(); - SetState(FindState("Spawn")+Random[ExploS](0,7)); + SetState(FindState('Spawn')+Random[ExploS](0,7)); if ( waterlevel > 0 ) return; - let t = Spawn("DashTrail2",level.Vec3Offset(pos,vel*.3)); + let t = Spawn('DashTrail2',level.Vec3Offset(pos,vel*.3)); t.master = master; t.vel = vel*1.2; - let s = Spawn("SWWMSmoke",level.Vec3Offset(pos,vel*1.6)); + let s = Spawn('SWWMSmoke',level.Vec3Offset(pos,vel*1.6)); s.vel = vel*.8; s.SetShade(Color(1,1,1)*Random[ExploS](64,128)); s.special1 = Random[ExploS](2,4); @@ -132,7 +132,7 @@ Class DashTrail2 : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale .2; Alpha .4; +MASTERNOSEE; @@ -141,7 +141,7 @@ Class DashTrail2 : SWWMNonInteractiveActor override void PostBeginPlay() { Super.PostBeginPlay(); - SetState(FindState("Spawn")+Random[ExploS](0,7)); + SetState(FindState('Spawn')+Random[ExploS](0,7)); } States { @@ -152,7 +152,7 @@ Class DashTrail2 : SWWMNonInteractiveActor A_SetScale(scale.x*1.04); if ( waterlevel > 0 ) { - let b = Spawn("SWWMBubble",pos); + let b = Spawn('SWWMBubble',pos); b.vel = vel; b.scale *= scale.x; Destroy(); @@ -168,7 +168,7 @@ Class DemolitionistRadiusShockwaveTail : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; } States { @@ -190,7 +190,7 @@ Class DemolitionistRadiusShockwave : Actor Default { - RenderStyle "Add"; + RenderStyle 'Add'; Speed 15; DamageFunction int(200*alpha); DamageType 'GroundPound'; @@ -233,10 +233,10 @@ Class DemolitionistRadiusShockwave : Actor pitch = min(85,(pitch+2)*1.05); if ( !Random[ExploS](0,3) ) { - let p = Spawn("InvisibleSplasher",Vec3Offset(0,0,2)); + let p = Spawn('InvisibleSplasher',Vec3Offset(0,0,2)); p.target = target; } - let s = Spawn("DemolitionistRadiusShockwaveTail",pos); + let s = Spawn('DemolitionistRadiusShockwaveTail',pos); s.vel = vel*.35; s.scale = scale; s.alpha = alpha*.4; @@ -281,7 +281,7 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor for ( int i=0; i<360; i+=5 ) { Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,3); - let s = Spawn("SWWMSmoke",Vec3Angle(4,i,8)); + let s = Spawn('SWWMSmoke',Vec3Angle(4,i,8)); s.vel = pvel+SWWMUtility.AngleToVector3(i,7.); s.SetShade(Color(1,1,1)*Random[ExploS](64,224)); s.special1 = Random[ExploS](1,4); @@ -291,7 +291,7 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor if ( pos.z > floorz+16 ) return; for ( int i=0; i<360; i+=5 ) { - let r = Spawn("DemolitionistRadiusShockwave",Vec3Angle(5,i)); + let r = Spawn('DemolitionistRadiusShockwave',Vec3Angle(5,i)); r.target = target; r.angle = i; r.vel.xy = AngleToVector(i,r.speed+min(special1*.15,30)); @@ -301,14 +301,14 @@ Class DemolitionistShockwave : SWWMNonInteractiveActor for ( int i=0; i 0 ) jumpvelz *= jumpfac; - bool raging = FindInventory("RagekitPower"); + bool raging = FindInventory('RagekitPower'); if ( raging ) jumpvelz *= 2.; double pvelz = vel.z; if ( !player.onground && !(player.cheats&CF_PREDICTING) ) @@ -658,7 +658,7 @@ extend Class Demolitionist int dmg = jumpactor.DamageMobj(self,self,10,'Jump'); if ( raging ) { - let ps = Spawn("BigPunchSplash",pos); + let ps = Spawn('BigPunchSplash',pos); ps.damagetype = 'Jump'; ps.target = self; ps.special1 = dmg; @@ -683,7 +683,7 @@ extend Class Demolitionist mystats.boostcount++; last_boost = level.maptime+1; BumpView(3.,vel); - SetStateLabel("Boost"); + SetStateLabel('Boost'); } else { @@ -731,7 +731,7 @@ extend Class Demolitionist if ( loudlv > 2 ) A_StartSound(String.Format("voice/%s/jump%d",myvoice,idx),CHAN_DEMOVOICEAUX2,CHANF_OVERLAP); if ( loudlv > 3 ) A_StartSound(String.Format("voice/%s/jump%d",myvoice,idx),CHAN_DEMOVOICEAUX3,CHANF_OVERLAP); } - SetStateLabel("Jump"); + SetStateLabel('Jump'); } } last_jump_held = level.maptime+1; @@ -740,7 +740,7 @@ extend Class Demolitionist bool AllowCrouch() { if ( player.cmd.buttons&BT_JUMP ) return false; - if ( InStateSequence(CurState,FindState("Dash")) ) return false; // no crouch during dash + if ( InStateSequence(CurState,FindState('Dash')) ) return false; // no crouch during dash return true; } @@ -821,7 +821,7 @@ extend Class Demolitionist grav *= .35; } // reduce gravity while we're boosting - else if ( InStateSequence(CurState,FindState("Dash")) || InStateSequence(CurState,FindState("Boost")) ) + else if ( InStateSequence(CurState,FindState('Dash')) || InStateSequence(CurState,FindState('Boost')) ) grav *= .25; vel.z -= grav; } diff --git a/zscript/player/swwm_player_think.zsc b/zscript/player/swwm_player_think.zsc index 3631ff6ad..756edcf7c 100644 --- a/zscript/player/swwm_player_think.zsc +++ b/zscript/player/swwm_player_think.zsc @@ -157,7 +157,7 @@ extend Class Demolitionist { if ( player.usedown ) return; - if ( !itrace ) itrace = new("SWWMItemTracer"); + if ( !itrace ) itrace = new('SWWMItemTracer'); Vector3 dir; let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetPlayerEye(self); @@ -183,7 +183,7 @@ extend Class Demolitionist bool CheckMirrorUse() { - if ( !mtrace ) mtrace = new("SWWMMirrorTracer"); + if ( !mtrace ) mtrace = new('SWWMMirrorTracer'); Vector3 dir = SWWMUtility.GetPlayerAimDir(self); Vector3 origin = SWWMUtility.GetPlayerEye(self); mtrace.Trace(origin,level.PointInSector(origin.xy),dir,UseRange,0,ignoreallactors:true); @@ -289,7 +289,7 @@ extend Class Demolitionist deadtimer++; if ( (deadtimer == 60) && (player == players[consoleplayer]) ) A_StartSound("demolitionist/youdied",CHAN_DEMOVOICE,CHANF_OVERLAP|CHANF_UI); - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( multiplayer || level.AllowRespawn || sv_singleplayerrespawn || G_SkillPropertyInt(SKILLP_PlayerRespawn) ) { // standard behaviour, respawn normally @@ -311,7 +311,7 @@ extend Class Demolitionist else if ( (player.cmd.buttons&BT_ATTACK) && (deadtimer > 120) && (!hnd || !hnd.gdat.disablerevive) && swwm_revive ) { // reboot (if possible) - if ( !FindInventory("ReviveCooldown") && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 6) ) + if ( !FindInventory('ReviveCooldown') && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 6) ) { if ( hasrevived ) SWWMUtility.MarkAchievement("sekiro",player); hasrevived = true; @@ -322,9 +322,9 @@ extend Class Demolitionist player.bonuscount = 0; player.poisoncount = 0; blinktime = 30; - SetState(FindState("Spawn")+1); // skip tweening + SetState(FindState('Spawn')+1); // skip tweening roll = 0; - let s = Spawn("DemolitionistShockwave",pos); + let s = Spawn('DemolitionistShockwave',pos); s.target = self; s.special1 = 30; ReactionTime = 17; @@ -341,7 +341,7 @@ extend Class Demolitionist SWWMHandler.DoFlash(self,Color(255,128,192,255),30); if ( special1 > 2 ) special1 = 0; if ( (swwm_revivecooldown > 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4) ) - GiveInventory("ReviveCooldown",1); + GiveInventory('ReviveCooldown',1); } else if ( level.maptime > revivefail ) { diff --git a/zscript/player/swwm_player_tick.zsc b/zscript/player/swwm_player_tick.zsc index 44ba48f51..cb61f20fe 100644 --- a/zscript/player/swwm_player_tick.zsc +++ b/zscript/player/swwm_player_tick.zsc @@ -75,7 +75,7 @@ extend Class Demolitionist break; } if ( !addme ) continue; - let nmi = new("SWWMMagItem"); + let nmi = new('SWWMMagItem'); nmi.target = self; nmi.item = i; nmi.next = magitem; @@ -207,7 +207,7 @@ extend Class Demolitionist isAnalogMoving = CVar.GetCVar('swwm_analogmove',player).GetBool(); UpdateFace(); UpdateTags(); - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) { if ( hasteleported ) hnd.SendInterfaceEvent(PlayerNumber(),"swwmsendplayertele"); @@ -221,21 +221,21 @@ extend Class Demolitionist } if ( !selflight ) { - selflight = new("DemolitionistSelfLight"); + selflight = new('DemolitionistSelfLight'); selflight.ChangeStatNum(STAT_USER); selflight.target = self; selflight.Tick(); } if ( !myshadow ) myshadow = SWWMShadow.Track(self); // double-check that we have these - if ( !FindInventory("AlmasteelPlating") ) + if ( !FindInventory('AlmasteelPlating') ) { - let ap = Inventory(Spawn("AlmasteelPlating")); + let ap = Inventory(Spawn('AlmasteelPlating')); if ( !ap.CallTryPickup(self) ) ap.Destroy(); } - if ( !FindInventory("SayaCollar") ) + if ( !FindInventory('SayaCollar') ) { - let sc = Inventory(Spawn("SayaCollar")); + let sc = Inventory(Spawn('SayaCollar')); if ( !sc.CallTryPickup(self) ) sc.Destroy(); } // this is why we need mod cvar callbacks @@ -257,20 +257,20 @@ extend Class Demolitionist { if ( health > 1000 ) { - let spr = DivineSpriteEffect(FindInventory("DivineSpriteEffect")); + let spr = DivineSpriteEffect(FindInventory('DivineSpriteEffect')); if ( !spr || spr.bHealDone ) A_SetHealth(max(1000,health-10)); if ( health <= 1000 ) healcooldown = 40; } else if ( health > 500 ) { - if ( !FindInventory("GrilledCheeseSafeguard") && !(healtimer%3) ) + if ( !FindInventory('GrilledCheeseSafeguard') && !(healtimer%3) ) A_SetHealth(health-1); if ( health <= 500 ) healcooldown = 20; } else if ( health > 200 ) { - if ( !FindInventory("RefresherRegen") && !(healtimer%12) ) + if ( !FindInventory('RefresherRegen') && !(healtimer%12) ) A_SetHealth(health-1); } healtimer++; @@ -317,7 +317,7 @@ extend Class Demolitionist int numpt = Random[ExploS](-2,2); for ( int i=0; i mystats.topspeed ) mystats.topspeed = spd; if ( spd > ((3600*GameTicRate)/32000.) ) SWWMUtility.AchievementProgress("sanic",int((spd*3600*GameTicRate)/32000.),player); - bool isdashing = InStateSequence(CurState,FindState("Dash")); + bool isdashing = InStateSequence(CurState,FindState('Dash')); if ( player.onground && !bNoGravity && !lastground ) { // bump down weapon @@ -343,13 +343,13 @@ extend Class Demolitionist BumpView(min(-lastvelz/10.,20)); if ( lastvelz < -25 ) { - let s = Spawn("DemolitionistShockwave",pos); + let s = Spawn('DemolitionistShockwave',pos); s.target = self; s.special1 = int(-lastvelz); A_AlertMonsters(swwm_uncapalert?0:2500); BumpView(15.); lastbump *= 1.1; - if ( FindInventory("RagekitPower") ) + if ( FindInventory('RagekitPower') ) { // stop for just a split second UNLESS bunnyhopping if ( !IsRunning() || (level.maptime >= (lastairtic+10)) ) @@ -444,9 +444,9 @@ extend Class Demolitionist if ( (lastvelz < -5) || !(level.maptime%5) ) { int realdmg = encroached.DamageMobj(self,self,int((2+max(0,-lastvelz*3))*max(1.,mass/encroached.mass)),'Jump',DMG_THRUSTLESS); - if ( FindInventory("RagekitPower") ) + if ( FindInventory('RagekitPower') ) { - let ps = Spawn("BigPunchSplash",pos); + let ps = Spawn('BigPunchSplash',pos); ps.damagetype = 'Jump'; ps.target = self; ps.special1 = realdmg; @@ -506,7 +506,7 @@ extend Class Demolitionist lastground = player.onground; lastvelz = prevvelz; prevvelz = vel.z; - bool isboosting = InStateSequence(CurState,FindState("Boost")); + bool isboosting = InStateSequence(CurState,FindState('Boost')); bNOFRICTION = ((bFly&&!bFlyCheat&&!(player.cheats&CF_NOCLIP2))||isdashing); if ( fuelcooldown == 1 ) A_StartSound("demolitionist/fuelregen",CHAN_FUELREGEN,CHANF_LOOP,.35,4.,.5); else if ( fuelcooldown > 1 ) A_StopSound(CHAN_FUELREGEN); @@ -562,7 +562,7 @@ extend Class Demolitionist { for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ ) { - a = Spawn("DashTrail",Vec3Angle(15,angle+i*140,35)); + a = Spawn('DashTrail',Vec3Angle(15,angle+i*140,35)); a.master = self; a.vel = (RotateVector((j,0),angle+i*160),0)-(0,0,1)*j; a.vel -= vel*.5; @@ -574,7 +574,7 @@ extend Class Demolitionist Vector3 viewdir = SWWMUtility.Vec3FromAngles(angle,pitch); // look for things we could potentially bump into bool bumped = false; - let raging = RagekitPower(FindInventory("RagekitPower")); + let raging = RagekitPower(FindInventory('RagekitPower')); double maxmass = max(mass*spd/40.,200); if ( raging ) maxmass *= 2; let bt = BlockThingsIterator.Create(self,spd+radius+1024); @@ -651,7 +651,7 @@ extend Class Demolitionist { 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)); + Spawn('SWWMItemFog',level.Vec3Offset(pos,diff/2)); A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.); mystats.buttslams++; lastbump *= .8; @@ -659,7 +659,7 @@ extend Class Demolitionist } if ( raging ) { - let ps = Spawn("BigPunchSplash",level.Vec3Offset(pos,diff/2)); + let ps = Spawn('BigPunchSplash',level.Vec3Offset(pos,diff/2)); ps.damagetype = buttslam?'Buttslam':'Dash'; ps.target = self; ps.special1 = dmg; @@ -687,7 +687,7 @@ extend Class Demolitionist if ( raging || swwm_omnibust ) { // see if we can bust it - let tempme = new("LineTracer"); // gross hack to pass needed data + let tempme = new('LineTracer'); // gross hack to pass needed data int dmg = int(10+spd*3.); if ( raging ) dmg *= 8; bool buttslam = false; @@ -705,7 +705,7 @@ extend Class Demolitionist // busted through if ( raging ) { - let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height)); + let ps = Spawn('BigPunchSplash',Vec3Offset(0,0,Height)); ps.damagetype = buttslam?'Buttslam':'Dash'; ps.target = self; ps.special1 = int(10+spd*3.); @@ -717,7 +717,7 @@ extend Class Demolitionist { 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)); + Spawn('SWWMItemFog',Vec3Offset(0,0,Height)); A_QuakeEx(8.,8.,8.,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollIntensity:1.); mystats.buttslams++; lastbump *= .8; @@ -741,7 +741,7 @@ extend Class Demolitionist dashboost *= 0.; if ( raging ) { - let ps = Spawn("BigPunchSplash",Vec3Offset(0,0,Height)); + let ps = Spawn('BigPunchSplash',Vec3Offset(0,0,Height)); ps.damagetype = (dir dot viewdir < -3.)?'Buttslam':'Dash'; ps.target = self; ps.special1 = int(10+spd*3.); @@ -783,7 +783,7 @@ extend Class Demolitionist if ( raging || swwm_omnibust ) { // see if we can bust it - let tempme = new("LineTracer"); // gross hack to pass needed data + let tempme = new('LineTracer'); // gross hack to pass needed data int dmg = int(10+spd*3.); if ( raging ) dmg *= 8; if ( buttslam ) dmg *= 3; @@ -805,7 +805,7 @@ extend Class Demolitionist // busted through if ( raging ) { - let ps = Spawn("BigPunchSplash",Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2))); + let ps = Spawn('BigPunchSplash',Vec3Offset(dir.x*radius,dir.y*radius,(tempme.Results.Tier==TIER_UPPER)?Height:(tempme.Results.Tier==TIER_LOWER)?0:(Height/2))); ps.damagetype = buttslam?'Buttslam':'Dash'; ps.target = self; ps.special1 = int(10+spd*3.); @@ -816,7 +816,7 @@ extend Class Demolitionist { 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))); + 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|QF_3D,falloff:300,rollIntensity:1.); mystats.buttslams++; lastbump *= .8; @@ -839,7 +839,7 @@ extend Class Demolitionist dashboost *= 0.; if ( raging ) { - let ps = Spawn("BigPunchSplash",Vec3Offset(dir.x*radius,dir.y*radius,Height/2.)); + let ps = Spawn('BigPunchSplash',Vec3Offset(dir.x*radius,dir.y*radius,Height/2.)); ps.damagetype = (dir dot viewdir < -3.)?'Buttslam':'Dash'; ps.target = self; ps.special1 = int(10+spd*3.); @@ -887,7 +887,7 @@ extend Class Demolitionist Actor a; for ( int i=-1; i<=1; i+=2 ) for ( int j=1; j<4; j++ ) { - a = Spawn("DashTrail",Vec3Angle(10,angle+i*140,40)); + a = Spawn('DashTrail',Vec3Angle(10,angle+i*140,40)); a.master = self; a.vel = .5*(RotateVector((j,0),angle+i*160),0)-(0,0,1)*j; a.vel -= vel*.5; diff --git a/zscript/swwm_blod.zsc b/zscript/swwm_blod.zsc index 5514f723a..3c112090d 100644 --- a/zscript/swwm_blod.zsc +++ b/zscript/swwm_blod.zsc @@ -10,7 +10,7 @@ Class mkBlood : SWWMNonInteractiveActor void A_Bleed( int str = 1 ) { if ( !target ) return; - let b = Spawn("mkBloodSpray",pos); + let b = Spawn('mkBloodSpray',pos); Vector2 dirto = target.Vec2To(self).unit(); b.angle = atan2(dirto.y,dirto.x); b.pitch = FRandom[Blood](-60,30); @@ -45,7 +45,7 @@ Class mkBlood : SWWMNonInteractiveActor level.SpawnParticle(puff); } } - let s = mkBloodSmoke(SWWMStaticSprite.SpawnAt("mkBloodSmoke",pos)); + let s = mkBloodSmoke(SWWMStaticSprite.SpawnAt('mkBloodSmoke',pos)); s.scolor = b.fillcolor; s.scale *= .4*str; s.thickness = str-1; @@ -111,7 +111,7 @@ Class mkBloodSpray : SWWMNonInteractiveActor int cnt = sz-Random[Blood](0,4); for ( int i=0; i 0) ) return; if ( killme ) A_FadeOut(.01); - if ( CurState == ResolveState("Death2") ) + if ( CurState == ResolveState('Death2') ) { if ( vel.length() < .1 ) bleeding = false; @@ -594,7 +594,7 @@ Class mkFlyingGib : Actor Mass 10; Scale .75; Gravity .5; - BounceType "Doom"; + BounceType 'Doom'; BounceFactor .2; +MISSILE; +DROPOFF; @@ -625,7 +625,7 @@ Class mkFlyingGib : Actor } Goto Spawn; Death: - XZW1 # 1 A_JumpIf(pos.z<=floorz,"Death2"); + XZW1 # 1 A_JumpIf(pos.z<=floorz,'Death2'); Wait; Death2: XZW1 # -1 @@ -636,7 +636,7 @@ Class mkFlyingGib : Actor else roll = Random[Gibs](175,185); A_Stop(); // floor drop - let b = Spawn("mkBloodDrop",pos); + let b = Spawn('mkBloodDrop',pos); b.scale *= 2.0; b.SetShade(shadecol); } @@ -662,7 +662,7 @@ Class mkGibber : SWWMNonInteractiveActor double ang, pt; Vector3 dir; int bloodthrottle = 0, gibthrottle = 0; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( hnd ) { if ( hnd.oldmaxblood != 0 ) @@ -673,7 +673,7 @@ Class mkGibber : SWWMNonInteractiveActor for ( int i=0; i 0) || isflying || (mybody.tics != -1) || (mybody.vel.length() > 0) ) return; - let b = mybody.Spawn("mkBloodPool",mybody.pos); + let b = mybody.Spawn('mkBloodPool',mybody.pos); Color shadecol; if ( mybody.bloodcolor ) shadecol = Color(mybody.bloodcolor.r/2,mybody.bloodcolor.g/2,mybody.bloodcolor.b/2); else shadecol = Color(80,0,0); @@ -905,7 +905,7 @@ Class mkBloodPool : SWWMNonInteractiveActor prevpool.nextpool = nextpool; if ( nextpool ) nextpool.prevpool = prevpool; } - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; hnd.bloodpools = nextpool; } @@ -920,7 +920,7 @@ Class mkBloodPool : SWWMNonInteractiveActor A_SetScale(sz); A_QueueCorpse(); SWWMUtility.SetToSlope(self,FRandom[Blood](0,360)); - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); if ( !hnd ) return; nextpool = hnd.bloodpools; hnd.bloodpools = self; @@ -957,7 +957,7 @@ Class mkBloodPool : SWWMNonInteractiveActor { Radius 1; Height 1; - StencilColor "Red"; + StencilColor "FF 00 00"; mkBloodPool.BaseAccel .0006; } States @@ -998,8 +998,8 @@ Class mkBloodStep : SWWMNonInteractiveActor Default { - RenderStyle "Shaded"; - StencilColor "Red"; + RenderStyle 'Shaded'; + StencilColor "FF 00 00"; } States diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index ac61e3578..3b80d2d82 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -177,10 +177,10 @@ Class SWWMDamageAccumulator : Inventory static void Accumulate( Actor victim, int amount, Actor inflictor, Actor source, Name type, bool dontgib = false, int flags = 0 ) { if ( !victim ) return; - SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory("SWWMDamageAccumulator")); + SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory('SWWMDamageAccumulator')); if ( !match ) { - match = SWWMDamageAccumulator(Spawn("SWWMDamageAccumulator")); + match = SWWMDamageAccumulator(Spawn('SWWMDamageAccumulator')); match.AttachToOwner(victim); } match.amounts.Push(amount); @@ -194,11 +194,11 @@ Class SWWMDamageAccumulator : Inventory static clearscope int GetAmount( Actor victim ) { - let ti = ThinkerIterator.Create("SWWMDamageAccumulator",STAT_USER); - SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory("SWWMDamageAccumulator")); + let ti = ThinkerIterator.Create('SWWMDamageAccumulator',STAT_USER); + SWWMDamageAccumulator match = SWWMDamageAccumulator(victim.FindInventory('SWWMDamageAccumulator')); if ( match ) { - if ( match.source && match.source.FindInventory("AngeryPower") ) + if ( match.source && match.source.FindInventory('AngeryPower') ) return (match.total>85899345)?int.max:(match.total*25); return match.total; } @@ -222,14 +222,14 @@ Class SWWMWhoPushedMe : Inventory static void SetInstigator( Actor b, Actor whomst ) { if ( !b || !whomst ) return; - SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory("SWWMWhoPushedMe")); + SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory('SWWMWhoPushedMe')); if ( ffd ) { ffd.instigator = whomst; ffd.killtimer = 0; // cancel kill timer return; } - ffd = SWWMWhoPushedMe(Spawn("SWWMWhoPushedMe")); + ffd = SWWMWhoPushedMe(Spawn('SWWMWhoPushedMe')); ffd.AttachToOwner(b); ffd.instigator = whomst; } @@ -237,7 +237,7 @@ Class SWWMWhoPushedMe : Inventory static Actor RecallInstigator( Actor b ) { if ( !b ) return null; - SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory("SWWMWhoPushedMe")); + SWWMWhoPushedMe ffd = SWWMWhoPushedMe(b.FindInventory('SWWMWhoPushedMe')); if ( ffd ) { Actor whomst = ffd.instigator; @@ -287,13 +287,13 @@ Class SWWMFlyTracker : Inventory static void Track( Actor b, Actor whomst ) { if ( !b || !whomst ) return; - SWWMFlyTracker ffd = SWWMFlyTracker(b.FindInventory("SWWMFlyTracker")); + SWWMFlyTracker ffd = SWWMFlyTracker(b.FindInventory('SWWMFlyTracker')); if ( ffd ) { ffd.instigator = whomst; return; } - ffd = SWWMFlyTracker(Spawn("SWWMFlyTracker")); + ffd = SWWMFlyTracker(Spawn('SWWMFlyTracker')); ffd.AttachToOwner(b); ffd.instigator = whomst; ffd.curpos = ffd.startpos = b.pos; @@ -373,7 +373,7 @@ Class SWWMQuickCombatTracker : Inventory // force update tag if Grace of Lilith has glitched our owner if ( item.GetClassName() == 'CCards_Token_Glitched' ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); UpdateTag(hnd); } return Super.HandlePickup(item); @@ -412,7 +412,7 @@ Class SWWMQuickCombatTracker : Inventory } return t; } - t = SWWMQuickCombatTracker(Spawn("SWWMQuickCombatTracker")); + t = SWWMQuickCombatTracker(Spawn('SWWMQuickCombatTracker')); t.myplayer = p; t.AttachToOwner(target); // players always use SpawnHealth @@ -457,7 +457,7 @@ Class SWWMQuickCombatTracker : Inventory } if ( PMHack && !Owner.isFrozen() ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); UpdateTag(hnd); } // cap lifespan if owner is dead @@ -510,7 +510,7 @@ Class SmoothLinearValueInterpolator static SmoothLinearValueInterpolator Create( double val, double diff ) { - let v = new("SmoothLinearValueInterpolator"); + let v = new('SmoothLinearValueInterpolator'); v.oldval = v.val = val; v.diff = diff; return v; @@ -537,7 +537,7 @@ Class SmoothDynamicValueInterpolator static SmoothDynamicValueInterpolator Create( double val, double factor, double mindiff = 1., double maxdiff = 0. ) { - let v = new("SmoothDynamicValueInterpolator"); + let v = new('SmoothDynamicValueInterpolator'); v.oldval = v.val = val; v.factor = factor; v.mindiff = mindiff; diff --git a/zscript/swwm_common_fx.zsc b/zscript/swwm_common_fx.zsc index 1eb071c71..5b3bf3668 100644 --- a/zscript/swwm_common_fx.zsc +++ b/zscript/swwm_common_fx.zsc @@ -245,8 +245,8 @@ Class SWWMSmoke : SWWMNonInteractiveActor { Default { - RenderStyle "Shaded"; - StencilColor "FFFFFF"; + RenderStyle 'Shaded'; + StencilColor "FF FF FF"; Speed 1; +FORCEXYBILLBOARD; +ROLLSPRITE; @@ -318,7 +318,7 @@ Class SWWMSmoke : SWWMNonInteractiveActor UpdateWaterLevel(); if ( (waterlevel > 0) && !bAMBUSH ) { - let b = Spawn("SWWMBubble",pos); + let b = Spawn('SWWMBubble',pos); b.scale *= abs(scale.x); b.vel = vel; Destroy(); @@ -364,7 +364,7 @@ Class SWWMHalfSmoke : SWWMAnimSprite override void EnteredWater() { - let b = SWWMAnimSprite.SpawnAt("SWWMHalfBubble",pos); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',pos); b.scale *= abs(scale.x); b.vel = vel; Destroy(); @@ -412,7 +412,7 @@ Class SWWMBubble : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 0.5; } @@ -424,7 +424,7 @@ Class SWWMBubble : SWWMNonInteractiveActor pt = FRandom[Puff](-90,90); vel += SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[Puff](0.2,0.8); if ( (waterlevel <= 0) || (waterdepth < (scale.y*9.)) ) Destroy(); - SetState(ResolveState("Spawn")+Random[Puff](0,19)); + SetState(ResolveState('Spawn')+Random[Puff](0,19)); } override void Tick() { @@ -536,7 +536,7 @@ Class SWWMSparkTrail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; } override void Tick() @@ -566,7 +566,7 @@ Class SWWMSpark : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Gravity .2; Scale .05; @@ -652,7 +652,7 @@ Class SWWMSpark : SWWMNonInteractiveActor pitch = 0; roll = 0; dead = true; - SetStateLabel("Death"); + SetStateLabel('Death'); break; } nstep++; @@ -663,7 +663,7 @@ Class SWWMSpark : SWWMNonInteractiveActor if ( (taillen > 0.) && (alpha > .3) && (waterlevel <= 0) ) { taildir /= taillen; - let t = Spawn("SWWMSparkTrail",newpos); + let t = Spawn('SWWMSparkTrail',newpos); t.alpha = alpha*.3; t.speed = taillen; [t.angle, t.pitch, t.scale.y] = SWWMUtility.CalcYBeam(taildir,taillen); @@ -678,7 +678,7 @@ Class SWWMSpark : SWWMNonInteractiveActor UpdateWaterLevel(); if ( waterlevel > 0 ) { - let b = Spawn("SWWMBubble",pos); + let b = Spawn('SWWMBubble',pos); b.vel = vel; b.scale *= 0.3; Destroy(); @@ -792,7 +792,7 @@ Class SWWMChip : SWWMNonInteractiveActor dist *= .3; vel = dir*spd; newpos = d.HitLocation+dir; - SetStateLabel("Bounce"); + SetStateLabel('Bounce'); } else { @@ -819,7 +819,7 @@ Class SWWMChip : SWWMNonInteractiveActor } vel = (0,0,0); dead = true; - SetStateLabel("Death"); + SetStateLabel('Death'); break; } nstep++; @@ -896,7 +896,7 @@ Class SWWMItemFog : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +ROLLSPRITE; +ROLLCENTER; +FORCEXYBILLBOARD; @@ -919,7 +919,7 @@ Class SWWMItemFog : SWWMNonInteractiveActor for ( int i=0; i= 3) && (psp.frame <= 12) && (psp.sprite == GetSpriteIndex('XZW1')) ) CheckWave(); @@ -98,7 +98,7 @@ Class SWWMGesture : SWWMWeapon if ( !mo || !(mo is 'Demolitionist') ) return null; // only Demo if ( mo.Health <= 0 ) return null; // dead if ( !force && (mo.player.cheats&CF_TOTALLYFROZEN) ) return null; // frozen today (unless forced) - SWWMGesture w = SWWMGesture(mo.FindInventory("SWWMGesture")); + SWWMGesture w = SWWMGesture(mo.FindInventory('SWWMGesture')); if ( w && ((mo.player.PendingWeapon is 'SWWMGesture') || (mo.player.ReadyWeapon is 'SWWMGesture') || (mo.player.PendingWeapon is 'SWWMItemGesture') || (mo.player.ReadyWeapon is 'SWWMItemGesture')) ) { @@ -114,7 +114,7 @@ Class SWWMGesture : SWWMWeapon } if ( !w ) { - w = SWWMGesture(Spawn("SWWMGesture")); + w = SWWMGesture(Spawn('SWWMGesture')); w.AttachToOwner(mo); } if ( mo.player.PendingWeapon != WP_NOCHANGE ) w.formerweapon = mo.player.PendingWeapon; @@ -133,7 +133,7 @@ Class SWWMGesture : SWWMWeapon if ( mo.Health <= 0 ) return null; // dead if ( !forced && (mo.player.cheats&CF_TOTALLYFROZEN) ) return null; // frozen today (unless forced) if ( !a ) return null; - SWWMGesture w = SWWMGesture(mo.FindInventory("SWWMGesture")); + SWWMGesture w = SWWMGesture(mo.FindInventory('SWWMGesture')); if ( w && ((mo.player.PendingWeapon is 'SWWMGesture') || (mo.player.ReadyWeapon is 'SWWMGesture') || (mo.player.PendingWeapon is 'SWWMItemGesture') || (mo.player.ReadyWeapon is 'SWWMItemGesture')) ) { @@ -149,7 +149,7 @@ Class SWWMGesture : SWWMWeapon } if ( !w ) { - w = SWWMGesture(Spawn("SWWMGesture")); + w = SWWMGesture(Spawn('SWWMGesture')); w.AttachToOwner(mo); } if ( mo.player.PendingWeapon != WP_NOCHANGE ) w.formerweapon = mo.player.PendingWeapon; @@ -178,7 +178,7 @@ Class SWWMGesture : SWWMWeapon invoker.whichweapon = invoker.sweapon[0]; // push back invoker.sweapon.Delete(0); - player.SetPSprite(PSP_WEAPON,ResolveState("Ready")); + player.SetPSprite(PSP_WEAPON,ResolveState('Ready')); return; } if ( invoker.queued ) @@ -186,7 +186,7 @@ Class SWWMGesture : SWWMWeapon invoker.whichweapon = null; invoker.whichgesture = invoker.nextgesture; invoker.queued = false; - player.SetPSprite(PSP_WEAPON,ResolveState("Ready")); + player.SetPSprite(PSP_WEAPON,ResolveState('Ready')); return; } if ( invoker.formerweapon ) player.PendingWeapon = invoker.formerweapon; @@ -196,7 +196,7 @@ Class SWWMGesture : SWWMWeapon if ( (player.PendingWeapon is 'SWWMGesture') || (player.PendingWeapon is 'SWWMItemGesture') ) player.PendingWeapon = null; } - player.SetPSprite(PSP_WEAPON,ResolveState("Deselect")); + player.SetPSprite(PSP_WEAPON,ResolveState('Deselect')); } action void A_Headpat() @@ -209,14 +209,14 @@ Class SWWMGesture : SWWMWeapon Vector3 patpos = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz-4),dir*30.); for ( int i=0; i 0) && (a.bBossSpawned || a.bCOUNTKILL) ) a.DamageMobj(self,self,a.Health,'EndMii',DMG_FORCED|DMG_THRUSTLESS); @@ -293,7 +293,7 @@ Class SWWMBossBrain : BossBrain A_StartSound("brain/pain",CHAN_VOICE,attenuation:ATTN_NONE); A_QuakeEx(3.,3.,3.,15,0,65535,"",QF_RELATIVE|QF_SCALEDOWN,falloff:65535,rollIntensity:.3); if ( !eyeless ) SpawnBrainExpl(false); - Spawn("SWWMBossBrainPain",pos); + Spawn('SWWMBossBrainPain',pos); } Goto Spawn; Death: @@ -307,7 +307,7 @@ Class SWWMBossBrain : BossBrain SpawnBrainExpl(true); EverythingDies(); } - Spawn("SWWMBossBrainPain",pos); + Spawn('SWWMBossBrainPain',pos); } MBRN A 1 { @@ -340,7 +340,7 @@ Class SWWMGuard : Actor Obituary "$OB_WOLFGUARD"; Tag "$FN_WOLFGUARD"; Species "WolfensteinSS"; - DropItem "Clip"; + DropItem 'Clip'; } States { @@ -388,7 +388,7 @@ Class SWWMSS : Actor Obituary "$OB_WOLFSS_ORIG"; Tag "$FN_WOLFSS_ORIG"; Species "WolfensteinSS"; - DropItem "Clip"; + DropItem 'Clip'; } States { diff --git a/zscript/swwm_thinkers.zsc b/zscript/swwm_thinkers.zsc index 8255ad465..d49de0304 100644 --- a/zscript/swwm_thinkers.zsc +++ b/zscript/swwm_thinkers.zsc @@ -14,7 +14,7 @@ Class KoraxYeeted : Thinker int sidx = level.CreateSectorTagIterator(145).Next(); if ( sidx == -1 ) return; Sector door = level.Sectors[sidx]; - let ti = ThinkerIterator.Create("SectorEffect"); + let ti = ThinkerIterator.Create('SectorEffect'); SectorEffect se; while ( se = SectorEffect(ti.Next()) ) { @@ -58,7 +58,7 @@ Class SWWMCrusherBroken : Thinker static void Create( Sector f, Sector c, double diffh ) { if ( !f && !c ) return; - let ti = ThinkerIterator.Create("SWWMCrusherBroken",STAT_USER); + let ti = ThinkerIterator.Create('SWWMCrusherBroken',STAT_USER); SWWMCrusherBroken cb; while ( cb = SWWMCrusherBroken(ti.Next()) ) { @@ -75,7 +75,7 @@ Class SWWMCrusherBroken : Thinker continue; } } - cb = new("SWWMCrusherBroken"); + cb = new('SWWMCrusherBroken'); cb.fsec = f; cb.csec = c; cb.ChangeStatNum(STAT_USER); @@ -87,7 +87,7 @@ Class SWWMCrusherBroken : Thinker static void Remove( Sector f, Sector c ) { if ( !f && !c ) return; - let ti = ThinkerIterator.Create("SWWMCrusherBroken",STAT_USER); + let ti = ThinkerIterator.Create('SWWMCrusherBroken',STAT_USER); SWWMCrusherBroken cb; while ( cb = SWWMCrusherBroken(ti.Next()) ) { @@ -212,7 +212,7 @@ Class SWWMCorpseCleaner : Thinker void Init( Actor activator ) { toclean.Clear(); - let ti = ThinkerIterator.Create("Actor"); + let ti = ThinkerIterator.Create('Actor'); Actor a; while ( a = Actor(ti.Next()) ) { @@ -243,7 +243,7 @@ Class SWWMCorpseCleaner : Thinker } Actor a = toclean[i++]; if ( !a || !a.bKILLED || (a.tics != -1) ) continue; - let f = a.Spawn("SWWMItemFog",a.pos); + let f = a.Spawn('SWWMItemFog',a.pos); f.A_StartSound("bestsound",CHAN_ITEM); a.Destroy(); } @@ -269,11 +269,11 @@ Class SWWMGlobals : SWWMStaticThinker static play SWWMGlobals Get() { - let ti = ThinkerIterator.Create("SWWMGlobals",STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMGlobals',STAT_STATIC); SWWMGlobals g = SWWMGlobals(ti.Next()); if ( !g ) { - g = new("SWWMGlobals"); + g = new('SWWMGlobals'); g.ChangeStatNum(STAT_STATIC); } return g; diff --git a/zscript/swwm_thinkers_player.zsc b/zscript/swwm_thinkers_player.zsc index 3997d60cd..2bf8f069f 100644 --- a/zscript/swwm_thinkers_player.zsc +++ b/zscript/swwm_thinkers_player.zsc @@ -17,16 +17,16 @@ Class SWWMMissionLog : SWWMStaticThinker static clearscope SWWMMissionLog Get() { - let ml = SWWMMissionLog(ThinkerIterator.Create("SWWMMissionLog",STAT_STATIC).Next()); + let ml = SWWMMissionLog(ThinkerIterator.Create('SWWMMissionLog',STAT_STATIC).Next()); return ml; } static play void AddLog( String str ) { - let ml = SWWMMissionLog(ThinkerIterator.Create("SWWMMissionLog",STAT_STATIC).Next()); + let ml = SWWMMissionLog(ThinkerIterator.Create('SWWMMissionLog',STAT_STATIC).Next()); if ( !ml ) { - ml = new("SWWMMissionLog"); + ml = new('SWWMMissionLog'); ml.ChangeStatNum(STAT_STATIC); } if ( ml.entries.Find(str) < ml.entries.Size() ) return; @@ -36,10 +36,10 @@ Class SWWMMissionLog : SWWMStaticThinker static play void SetClock( int year, int month, int day, int hour, int minute, String tz = "JST" ) { - let ml = SWWMMissionLog(ThinkerIterator.Create("SWWMMissionLog",STAT_STATIC).Next()); + let ml = SWWMMissionLog(ThinkerIterator.Create('SWWMMissionLog',STAT_STATIC).Next()); if ( !ml ) { - ml = new("SWWMMissionLog"); + ml = new('SWWMMissionLog'); ml.ChangeStatNum(STAT_STATIC); } ml.clockset = true; @@ -147,7 +147,7 @@ Class SWWMStats : SWWMStaticThinker if ( inflictor is 'SWWMPuff' ) inflictor = inflictor.master; // special puffs transfer real inflictor through master pointer if ( inflictor is 'Weapon' ) which = Weapon(inflictor).GetClass(); if ( which is 'DualExplodiumGun' ) which = 'ExplodiumGun'; // don't credit sister weapon - if ( inflictor && inflictor.FindInventory("ParriedBuff") ) which = 'DoomWeapon'; // gross hack + if ( inflictor && inflictor.FindInventory('ParriedBuff') ) which = 'DoomWeapon'; // gross hack // properly credit some projectiles to their respective gun else if ( inflictor is 'AirBullet' ) which = 'DeepImpact'; else if ( (inflictor is 'HammerShockwave') || (inflictor is 'HammerRadiusShockwave') ) which = 'ItamexHammer'; @@ -238,7 +238,7 @@ Class SWWMStats : SWWMStaticThinker bool wf_hack = false; if ( (li.mapname == "E1M4") && LevelInfo.MapExists("E1M4B") ) { - let cv = CVar.GetCVar("wf_blackroomswap_e1m4b"); + let cv = CVar.GetCVar('wf_blackroomswap_e1m4b'); if ( cv && cv.GetBool() ) { wf_hack = true; @@ -247,14 +247,14 @@ Class SWWMStats : SWWMStaticThinker } else if ( (li.mapname == "E1M8") && LevelInfo.MapExists("E1M8B") ) { - let cv = CVar.GetCVar("wf_blackroomswap_e1m8b"); + let cv = CVar.GetCVar('wf_blackroomswap_e1m8b'); if ( cv && cv.GetBool() ) { wf_hack = true; li = LevelInfo.FindLevelInfo("E1M8B"); } } - let ls = new("LevelStat"); + let ls = new('LevelStat'); // we can automatically assume that all levels from the same cluster will have this flag as well ls.hub = !!(level.clusterflags&level.CLUSTER_HUB); ls.visited = false; @@ -301,7 +301,7 @@ Class SWWMStats : SWWMStaticThinker ls.suck = level.sucktime; return; } - ls = new("LevelStat"); + ls = new('LevelStat'); ls.hub = !!(level.clusterflags&level.CLUSTER_HUB); ls.visited = true; ls.cluster = level.cluster; @@ -341,7 +341,7 @@ Class SWWMStats : SWWMStaticThinker { if ( victim ) { - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); Class mvictim = SWWMUtility.MergeMonster(hnd,victim.GetClass()); bool found = false; foreach ( ms:mstats ) @@ -353,7 +353,7 @@ Class SWWMStats : SWWMStaticThinker } if ( !found ) { - let ms = new("MonsterKill"); + let ms = new('MonsterKill'); ms.m = mvictim; ms.kills = 1; mstats.Push(ms); @@ -368,7 +368,7 @@ Class SWWMStats : SWWMStaticThinker if ( (favweapon == -1) || (wstats[favweapon].kills < wstats[i].kills) ) favweapon = i; return; } - let ws = new("WeaponUsage"); + let ws = new('WeaponUsage'); ws.w = which; ws.kills = 1; wstats.Push(ws); @@ -378,7 +378,7 @@ Class SWWMStats : SWWMStaticThinker static clearscope SWWMStats Find( PlayerInfo p ) { - let ti = ThinkerIterator.Create("SWWMStats",STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMStats',STAT_STATIC); SWWMStats t; while ( t = SWWMStats(ti.Next()) ) { @@ -454,7 +454,7 @@ Class SWWMCredits : SWWMStaticThinker static clearscope SWWMCredits Find( PlayerInfo p ) { - let ti = ThinkerIterator.Create("SWWMCredits",STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMCredits',STAT_STATIC); SWWMCredits t; while ( t = SWWMCredits(ti.Next()) ) { @@ -655,7 +655,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker if ( e.tag != "$"..tag ) continue; return true; } - SWWMLore e = new("SWWMLore"); + SWWMLore e = new('SWWMLore'); e.tag = "$"..tag; if ( StringTable.Localize(e.tag) == "" ) { @@ -696,7 +696,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker SWWMLoreLibrary ll = Find(p); if ( !ll ) { - ll = new("SWWMLoreLibrary"); + ll = new('SWWMLoreLibrary'); ll.ChangeStatNum(STAT_STATIC); ll.myplayer = p; } @@ -736,7 +736,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker static clearscope SWWMLoreLibrary Find( PlayerInfo p ) { - let ti = ThinkerIterator.Create("SWWMLoreLibrary",STAT_STATIC); + let ti = ThinkerIterator.Create('SWWMLoreLibrary',STAT_STATIC); SWWMLoreLibrary ll; while ( ll = SWWMLoreLibrary(ti.Next()) ) { diff --git a/zscript/utility/swwm_utility.zsc b/zscript/utility/swwm_utility.zsc index b9d6e8ee2..8d8eb1ad7 100644 --- a/zscript/utility/swwm_utility.zsc +++ b/zscript/utility/swwm_utility.zsc @@ -80,7 +80,7 @@ Class EnvmapDebugSphere : Actor override void Tick() {} Default { - RenderStyle "Normal"; + RenderStyle 'Normal'; Radius 16; Height 48; } diff --git a/zscript/utility/swwm_utility_achievements.zsc b/zscript/utility/swwm_utility_achievements.zsc index 23ad983e8..af0154b63 100644 --- a/zscript/utility/swwm_utility_achievements.zsc +++ b/zscript/utility/swwm_utility_achievements.zsc @@ -5,7 +5,7 @@ extend class SWWMUtility static void MarkAchievement( String mvar, PlayerInfo p = null ) { if ( !p || (p != players[consoleplayer]) ) return; - let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) return; String val = hnd.achievementstate.At(mvar); if ( val == "" ) @@ -19,7 +19,7 @@ extend class SWWMUtility static int GetAchievementProgress( String pvar, PlayerInfo p = null ) { if ( !p || (p != players[consoleplayer]) ) return 0; - let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) return 0; String pval = hnd.achievementprogress.At(pvar); if ( pval == "" ) @@ -32,7 +32,7 @@ extend class SWWMUtility static void AchievementProgress( String pvar, int val, PlayerInfo p = null ) { if ( !p || (p != players[consoleplayer]) ) return; - let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) return; String pval = hnd.achievementprogress.At(pvar); if ( pval == "" ) @@ -46,7 +46,7 @@ extend class SWWMUtility static void AchievementProgressInc( String pvar, int inc, PlayerInfo p = null ) { if ( !p || (p != players[consoleplayer]) ) return; - let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) return; String pval = hnd.achievementprogress.At(pvar); if ( pval == "" ) @@ -59,7 +59,7 @@ extend class SWWMUtility static void AchievementProgressIncDouble( String pvar, double inc, PlayerInfo p = null ) { if ( !p || (p != players[consoleplayer]) ) return; - let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) return; String pval = hnd.achievementprogress.At(pvar); if ( pval == "" ) @@ -75,7 +75,7 @@ extend class SWWMUtility static void AchievementProgressOr( String pvar, int val, PlayerInfo p = null ) { if ( !p || (p != players[consoleplayer]) ) return; - let hnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); + let hnd = SWWMStaticHandler(StaticEventHandler.Find('SWWMStaticHandler')); if ( !hnd ) return; String pval = hnd.achievementprogress.At(pvar); if ( pval == "" ) diff --git a/zscript/utility/swwm_utility_blast.zsc b/zscript/utility/swwm_utility_blast.zsc index 95c99031b..405fddee4 100644 --- a/zscript/utility/swwm_utility_blast.zsc +++ b/zscript/utility/swwm_utility_blast.zsc @@ -49,14 +49,14 @@ extend Class SWWMUtility // debug, display radius sphere if ( swwm_debugblast ) { - let s = Actor.Spawn("RadiusDebugSphere",(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos); + let s = Actor.Spawn('RadiusDebugSphere',(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos); s.Scale *= ExplosionRadius; - s.SetShade((Damage>0)?"Green":"Blue"); + s.SetShade((Damage>0)?0xFF00FF00:0xFF0000FF); if ( FullDamageRadius > 0. ) { - let s = Actor.Spawn("RadiusDebugSphere",(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos); + let s = Actor.Spawn('RadiusDebugSphere',(flags&DE_CENTERHEIGHT)?Source.Vec3Offset(0,0,Source.height/2):Source.pos); s.Scale *= FullDamageRadius; - s.SetShade("Red"); + s.SetShade(0xFFFF0000); } } if ( !(flags&DE_NOSPLASH) ) Source.CheckSplash(ExplosionRadius); @@ -164,7 +164,7 @@ extend Class SWWMUtility } if ( (Instigator is 'Demolitionist') && haskilled && !(flags&DE_NONEXPLOSIVE) ) { - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); let demo = Demolitionist(Instigator); if ( hnd && (gametic > demo.lastbang+30) && (gametic > hnd.lastcombat+10) && !Random[DemoLines](0,3) ) demo.lastbang = SWWMHandler.AddOneLiner("blast",2,10); @@ -177,8 +177,8 @@ Class RadiusDebugSphere : SWWMNonInteractiveActor { Default { - RenderStyle "AddStencil"; - StencilColor "White"; + RenderStyle 'AddStencil'; + StencilColor "FF FF FF"; } States { diff --git a/zscript/utility/swwm_utility_compat.zsc b/zscript/utility/swwm_utility_compat.zsc index 6e3b8b38b..f5c9f335f 100644 --- a/zscript/utility/swwm_utility_compat.zsc +++ b/zscript/utility/swwm_utility_compat.zsc @@ -65,25 +65,13 @@ extend Class SWWMUtility // detect eviternity (naive method) static bool IsEviternity() { - foreach ( cls:AllActorClasses ) - { - if ( cls.GetClassName() != "Archangelus" ) - continue; - return true; - } - return false; + return FindClass('Archangelus','Actor'); } // detect eviternity 2 (naive method) static bool IsEviternityTwo() { - foreach ( cls:AllActorClasses ) - { - if ( cls.GetClassName() != "The_Origin_Phase_1" ) - continue; - return true; - } - return false; + return FindClass('The_Origin_Phase_1','Actor'); } // detect doom vacation @@ -93,12 +81,7 @@ extend Class SWWMUtility if ( Wads.FindLump("VACABEX") != -1 ) { // just to make sure - foreach ( cls:AllActorClasses ) - { - if ( cls.GetClassName() != "Babe" ) - continue; - return true; - } + return FindClass('Babe','Actor'); } return false; } @@ -147,7 +130,7 @@ extend Class SWWMUtility let ai = Level.CreateActorIterator(tid); foreach ( a:ai ) { - let bb = a.Spawn("BossBrain",a.pos,NO_REPLACE); + let bb = a.Spawn('BossBrain',a.pos,NO_REPLACE); bb.angle = a.angle; } } diff --git a/zscript/utility/swwm_utility_map.zsc b/zscript/utility/swwm_utility_map.zsc index 6f581d52a..9768026f7 100644 --- a/zscript/utility/swwm_utility_map.zsc +++ b/zscript/utility/swwm_utility_map.zsc @@ -167,7 +167,7 @@ extend Class SWWMUtility } } // moderate: see if it's a busted crusher, we need to be able to break those in case they cause a softlock - let ti = ThinkerIterator.Create("SWWMCrusherBroken",Thinker.STAT_USER); + let ti = ThinkerIterator.Create('SWWMCrusherBroken',Thinker.STAT_USER); SWWMCrusherBroken cb; while ( cb = SWWMCrusherBroken(ti.Next()) ) { @@ -222,7 +222,7 @@ extend Class SWWMUtility return true; } } - ti = ThinkerIterator.Create("Actor"); + ti = ThinkerIterator.Create('Actor'); Actor a; while ( a = Actor(ti.Next()) ) { @@ -442,8 +442,7 @@ extend Class SWWMUtility } // gets the hit normal vector for projectiles and hitscan - // bNoBounce: actor didn't just bounce, meaning the fallback normal shouldn't be the inverse of velocity - static Vector3 GetActorHitNormal( Actor a, bool bNoBounce = false ) + static Vector3 GetActorHitNormal( Actor a ) { Vector3 HitNormal = (0,0,0); F3DFloor ff; @@ -496,7 +495,36 @@ extend Class SWWMUtility else { double len = a.vel.length(); - if ( len > 0. ) HitNormal = bNoBounce?(-a.vel/len):(a.vel/len); + if ( len > 0. ) HitNormal = -a.vel/len; + } + return HitNormal; + } + static Vector3 GetActorBounceHitNormal( Actor a, Actor bounceMobj, Line bounceLine, readonly bouncePlane, bool is3DFloor ) + { + Vector3 HitNormal = (0,0,0); + if ( bounceMobj ) + { + Vector3 diff = level.Vec3Diff(bounceMobj.pos,a.pos); + if ( diff.x >= bounceMobj.radius ) HitNormal += (1,0,0); + else if ( diff.x <= -bounceMobj.radius ) HitNormal += (-1,0,0); + if ( diff.y >= bounceMobj.radius ) HitNormal += (0,1,0); + else if ( diff.y <= -bounceMobj.radius ) HitNormal += (0,-1,0); + if ( diff.z >= bounceMobj.height ) HitNormal += (0,0,1); + else if ( diff.z <= 0. ) HitNormal += (0,0,-1); + double len = HitNormal.length(); + if ( len < double.epsilon ) HitNormal = Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90)); + else HitNormal /= len; + } + else if ( bouncePlane ) + { + if ( is3DFloor ) HitNormal = -bouncePlane.Normal; + else HitNormal = bouncePlane.Normal; + } + else if ( bounceLine ) + { + HitNormal = (-bounceLine.delta.y,bounceLine.delta.x,0).unit(); + if ( !Level.PointOnLineSide(a.pos.xy,bounceLine) ) + HitNormal *= -1; } return HitNormal; } diff --git a/zscript/weapons/swwm_baseweapon.zsc b/zscript/weapons/swwm_baseweapon.zsc index adc0d78e1..f5c412576 100644 --- a/zscript/weapons/swwm_baseweapon.zsc +++ b/zscript/weapons/swwm_baseweapon.zsc @@ -138,7 +138,7 @@ Class SWWMWeapon : Weapon abstract if ( ngun == 2 ) { // create a dual giver - let dg = SWWMDualWeaponGiver(Spawn("SWWMDualWeaponGiver",pos)); + let dg = SWWMDualWeaponGiver(Spawn('SWWMDualWeaponGiver',pos)); dg.bDROPPED = bDROPPED; // inherit drop flag dg.angle = angle; dg.vel = vel; @@ -182,7 +182,7 @@ Class SWWMWeapon : Weapon abstract Vector3 tracedir = level.Vec3Diff(userpos,itempos); double dist = tracedir.length(); tracedir /= dist; - let cf = new("CrossLineFinder"); + let cf = new('CrossLineFinder'); cf.Trace(userpos,level.PointInSector(userpos.xy),tracedir,dist,0,ignoreallactors:true); // trigger all player cross lines found between user and item for ( int i=0; i 1 ) { - s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",Owner.pos); + s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',Owner.pos); s.vel = Owner.vel*.3+SWWMUtility.Vec3FromAngles(FRandom[Ponch](0,360),FRandom[Ponch](-90,90))*FRandom[Ponch](.1,1.2); s.scale *= 2.; s.SetRenderStyle(STYLE_AddShaded); @@ -69,7 +69,7 @@ Class ParryDamageChecker : Inventory override void ModifyDamage( int damage, Name damageType, int &newdamage, bool passive, Actor inflictor, Actor source, int flags ) { Inventory buff; - if ( inflictor && (buff=inflictor.FindInventory("ParriedBuff")) ) + if ( inflictor && (buff=inflictor.FindInventory('ParriedBuff')) ) { double mult; if ( buff.special1 <= 1 ) mult = 1.5; @@ -84,7 +84,7 @@ Class ParryRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale .1; Alpha .3; +FORCEXYBILLBOARD; @@ -111,10 +111,10 @@ Class ParryField : SWWMNonInteractiveActor return; } SetOrigin(SWWMUtility.GetFireOffset(master,20,0,0),false); - let raging = RagekitPower(master.FindInventory("RagekitPower")); + let raging = RagekitPower(master.FindInventory('RagekitPower')); let st = Demolitionist(master).mystats; // check for projectiles to deflect - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); foreach ( s:level.Sectors ) { // don't check sectors that aren't within bounds, saves some time @@ -143,10 +143,10 @@ Class ParryField : SWWMNonInteractiveActor a.target = master; } if ( a.bSKULLFLY ) a.bBLASTED = true; // blast lost souls - let buff = a.FindInventory("ParriedBuff"); + let buff = a.FindInventory('ParriedBuff'); if ( !buff ) { - buff = Inventory(Spawn("ParriedBuff")); + buff = Inventory(Spawn('ParriedBuff')); buff.AttachToOwner(a); buff.tracer = oldtarget; } @@ -162,7 +162,7 @@ Class ParryField : SWWMNonInteractiveActor } a.vel = dir*nspeed; if ( a.bMISSILE ) a.speed = nspeed; - let i = Spawn(raging?"BigPunchImpact":"PunchImpact",a.pos); + let i = Spawn(raging?'BigPunchImpact':'PunchImpact',a.pos); i.target = master; i.angle = atan2(dir.y,dir.x); i.pitch = asin(-dir.z); @@ -177,7 +177,7 @@ Class ParryField : SWWMNonInteractiveActor a.vel = dir*nspeed; for ( int i=1; i<6; i++ ) { - let r = Spawn("ParryRing",a.pos); + let r = Spawn('ParryRing',a.pos); r.specialf1 = i*.04; } buff.special1 |= 1; @@ -253,7 +253,7 @@ Class UseLineTracer : LineTracer { if ( Results.HitType == TRACE_HitActor ) { - let u = new("UseList"); + let u = new('UseList'); u.hitline = null; u.hitactor = Results.HitActor; u.pos = Results.HitPos; @@ -264,7 +264,7 @@ Class UseLineTracer : LineTracer { if ( Results.HitLine.Activation&(SPAC_Use|SPAC_UseThrough) ) { - let u = new("UseList"); + let u = new('UseList'); u.hitline = Results.HitLine; u.hitside = Results.Side; u.hitpart = Results.FFloor?TIER_FFLOOR:Results.Tier; @@ -300,7 +300,7 @@ Class MeleeTracer : LineTracer if ( Results.HitType == TRACE_HitActor ) { if ( !Results.HitActor.bSHOOTABLE - || Results.HitActor.FindInventory("ParriedBuff") ) return TRACE_Skip; + || Results.HitActor.FindInventory('ParriedBuff') ) return TRACE_Skip; bool addme = true; foreach ( hit:hits ) { @@ -316,7 +316,7 @@ Class MeleeTracer : LineTracer } if ( addme ) { - let h = new("MHitList"); + let h = new('MHitList'); h.a = Results.HitActor; h.dir = Results.HitVector; h.pos = Results.HitPos; @@ -363,12 +363,12 @@ extend Class SWWMWeapon action void A_Parry( int duration ) { if ( invoker.pfield ) invoker.pfield.Destroy(); - invoker.pfield = Spawn("ParryField",SWWMUtility.GetFireOffset(self,20,0,0)); + invoker.pfield = Spawn('ParryField',SWWMUtility.GetFireOffset(self,20,0,0)); invoker.pfield.master = self; invoker.pfield.special1 = duration; invoker.pfield.special2 = duration; - if ( !FindInventory("ParryDamageChecker") ) - GiveInventory("ParryDamageChecker",1); // need this so parried projectiles deal extra damage + if ( !FindInventory('ParryDamageChecker') ) + GiveInventory('ParryDamageChecker',1); // need this so parried projectiles deal extra damage } // multi-hit cone rather than the usual one-hit arc, more fun private action bool TryMelee( double spread, int dmg, String hitsound, double rangemul, double kickmul, int flags, Class impactclass ) @@ -376,14 +376,14 @@ extend Class SWWMWeapon Vector3 dir; let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetPlayerEye(self); - if ( !invoker.mt ) invoker.mt = new("MeleeTracer"); + if ( !invoker.mt ) invoker.mt = new('MeleeTracer'); let mt = invoker.mt; // for convenience mt.hits.Clear(); mt.dorip = !!(flags&MELEE_Rip); int rings = 1; double step = spread/20.; double range = 1.5*DEFMELEERANGE*rangemul; - bool raging = (flags&MELEE_NoRage)?false:CountInv("RagekitPower"); + bool raging = (flags&MELEE_NoRage)?false:CountInv('RagekitPower'); double widemul = (flags&MELEE_ExtraWide)?(flags&MELEE_Wider)?5:3:(flags&MELEE_Wider)?2.5:1.5; for ( double i=0; i)("BigPunchImpact"):impactclass,hit.pos); + let p = Spawn(raging?(Class)('BigPunchImpact'):impactclass,hit.pos); p.angle = atan2(hit.dir.y,hit.dir.x); } if ( (flags&MELEE_HammerHit) && (hit.a.Health <= hit.a.GetGibHealth()) ) @@ -434,7 +434,7 @@ extend Class SWWMWeapon } if ( raging ) { - let ps = Spawn("BigPunchSplash",hit.pos); + let ps = Spawn('BigPunchSplash',hit.pos); ps.target = self; ps.special1 = dmg; } @@ -467,9 +467,9 @@ extend Class SWWMWeapon A_BumpFOV(.96); return true; } - action bool A_Melee( int dmg = 40, String hitsound = "", double rangemul = 1., double spreadmul = 1., double kickmul = 1., int flags = 0, Class impactclass = "PunchImpact" ) + action bool A_Melee( int dmg = 40, String hitsound = "", double rangemul = 1., double spreadmul = 1., double kickmul = 1., int flags = 0, Class impactclass = 'PunchImpact' ) { - let raging = RagekitPower(FindInventory("RagekitPower")); + let raging = RagekitPower(FindInventory('RagekitPower')); if ( flags&MELEE_NoRage ) raging = null; if ( raging ) rangemul += .2; Vector3 origin = SWWMUtility.GetPlayerEye(self); @@ -477,7 +477,7 @@ extend Class SWWMWeapon // check for usables if ( !(flags&MELEE_NoUse) ) { - if ( !invoker.ut ) invoker.ut = new("UseLineTracer"); + if ( !invoker.ut ) invoker.ut = new('UseLineTracer'); let ut = invoker.ut; // for convenience ut.uses.Clear(); ut.Trace(origin,level.PointInSector(origin.xy),dir,DEFMELEERANGE*rangemul,0,ignore:self); @@ -516,14 +516,14 @@ extend Class SWWMWeapon if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); if ( impactclass ) { - let p = Spawn(raging?(Class)("BigPunchImpact"):impactclass,d.HitLocation+HitNormal*4); + let p = Spawn(raging?(Class)('BigPunchImpact'):impactclass,d.HitLocation+HitNormal*4); p.angle = atan2(HitNormal.y,HitNormal.x); p.pitch = asin(-HitNormal.z); if ( d.HitType == TRACE_HitFloor ) p.CheckSplash(40); } if ( raging ) { - let ps = Spawn("BigPunchSplash",d.HitLocation+HitNormal*4); + let ps = Spawn('BigPunchSplash',d.HitLocation+HitNormal*4); ps.target = self; ps.special1 = dmg; } diff --git a/zscript/weapons/swwm_blazeit.zsc b/zscript/weapons/swwm_blazeit.zsc index 33714fa7c..b760916c6 100644 --- a/zscript/weapons/swwm_blazeit.zsc +++ b/zscript/weapons/swwm_blazeit.zsc @@ -5,7 +5,7 @@ Class HellblazerX : SWWMItemOverlay { Default { - RenderStyle "Translucent"; + RenderStyle 'Translucent'; Alpha .5; +INTERPOLATEANGLES; } @@ -75,7 +75,7 @@ Class Hellblazer : SWWMWeapon double a = FRandom[Hellblazer](0,360); double s = FRandom[Hellblazer](0,bAlt?.02:.005); Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s); - let p = Spawn(bAlt?"HellblazerMissile2":"HellblazerMissile",origin); + let p = Spawn(bAlt?'HellblazerMissile2':'HellblazerMissile',origin); p.target = self; int tidx = max(0,invoker.seekcnt-(invoker.preload+1)); if ( invoker.seektarget[tidx] ) HellblazerMissile(p).seektarget = invoker.seektarget[tidx]; @@ -90,7 +90,7 @@ Class Hellblazer : SWWMWeapon } for ( int i=0; i<5; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.special1 = 1; s.scale *= 2.4; s.alpha *= .4; @@ -99,7 +99,7 @@ Class Hellblazer : SWWMWeapon } for ( int i=0; i<6; i++ ) { - let s = Spawn("SWWMSpark",origin); + let s = Spawn('SWWMSpark',origin); s.scale *= .7; s.alpha *= .4; s.vel += vel*.5+x*FRandom[Hellblazer](4.,8.)+y*FRandom[Hellblazer](-2,2)+z*FRandom[Hellblazer](-2,2); @@ -247,7 +247,7 @@ Class Hellblazer : SWWMWeapon break; } if ( !addme ) continue; - let nhit = new("HHitList"); + let nhit = new('HHitList'); nhit.a = d.HitActor; nhit.dir = dir; hits.Push(nhit); @@ -285,7 +285,7 @@ Class Hellblazer : SWWMWeapon { Super.Travelled(); if ( tracer ) return; - tracer = Spawn("HellblazerX",pos); + tracer = Spawn('HellblazerX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -293,7 +293,7 @@ Class Hellblazer : SWWMWeapon override void PostBeginPlay() { Super.PostBeginPlay(); - tracer = Spawn("HellblazerX",pos); + tracer = Spawn('HellblazerX',pos); tracer.angle = angle; tracer.target = self; tracer.FloatBobPhase = FloatBobPhase; @@ -339,9 +339,9 @@ Class Hellblazer : SWWMWeapon Weapon.SelectionOrder 700; Weapon.UpSound "hellblazer/select"; Stamina 90000; - Weapon.AmmoType1 "HellblazerMissiles"; + Weapon.AmmoType1 'HellblazerMissiles'; Weapon.AmmoGive1 3; - SWWMWeapon.DropAmmoType "SWWMRocketAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMRocketAmmoSmall'; +SWWMWEAPON.NOFIRSTGIVE; +WEAPON.EXPLOSIVE; } @@ -355,7 +355,7 @@ Class Hellblazer : SWWMWeapon { A_CheckSpinSkip(); A_FullRaise(); - A_GlassOverlay("Select_G"); + A_GlassOverlay('Select_G'); } XZW2 JKLMNOP 2; Goto Ready; @@ -366,7 +366,7 @@ Class Hellblazer : SWWMWeapon XZW2 A 2 { A_StartSound("hellblazer/deselect",CHAN_WEAPON,CHANF_OVERLAP); - A_GlassOverlay("Deselect_G"); + A_GlassOverlay('Deselect_G'); } XZW2 BCDEFGH 2; XZW2 I -1 A_FullLower(); @@ -375,7 +375,7 @@ Class Hellblazer : SWWMWeapon XZW7 ABCDEFGHI 2; Stop; Ready: - XZW2 A 0 A_GlassOverlay("Ready_G"); + XZW2 A 0 A_GlassOverlay('Ready_G'); XZW2 A 1 A_HellblazerReady(); Wait; Ready_G: @@ -390,7 +390,7 @@ Class Hellblazer : SWWMWeapon #### # 1 { if ( invoker.clipcount <= 0 ) - return A_JumpX("Unload","Unload_G"); + return A_JumpX('Unload','Unload_G'); if ( player.cmd.buttons&BT_ATTACK ) { A_CanBob(); @@ -398,16 +398,16 @@ Class Hellblazer : SWWMWeapon if ( (player.cmd.buttons&BT_ALTATTACK) || ((invoker.clipcount < 2) && (invoker.preloadcnt >= 10)) ) { invoker.preloadcnt = 0; - return A_JumpX("PreFire","Ready_G"); + return A_JumpX('PreFire','Ready_G'); } if ( invoker.preloadcnt >= 10 ) { invoker.preloadcnt = 0; - return A_JumpX("PreLoad","Ready_G"); + return A_JumpX('PreLoad','Ready_G'); } return ResolveState(null); } - return A_JumpX("DoFire","DoFire_G"); + return A_JumpX('DoFire','DoFire_G'); } Wait; DoFire: @@ -420,7 +420,7 @@ Class Hellblazer : SWWMWeapon { invoker.preload--; invoker.spinskipped--; - return A_JumpX("DoFire","DoFire_G"); + return A_JumpX('DoFire','DoFire_G'); } return ResolveState(null); } @@ -438,7 +438,7 @@ Class Hellblazer : SWWMWeapon #### # 1 { if ( invoker.clipcount <= 0 ) - return A_JumpX("Unload","Unload_G"); + return A_JumpX('Unload','Unload_G'); if ( player.cmd.buttons&BT_ALTATTACK ) { A_CanBob(); @@ -446,16 +446,16 @@ Class Hellblazer : SWWMWeapon if ( (player.cmd.buttons&BT_ATTACK) || ((invoker.clipcount < 2) && (invoker.preloadcnt >= 10)) ) { invoker.preloadcnt = 0; - return A_JumpX("PreAltFire","Ready_G"); + return A_JumpX('PreAltFire','Ready_G'); } if ( invoker.preloadcnt >= 10 ) { invoker.preloadcnt = 0; - return A_JumpX("PreAltLoad","Ready_G"); + return A_JumpX('PreAltLoad','Ready_G'); } return ResolveState(null); } - return A_JumpX("DoAltFire","DoAltFire_G"); + return A_JumpX('DoAltFire','DoAltFire_G'); } Wait; DoAltFire: @@ -469,7 +469,7 @@ Class Hellblazer : SWWMWeapon { invoker.preload--; invoker.spinskipped--; - return A_JumpX("DoAltFire","DoAltFire_G"); + return A_JumpX('DoAltFire','DoAltFire_G'); } return ResolveState(null); } @@ -489,7 +489,7 @@ Class Hellblazer : SWWMWeapon { invoker.magpos = (invoker.magpos+1)%6; invoker.preload++; - A_GlassOverlay("Cycle_G"); + A_GlassOverlay('Cycle_G'); A_CanBob(); } XZW3 E 2 A_CanBob(); @@ -500,10 +500,10 @@ Class Hellblazer : SWWMWeapon { A_CanBob(); if ( !(player.cmd.buttons&BT_ATTACK) ) - return A_JumpX("DoFire","DoFire_G"); + return A_JumpX('DoFire','DoFire_G'); if ( (player.cmd.buttons&BT_ALTATTACK) || (invoker.preload >= min(invoker.clipcount-1,2)) ) - return A_JumpX("PreFire","Ready_G"); - return A_JumpX("PreLoad","Ready_G"); + return A_JumpX('PreFire','Ready_G'); + return A_JumpX('PreLoad','Ready_G'); } Wait; PreAltLoad: @@ -516,7 +516,7 @@ Class Hellblazer : SWWMWeapon { invoker.magpos = (invoker.magpos+1)%6; invoker.preload++; - A_GlassOverlay("Cycle_G"); + A_GlassOverlay('Cycle_G'); A_CanBob(); } XZW3 E 2 A_CanBob(); @@ -527,10 +527,10 @@ Class Hellblazer : SWWMWeapon { A_CanBob(); if ( !(player.cmd.buttons&BT_ALTATTACK) ) - return A_JumpX("DoAltFire","DoAltFire_G"); + return A_JumpX('DoAltFire','DoAltFire_G'); if ( (player.cmd.buttons&BT_ATTACK) || (invoker.preload >= min(invoker.clipcount-1,2)) ) - return A_JumpX("PreAltFire","Ready_G"); - return A_JumpX("PreAltLoad","Ready_G"); + return A_JumpX('PreAltFire','Ready_G'); + return A_JumpX('PreAltLoad','Ready_G'); } Wait; PreFire: @@ -542,7 +542,7 @@ Class Hellblazer : SWWMWeapon XZW2 A 1 { if ( !(player.cmd.buttons&BT_ATTACK) ) - return A_JumpX("DoFire","DoFire_G"); + return A_JumpX('DoFire','DoFire_G'); A_CanBob(); if ( (player.cmd.buttons&BT_ZOOM) && !(player.oldbuttons&BT_ZOOM) ) A_CheckLockOn(); @@ -564,7 +564,7 @@ Class Hellblazer : SWWMWeapon XZW2 A 1 { if ( !(player.cmd.buttons&BT_ALTATTACK) ) - return A_JumpX("DoAltFire","DoAltFire_G"); + return A_JumpX('DoAltFire','DoAltFire_G'); A_CanBob(); if ( (player.cmd.buttons&BT_ZOOM) && !(player.oldbuttons&BT_ZOOM) ) A_CheckLockOn(); @@ -583,7 +583,7 @@ Class Hellblazer : SWWMWeapon A_CanBob(); invoker.spinskipped--; invoker.magpos = (invoker.magpos+1)%6; - A_GlassOverlay("Cycle_G"); + A_GlassOverlay('Cycle_G'); } XZW3 E 2 A_CanBob(); XZW3 FGHI 2 A_CanBob(); @@ -603,8 +603,8 @@ Class Hellblazer : SWWMWeapon XZW2 A 2 { if ( invoker.clipcount >= invoker.LoadedCapacity() ) - return A_JumpX("Zoom","Zoom_G"); - return A_JumpX("Unload","Unload_G"); + return A_JumpX('Zoom','Zoom_G'); + return A_JumpX('Unload','Unload_G'); } Goto Ready; Unload: @@ -654,7 +654,7 @@ Class Hellblazer : SWWMWeapon XZWA EFGHIJ 2; Goto Ready_G; Zoom: - XZW2 A 2 A_GlassOverlay("Zoom_G"); + XZW2 A 2 A_GlassOverlay('Zoom_G'); XZW5 KLMNOPQRSTUVWXYZ 2; XZW6 A 2; Goto Ready; @@ -671,7 +671,7 @@ Class Hellblazer : SWWMWeapon XZWB A 2; Goto Ready_G; User1: - XZW2 A 2 A_GlassOverlay("User1_G"); + XZW2 A 2 A_GlassOverlay('User1_G'); XZW6 BCDE 2; XZW6 FGH 1; XZW6 IJK 2; diff --git a/zscript/weapons/swwm_blazeit_fx.zsc b/zscript/weapons/swwm_blazeit_fx.zsc index 68e7b8199..1a02dad50 100644 --- a/zscript/weapons/swwm_blazeit_fx.zsc +++ b/zscript/weapons/swwm_blazeit_fx.zsc @@ -13,7 +13,7 @@ Class HellblazerSubExpl : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 2.2; Alpha .75; +FORCEXYBILLBOARD; @@ -39,7 +39,7 @@ Class HellblazerRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 2.; +FORCEXYBILLBOARD; } @@ -55,7 +55,7 @@ Class HellblazerArmTrail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 2.5; } @@ -102,10 +102,10 @@ Class HellblazerArm : Actor Spawn: TNT1 A 1 { - Spawn("HellblazerArmTrail",pos); + Spawn('HellblazerArmTrail',pos); SWWMUtility.DoExplosion(self,6+reactiontime/2,3000+500*reactiontime,80+10*reactiontime); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5); - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.vel = pvel+vel*.2; s.scolor = Color(4,2,1)*Random[ExploS](48,63); s.framestep = Random[ExploS](1,3); @@ -121,7 +121,7 @@ Class HellblazerTrail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale .2; Alpha .3; +FORCEXYBILLBOARD; @@ -129,7 +129,7 @@ Class HellblazerTrail : SWWMNonInteractiveActor override void PostBeginPlay() { Super.PostBeginPlay(); - SetState(FindState("Spawn")+Random[ExploS](0,7)); + SetState(FindState('Spawn')+Random[ExploS](0,7)); } States { @@ -140,7 +140,7 @@ Class HellblazerTrail : SWWMNonInteractiveActor A_SetScale(scale.x*.95); if ( waterlevel > 0 ) { - let b = Spawn("SWWMBubble",pos); + let b = Spawn('SWWMBubble',pos); b.vel = vel; b.scale *= scale.x; Destroy(); @@ -154,7 +154,7 @@ Class HellblazerFlare : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; } @@ -207,7 +207,7 @@ Class HellblazerMissile : Actor if ( bNOGRAVITY ) { A_StartSound("hellblazer/fly",CHAN_BODY,CHANF_LOOP,1.,2.); - let t = Spawn("HellblazerFlare",pos); + let t = Spawn('HellblazerFlare',pos); t.master = self; } } @@ -217,7 +217,7 @@ Class HellblazerMissile : Actor Vector3 traildir = -SWWMUtility.Vec3FromAngles(angle,pitch); for ( int i=0; i<3; i++ ) { - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",level.Vec3Offset(pos,traildir*3)); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',level.Vec3Offset(pos,traildir*3)); s.scolor = smokecol*Random[Hellblazer](48,63); s.scale *= FRandom[Hellblazer](.8,1.2); s.framestep = Random[Hellblazer](1,3); @@ -228,7 +228,7 @@ Class HellblazerMissile : Actor { for ( double i=0.; i 0) || !InStateSequence(CurState,FindState("Spawn")) ) return; + if ( isFrozen() || (freezetics > 0) || !InStateSequence(CurState,FindState('Spawn')) ) return; roll += rollvel; angle += anglevel; pitch += pitchvel; diff --git a/zscript/weapons/swwm_cbt.zsc b/zscript/weapons/swwm_cbt.zsc index 295705d0c..eaac11234 100644 --- a/zscript/weapons/swwm_cbt.zsc +++ b/zscript/weapons/swwm_cbt.zsc @@ -66,7 +66,7 @@ Class Wallbuster : SWWMWeapon A_OverlayFlags(PSP_FLASH-index,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayRenderStyle(PSP_FLASH-index,STYLE_Add); } - action void ProcessTraceHit( SpreadgunTracer t, Vector3 origin, Vector3 dir, int dmg, double mm, Class impact = "SpreadImpact", int bc = 1, bool bust = false ) + action void ProcessTraceHit( SpreadgunTracer t, Vector3 origin, Vector3 dir, int dmg, double mm, Class impact = 'SpreadImpact', int bc = 1, bool bust = false ) { // Wall busting if ( bust || swwm_omnibust ) @@ -81,7 +81,7 @@ Class Wallbuster : SWWMWeapon } foreach ( w:t.WaterHitList ) { - let b = Spawn("SmolInvisibleSplasher",w.hitpos); + let b = Spawn('SmolInvisibleSplasher',w.hitpos); b.target = self; b.A_CheckTerrain(); } @@ -89,7 +89,7 @@ Class Wallbuster : SWWMWeapon { if ( Random[Boolet](0,bc) ) continue; if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance - let b = SWWMAnimSprite.SpawnAt("SWWMHalfBubble",level.Vec3Offset(origin,dir*i)); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i)); b.Scale *= FRandom[Boolet](.1,.3); } foreach( hit:t.HitList ) @@ -147,7 +147,7 @@ Class Wallbuster : SWWMWeapon } if ( !isloaded && (GetShellsToLoad() > 0) ) { - player.SetPSprite(PSP_WEAPON,ResolveState("Reload")); + player.SetPSprite(PSP_WEAPON,ResolveState('Reload')); return; } // speen @@ -175,7 +175,7 @@ Class Wallbuster : SWWMWeapon if ( howmany <= 0 ) { A_StartSound("wallbuster/dryfire",CHAN_WEAPON,CHANF_OVERLAP); - player.SetPsprite(PSP_WEAPON,ResolveState("DryFire")); + player.SetPsprite(PSP_WEAPON,ResolveState('DryFire')); return; } Vector3 origin, dir; @@ -201,23 +201,23 @@ Class Wallbuster : SWWMWeapon if ( !invoker.loaded[idx] || invoker.fired[idx] ) continue; A_StartSound("spreadgun/redfire",CHAN_WEAPON,CHANF_OVERLAP,1./(howmany**.65),.6-howmany*.004,1.-howmany*.015); flashstr = max(120,flashstr+10); - A_CBTFlash("FlashRed",i); + A_CBTFlash('FlashRed',i); if ( alertness > 800 ) alertness += 200; else alertness += 800; } if ( howmany < 3 ) { - player.SetPsprite(PSP_WEAPON,ResolveState("FireOne")); + player.SetPsprite(PSP_WEAPON,ResolveState('FireOne')); SWWMHandler.DoFlash(self,Color(40,255,192,64),5); } else if ( howmany < 15 ) { - player.SetPsprite(PSP_WEAPON,ResolveState("FireFive")); + player.SetPsprite(PSP_WEAPON,ResolveState('FireFive')); SWWMHandler.DoFlash(self,Color(60,255,192,64),6); } else { - player.SetPsprite(PSP_WEAPON,ResolveState("FireTwentyFive")); + player.SetPsprite(PSP_WEAPON,ResolveState('FireTwentyFive')); SWWMHandler.DoFlash(self,Color(80,255,192,64),7); } double qk = min(9.,1.+howmany/4.); @@ -229,7 +229,7 @@ Class Wallbuster : SWWMWeapon A_PlayerFire(); if ( flashstr > 0 ) { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.args[3] = flashstr; l.target = self; } @@ -258,7 +258,7 @@ Class Wallbuster : SWWMWeapon Vector2 n = RotateVector(b,t2); origin = level.Vec3Offset(base,n.x*y+n.y*z); // the shooting - if ( !st ) st = new("SpreadgunTracer"); + if ( !st ) st = new('SpreadgunTracer'); // attempt to uniformize expected damage while reducing traces (mainly for performance) int expecteddmg = 200; int numshot = max(21-howmany,5); @@ -276,7 +276,7 @@ Class Wallbuster : SWWMWeapon } for ( int i=0; i<(16-howmany/2); i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.special1 = 1; s.scale *= .9; s.alpha *= .3; @@ -285,7 +285,7 @@ Class Wallbuster : SWWMWeapon } for ( int i=0; i<(20-howmany/2); i++ ) { - let s = Spawn("SWWMSpark",origin); + let s = Spawn('SWWMSpark',origin); s.scale *= .3; s.alpha *= .4; s.vel += vel*.5+x*FRandom[Wallbuster](4.,8.)+y*FRandom[Wallbuster](-2,2)+z*FRandom[Wallbuster](-2,2); @@ -362,7 +362,7 @@ Class Wallbuster : SWWMWeapon { let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,-3,-13); - let c = Spawn("RedShellCasing",origin); + let c = Spawn('RedShellCasing',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.2,.2)+y*FRandom[Junk](-.2,.2)-(0,0,FRandom[Junk](2,3)); @@ -471,9 +471,9 @@ Class Wallbuster : SWWMWeapon Weapon.SlotNumber 4; Weapon.SelectionOrder 400; Weapon.UpSound "wallbuster/select"; - Weapon.AmmoType1 "RedShell"; + Weapon.AmmoType1 'RedShell'; Weapon.AmmoGive1 5; - SWWMWeapon.DropAmmoType "SWWMShellAmmoBig"; + SWWMWeapon.DropAmmoType 'SWWMShellAmmoBig'; Stamina 35000; +SWWMWEAPON.NOFIRSTGIVE; } @@ -512,9 +512,9 @@ Class Wallbuster : SWWMWeapon XZW2 AQRSTUVWX 1; XZW2 A 0 { - if ( invoker.whichspin == 2 ) return ResolveState("BigSpin"); - if ( invoker.whichspin == 1 ) return ResolveState("OneSpin"); - return ResolveState("Ready"); + if ( invoker.whichspin == 2 ) return ResolveState('BigSpin'); + if ( invoker.whichspin == 1 ) return ResolveState('OneSpin'); + return ResolveState('Ready'); } Goto Ready; FireFive: @@ -522,9 +522,9 @@ Class Wallbuster : SWWMWeapon XZW3 CDEFGHIJK 2; XZW2 A 0 { - if ( invoker.whichspin == 2 ) return ResolveState("BigSpin"); - if ( invoker.whichspin == 1 ) return ResolveState("OneSpin"); - return ResolveState("Ready"); + if ( invoker.whichspin == 2 ) return ResolveState('BigSpin'); + if ( invoker.whichspin == 1 ) return ResolveState('OneSpin'); + return ResolveState('Ready'); } Goto Ready; FireTwentyFive: @@ -533,9 +533,9 @@ Class Wallbuster : SWWMWeapon XZW4 ABC 2; XZW2 A 0 { - if ( invoker.whichspin == 2 ) return ResolveState("BigSpin"); - if ( invoker.whichspin == 1 ) return ResolveState("OneSpin"); - return ResolveState("Ready"); + if ( invoker.whichspin == 2 ) return ResolveState('BigSpin'); + if ( invoker.whichspin == 1 ) return ResolveState('OneSpin'); + return ResolveState('Ready'); } Goto Ready; DryFire: @@ -543,9 +543,9 @@ Class Wallbuster : SWWMWeapon XZW2 XA 4; XZW2 A 0 { - if ( invoker.whichspin == 2 ) return ResolveState("BigSpin"); - if ( invoker.whichspin == 1 ) return ResolveState("OneSpin"); - return ResolveState("Ready"); + if ( invoker.whichspin == 2 ) return ResolveState('BigSpin'); + if ( invoker.whichspin == 1 ) return ResolveState('OneSpin'); + return ResolveState('Ready'); } Goto Ready; OneSpin: @@ -553,7 +553,7 @@ Class Wallbuster : SWWMWeapon XZW2 YZ 2; XZW3 A 2; XZW3 B 0; - XZW2 A 0 A_JumpIf(invoker.rotation[invoker.rotation[5]]==0,"BigSpin"); + XZW2 A 0 A_JumpIf(invoker.rotation[invoker.rotation[5]]==0,'BigSpin'); Goto Ready; BigSpin: XZW2 A 1 A_SpinBig(); @@ -614,7 +614,7 @@ Class Wallbuster : SWWMWeapon if ( !invoker.loaded[idx] || invoker.fired[idx] ) continue; nsetp++; } - return A_JumpIf((nset>=5)&&(nsetp<5),"DetachSpin"); + return A_JumpIf((nset>=5)&&(nsetp<5),'DetachSpin'); } XZW4 WXYZ 1; XZW5 ABCDEF 1; @@ -652,7 +652,7 @@ Class Wallbuster : SWWMWeapon { int rnum = (player.cmd.buttons&BT_RELOAD)?GetShellsToLoad():0; player.SetPSprite(-9999,null); - return A_JumpIf(rnum,"AttachSpin"); + return A_JumpIf(rnum,'AttachSpin'); } Goto Attach; Attach: diff --git a/zscript/weapons/swwm_cbt_fx.zsc b/zscript/weapons/swwm_cbt_fx.zsc index bde504452..2349479ef 100644 --- a/zscript/weapons/swwm_cbt_fx.zsc +++ b/zscript/weapons/swwm_cbt_fx.zsc @@ -92,7 +92,7 @@ Class BusterWall : Thinker if ( (initial || !(busttics%2)) && !Random[Wallbuster](0,1) ) { Vector3 pvel = (bustdir+SWWMUtility.Vec3FromAngles(FRandom[Wallbuster](0,360),FRandom[Wallbuster](-90,90))).unit()*FRandom[Wallbuster](-2.,8.); - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",spot); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',spot); s.vel = pvel; s.scale *= 2.5; s.framestep = Random[Wallbuster](4,9); @@ -103,14 +103,14 @@ Class BusterWall : Thinker for ( int i=0; i 20) && !Random[Eviscerator](0,2) ) { - let l = Spawn("ChunkImpact",pos); + let l = Spawn('ChunkImpact',pos); l.angle = atan2(RealHitNormal.y,RealHitNormal.x); l.pitch = asin(-RealHitNormal.z); A_StartSound("eviscerator/hith",CHAN_WEAPON,CHANF_OVERLAP,.5); @@ -298,7 +299,7 @@ Class EvisceratorChunk : Actor } else { - let l = Spawn("ChunkImpact",pos); + let l = Spawn('ChunkImpact',pos); l.angle = angle+180; l.pitch = -pitch; A_StartSound("eviscerator/hith",CHAN_WEAPON,CHANF_OVERLAP,.1); @@ -362,7 +363,7 @@ Class EvisceratorProjSmoke : SWWMNonInteractiveActor } if ( isFrozen() ) return; lifetime += lifespeed; - let s = Spawn("SWWMSmoke",pos); + let s = Spawn('SWWMSmoke',pos); s.vel = SWWMUtility.Vec3FromAngles(FRandom[Eviscerator](0,360),FRandom[Eviscerator](-90,90))*.5; s.vel.z += 2.; s.alpha = scale.x; @@ -427,8 +428,8 @@ Class EvisceratorProj : Actor A_StartSound("eviscerator/shell",CHAN_WEAPON,attenuation:.8); A_StartSound("eviscerator/shell",CHAN_VOICE,attenuation:.5); A_AlertMonsters(swwm_uncapalert?0:3000,AMF_EMITFROMTARGET); - if ( !Tracer ) Spawn("EvisceratorProjSmoke",pos); - Spawn("EvisceratorProjLight",pos); + if ( !Tracer ) Spawn('EvisceratorProjSmoke',pos); + Spawn('EvisceratorProjLight',pos); double a, s; let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll); EvisceratorChunk p; @@ -447,7 +448,7 @@ Class EvisceratorProj : Actor if ( trail == 8 ) trail = Random[Eviscerator](0,7); for ( int i=0; i<30; i++ ) { - p = EvisceratorChunk(Spawn("EvisceratorChunk",level.Vec3Offset(pos,spawnofs))); + p = EvisceratorChunk(Spawn('EvisceratorChunk',level.Vec3Offset(pos,spawnofs))); p.bHITOWNER = true; a = FRandom[Eviscerator](0,360); s = FRandom[Eviscerator](0,.4); @@ -497,7 +498,7 @@ Class EvisceratorProj : Actor for ( int i=0; i 0 ) { - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.alpha *= heat; } } @@ -568,7 +569,7 @@ Class EvisceratorSubExpl : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 1.8; Alpha .6; +FORCEXYBILLBOARD; @@ -585,7 +586,7 @@ Class EvisceratorRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 2.; +FORCEXYBILLBOARD; } diff --git a/zscript/weapons/swwm_deathlydeathcannon.zsc b/zscript/weapons/swwm_deathlydeathcannon.zsc index 10c67613c..730f4d69e 100644 --- a/zscript/weapons/swwm_deathlydeathcannon.zsc +++ b/zscript/weapons/swwm_deathlydeathcannon.zsc @@ -80,7 +80,7 @@ Class Ynykron : SWWMWeapon A_BumpFOV(.7); A_PlayerFire(); SWWMHandler.DoFlash(self,Color(120,255,255,255),30); - A_Overlay(PSP_WEAPON+1,"FireSmoke"); + A_Overlay(PSP_WEAPON+1,'FireSmoke'); A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_ALPHA|PSPF_FORCESTYLE|PSPF_FORCEALPHA,true); A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add); A_OverlayAlpha(PSP_WEAPON+1,0.); @@ -88,13 +88,13 @@ Class Ynykron : SWWMWeapon invoker.clipcount = 0; Vector3 origin = SWWMUtility.GetFireOffset(self,15,4,-1); Actor s; - if ( invoker.inverted ) s = Spawn("YnykronAltShot",origin); - else s = Spawn("YnykronShot",origin); + if ( invoker.inverted ) s = Spawn('YnykronAltShot',origin); + else s = Spawn('YnykronShot',origin); s.target = self; s.angle = angle; s.pitch = BulletSlope(); invoker.specialf1 = 1.; - A_Overlay(PSP_WEAPON+3,"FireBlast"); + A_Overlay(PSP_WEAPON+3,'FireBlast'); } action void A_Backblast() @@ -104,7 +104,7 @@ Class Ynykron : SWWMWeapon int numpt = Random[Ynykron](10,20); for ( int i=0; i CS_IDLE) || ((invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true))) ) flg |= WRF_ALLOWRELOAD; @@ -256,7 +256,7 @@ Class Ynykron : SWWMWeapon { invoker.ventcooldown--; if ( invoker.ventcooldown <= 0 ) - return ResolveState("ReadyVent"); + return ResolveState('ReadyVent'); } if ( player.cmd.buttons&BT_ATTACK ) invoker.CheckAmmo(EitherFire,true); @@ -267,7 +267,7 @@ Class Ynykron : SWWMWeapon XZW2 A 1 { invoker.ventcooldown = Random[Ynykron](10,15)*5+2*(40-int(invoker.chargelevel)); - A_Overlay(PSP_WEAPON+1,"ReadyVentSmoke"); + A_Overlay(PSP_WEAPON+1,'ReadyVentSmoke'); A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_ALPHA|PSPF_FORCESTYLE|PSPF_FORCEALPHA,true); A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add); A_OverlayAlpha(PSP_WEAPON+1,0.); @@ -307,9 +307,9 @@ Class Ynykron : SWWMWeapon XZW2 A 1 { if ( (invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true)) ) - return ResolveState("Reload"); + return ResolveState('Reload'); if ( invoker.chargestate == CS_IDLE ) - return ResolveState("Charge"); + return ResolveState('Charge'); A_YnykronFire(); A_StartSound("ynykron/ventopen",CHAN_WEAPON,CHANF_OVERLAP); return ResolveState(null); @@ -335,10 +335,10 @@ Class Ynykron : SWWMWeapon if ( (invoker.clipcount <= 0) && ((invoker.Ammo1.Amount > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true)) ) { invoker.invertreload = true; - return ResolveState("Reload"); + return ResolveState('Reload'); } A_StartSound("ynykron/meleestart",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.inverted,"TakeInverted"); + return A_JumpIf(invoker.inverted,'TakeInverted'); } TakeNormal: XZW2 A 2; @@ -437,7 +437,7 @@ Class Ynykron : SWWMWeapon XZW7 Q 2 { invoker.chargestate = CS_DISCHARGING; - A_Overlay(PSP_WEAPON+1,"DischargeSmoke"); + A_Overlay(PSP_WEAPON+1,'DischargeSmoke'); A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_ALPHA|PSPF_FORCESTYLE|PSPF_FORCEALPHA,true); A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add); A_OverlayAlpha(PSP_WEAPON+1,0.); @@ -511,8 +511,8 @@ Class Ynykron : SWWMWeapon Reload: XZW2 A 2 { - if ( invoker.chargestate>CS_IDLE ) return ResolveState("Discharge"); - if ( invoker.inverted ) return ResolveState("UnloadInverted"); + if ( invoker.chargestate>CS_IDLE ) return ResolveState('Discharge'); + if ( invoker.inverted ) return ResolveState('UnloadInverted'); A_StartSound("ynykron/meleestart",CHAN_WEAPON,CHANF_OVERLAP); return ResolveState(null); } @@ -541,7 +541,7 @@ Class Ynykron : SWWMWeapon { invoker.invertreload = false; invoker.inverted = true; - return ResolveState("PutInverted"); + return ResolveState('PutInverted'); } return ResolveState(null); } @@ -564,7 +564,7 @@ Class Ynykron : SWWMWeapon { invoker.invertreload = false; invoker.inverted = true; - return ResolveState("PutInverted"); + return ResolveState('PutInverted'); } return ResolveState(null); } @@ -621,7 +621,7 @@ Class Ynykron : SWWMWeapon Flash: XZWZ A 2 Bright { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.args[0] = 255; l.args[1] = 255; l.args[2] = 255; diff --git a/zscript/weapons/swwm_deathlydeathcannon_altfx.zsc b/zscript/weapons/swwm_deathlydeathcannon_altfx.zsc index 33f5315b5..c54780911 100644 --- a/zscript/weapons/swwm_deathlydeathcannon_altfx.zsc +++ b/zscript/weapons/swwm_deathlydeathcannon_altfx.zsc @@ -10,13 +10,13 @@ Class YnykronAltTracer : LineTracer // liquid splashes if ( Results.CrossedWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.CrossedWaterPos; WaterHitList.Push(hl); } else if ( Results.Crossed3DWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.Crossed3DWaterPos; WaterHitList.Push(hl); } @@ -40,7 +40,7 @@ Class YnykronHaloTail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 1.5; } @@ -67,7 +67,7 @@ Class YnykronHalo : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 1.5; } @@ -79,14 +79,14 @@ Class YnykronHalo : SWWMNonInteractiveActor return; } if ( isFrozen() ) return; - if ( !target || target.InStateSequence(target.CurState,target.FindState("Death")) ) + if ( !target || target.InStateSequence(target.CurState,target.FindState('Death')) ) { Destroy(); return; } SetOrigin(target.pos,true); A_SetScale(1.5*target.scale.x); - let h = Spawn("YnykronHaloTail",pos); + let h = Spawn('YnykronHaloTail',pos); h.scale = scale; } States @@ -103,7 +103,7 @@ Class GatherDust : SWWMNonInteractiveActor override void PostBeginPlay() { - SetState(FindState("Spawn")+Random[ExploS](0,19)); + SetState(FindState('Spawn')+Random[ExploS](0,19)); Scale *= FRandom[ExploS](.75,1.5); Scale.x *= RandomPick[ExploS](-1,1); Scale.y *= RandomPick[ExploS](-1,1); @@ -112,7 +112,7 @@ Class GatherDust : SWWMNonInteractiveActor void A_Gravitate() { - if ( target && !target.InStateSequence(target.CurState,target.FindState("Death")) ) + if ( target && !target.InStateSequence(target.CurState,target.FindState('Death')) ) { if ( alpha < .08 ) A_FadeIn(FRandom[ExploS](.0002,.004)); Vector3 dirto = level.Vec3Diff(pos,target.pos); @@ -136,7 +136,7 @@ Class GatherDust : SWWMNonInteractiveActor Default { - RenderStyle "Shaded"; + RenderStyle 'Shaded'; Alpha 0.; Scale 3.; +FORCEXYBILLBOARD; @@ -153,7 +153,7 @@ Class YnykronVoidBeamTail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; } override void Tick() @@ -188,7 +188,7 @@ Class YnykronVoidBeam : SWWMNonInteractiveActor { DamageType 'YnykronAlt'; Obituary "$O_YNYKRONALT"; - RenderStyle "Add"; + RenderStyle 'Add'; Alpha 0.; Stamina 3; +INTERPOLATEANGLES; @@ -251,7 +251,7 @@ Class YnykronVoidBeam : SWWMNonInteractiveActor return; } Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch); - if ( !t ) t = new("YnykronTracer"); + if ( !t ) t = new('YnykronTracer'); t.ShootThroughList.Clear(); t.WaterHitList.Clear(); t.HitList.Clear(); @@ -284,7 +284,7 @@ Class YnykronVoidBeam : SWWMNonInteractiveActor // spawn (or relocate) next beam if ( !nextbeam ) { - nextbeam = Spawn("YnykronVoidBeam",level.Vec3Offset(pos,x*16*scale.x)); + nextbeam = Spawn('YnykronVoidBeam',level.Vec3Offset(pos,x*16*scale.x)); nextbeam.angle = atan2(t.Results.HitVector.y,t.Results.HitVector.x); nextbeam.pitch = asin(-t.Results.HitVector.z); } @@ -305,7 +305,7 @@ Class YnykronVoidBeam : SWWMNonInteractiveActor nextbeam.angle += da*.2; nextbeam.pitch += dp*.2; } - let h = Spawn("YnykronVoidBeamTail",pos); + let h = Spawn('YnykronVoidBeamTail',pos); h.angle = angle; h.pitch = pitch; h.alpha = alpha*2.; @@ -341,7 +341,7 @@ Class YnykronLightningImpact : SWWMNonInteractiveActor for ( int i=0; i 0.) && (alpha > .1) ) { dir /= len; - let t = Spawn("YnykronVoidSparkleTrail",newpos); + let t = Spawn('YnykronVoidSparkleTrail',newpos); t.alpha = alpha*.5; t.scale.x *= scale.x; t.speed = len; @@ -814,9 +814,9 @@ Class YnykronSingularityExplosionArm : Actor A_CountDown(); if ( !(reactiontime%2) ) { - Spawn("YnykronSingularityExplosionTrail",pos); + Spawn('YnykronSingularityExplosionTrail',pos); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5); - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.scolor = Color(1,1,1)*Random[ExploS](128,160)+Color(28,0,31); s.alpha *= .1+.4*(ReactionTime/15.); s.SetRenderStyle(STYLE_AddShaded); @@ -833,7 +833,7 @@ Class YnykronSingularityExplosionTrail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 3.; Alpha .2; @@ -859,7 +859,7 @@ Class YnykronSingularityExplosion : SWWMNonInteractiveActor { Obituary "$O_YNYKRONALT"; DamageType 'YnykronAlt'; - RenderStyle "Add"; + RenderStyle 'Add'; Scale 5.; +NODAMAGETHRUST; +FORCERADIUSDMG; @@ -880,7 +880,7 @@ Class YnykronSingularityExplosion : SWWMNonInteractiveActor for ( int i=0; i -1) ) continue; - clouds[i] = Spawn("YnykronCloud",pos); + clouds[i] = Spawn('YnykronCloud',pos); clouds[i].target = target; clouds[i].master = self; } @@ -1050,8 +1050,8 @@ Class YnykronSingularity : SWWMNonInteractiveActor } if ( (contacts.Size() > 12) && !Random[Ynykron](0,5) ) { - Spawn("YnykronLightningLight",clouds[which].pos); - Spawn("YnykronLightningLight2",clouds[which].pos); + Spawn('YnykronLightningLight',clouds[which].pos); + Spawn('YnykronLightningLight2',clouds[which].pos); A_StartSound("ynykron/vortexflash",CHAN_WEAPON,CHANF_OVERLAP,1.,0.,FRandom[Ynykron](.9,1.1)); YnykronCloud(clouds[which]).frightening = 1.; YnykronCloud(clouds[which]).FlashPlayer(200,3000); @@ -1065,7 +1065,7 @@ Class YnykronSingularity : SWWMNonInteractiveActor dirto /= dirto.length(); for ( int i=0; i candidates; candidates.Clear(); // gather first - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); foreach ( s:level.Sectors ) { // don't check sectors that aren't within bounds, saves some time @@ -1135,16 +1135,16 @@ Class YnykronSingularity : SWWMNonInteractiveActor // voodoo dolls just get erased (how convenient) // otherwise instantly vaporize the poor sap if ( a.player && (a.player.mo != a) ) a.Destroy(); - else if ( a.CountInv("GrilledCheeseSandwich") > 0 ) + else if ( a.CountInv('GrilledCheeseSandwich') > 0 ) { // force use the sandwich, warp to safe spot - let gc = GrilledCheeseSandwich(a.FindInventory("GrilledCheeseSandwich")); + let gc = GrilledCheeseSandwich(a.FindInventory('GrilledCheeseSandwich')); gc.SafeTeleport(true); a.A_StartSound(gc.UseSound,CHAN_ITEMEXTRA); gc.DoTheThing(true); gc.Amount--; } - else if ( !a.FindInventory("GrilledCheeseSafeguard") ) + else if ( !a.FindInventory('GrilledCheeseSafeguard') ) a.DamageMobj(self,target,int.max,'Ynykron',DMG_FORCED|DMG_THRUSTLESS); if ( a && (a.Health <= 0) ) { @@ -1157,8 +1157,8 @@ Class YnykronSingularity : SWWMNonInteractiveActor } else PlayerGone.FeckOff(a); } - if ( a.FindState("YnykronAltDeath",true) ) - a.SetStateLabel("YnykronAltDeath"); // dedicated state + if ( a.FindState('YnykronAltDeath',true) ) + a.SetStateLabel('YnykronAltDeath'); // dedicated state else { // poof away manually @@ -1166,7 +1166,7 @@ Class YnykronSingularity : SWWMNonInteractiveActor a.A_ChangeLinkFlags(false); // remove from blockmap, should guarantee archviles not raising this IDontFeelSoGood.DeletThis(a,true); // ensures corpse is deleted too } - if ( target && a.FindInventory("EndgameBossMarker") ) + if ( target && a.FindInventory('EndgameBossMarker') ) SWWMUtility.MarkAchievement("ligma",target.player); } if ( !a || (a.Health <= 0) ) @@ -1230,7 +1230,7 @@ Class YnykronSingularity : SWWMNonInteractiveActor else A_SetScale(scale.x+diffscale*.3); // detonate if we reach critical mass if ( specialf2 >= critmass ) - SetStateLabel("Death"); + SetStateLabel('Death'); } void FlashPlayer( int str, double rad ) @@ -1258,12 +1258,12 @@ Class YnykronSingularity : SWWMNonInteractiveActor if ( !beamers[i] ) continue; YnykronVoidBeam(beamers[i]).maxlife = 0; } - Spawn("YnykronSingularityRing",pos); - Spawn("YnykronVoidExplLight",pos); + Spawn('YnykronSingularityRing',pos); + Spawn('YnykronVoidExplLight',pos); int numpt = Random[ExploS](60,80); for ( int i=0; i 0) ) return; - let ti = ThinkerIterator.Create("IDontFeelSoGood",STAT_USER); + let ti = ThinkerIterator.Create('IDontFeelSoGood',STAT_USER); IDontFeelSoGood i; while ( i = IDontFeelSoGood(ti.Next()) ) if ( i.goner == whomst ) return; - i = new("IDontFeelSoGood"); + i = new('IDontFeelSoGood'); i.ChangeStatNum(STAT_USER); i.goner = whomst; i.silence = silence; @@ -158,7 +158,7 @@ Class IDontFeelSoGood : Thinker if ( cnt < 15 ) return; if ( goner is 'Sorcerer1' ) { - let h = Actor.Spawn("DSparilHax",goner.pos); + let h = Actor.Spawn('DSparilHax',goner.pos); h.CopyFriendliness(goner,true); } else if ( goner is 'Korax' ) @@ -243,9 +243,9 @@ Class YnykronImpactArm : Actor A_CountDown(); if ( !(reactiontime%2) ) { - Spawn("YnykronImpactTrail",pos); + Spawn('YnykronImpactTrail',pos); Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5); - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.vel = pvel+vel*.2; s.framestep = Random[ExploS](2,4); s.scale *= 2.4; @@ -260,7 +260,7 @@ Class YnykronImpactTrail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 2.; Alpha .2; @@ -298,7 +298,7 @@ Class YnykronDelayedImpact : SWWMNonInteractiveActor if ( tracer ) SetOrigin(level.Vec3Offset(tracer.pos,ofs),false); return; } - let b = Spawn("YnykronImpact",pos); + let b = Spawn('YnykronImpact',pos); b.tracer = tracer; b.target = target; b.master = master; @@ -319,7 +319,7 @@ Class YnykronImpact : SWWMNonInteractiveActor { Obituary "$O_YNYKRON"; DamageType 'Ynykron'; - RenderStyle "Add"; + RenderStyle 'Add'; Scale 5.; +FORCEXYBILLBOARD; +NODAMAGETHRUST; @@ -385,20 +385,20 @@ Class YnykronImpact : SWWMNonInteractiveActor { if ( tracer.pos.z < (tracer.floorz+64) ) { - let r = Spawn("AshenRemains",tracer.pos); + let r = Spawn('AshenRemains',tracer.pos); r.scale *= tracer.radius/16.; } tracer.Destroy(); } - else if ( tracer.CountInv("GrilledCheeseSandwich") > 0 ) + else if ( tracer.CountInv('GrilledCheeseSandwich') > 0 ) { // force use the sandwich - let gc = GrilledCheeseSandwich(tracer.FindInventory("GrilledCheeseSandwich")); + let gc = GrilledCheeseSandwich(tracer.FindInventory('GrilledCheeseSandwich')); tracer.A_StartSound(gc.UseSound,CHAN_ITEMEXTRA); gc.DoTheThing(true); gc.Amount--; } - else if ( !tracer.FindInventory("GrilledCheeseSafeguard") ) + else if ( !tracer.FindInventory('GrilledCheeseSafeguard') ) tracer.DamageMobj(self,target,int.max,'Ynykron',DMG_FORCED|DMG_THRUSTLESS); if ( tracer && (tracer.Health <= 0) ) { @@ -411,8 +411,8 @@ Class YnykronImpact : SWWMNonInteractiveActor } else PlayerGone.FeckOff(tracer); } - if ( tracer.FindState("YnykronDeath",true) ) - tracer.SetStateLabel("YnykronDeath"); // dedicated state + if ( tracer.FindState('YnykronDeath',true) ) + tracer.SetStateLabel('YnykronDeath'); // dedicated state else { // poof away manually @@ -422,12 +422,12 @@ Class YnykronImpact : SWWMNonInteractiveActor } if ( tracer.pos.z < (tracer.floorz+64) ) { - let r = Spawn("AshenRemains",tracer.pos); + let r = Spawn('AshenRemains',tracer.pos); r.scale *= tracer.radius/16.; } if ( (tracer.bIsMonster || tracer.player) && (!target || tracer.IsHostile(target)) && YnykronShot(master) ) YnykronShot(master).enemykills++; - if ( target && tracer.FindInventory("EndgameBossMarker") ) + if ( target && tracer.FindInventory('EndgameBossMarker') ) SWWMUtility.MarkAchievement("ligma",target.player); } } @@ -448,21 +448,21 @@ Class YnykronImpact : SWWMNonInteractiveActor for ( int i=0; i candidates; @@ -498,10 +498,10 @@ Class YnykronImpact : SWWMNonInteractiveActor if ( t && YnykronShot(master) ) { YnykronShot(master).hitlist.Push(t); - if ( t.bBOSS || t.FindInventory("BossMarker") ) YnykronShot(master).hitboss = true; + if ( t.bBOSS || t.FindInventory('BossMarker') ) YnykronShot(master).hitboss = true; } // spawn blast that will propagate - let b = Spawn("YnykronDelayedImpact",t.pos); + let b = Spawn('YnykronDelayedImpact',t.pos); Vector3 ofs = level.Vec3Diff(t.pos,level.Vec3Offset(pos,dirto*min(rad,dist))); YnykronDelayedImpact(b).ofs = ofs; b.tracer = t; @@ -541,13 +541,13 @@ Class YnykronTracer : LineTracer // liquid splashes if ( Results.CrossedWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.CrossedWaterPos; WaterHitList.Push(hl); } else if ( Results.Crossed3DWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.Crossed3DWaterPos; WaterHitList.Push(hl); } @@ -555,7 +555,7 @@ Class YnykronTracer : LineTracer { if ( Results.HitActor.bSHOOTABLE || (Results.HitActor is 'YnykronSingularityHitbox') ) { - let ent = new("HitListEntry"); + let ent = new('HitListEntry'); ent.hitactor = Results.HitActor; ent.hitlocation = Results.HitPos; ent.x = Results.HitVector; @@ -581,13 +581,13 @@ Class YnykronInWallTracer : YnykronTracer // liquid splashes if ( Results.CrossedWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.CrossedWaterPos; WaterHitList.Push(hl); } else if ( Results.Crossed3DWater ) { - let hl = new("WaterHit"); + let hl = new('WaterHit'); hl.hitpos = Results.Crossed3DWaterPos; WaterHitList.Push(hl); } @@ -595,7 +595,7 @@ Class YnykronInWallTracer : YnykronTracer { if ( Results.HitActor.bSHOOTABLE ) { - let ent = new("HitListEntry"); + let ent = new('HitListEntry'); ent.hitactor = Results.HitActor; ent.hitlocation = Results.HitPos; ent.x = Results.HitVector; @@ -616,7 +616,7 @@ Class YnykronBeam : SWWMNonInteractiveActor void TraceOut() { Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch); - let t = new("YnykronTracer"); + let t = new('YnykronTracer'); t.ShootThroughList.Clear(); t.WaterHitList.Clear(); t.HitList.Clear(); @@ -628,14 +628,14 @@ Class YnykronBeam : SWWMNonInteractiveActor } foreach ( w:t.WaterHitList ) { - let b = Spawn("InvisibleSplasher",w.hitpos); + let b = Spawn('InvisibleSplasher',w.hitpos); b.target = target; b.A_CheckTerrain(); } for ( int i=0; i= 25600 ) { // end of the line, dissipate int numpt = Random[Ynykron](4,8); for ( int i=0; i 0 ) return; if ( YnykronShot(master) ) YnykronShot(master).beamcount--; - let next = Spawn("YnykronBeam",pos); + let next = Spawn('YnykronBeam',pos); next.angle = angle; next.pitch = pitch; next.roll = roll; next.target = target; next.master = master; next.special1 = special1; - next.SetStateLabel("TrailSpawn"); + next.SetStateLabel('TrailSpawn'); // exit blast Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch); - let b = Spawn("YnykronImpact",level.Vec3Offset(pos,x*16)); + let b = Spawn('YnykronImpact',level.Vec3Offset(pos,x*16)); b.target = target; b.master = master; b.angle = atan2(x.y,x.x); @@ -924,7 +924,7 @@ Class DelayedWallBeam : SWWMNonInteractiveActor if ( YnykronShot(master) ) YnykronShot(master).blastcount++; // trace back to get the proper "exit surface" so we can trigger lines if needed - let at = new("AuxiliarySilverBulletTracer"); + let at = new('AuxiliarySilverBulletTracer'); at.Trace(pos,CurSector,-x,2.,0,ignoreallactors:true); if ( at.Results.HitType == TRACE_HitWall ) { @@ -944,7 +944,7 @@ Class YnykronRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale .6; Alpha .05; +FORCEXYBILLBOARD; @@ -964,7 +964,7 @@ Class YnykronImpactRing : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 2.; +FORCEXYBILLBOARD; } @@ -1034,7 +1034,7 @@ Class YnykronShot : SWWMNonInteractiveActor s = i+FRandom[Ynykron](-.02,.04); dir = SWWMUtility.ConeSpread(x,y,z,a,s); } - let b = Spawn("YnykronBeam",pos); + let b = Spawn('YnykronBeam',pos); b.target = target; b.master = self; b.angle = atan2(dir.y,dir.x); @@ -1043,7 +1043,7 @@ Class YnykronShot : SWWMNonInteractiveActor } rings += 2; } - Spawn("YnykronShotLight",level.Vec3Offset(pos,x*30)); + Spawn('YnykronShotLight',level.Vec3Offset(pos,x*30)); } override void Tick() { @@ -1060,7 +1060,7 @@ Class YnykronShot : SWWMNonInteractiveActor Vector3 dir = SWWMUtility.Vec3FromAngles(angle,pitch); for ( int i=0; i<16; i++ ) { - let r = Spawn("YnykronRing",level.Vec3Offset(pos,dir*(special1*16+i))); + let r = Spawn('YnykronRing',level.Vec3Offset(pos,dir*(special1*16+i))); r.scale *= special1/8.; r.angle = angle; r.pitch = pitch; diff --git a/zscript/weapons/swwm_deepdarkimpact.zsc b/zscript/weapons/swwm_deepdarkimpact.zsc index 374172943..47dd3b7b5 100644 --- a/zscript/weapons/swwm_deepdarkimpact.zsc +++ b/zscript/weapons/swwm_deepdarkimpact.zsc @@ -81,7 +81,7 @@ Class DeepImpact : SWWMWeapon if ( invoker.charge >= (invoker.clipcount*.01) ) { A_WeaponOffset(0,32); - player.SetPSprite(PSP_WEAPON,ResolveState("AltRelease")); + player.SetPSprite(PSP_WEAPON,ResolveState('AltRelease')); } } @@ -104,7 +104,7 @@ Class DeepImpact : SWWMWeapon for ( int i=0; i list; list.Clear(); int rings = 1; @@ -157,7 +157,7 @@ Class DeepImpact : SWWMWeapon } if ( inl == -1 ) { - THitList l = new("THitList"); + THitList l = new('THitList'); l.a = t.hitlist[k]; inl = list.Push(l); } @@ -180,7 +180,7 @@ Class DeepImpact : SWWMWeapon if ( t.Results.FFloor ) hitnormal = -t.Results.FFloor.top.Normal; else hitnormal = t.Results.HitSector.floorplane.Normal; wnorm += (hitnormal*.2-dir)/max(50.,t.Results.Distance); - let b = Spawn("InvisibleSplasher",t.Results.HitPos); + let b = Spawn('InvisibleSplasher',t.Results.HitPos); b.target = self; } else if ( t.Results.HitType == TRACE_HitCeiling ) @@ -212,7 +212,7 @@ Class DeepImpact : SWWMWeapon l.a.DamageMobj(p,self,int(dmg/250.),'Push',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF); } let st = Demolitionist(self).mystats; - let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + let hnd = SWWMHandler(EventHandler.Find('SWWMHandler')); foreach ( s:level.Sectors ) { // don't check sectors that aren't within bounds, saves some time @@ -233,9 +233,9 @@ Class DeepImpact : SWWMWeapon m.pitch = asin(-ndir.z); if ( m.bSEEKERMISSILE && (m.target != self) ) m.tracer = m.target; m.target = self; - if ( !m.FindInventory("ParriedBuff") ) + if ( !m.FindInventory('ParriedBuff') ) { - let pb = Inventory(Spawn("ParriedBuff")); + let pb = Inventory(Spawn('ParriedBuff')); pb.AttachToOwner(m); pb.bAMBUSH = true; } @@ -247,7 +247,7 @@ Class DeepImpact : SWWMWeapon for ( int i=0; i=invoker.default.clipcount,"NoReload"); + XZW2 A 0 A_JumpIf(invoker.clipcount>=invoker.default.clipcount,'NoReload'); XZW2 A 2 A_StartSound("deepimpact/reloadbeg",CHAN_WEAPON,CHANF_OVERLAP); XZW3 HIJ 2 A_BumpView(.1,tics:2); ReloadHold: @@ -425,7 +425,7 @@ Class DeepImpact : SWWMWeapon } XZW3 LM 2 A_BumpView(-.2,tics:2); XZW3 NOPQ 3; - XZW3 K 0 A_JumpIf((player.cmd.buttons&(BT_RELOAD|BT_ALTATTACK))&&(invoker.clipcount impact = "SpreadImpact", int bc = 1 ) + action void ProcessTraceHit( SpreadgunTracer t, Vector3 origin, Vector3 dir, int dmg, double mm, Class impact = 'SpreadImpact', int bc = 1 ) { if ( swwm_omnibust ) { @@ -161,7 +161,7 @@ Class Spreadgun : SWWMWeapon } foreach ( w:t.WaterHitList ) { - let b = Spawn("SmolInvisibleSplasher",w.hitpos); + let b = Spawn('SmolInvisibleSplasher',w.hitpos); b.target = self; b.A_CheckTerrain(); } @@ -169,7 +169,7 @@ Class Spreadgun : SWWMWeapon { if ( Random[Boolet](0,bc) ) continue; if ( Random[Boolet](0,i/100) ) continue; // fall off w/ distance - let b = SWWMAnimSprite.SpawnAt("SWWMHalfBubble",level.Vec3Offset(origin,dir*i)); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfBubble',level.Vec3Offset(origin,dir*i)); b.Scale *= FRandom[Boolet](.1,.3); } foreach( hit:t.HitList ) @@ -213,7 +213,7 @@ Class Spreadgun : SWWMWeapon { if ( invoker.goldload ) { - A_SWWMFlash("FlashGold"); + A_SWWMFlash('FlashGold'); A_StartSound("spreadgun/goldfire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6); A_AlertMonsters(swwm_uncapalert?0:2500); A_QuakeEx(6.,6.,6.,12,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:1.2); @@ -223,7 +223,7 @@ Class Spreadgun : SWWMWeapon } else { - A_SWWMFlash("FlashRed"); + A_SWWMFlash('FlashRed'); A_StartSound("spreadgun/redfire",CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6); A_AlertMonsters(swwm_uncapalert?0:800); A_QuakeEx(2.5,2.5,2.5,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.6); @@ -248,19 +248,19 @@ Class Spreadgun : SWWMWeapon if ( d.HitType != TRACE_HitNone ) { Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); - let p = Spawn("SWWMBulletImpact",d.HitLocation+hitnormal); + let p = Spawn('SWWMBulletImpact',d.HitLocation+hitnormal); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); - let b = Spawn("GoldenImpact",d.HitLocation+hitnormal*4.); + let b = Spawn('GoldenImpact',d.HitLocation+hitnormal*4.); b.angle = atan2(hitnormal.y,hitnormal.x); b.pitch = asin(-hitnormal.z); b.target = self; } for ( int i=0; i<6; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .8; s.alpha *= .3; s.SetShade(Color(1,1,1)*Random[Spreadgun](96,192)); @@ -268,14 +268,14 @@ Class Spreadgun : SWWMWeapon } for ( int i=0; i<10; i++ ) { - let s = Spawn("SWWMSpark",origin); + let s = Spawn('SWWMSpark',origin); s.scale *= .2; s.alpha *= .4; s.vel += vel*.5+x*FRandom[Spreadgun](4.,8.)+y*FRandom[Spreadgun](-1,1)+z*FRandom[Spreadgun](-1,1); } for ( int i=0; i<50; i++ ) { - let s = Spawn("FancyConfetti",origin); + let s = Spawn('FancyConfetti',origin); s.bAMBUSH = true; s.vel += vel*.5+x*FRandom[Spreadgun](1.,20.)+y*FRandom[Spreadgun](-2,2)+z*FRandom[Spreadgun](-2,2); } @@ -284,7 +284,7 @@ Class Spreadgun : SWWMWeapon } else { - SpreadgunTracer st = new("SpreadgunTracer"); + SpreadgunTracer st = new('SpreadgunTracer'); for ( int j=0; j<20; j++ ) { a = FRandom[Spreadgun](0,360); @@ -298,7 +298,7 @@ Class Spreadgun : SWWMWeapon } for ( int i=0; i<16; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.special1 = 1; s.scale *= .9; s.alpha *= .3; @@ -307,7 +307,7 @@ Class Spreadgun : SWWMWeapon } for ( int i=0; i<20; i++ ) { - let s = Spawn("SWWMSpark",origin); + let s = Spawn('SWWMSpark',origin); s.scale *= .3; s.alpha *= .4; s.vel += vel*.5+x*FRandom[Spreadgun](4.,8.)+y*FRandom[Spreadgun](-2,2)+z*FRandom[Spreadgun](-2,2); @@ -392,7 +392,7 @@ Class Spreadgun : SWWMWeapon Super.ModifyDropAmount(dropamount); // toss some ammo while we're at it if ( Random[Spreadgun](0,1) ) - A_DropItem("RedShell",Random[Spreadgun](1,2)); + A_DropItem('RedShell',Random[Spreadgun](1,2)); } action void A_UpdatePickup() @@ -452,11 +452,11 @@ Class Spreadgun : SWWMWeapon Weapon.UpSound "spreadgun/select"; Weapon.SlotNumber 3; Weapon.SelectionOrder 500; - Weapon.AmmoType1 "RedShell"; + Weapon.AmmoType1 'RedShell'; Weapon.AmmoGive1 1; - Weapon.AmmoType2 "GoldShell"; + Weapon.AmmoType2 'GoldShell'; Weapon.AmmoGive2 0; - SWWMWeapon.DropAmmoType "SWWMShellAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMShellAmmoSmall'; Stamina 15000; +SWWMWEAPON.NOFIRSTGIVE; } @@ -471,7 +471,7 @@ Class Spreadgun : SWWMWeapon { A_StartSound("spreadgun/deselect",CHAN_WEAPON,CHANF_OVERLAP); A_BumpView(-.1); - return A_JumpIf(invoker.fired,"DeselectFired"); + return A_JumpIf(invoker.fired,'DeselectFired'); } XZW2 BCD 1 A_BumpView(.1); XZW2 EF 1 A_BumpView(.2); @@ -490,7 +490,7 @@ Class Spreadgun : SWWMWeapon { A_FullRaise(); A_BumpView(.2); - return A_JumpIf(invoker.fired,"SelectFired"); + return A_JumpIf(invoker.fired,'SelectFired'); } XZW2 JKL 1 A_BumpView(-.1); XZW2 MNO 1 A_BumpView(-.2); @@ -511,7 +511,7 @@ Class Spreadgun : SWWMWeapon Fire: XZW2 A 1 { - if ( invoker.fired || !invoker.chambered ) return ResolveState("Reload"); + if ( invoker.fired || !invoker.chambered ) return ResolveState('Reload'); A_FireShell(); return ResolveState(null); } @@ -592,7 +592,7 @@ Class Spreadgun : SWWMWeapon { A_StartSound("spreadgun/checkgun",CHAN_WEAPON,CHANF_OVERLAP); A_PlayerCheckGun(); - return A_JumpIf(invoker.fired,"ZoomFired"); + return A_JumpIf(invoker.fired,'ZoomFired'); } XZW5 PQR 1 A_BumpView(.1); XZW5 STUVWXYZ 1 A_BumpView(-.2); @@ -620,7 +620,7 @@ Class Spreadgun : SWWMWeapon XZW2 A 2 { A_StartSound("spreadgun/deselect",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf(invoker.fired,"User1Fired"); + return A_JumpIf(invoker.fired,'User1Fired'); } XZW7 PQ 2 A_BumpView(.05,tics:2); User1Hold: @@ -628,12 +628,12 @@ Class Spreadgun : SWWMWeapon { A_BumpAngle(1.); A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP); - A_Overlay(-9999,"DummyMelee"); + A_Overlay(-9999,'DummyMelee'); } XZW7 ST 2 A_BumpAngle(-.25,tics:2); XZW7 UV 2; XZW7 WX 3; - XZW7 Y 0 A_JumpIf(player.cmd.buttons&BT_USER1,"User1Hold"); + XZW7 Y 0 A_JumpIf(player.cmd.buttons&BT_USER1,'User1Hold'); XZW7 Y 0 { invoker.PlayUpSound(self); } XZW7 Y 2 A_BumpView(.2,tics:2); XZW7 Z 2 A_BumpView(.1,tics:2); @@ -647,12 +647,12 @@ Class Spreadgun : SWWMWeapon { A_BumpAngle(1.); A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP); - A_Overlay(-9999,"DummyMelee"); + A_Overlay(-9999,'DummyMelee'); } XZW9 FG 2 A_BumpAngle(-.25,tics:2); XZW9 HI 2; XZW9 JK 3; - XZW9 L 0 A_JumpIf(player.cmd.buttons&BT_USER1,"User1FiredHold"); + XZW9 L 0 A_JumpIf(player.cmd.buttons&BT_USER1,'User1FiredHold'); XZW9 L 0 { invoker.PlayUpSound(self); } XZW9 L 2 A_BumpView(.2,tics:2); XZW9 M 2 A_BumpView(.1,tics:2); @@ -661,7 +661,7 @@ Class Spreadgun : SWWMWeapon FlashRed: XZW0 A 2 Bright { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.args[3] = 120; l.target = self; } @@ -669,7 +669,7 @@ Class Spreadgun : SWWMWeapon FlashGold: XZW0 B 2 Bright { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.args[3] = 300; l.target = self; } diff --git a/zscript/weapons/swwm_shot_fx.zsc b/zscript/weapons/swwm_shot_fx.zsc index b448fb3b1..a88b8ae41 100644 --- a/zscript/weapons/swwm_shot_fx.zsc +++ b/zscript/weapons/swwm_shot_fx.zsc @@ -32,7 +32,7 @@ Class SpreadImpact : SWWMNonInteractiveActor for ( int i=0; i 0 ) { if ( player.cmd.buttons&BT_ATTACK ) - return ResolveState("Refire"); + return ResolveState('Refire'); if ( player.cmd.buttons&BT_ALTATTACK ) - return ResolveState("AltRefire"); + return ResolveState('AltRefire'); } return ResolveState(null); } @@ -345,9 +345,9 @@ Class Sparkster : SWWMWeapon if ( (invoker.ClipCount > 0) && (invoker.ClipCount%4) ) { if ( player.cmd.buttons&BT_ATTACK ) - return ResolveState("DoubleRefire"); + return ResolveState('DoubleRefire'); if ( player.cmd.buttons&BT_ALTATTACK ) - return ResolveState("DoubleAltRefire"); + return ResolveState('DoubleAltRefire'); } return ResolveState(null); } @@ -372,7 +372,7 @@ Class Sparkster : SWWMWeapon XZW2 A 8 { A_CanBob(); - A_Overlay(PSP_WEAPON+2,"VentFlash"); + A_Overlay(PSP_WEAPON+2,'VentFlash'); A_OverlayFlags(PSP_WEAPON+2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayRenderStyle(PSP_WEAPON+2,STYLE_Add); A_StartSound("biospark/hiss",CHAN_WEAPON,CHANF_OVERLAP); @@ -382,7 +382,7 @@ Class Sparkster : SWWMWeapon XZW5 Z 8 { A_CanBob(); - A_Overlay(PSP_WEAPON+2,"VentFlash"); + A_Overlay(PSP_WEAPON+2,'VentFlash'); A_OverlayFlags(PSP_WEAPON+2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayRenderStyle(PSP_WEAPON+2,STYLE_Add); A_StartSound("biospark/hiss",CHAN_WEAPON,CHANF_OVERLAP); @@ -392,16 +392,16 @@ Class Sparkster : SWWMWeapon XZWY ABCDEFGHIJKLMNOPQRSTUVWX 1; Stop; Zoom: - XZW2 A 0 A_JumpIf(invoker.ClipCount<=0,"Reload"); - XZW2 A 0 A_JumpIf(invoker.doublestacc,"DoubleZoom"); - XZW2 A 0 A_JumpIf(invoker.ClipCount<2,"NoZoom"); + XZW2 A 0 A_JumpIf(invoker.ClipCount<=0,'Reload'); + XZW2 A 0 A_JumpIf(invoker.doublestacc,'DoubleZoom'); + XZW2 A 0 A_JumpIf(invoker.ClipCount<2,'NoZoom'); XZW2 A 1 A_StartSound("biospark/prethird",CHAN_WEAPON,CHANF_OVERLAP); XZW5 A 12 A_CanBob(); XZW5 A 1 A_FireSpark(2); XZW2 VWXYZ 2; Goto Ready; DoubleZoom: - XZW5 Z 0 A_JumpIf((invoker.ClipCount<2)||((invoker.ClipCount>4)&&(invoker.ClipCount<6)),"DoubleNoZoom"); + XZW5 Z 0 A_JumpIf((invoker.ClipCount<2)||((invoker.ClipCount>4)&&(invoker.ClipCount<6)),'DoubleNoZoom'); XZW5 Z 1 A_StartSound("biospark/prethird",CHAN_WEAPON,CHANF_OVERLAP); XZW8 N 12 A_CanBob(); XZW8 N 1 A_FireSpark(2); @@ -425,13 +425,13 @@ Class Sparkster : SWWMWeapon if ( invoker.clipcount > 0 ) { if ( !invoker.doublestacc && ((invoker.Ammo1.Amount > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo')) ) - return ResolveState("AttachExtra"); - return ResolveState("Idle"); + return ResolveState('AttachExtra'); + return ResolveState('Idle'); } if ( (invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo') ) - return ResolveState("Idle"); + return ResolveState('Idle'); if ( invoker.doublestacc ) - return ResolveState("UnloadExtra"); + return ResolveState('UnloadExtra'); return ResolveState(null); } XZW2 A 2 @@ -488,7 +488,7 @@ Class Sparkster : SWWMWeapon A_StartSound("biospark/idle",CHAN_WEAPONEXTRA,CHANF_LOOP,.4,4.); } XZW3 UV 2; - XZW3 W 0 A_JumpIf((player.cmd.buttons&BT_RELOAD)&&((invoker.Ammo1.Amount>0)||sv_infiniteammo||FindInventory('PowerInfiniteAmmo')),"DoubleStacc"); + XZW3 W 0 A_JumpIf((player.cmd.buttons&BT_RELOAD)&&((invoker.Ammo1.Amount>0)||sv_infiniteammo||FindInventory('PowerInfiniteAmmo')),'DoubleStacc'); Goto Reload3; Reload3: XZW3 W 2; @@ -542,7 +542,7 @@ Class Sparkster : SWWMWeapon { A_StartSound("biospark/checkout",CHAN_WEAPON,CHANF_OVERLAP); A_PlayerCheckGun(); - return A_JumpIf(invoker.doublestacc,"DoubleIdle"); + return A_JumpIf(invoker.doublestacc,'DoubleIdle'); } XZW5 BCDE 2; XZW5 FGHI 3; @@ -566,7 +566,7 @@ Class Sparkster : SWWMWeapon A_StartSound("demolitionist/wswing",CHAN_WEAPON,CHANF_OVERLAP); A_StartSound("biospark/meleestart",CHAN_WEAPON,CHANF_OVERLAP); A_PlayerMelee(); - return A_JumpIf(invoker.doublestacc,"DoubleUser1"); + return A_JumpIf(invoker.doublestacc,'DoubleUser1'); } XZW4 EFG 2 A_BumpView(1,tics:2); XZW4 H 1 @@ -600,7 +600,7 @@ Class Sparkster : SWWMWeapon Flash: XZWZ A 2 Bright { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.args[0] = 192; l.args[1] = 255; l.args[2] = 96; diff --git a/zscript/weapons/swwm_sparkyboi_fx.zsc b/zscript/weapons/swwm_sparkyboi_fx.zsc index 866cd990b..155b19977 100644 --- a/zscript/weapons/swwm_sparkyboi_fx.zsc +++ b/zscript/weapons/swwm_sparkyboi_fx.zsc @@ -37,7 +37,7 @@ Class BiosparkHitbox : SWWMNonInteractiveActor } override void Tick() { - if ( !target || !target.InStateSequence(target.CurState,target.FindState("Spawn")) ) + if ( !target || !target.InStateSequence(target.CurState,target.FindState('Spawn')) ) { Destroy(); return; @@ -64,13 +64,13 @@ Class BigOrbiter : SWWMNonInteractiveActor Default { - RenderStyle "Add"; + RenderStyle 'Add'; Scale 3.; +FORCEXYBILLBOARD; } override void PostBeginPlay() { - if ( !target || target.InStateSequence(target.CurState,target.FindState("Death")) ) + if ( !target || target.InStateSequence(target.CurState,target.FindState('Death')) ) { Destroy(); return; @@ -82,11 +82,11 @@ Class BigOrbiter : SWWMNonInteractiveActor speed = FRandom[Sparkster](20,40); Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch); SetOrigin(level.Vec3Offset(target.pos,x*speed+(0,0,target.height/2)),false); - SetState(FindState("Spawn")+Random[Sparkster](0,9)); + SetState(FindState('Spawn')+Random[Sparkster](0,9)); } override void Tick() { - if ( !target || target.InStateSequence(target.CurState,target.FindState("Death")) ) + if ( !target || target.InStateSequence(target.CurState,target.FindState('Death')) ) { Destroy(); return; @@ -125,7 +125,7 @@ Class BigBiospark : Actor if ( special1 <= 0 ) special1 = 4; for ( int i=0; i 0) && !invoker.chambered ) player.SetPSprite(PSP_WEAPON,ResolveState("Slide")); + if ( invoker.firstselect ) player.SetPSprite(PSP_WEAPON,ResolveState('FirstSelect')); + else if ( (invoker.clipcount > 0) && !invoker.chambered ) player.SetPSprite(PSP_WEAPON,ResolveState('Slide')); else A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWUSER1|WRF_ALLOWRELOAD); } Wait; @@ -378,14 +378,14 @@ Class ExplodiumGun : SWWMWeapon XZW2 A 1 { A_Schutt(); - return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,"FireLast"); + return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,'FireLast'); } XZW2 I 1; XZW2 J 1 { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'Casing'); } XZW2 KLMNOP 1; XZW2 Q 2; @@ -397,7 +397,7 @@ Class ExplodiumGun : SWWMWeapon { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'Casing'); } XZWA M 1; XZWA N 1 A_StartSound("explodium/slidelock",CHAN_WEAPON,CHANF_OVERLAP); @@ -454,7 +454,7 @@ Class ExplodiumGun : SWWMWeapon XZW2 A 2 { A_PlayerReload(); - return A_JumpIf(invoker.clipcount<=0,"Reload"); + return A_JumpIf(invoker.clipcount<=0,'Reload'); } XZW5 NO 2; XZW5 P 1 A_StartSound("explodium/magpin",CHAN_WEAPON,CHANF_OVERLAP); @@ -487,9 +487,9 @@ Class ExplodiumGun : SWWMWeapon Reload: XZW2 A 1 { - if ( invoker.clipcount >= invoker.default.clipcount ) return ResolveState("CheckBullet"); + if ( invoker.clipcount >= invoker.default.clipcount ) return ResolveState('CheckBullet'); A_PlayerReload(); - if ( invoker.clipcount <= 0 ) return ResolveState("ReloadEmpty"); + if ( invoker.clipcount <= 0 ) return ResolveState('ReloadEmpty'); return ResolveState(null); } XZW2 TUVWXYZ 1; @@ -525,7 +525,7 @@ Class ExplodiumGun : SWWMWeapon invoker.clipcount = invoker.default.clipcount; } XZW4 STUV 1; - XZW2 A 1 A_JumpIf(!invoker.chambered,"Slide"); + XZW2 A 1 A_JumpIf(!invoker.chambered,'Slide'); Goto Ready; Slide: XZW2 A 1; @@ -541,12 +541,12 @@ Class ExplodiumGun : SWWMWeapon XZW2 A 1 { A_PlayerCheckGun(); - return A_Jump(256,"Zoom1","Zoom2","Zoom2"); + return A_Jump(256,'Zoom1','Zoom2','Zoom2'); } Goto Ready; CheckBullet: XZW2 A 1; - XZW7 A 1 A_Overlay(PSP_WEAPON+1,"CheckBulletCasing"); + XZW7 A 1 A_Overlay(PSP_WEAPON+1,'CheckBulletCasing'); XZW7 BCDE 1 A_BumpView(-.2); XZW7 F 1 A_StartSound("explodium/slideback",CHAN_WEAPON,CHANF_OVERLAP); XZW7 GHIJKLMNOP 1; @@ -576,7 +576,7 @@ Class ExplodiumGun : SWWMWeapon XZW7 Y 1 A_Melee(); XZW7 Z 2; XZW8 ABCDE 2; - XZW8 F 1 A_JumpIf(player.cmd.buttons&BT_USER1,"User1Hold"); + XZW8 F 1 A_JumpIf(player.cmd.buttons&BT_USER1,'User1Hold'); XZW2 B 0 { invoker.PlayUpSound(self); } Goto Select; Zoom1: @@ -605,7 +605,7 @@ Class ExplodiumGun : SWWMWeapon { let psp = player.GetPSprite(PSP_FLASH); psp.frame = Random[GunFlash](0,9); - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.target = self; } Stop; @@ -665,9 +665,9 @@ Class DualExplodiumGun : SWWMWeapon A_BumpFOV(.96); A_BumpView(-.2); if ( side == 1 ) - A_SWWMFlash("Flash"); + A_SWWMFlash('Flash'); else if ( side == -1 ) - A_LeftFlash("LeftFlash"); + A_LeftFlash('LeftFlash'); SWWMHandler.DoFlash(self,Color(64,255,224,64),3); A_AlertMonsters(swwm_uncapalert?0:5000); A_PlayerFire(); @@ -695,7 +695,7 @@ Class DualExplodiumGun : SWWMWeapon dmg = d.HitActor.DamageMobj(p,self,dmg,'Explodium',DMG_THRUSTLESS|DMG_INFLICTOR_IS_PUFF); if ( d.HitActor.bNOBLOOD || d.HitActor.bDORMANT || d.HitActor.bINVULNERABLE ) { - let p = Spawn("SWWMBulletImpact",d.HitLocation); + let p = Spawn('SWWMBulletImpact',d.HitLocation); p.angle = atan2(d.HitDir.y,d.HitDir.x)+180; p.pitch = asin(d.HitDir.z); p.target = self; @@ -705,7 +705,7 @@ Class DualExplodiumGun : SWWMWeapon d.HitActor.TraceBleed(dmg,self); d.HitActor.SpawnBlood(d.HitLocation,atan2(d.HitDir.y,d.HitDir.x)+180,dmg); } - let b = Spawn("ExplodiumBulletImpact",d.HitLocation-d.HitDir*4.); + let b = Spawn('ExplodiumBulletImpact',d.HitLocation-d.HitDir*4.); b.angle = atan2(d.HitDir.y,d.HitDir.x)+180; b.pitch = asin(d.HitDir.z); b.target = self; @@ -714,12 +714,12 @@ Class DualExplodiumGun : SWWMWeapon { ExplodiumGun(invoker.SisterWeapon).deadeyecnt = 0; Vector3 hitnormal = SWWMUtility.GetLineTraceHitNormal(d); - let p = Spawn("SWWMBulletImpact",d.HitLocation+hitnormal*0.01); + let p = Spawn('SWWMBulletImpact',d.HitLocation+hitnormal*0.01); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); - let b = Spawn("ExplodiumBulletImpact",d.HitLocation+hitnormal*4.); + let b = Spawn('ExplodiumBulletImpact',d.HitLocation+hitnormal*4.); b.angle = atan2(hitnormal.y,hitnormal.x); b.pitch = asin(-hitnormal.z); b.target = self; @@ -728,7 +728,7 @@ Class DualExplodiumGun : SWWMWeapon else ExplodiumGun(invoker.SisterWeapon).deadeyecnt = 0; for ( int i=0; i<6; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= .15; s.alpha *= .5; s.speed *= .2; @@ -742,7 +742,7 @@ Class DualExplodiumGun : SWWMWeapon if ( swwm_nomagdrop ) return; let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2*side,-10); - let c = Spawn("ExplodiumMag",origin); + let c = Spawn('ExplodiumMag',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.5,.5)+y*side*FRandom[Junk](-1.2,.3)-(0,0,FRandom[Junk](2,3)); @@ -753,7 +753,7 @@ Class DualExplodiumGun : SWWMWeapon { let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,8*side,-10); - let c = Spawn("ExplodiumCasing",origin); + let c = Spawn('ExplodiumCasing',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.5,.5)+y*side*FRandom[Junk](2,4)-(0,0,FRandom[Junk](2,3)); @@ -801,7 +801,7 @@ Class DualExplodiumGun : SWWMWeapon SWWMWeapon.GetLine "getexplodiumgun2"; SWWMWeapon.NumCrosshairs 2; Weapon.UpSound "explodium/select"; - Weapon.SisterWeapon "ExplodiumGun"; + Weapon.SisterWeapon 'ExplodiumGun'; Weapon.SlotNumber 2; Weapon.SelectionOrder 950; Weapon.SlotPriority 2.; @@ -823,7 +823,7 @@ Class DualExplodiumGun : SWWMWeapon XZW2 D 2 { A_BumpView(-.1,tics:2); - player.SetPSprite(PSP_WEAPON+1,ResolveState("LeftSelect")); + player.SetPSprite(PSP_WEAPON+1,ResolveState('LeftSelect')); } XZW2 E 2 A_BumpView(-.1,tics:2); XZW2 FGH 2 A_BumpView(.05,tics:2); @@ -841,31 +841,31 @@ Class DualExplodiumGun : SWWMWeapon let sis = player.FindPSprite(PSP_WEAPON+1); if ( !sis ) { - player.SetPSprite(PSP_WEAPON+1,ResolveState("LeftReady")); + player.SetPSprite(PSP_WEAPON+1,ResolveState('LeftReady')); sis = player.FindPSprite(PSP_WEAPON+1); } - if ( sis.CurState.InStateSequence(ResolveState("LeftReady")) ) + if ( sis.CurState.InStateSequence(ResolveState('LeftReady')) ) { if ( (ExplodiumGun(invoker.SisterWeapon).clipcount > 0) && !ExplodiumGun(invoker.SisterWeapon).chambered ) - player.SetPSprite(PSP_WEAPON,ResolveState("Slide")); + player.SetPSprite(PSP_WEAPON,ResolveState('Slide')); else if ( (invoker.clipcount > 0) && !invoker.chambered ) - player.SetPSprite(PSP_WEAPON+1,ResolveState("LeftSlide")); + player.SetPSprite(PSP_WEAPON+1,ResolveState('LeftSlide')); else if ( (player.cmd.buttons&BT_RELOAD) && (ExplodiumGun(invoker.SisterWeapon).clipcount < ExplodiumGun(invoker.SisterWeapon).default.clipcount) ) - player.SetPSprite(PSP_WEAPON,ResolveState("Reload")); + player.SetPSprite(PSP_WEAPON,ResolveState('Reload')); else A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWUSER1); } else { // left weapon isn't ready, but we can still reload right weapon if needed if ( (player.cmd.buttons&BT_RELOAD) && (ExplodiumGun(invoker.SisterWeapon).clipcount < ExplodiumGun(invoker.SisterWeapon).default.clipcount) ) - player.SetPSprite(PSP_WEAPON,ResolveState("Reload")); + player.SetPSprite(PSP_WEAPON,ResolveState('Reload')); else { int flg = WRF_NOSWITCH|WRF_NOSECONDARY; if ( !ExplodiumGun(invoker.SisterWeapon).chambered ) flg |= WRF_NOPRIMARY; // don't bob while the left weapon is firing - if ( sis.CurState.InStateSequence(ResolveState("LeftFire")) || sis.CurState.InStateSequence(ResolveState("LeftFireLast")) ) + if ( sis.CurState.InStateSequence(ResolveState('LeftFire')) || sis.CurState.InStateSequence(ResolveState('LeftFireLast')) ) flg |= WRF_NOBOB; A_WeaponReady(flg); } @@ -877,13 +877,13 @@ Class DualExplodiumGun : SWWMWeapon { let sis = player.FindPSprite(PSP_WEAPON); if ( (invoker.clipcount <= 0) && !invoker.chambered ) - player.SetPSprite(PSP_WEAPON+1,ResolveState("LeftReloadLast")); + player.SetPSprite(PSP_WEAPON+1,ResolveState('LeftReloadLast')); else if ( (player.cmd.buttons&BT_RELOAD) && (invoker.clipcount < invoker.default.clipcount) ) - player.SetPSprite(PSP_WEAPON+1,ResolveState("LeftReload")); + player.SetPSprite(PSP_WEAPON+1,ResolveState('LeftReload')); else if ( player.cmd.buttons&BT_ALTATTACK && invoker.chambered ) - player.SetPSprite(PSP_WEAPON+1,ResolveState("LeftFire")); + player.SetPSprite(PSP_WEAPON+1,ResolveState('LeftFire')); // allow bobbing while the right weapon reloads - if ( !sis.CurState.InStateSequence(ResolveState("Fire")) && !sis.CurState.InStateSequence(ResolveState("FireLast")) ) + if ( !sis.CurState.InStateSequence(ResolveState('Fire')) && !sis.CurState.InStateSequence(ResolveState('FireLast')) ) A_CanBob(); } Wait; @@ -891,14 +891,14 @@ Class DualExplodiumGun : SWWMWeapon XZW2 A 1 { A_Schutt(); - return A_JumpIf((ExplodiumGun(invoker.SisterWeapon).clipcount<=0)&&!ExplodiumGun(invoker.SisterWeapon).chambered,"FireLast"); + return A_JumpIf((ExplodiumGun(invoker.SisterWeapon).clipcount<=0)&&!ExplodiumGun(invoker.SisterWeapon).chambered,'FireLast'); } XZW2 I 1; XZW2 J 1 { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'Casing'); } XZW2 KLMNOP 1; XZW2 Q 2; @@ -910,7 +910,7 @@ Class DualExplodiumGun : SWWMWeapon { int layer = PSP_WEAPON+1; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'Casing'); } XZWI M 1; XZWI N 1 A_StartSound("explodium/slidelock",CHAN_WEAPON,CHANF_OVERLAP); @@ -957,14 +957,14 @@ Class DualExplodiumGun : SWWMWeapon XZWB A 1 { A_Schutt(-1); - return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,"LeftFireLast"); + return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,'LeftFireLast'); } XZWB I 1; XZWB J 1 { int layer = PSP_WEAPON+12; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"LeftCasing"); + A_Overlay(layer,'LeftCasing'); } XZWB KLMNOP 1; XZWB Q 2; @@ -976,7 +976,7 @@ Class DualExplodiumGun : SWWMWeapon { int layer = PSP_WEAPON+1; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'LeftCasing'); } XZWK S 1; XZWK T 1 A_StartSound("explodium/slidelock",CHAN_WEAPON,CHANF_OVERLAP); @@ -987,8 +987,8 @@ Class DualExplodiumGun : SWWMWeapon XZWK Z 4 { let sis = player.FindPSprite(PSP_WEAPON); - if ( !sis.CurState.InStateSequence(ResolveState("Reload")) && !sis.CurState.InStateSequence(ResolveState("ReloadEmpty")) && !sis.CurState.InStateSequence(ResolveState("ReloadLast")) ) - return ResolveState("LeftReloadLast")+1; + if ( !sis.CurState.InStateSequence(ResolveState('Reload')) && !sis.CurState.InStateSequence(ResolveState('ReloadEmpty')) && !sis.CurState.InStateSequence(ResolveState('ReloadLast')) ) + return ResolveState('LeftReloadLast')+1; return ResolveState(null); } XZWK Z 1 @@ -1070,7 +1070,7 @@ Class DualExplodiumGun : SWWMWeapon { A_PlayerReload(); A_StartSound("explodium/deselect",CHAN_WEAPON,CHANF_OVERLAP); - if ( ExplodiumGun(invoker.SisterWeapon).clipcount <= 0 ) return ResolveState("ReloadEmpty"); + if ( ExplodiumGun(invoker.SisterWeapon).clipcount <= 0 ) return ResolveState('ReloadEmpty'); return ResolveState(null); } XZW2 TUV 2 A_BumpView(.2,tics:2); @@ -1110,7 +1110,7 @@ Class DualExplodiumGun : SWWMWeapon XZW4 NOP 2 A_BumpView(.1,tics:2); Goto Ready; Slide: - XZW2 A 9 { player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftLower")); } + XZW2 A 9 { player.SetPSPrite(PSP_WEAPON+1,ResolveState('LeftLower')); } XZW2 A 1; XZW4 WXY 1 A_BumpView(-.1); XZW5 A 1 A_StartSound("explodium/slideback",CHAN_WEAPON,CHANF_OVERLAP); @@ -1123,21 +1123,21 @@ Class DualExplodiumGun : SWWMWeapon XZW5 EFG 1 A_BumpView(.1); XZW5 H 1 A_StartSound("explodium/slideforward",CHAN_WEAPON,CHANF_OVERLAP); XZW5 IJKLM 1; - XZW2 A 0 { player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftRaise")); } + XZW2 A 0 { player.SetPSPrite(PSP_WEAPON+1,ResolveState('LeftRaise')); } Goto Ready; LeftReload: XZWB A 4 { let sis = player.FindPSprite(PSP_WEAPON); - if ( !sis.CurState.InStateSequence(ResolveState("Reload")) && !sis.CurState.InStateSequence(ResolveState("ReloadEmpty")) && !sis.CurState.InStateSequence(ResolveState("ReloadLast")) ) - return ResolveState("LeftReload")+1; + if ( !sis.CurState.InStateSequence(ResolveState('Reload')) && !sis.CurState.InStateSequence(ResolveState('ReloadEmpty')) && !sis.CurState.InStateSequence(ResolveState('ReloadLast')) ) + return ResolveState('LeftReload')+1; return ResolveState(null); } XZWB A 1 { A_PlayerReload(); A_StartSound("explodium/deselect",CHAN_WEAPON,CHANF_OVERLAP); - if ( invoker.clipcount <= 0 ) return ResolveState("LeftReloadEmpty"); + if ( invoker.clipcount <= 0 ) return ResolveState('LeftReloadEmpty'); return ResolveState(null); } XZWB TUV 2 A_BumpView(.2,tics:2); @@ -1177,7 +1177,7 @@ Class DualExplodiumGun : SWWMWeapon XZWD NOP 2 A_BumpView(.1,tics:2); Goto LeftReady; LeftSlide: - XZWB A 9 { player.SetPSPrite(PSP_WEAPON,ResolveState("Lower")); } + XZWB A 9 { player.SetPSPrite(PSP_WEAPON,ResolveState('Lower')); } XZWB A 1; XZWD WXY 1 A_BumpView(-.1); XZWE A 1 A_StartSound("explodium/slideback",CHAN_WEAPON,CHANF_OVERLAP); @@ -1190,7 +1190,7 @@ Class DualExplodiumGun : SWWMWeapon XZWE EFG 1 A_BumpView(.1); XZWE H 1 A_StartSound("explodium/slideforward",CHAN_WEAPON,CHANF_OVERLAP); XZWE IJKLM 1; - XZWB A 0 { player.SetPSPrite(PSP_WEAPON,ResolveState("Raise")); } + XZWB A 0 { player.SetPSPrite(PSP_WEAPON,ResolveState('Raise')); } Goto LeftReady; Zoom: XZW2 A 1 @@ -1203,7 +1203,7 @@ Class DualExplodiumGun : SWWMWeapon XZW9 H 1 { A_BumpView(-.2); - player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftZoom")); + player.SetPSPrite(PSP_WEAPON+1,ResolveState('LeftZoom')); } XZW9 IJ 1 A_BumpView(-.2); XZW9 KLMNOP 1 A_BumpView(-.1); @@ -1219,7 +1219,7 @@ Class DualExplodiumGun : SWWMWeapon XZWH UVW 1; Goto LeftReady; User1: - XZW2 A 1 { player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftUser1")); } + XZW2 A 1 { player.SetPSPrite(PSP_WEAPON+1,ResolveState('LeftUser1')); } XZW7 TU 1 A_BumpView(.1); User1Hold: XZW7 V 1 @@ -1233,8 +1233,8 @@ Class DualExplodiumGun : SWWMWeapon XZW7 Y 1 A_Melee(); XZW7 Z 2; XZW8 ABCDE 2; - XZW8 F 1 A_JumpIf(player.cmd.buttons&BT_USER1,"User1Hold"); - XZW2 B 0 { invoker.PlayUpSound(self); player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftSelect")); } + XZW8 F 1 A_JumpIf(player.cmd.buttons&BT_USER1,'User1Hold'); + XZW2 B 0 { invoker.PlayUpSound(self); player.SetPSPrite(PSP_WEAPON+1,ResolveState('LeftSelect')); } Goto Select; LeftUser1: XZWB A 1; @@ -1247,7 +1247,7 @@ Class DualExplodiumGun : SWWMWeapon XZWA U 2 { A_BumpView(.1,tics:2); - player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftDeselect")); + player.SetPSPrite(PSP_WEAPON+1,ResolveState('LeftDeselect')); } XZWA VW 2 A_BumpView(.1,tics:2); XZW2 B -1 A_FullLower(); @@ -1262,7 +1262,7 @@ Class DualExplodiumGun : SWWMWeapon { let psp = player.GetPSprite(PSP_FLASH); psp.frame = Random[GunFlash](0,9); - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.target = self; } Stop; @@ -1271,7 +1271,7 @@ Class DualExplodiumGun : SWWMWeapon { let psp = player.GetPSprite(PSP_FLASH+1); psp.frame = Random[GunFlash](10,19); - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.target = self; } Stop; diff --git a/zscript/weapons/swwm_splode_fx.zsc b/zscript/weapons/swwm_splode_fx.zsc index 83cd2ec64..bfdfb2cad 100644 --- a/zscript/weapons/swwm_splode_fx.zsc +++ b/zscript/weapons/swwm_splode_fx.zsc @@ -65,14 +65,14 @@ Class ExplodiumMagArm : Actor Spawn: TNT1 A 1 { - Spawn("ExplodiumMagTrail",pos); + Spawn('ExplodiumMagTrail',pos); if ( !(ReactionTime%2) ) { let [nhit, nkill] = SWWMUtility.DoExplosion(self,3+reactiontime/2,3000+500*reactiontime,40+3*reactiontime,20,DE_COUNTENEMIES); if ( target && special1 ) SWWMUtility.AchievementProgressInc("grenade",nkill,target.player); } Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5); - let s = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",pos); + let s = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',pos); s.vel = pvel+vel*.2; s.scolor = Color(1,1,1)*Random[ExploS](64,224); s.framestep = Random[ExploS](2,4); @@ -88,7 +88,7 @@ Class ExplodiumMagTrail : SWWMNonInteractiveActor { Default { - RenderStyle "Add"; + RenderStyle 'Add'; +FORCEXYBILLBOARD; Scale 1.1; } @@ -130,6 +130,7 @@ Class ExplodiumMagProj : Actor +DONTBOUNCEONSHOOTABLES; +CANBOUNCEWATER; +USEBOUNCESTATE; + +KEEPBOUNCEANGLE; BounceFactor 0.4; WallBounceFactor 0.4; } @@ -161,7 +162,7 @@ Class ExplodiumMagProj : Actor for ( int i=0; i 0 ) invoker.BufferMagAmmo("CandyGunBullets",dropamt); + if ( dropamt > 0 ) invoker.BufferMagAmmo('CandyGunBullets',dropamt); ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount); ma.MagFill(); invoker.clipcount = 0; @@ -267,7 +267,7 @@ Class CandyGun : SWWMWeapon action void A_LoadMag() { - MagAmmo sb = MagAmmo(FindInventory("CandyGunBullets")); + MagAmmo sb = MagAmmo(FindInventory('CandyGunBullets')); if ( sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) ) invoker.clipcount = invoker.default.clipcount; else if ( (invoker.Ammo1.Amount <= 0) || (sb.Amount >= sb.ClipSize) ) @@ -276,9 +276,9 @@ Class CandyGun : SWWMWeapon invoker.clipcount = takeamt; sb.Amount -= takeamt; int req = invoker.default.ClipCount-invoker.clipcount; - if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo("CandyGunBullets",req); + if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo('CandyGunBullets',req); } - else if ( invoker.FetchBufferedMagAmmo("CandyGunBullets",sb.ClipSize,true) ) + else if ( invoker.FetchBufferedMagAmmo('CandyGunBullets',sb.ClipSize,true) ) invoker.clipcount = invoker.default.clipcount; else { @@ -292,7 +292,7 @@ Class CandyGun : SWWMWeapon { let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,8,-10); - let c = Spawn("CandyCasing",origin); + let c = Spawn('CandyCasing',origin); c.special1 = special1; c.angle = angle; c.pitch = pitch; @@ -304,15 +304,15 @@ Class CandyGun : SWWMWeapon { if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true; if ( Amount <= 0 ) return false; - if ( fireMode == PrimaryFire ) return (chambered || (clipcount > 0) || (Ammo1.Amount > 0) || (Owner.CountInv("CandyGunBullets") > 0)); - if ( fireMode == AltFire ) return ((Ammo1.Amount > 0) || (Owner.CountInv("CandyGunBullets") > 0)); + if ( fireMode == PrimaryFire ) return (chambered || (clipcount > 0) || (Ammo1.Amount > 0) || (Owner.CountInv('CandyGunBullets') > 0)); + if ( fireMode == AltFire ) return ((Ammo1.Amount > 0) || (Owner.CountInv('CandyGunBullets') > 0)); return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount); } override bool ReportHUDAmmo() { if ( Amount <= 0 ) return false; - if ( chambered || (clipcount > 0) || (Owner.CountInv("CandyGunBullets") > 0) ) return true; + if ( chambered || (clipcount > 0) || (Owner.CountInv('CandyGunBullets') > 0) ) return true; if ( Ammo1.Amount <= 0 ) return false; return Super.ReportHUDAmmo(); } @@ -368,12 +368,12 @@ Class CandyGun : SWWMWeapon Weapon.SlotNumber 9; Weapon.SelectionOrder 900; Stamina 1000000; - Weapon.AmmoType1 "CandyGunAmmo"; - Weapon.AmmoType2 "CandyGunSpares"; + Weapon.AmmoType1 'CandyGunAmmo'; + Weapon.AmmoType2 'CandyGunSpares'; Weapon.AmmoGive1 1; Weapon.AmmoGive2 0; Weapon.AmmoUse2 0; - SWWMWeapon.DropAmmoType "SWWMCellAmmoBig"; + SWWMWeapon.DropAmmoType 'SWWMCellAmmoBig'; CandyGun.ClipCount 7; +SWWMWEAPON.NOFIRSTGIVE; +WEAPON.EXPLOSIVE; @@ -388,7 +388,7 @@ Class CandyGun : SWWMWeapon XZW2 B 2 { A_FullRaise(); - return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,"SelectLast"); + return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,'SelectLast'); } XZW2 CDEFGH 2; Goto Ready; @@ -399,14 +399,14 @@ Class CandyGun : SWWMWeapon Ready: XZW2 A 1 { - if ( (invoker.clipcount > 0) && !invoker.chambered ) player.SetPSprite(PSP_WEAPON,ResolveState("Slide")); + if ( (invoker.clipcount > 0) && !invoker.chambered ) player.SetPSprite(PSP_WEAPON,ResolveState('Slide')); else { int flg = WRF_ALLOWZOOM|WRF_ALLOWUSER1; if ( sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) || (invoker.Ammo1.Amount > 0) || invoker.chambered ) flg |= WRF_ALLOWRELOAD; - if ( (invoker.Ammo1.Amount <= 0) && (CountInv("CandyGunBullets") <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) flg |= WRF_NOSECONDARY; + if ( (invoker.Ammo1.Amount <= 0) && (CountInv('CandyGunBullets') <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) flg |= WRF_NOSECONDARY; if ( (flg&WRF_NOSECONDARY) && (player.cmd.buttons&BT_ATTACK) && (player.cmd.buttons&BT_ALTATTACK) ) - player.SetPSprite(PSP_WEAPON,ResolveState("SpecialFirePre")); + player.SetPSprite(PSP_WEAPON,ResolveState('SpecialFirePre')); else { A_WeaponReady(flg); @@ -419,7 +419,7 @@ Class CandyGun : SWWMWeapon ReadyLast: XZW9 X 1 { - if ( (invoker.Ammo1.Amount > 0) || (CountInv("CandyGunBullets") > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) ) player.SetPSprite(PSP_WEAPON,ResolveState("ReloadLast")); + if ( (invoker.Ammo1.Amount > 0) || (CountInv('CandyGunBullets') > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) ) player.SetPSprite(PSP_WEAPON,ResolveState('ReloadLast')); else { A_WeaponReady(WRF_NOPRIMARY|WRF_NOSECONDARY); @@ -432,14 +432,14 @@ Class CandyGun : SWWMWeapon XZW2 A 1 { A_Schutt(); - return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,"FireLast"); + return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,'FireLast'); } XZW2 I 1; XZW2 J 1 { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'Casing'); } XZW2 KLMNOP 1; XZW2 Q 2; @@ -451,7 +451,7 @@ Class CandyGun : SWWMWeapon { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - A_Overlay(layer,"Casing"); + A_Overlay(layer,'Casing'); } XZWC M 1; XZWC N 1 A_StartSound("explodium/slidelock",CHAN_WEAPON,CHANF_OVERLAP); @@ -502,7 +502,7 @@ Class CandyGun : SWWMWeapon XZW2 A 2 { A_PlayerReload(); - return A_JumpIf(invoker.clipcount<=0,"Reload"); + return A_JumpIf(invoker.clipcount<=0,'Reload'); } XZW5 NO 2; XZW5 P 1 A_StartSound("explodium/magpin",CHAN_WEAPON,CHANF_OVERLAP); @@ -510,7 +510,7 @@ Class CandyGun : SWWMWeapon XZW5 R 1 { if ( player.cmd.buttons&BT_ATTACK ) - player.SetPSprite(PSP_WEAPON,ResolveState("SpecialFire")); + player.SetPSprite(PSP_WEAPON,ResolveState('SpecialFire')); } XZW5 STUVWXYZ 1; XZW6 AB 1; @@ -561,7 +561,7 @@ Class CandyGun : SWWMWeapon if ( (invoker.clipcount > 0) && (Health > 0) ) { invoker.PlayUpSound(self); - return ResolveState("Select"); + return ResolveState('Select'); } let nw = player.mo.PickPrevWeapon(); if ( nw != invoker ) player.PendingWeapon = nw; @@ -577,9 +577,9 @@ Class CandyGun : SWWMWeapon Reload: XZW2 A 1 { - if ( ((invoker.Ammo1.Amount <= 0) && (CountInv("CandyGunBullets") <= 0)) || (invoker.clipcount >= invoker.default.clipcount) ) return ResolveState("CheckBullet"); + if ( ((invoker.Ammo1.Amount <= 0) && (CountInv('CandyGunBullets') <= 0)) || (invoker.clipcount >= invoker.default.clipcount) ) return ResolveState('CheckBullet'); A_PlayerReload(); - if ( invoker.clipcount <= 0 ) return ResolveState("ReloadEmpty"); + if ( invoker.clipcount <= 0 ) return ResolveState('ReloadEmpty'); return ResolveState(null); } XZW2 TUVWXYZ 1; @@ -608,7 +608,7 @@ Class CandyGun : SWWMWeapon A_LoadMag(); } XZW4 STUV 1; - XZW2 A 1 A_JumpIf(!invoker.chambered,"Slide"); + XZW2 A 1 A_JumpIf(!invoker.chambered,'Slide'); Goto Ready; Slide: XZW2 A 1; @@ -624,12 +624,12 @@ Class CandyGun : SWWMWeapon XZW2 A 1 { A_PlayerCheckGun(); - return A_Jump(256,"Zoom1","Zoom2","Zoom2"); + return A_Jump(256,'Zoom1','Zoom2','Zoom2'); } Goto Ready; CheckBullet: XZW2 A 1; - XZW7 A 1 A_Overlay(PSP_WEAPON+1,"CheckBulletCasing"); + XZW7 A 1 A_Overlay(PSP_WEAPON+1,'CheckBulletCasing'); XZW7 BCDE 1; XZW7 F 1 A_StartSound("explodium/slideback",CHAN_WEAPON,CHANF_OVERLAP); XZW7 GHIJKLMNOP 1; @@ -653,7 +653,7 @@ Class CandyGun : SWWMWeapon XZW7 Y 1 A_Melee(); XZW7 Z 2; XZW8 ABCDE 2; - XZW8 F 1 A_JumpIf(player.cmd.buttons&BT_USER1,"User1Hold"); + XZW8 F 1 A_JumpIf(player.cmd.buttons&BT_USER1,'User1Hold'); XZW2 B 0 { invoker.PlayUpSound(self); } Goto Select; Zoom1: @@ -668,7 +668,7 @@ Class CandyGun : SWWMWeapon XZW2 A 2 { A_StartSound("explodium/deselect",CHAN_WEAPON,CHANF_OVERLAP); - return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,"DeselectLast"); + return A_JumpIf((invoker.clipcount<=0)&&!invoker.chambered,'DeselectLast'); } XZWA TUVW 2; XZW2 B -1 A_FullLower(); @@ -683,7 +683,7 @@ Class CandyGun : SWWMWeapon { let psp = player.GetPSprite(PSP_FLASH); psp.frame = Random[GunFlash](0,9); - let l = Spawn("CandyWeaponLight",pos); + let l = Spawn('CandyWeaponLight',pos); l.target = self; } Stop; diff --git a/zscript/weapons/swwm_tastytreat_fx.zsc b/zscript/weapons/swwm_tastytreat_fx.zsc index b336b81b3..fd1c33f08 100644 --- a/zscript/weapons/swwm_tastytreat_fx.zsc +++ b/zscript/weapons/swwm_tastytreat_fx.zsc @@ -68,7 +68,7 @@ Class CandyBeamTracer : LineTracer { if ( Results.HitActor.bSHOOTABLE ) { - let ent = new("HitListEntry"); + let ent = new('HitListEntry'); ent.hitactor = Results.HitActor; ent.hitlocation = Results.HitPos; ent.x = Results.HitVector; @@ -93,7 +93,7 @@ Class CandyBeam : SWWMNonInteractiveActor void A_Trace() { - let t = new("CandyBeamTracer"); + let t = new('CandyBeamTracer'); t.hitlist.Clear(); let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll); t.ShootThroughList.Clear(); @@ -122,7 +122,7 @@ Class CandyBeam : SWWMNonInteractiveActor double a = FRandom[Candy](0,360), s = FRandom[Candy](0.,.8); nextdir = SWWMUtility.ConeSpread(dir,y,z,a,s); } - void A_Spread( Class pop = "CandyPop", Class smk = "SWWMHalfSmoke" ) + void A_Spread( Class pop = 'CandyPop', Class smk = 'SWWMHalfSmoke' ) { Vector3 tdir = level.Vec3Diff(pos,nextpos); Vector3 pvel = .1*tdir+SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.1,.3); @@ -152,7 +152,7 @@ Class CandyBeam : SWWMNonInteractiveActor Default { Obituary "$O_CANDYGUN"; - RenderStyle "Add"; + RenderStyle 'Add'; Alpha 0.4; DamageFunction 40; ReactionTime 12; @@ -177,7 +177,7 @@ Class CandyPop : SWWMNonInteractiveActor { Obituary "$O_CANDYGUN"; DamageType 'Candy'; - RenderStyle "Add"; + RenderStyle 'Add'; Scale 2.; +NODAMAGETHRUST; +FORCERADIUSDMG; @@ -205,14 +205,14 @@ Class CandyPop : SWWMNonInteractiveActor Scale.x *= RandomPick[ExploS](-1,1); Scale.y *= RandomPick[ExploS](-1,1); roll = FRandom[Explos](0,360); - Spawn("CandyPLight",pos); + Spawn('CandyPLight',pos); FlashPlayer(40,1200); int numpt = Random[ExploS](-3,3); for ( int i=0; i 0) ) { - let s = Spawn("CandyMagArmBig",pos); + let s = Spawn('CandyMagArmBig',pos); s.target = target; } } @@ -612,6 +612,7 @@ Class CandyMagProj : Actor +DONTBOUNCEONSHOOTABLES; +CANBOUNCEWATER; +USEBOUNCESTATE; + +KEEPBOUNCEANGLE; BounceFactor 0.4; WallBounceFactor 0.4; } @@ -641,7 +642,7 @@ Class CandyMagProj : Actor for ( int i=0; i15)?"CandyBeam":"TinyCandyBeam",pos); + let s = Spawn((frame>15)?'CandyBeam':'TinyCandyBeam',pos); s.target = target; s.angle = ang; s.pitch = pt; @@ -725,7 +726,7 @@ Class CandyBulletImpact : SWWMNonInteractiveActor { Obituary "$O_CANDYGUN"; DamageType 'Candy'; - RenderStyle "Add"; + RenderStyle 'Add'; Scale 2.5; +NODAMAGETHRUST; +FORCERADIUSDMG; @@ -748,7 +749,7 @@ Class CandyBulletImpact : SWWMNonInteractiveActor for ( int i=0; i 0) ) return true; - if ( (Ammo1.Amount <= 0) && (Owner.CountInv("SilverBullets") <= 0) ) return false; + if ( (Ammo1.Amount <= 0) && (Owner.CountInv('SilverBullets') <= 0) ) return false; return true; } override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount ) @@ -206,7 +206,7 @@ Class SilverBullet : SWWMWeapon if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true; if ( (fireMode == PrimaryFire) || (fireMode == EitherFire) ) { - if ( (chambered && !fired) || (clipcount > 0) || (Ammo1.Amount > 0) || (Owner.CountInv("SilverBullets") > 0) ) + if ( (chambered && !fired) || (clipcount > 0) || (Ammo1.Amount > 0) || (Owner.CountInv('SilverBullets') > 0) ) return true; if ( autoswitch ) PlayerPawn(Owner).PickNewWeapon(null); return false; @@ -285,7 +285,7 @@ Class SilverBullet : SWWMWeapon } foreach ( w:t.WaterHitList ) { - let b = Spawn("InvisibleSplasher",w.hitpos); + let b = Spawn('InvisibleSplasher',w.hitpos); b.target = self; b.A_CheckTerrain(); } @@ -306,7 +306,7 @@ Class SilverBullet : SWWMWeapon hit.HitActor.TraceBleed(dmg,self); hit.HitActor.SpawnBlood(hit.HitLocation,atan2(hit.x.y,hit.x.x)+180,dmg); hit.HitActor.A_StartSound("silverbullet/flesh",CHAN_DAMAGE,CHANF_OVERLAP,1.,2.); - let p = Spawn("SilverImpact",hit.HitLocation); + let p = Spawn('SilverImpact',hit.HitLocation); p.special1 = 1; p.target = self; p.master = invoker; @@ -314,7 +314,7 @@ Class SilverBullet : SWWMWeapon } else { - let p = Spawn("SilverImpact",hit.HitLocation); + let p = Spawn('SilverImpact',hit.HitLocation); p.angle = atan2(hit.x.y,hit.x.x)+180; p.pitch = asin(hit.x.z); p.target = self; @@ -322,12 +322,12 @@ Class SilverBullet : SWWMWeapon p.bAMBUSH = hit.pastwall; } } - LineTracer faketracer = new("LineTracer"); + LineTracer faketracer = new('LineTracer'); foreach ( wp:t.WallPenetrateList ) { Vector3 hitpos = wp.hitpos; Vector3 hitnormal = wp.hitnormal; - let p = Spawn("SilverImpact",hitpos+hitnormal*4); + let p = Spawn('SilverImpact',hitpos+hitnormal*4); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; @@ -349,7 +349,7 @@ Class SilverBullet : SWWMWeapon if ( (t.Results.HitType != TRACE_HitNone) && (t.Results.HitType != TRACE_HitActor) ) { Vector3 hitnormal = SWWMUtility.GetLineTracerHitNormal(t.Results); - let p = Spawn("SilverImpact",t.Results.HitPos+hitnormal*4); + let p = Spawn('SilverImpact',t.Results.HitPos+hitnormal*4); p.angle = atan2(hitnormal.y,hitnormal.x); p.pitch = asin(-hitnormal.z); p.target = self; @@ -376,7 +376,7 @@ Class SilverBullet : SWWMWeapon s.Explode(); continue; } - s = SilverAirRip(Spawn("SilverAirRip",ofs)); + s = SilverAirRip(Spawn('SilverAirRip',ofs)); s.target = self; s.master = invoker; s.Explode(); @@ -386,7 +386,7 @@ Class SilverBullet : SWWMWeapon if ( !Random[Boolet](0,1) ) continue; Vector3 ofs = level.Vec3Offset(start,tdir*i); if ( !level.IsPointInLevel(ofs) ) continue; - let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs); b.Scale *= FRandom[Boolet](.9,1.6); b.alpha *= .5; b.framestep = Random[Boolet](1,3); @@ -409,7 +409,7 @@ Class SilverBullet : SWWMWeapon s.Explode(true); continue; } - s = SilverAirRip(Spawn("SilverAirRip",ofs)); + s = SilverAirRip(Spawn('SilverAirRip',ofs)); s.target = self; s.master = invoker; s.Explode(true); @@ -419,7 +419,7 @@ Class SilverBullet : SWWMWeapon if ( !Random[Boolet](0,1) ) continue; Vector3 ofs = level.Vec3Offset(start,tdir*i); if ( !level.IsPointInLevel(ofs) ) continue; - let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs); b.Scale *= FRandom[Boolet](.9,1.6); b.alpha *= .5; b.framestep = Random[Boolet](1,3); @@ -439,7 +439,7 @@ Class SilverBullet : SWWMWeapon s.Explode(); continue; } - s = SilverAirRip(Spawn("SilverAirRip",ofs)); + s = SilverAirRip(Spawn('SilverAirRip',ofs)); s.target = self; s.master = invoker; s.Explode(); @@ -449,7 +449,7 @@ Class SilverBullet : SWWMWeapon if ( !Random[Boolet](0,1) ) continue; Vector3 ofs = level.Vec3Offset(origin,dir*i); if ( !level.IsPointInLevel(ofs) ) continue; - let b = SWWMAnimSprite.SpawnAt("SWWMHalfSmoke",ofs); + let b = SWWMAnimSprite.SpawnAt('SWWMHalfSmoke',ofs); b.Scale *= FRandom[Boolet](.9,1.6); b.alpha *= .5; b.framestep = Random[Boolet](1,3); @@ -477,7 +477,7 @@ Class SilverBullet : SWWMWeapon if ( !invoker.zoomed ) origin = SWWMUtility.GetFireOffset(self,10,1,-1); else origin = SWWMUtility.GetPlayerEye(self); let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self); - SilverBulletTracer sst = new("SilverBulletTracer"); + SilverBulletTracer sst = new('SilverBulletTracer'); sst.penetration = invoker.proneme?1200.:1000.; sst.hitlist.Clear(); sst.shootthroughlist.Clear(); @@ -499,7 +499,7 @@ Class SilverBullet : SWWMWeapon ProcessTraceHit(sst,origin,x2); for ( int i=0; i<16; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= 1.3; s.alpha *= .5; s.special1 = Random[Silverbullet](0,3); @@ -508,7 +508,7 @@ Class SilverBullet : SWWMWeapon } for ( int i=0; i<34; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= 1.8; s.alpha *= .8; s.special1 = Random[Silverbullet](0,2); @@ -517,7 +517,7 @@ Class SilverBullet : SWWMWeapon } for ( int i=0; i<20; i++ ) { - let s = Spawn("SWWMSpark",origin); + let s = Spawn('SWWMSpark',origin); s.scale *= .4; s.alpha *= .4; s.vel += vel*.5+x*FRandom[Silverbullet](4.,8.)+y*FRandom[Silverbullet](-1,1)+z*FRandom[Silverbullet](-1,1); @@ -531,7 +531,7 @@ Class SilverBullet : SWWMWeapon { let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,10,-8); - let c = Spawn("SilverBulletCasing",origin); + let c = Spawn('SilverBulletCasing',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.5,.5)+y*FRandom[Junk](4,8)-(0,0,FRandom[Junk](1,3)); @@ -541,10 +541,10 @@ Class SilverBullet : SWWMWeapon { let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,10,10,-8); - MagAmmo ma = MagAmmo(FindInventory("SilverBullets")); + MagAmmo ma = MagAmmo(FindInventory('SilverBullets')); if ( !ma ) { - ma = MagAmmo(Spawn("SilverBullets")); + ma = MagAmmo(Spawn('SilverBullets')); ma.Amount = 0; ma.AttachToOwner(self); } @@ -555,7 +555,7 @@ Class SilverBullet : SWWMWeapon } else { - let c = Spawn("SilverBullets",origin); + let c = Spawn('SilverBullets',origin); c.vel = x*FRandom[Junk](-.5,.5)+y*FRandom[Junk](4,8)-(0,0,FRandom[Junk](1,3)); c.vel += vel*.5; } @@ -574,23 +574,23 @@ Class SilverBullet : SWWMWeapon } action void A_DropMag() { - MagAmmo ma = MagAmmo(FindInventory("SilverBullets")); + MagAmmo ma = MagAmmo(FindInventory('SilverBullets')); if ( !ma ) { - ma = MagAmmo(Spawn("SilverBullets")); + ma = MagAmmo(Spawn('SilverBullets')); ma.Amount = 0; ma.AttachToOwner(self); } int maxgiveamt = min(ma.MaxAmount-ma.Amount,invoker.clipcount); int dropamt = invoker.clipcount-maxgiveamt; - if ( dropamt > 0 ) invoker.BufferMagAmmo("SilverBullets",dropamt); + if ( dropamt > 0 ) invoker.BufferMagAmmo('SilverBullets',dropamt); ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount); ma.MagFill(); invoker.ClipCount = 0; if ( swwm_nomagdrop ) return; let [x, y, z] = SWWMUtility.GetPlayerAxes(self); Vector3 origin = SWWMUtility.GetFireOffset(self,6,0,-15); - let c = Spawn("SilverBulletMag",origin); + let c = Spawn('SilverBulletMag',origin); c.angle = angle; c.pitch = pitch; c.vel = x*FRandom[Junk](-.5,.5)+y*FRandom[Junk](-.5,.5)-(0,0,FRandom[Junk](2,3)); @@ -607,7 +607,7 @@ Class SilverBullet : SWWMWeapon Vector3 origin = SWWMUtility.GetFireOffset(self,-10,0,-10); for ( int i=0; i<4; i++ ) { - let s = Spawn("SWWMSmoke",origin); + let s = Spawn('SWWMSmoke',origin); s.scale *= 1.3; s.alpha *= .5*invoker.specialf1; s.special1 = Random[Silverbullet](0,3); @@ -618,7 +618,7 @@ Class SilverBullet : SWWMWeapon action void A_LoadMag() { - MagAmmo sb = MagAmmo(FindInventory("SilverBullets")); + MagAmmo sb = MagAmmo(FindInventory('SilverBullets')); if ( sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) ) invoker.clipcount = invoker.default.clipcount; else if ( (invoker.Ammo1.Amount <= 0) || (sb.Amount >= sb.ClipSize) ) @@ -627,9 +627,9 @@ Class SilverBullet : SWWMWeapon invoker.clipcount = takeamt; sb.Amount -= takeamt; int req = invoker.default.ClipCount-invoker.clipcount; - if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo("SilverBullets",req); + if ( req > 0 ) invoker.clipcount += invoker.FetchBufferedMagAmmo('SilverBullets',req); } - else if ( invoker.FetchBufferedMagAmmo("SilverBullets",sb.ClipSize,true) ) + else if ( invoker.FetchBufferedMagAmmo('SilverBullets',sb.ClipSize,true) ) invoker.clipcount = invoker.default.clipcount; else { @@ -650,10 +650,10 @@ Class SilverBullet : SWWMWeapon if ( chambered ) { // first check the bullet in the chamber - let ma = Owner.FindInventory("SilverBullets"); + let ma = Owner.FindInventory('SilverBullets'); if ( !ma ) { - ma = Inventory(Spawn("SilverBullets")); + ma = Inventory(Spawn('SilverBullets')); ma.Amount = 0; ma.AttachToOwner(Owner); } @@ -663,10 +663,10 @@ Class SilverBullet : SWWMWeapon } if ( clipcount > 0 ) { - let ma = Owner.FindInventory("SilverBullets"); + let ma = Owner.FindInventory('SilverBullets'); if ( !ma ) { - ma = Inventory(Spawn("SilverBullets")); + ma = Inventory(Spawn('SilverBullets')); ma.Amount = 0; ma.AttachToOwner(Owner); } @@ -726,9 +726,9 @@ Class SilverBullet : SWWMWeapon Weapon.SelectionOrder 800; Weapon.UpSound "silverbullet/select"; Stamina 400000; - Weapon.AmmoType1 "SilverBulletAmmo"; + Weapon.AmmoType1 'SilverBulletAmmo'; Weapon.AmmoGive1 1; - SWWMWeapon.DropAmmoType "SWWMCellAmmoSmall"; + SWWMWeapon.DropAmmoType 'SWWMCellAmmoSmall'; SilverBullet.ClipCount 5; +SWWMWEAPON.NOFIRSTGIVE; +WEAPON.ALT_AMMO_OPTIONAL; @@ -768,21 +768,21 @@ Class SilverBullet : SWWMWeapon { if ( !invoker.chambered || invoker.fired ) { - if ( !invoker.fired && (invoker.clipcount <= 0) && (sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) || (invoker.Ammo1.Amount > 0) || (CountInv("SilverBullets") > 0)) ) - return ResolveState("Reload"); - return ResolveState("AltFire"); + if ( !invoker.fired && (invoker.clipcount <= 0) && (sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) || (invoker.Ammo1.Amount > 0) || (CountInv('SilverBullets') > 0)) ) + return ResolveState('Reload'); + return ResolveState('AltFire'); } A_SilverFire(); invoker.fired = true; - return A_JumpIf(invoker.zoomed,"ZoomFire"); + return A_JumpIf(invoker.zoomed,'ZoomFire'); } XZW2 OPQR 2; XZW2 STUVW 3; - XZW2 A 1 A_JumpIf(invoker.specialf1<=0.,"Ready"); + XZW2 A 1 A_JumpIf(invoker.specialf1<=0.,'Ready'); Wait; ZoomFire: TNT1 A 24; - TNT1 A 1 A_JumpIf(invoker.specialf1<=0.,"ZoomReady"); + TNT1 A 1 A_JumpIf(invoker.specialf1<=0.,'ZoomReady'); Wait; Jet: TNT1 A 3 @@ -794,7 +794,7 @@ Class SilverBullet : SWWMWeapon A_StartSound("silverbullet/jet",CHAN_WEAPON,CHANF_OVERLAP); if ( !invoker.zoomed ) { - A_Overlay(PSP_WEAPON+1,"JetSmoke"); + A_Overlay(PSP_WEAPON+1,'JetSmoke'); A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_ALPHA|PSPF_FORCESTYLE|PSPF_FORCEALPHA,true); A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add); } @@ -815,7 +815,7 @@ Class SilverBullet : SWWMWeapon TNT1 A 1; Stop; AltFire: - XZW2 A 0 A_JumpIf(invoker.zoomed,"ZoomCock"); + XZW2 A 0 A_JumpIf(invoker.zoomed,'ZoomCock'); Goto DoCock; ZoomCock: TNT1 A 12 A_StartSound("silverbullet/meleestart",CHAN_WEAPON,CHANF_OVERLAP); @@ -828,8 +828,8 @@ Class SilverBullet : SWWMWeapon { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - if ( invoker.fired ) A_Overlay(layer,"ZoomCasing"); - else A_Overlay(layer,"ZoomBullet"); + if ( invoker.fired ) A_Overlay(layer,'ZoomCasing'); + else A_Overlay(layer,'ZoomBullet'); } if ( !invoker.chambered || invoker.fired ) invoker.wastecycle = 0; invoker.fired = false; @@ -857,8 +857,8 @@ Class SilverBullet : SWWMWeapon { int layer = PSP_WEAPON+2; while ( player.FindPSprite(layer) ) layer++; - if ( invoker.fired ) A_Overlay(layer,"Casing"); - else A_Overlay(layer,"Bullet"); + if ( invoker.fired ) A_Overlay(layer,'Casing'); + else A_Overlay(layer,'Bullet'); } if ( !invoker.chambered || invoker.fired ) invoker.wastecycle = 0; invoker.fired = false; @@ -907,7 +907,7 @@ Class SilverBullet : SWWMWeapon TNT1 A 0 A_DropBullet(); Stop; Zoom: - XZW2 A 0 A_JumpIf(invoker.zoomed,"UnZoom"); + XZW2 A 0 A_JumpIf(invoker.zoomed,'UnZoom'); XZW2 A 2 { A_StartSound("silverbullet/zoomstart",CHAN_WEAPON,CHANF_OVERLAP); @@ -923,7 +923,7 @@ Class SilverBullet : SWWMWeapon if ( !(player.cmd.buttons&BT_ZOOM) ) { invoker.rezoom = 3; - return ResolveState("ZoomReady"); + return ResolveState('ZoomReady'); } return ResolveState(null); } @@ -952,14 +952,14 @@ Class SilverBullet : SWWMWeapon Reload: XZW2 A -1 { - if ( (invoker.clipcount >= invoker.default.clipcount) || (!sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) && (invoker.Ammo1.Amount <= 0) && (CountInv("SilverBullets") <= 0)) ) - return ResolveState("Idle"); + if ( (invoker.clipcount >= invoker.default.clipcount) || (!sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) && (invoker.Ammo1.Amount <= 0) && (CountInv('SilverBullets') <= 0)) ) + return ResolveState('Idle'); if ( invoker.zoomed ) { - invoker.dezoomstate = ResolveState("Unload"); - return ResolveState("UnZoom"); + invoker.dezoomstate = ResolveState('Unload'); + return ResolveState('UnZoom'); } - return ResolveState("Unload"); + return ResolveState('Unload'); } Stop; Unload: @@ -1003,10 +1003,10 @@ Class SilverBullet : SWWMWeapon { if ( invoker.zoomed ) { - invoker.dezoomstate = ResolveState("DoIdle"); - return ResolveState("UnZoom"); + invoker.dezoomstate = ResolveState('DoIdle'); + return ResolveState('UnZoom'); } - return ResolveState("DoIdle"); + return ResolveState('DoIdle'); } Stop; DoIdle: @@ -1026,10 +1026,10 @@ Class SilverBullet : SWWMWeapon { if ( invoker.zoomed ) { - invoker.dezoomstate = ResolveState("DoUser1"); - return ResolveState("UnZoom"); + invoker.dezoomstate = ResolveState('DoUser1'); + return ResolveState('UnZoom'); } - return ResolveState("DoUser1"); + return ResolveState('DoUser1'); } Stop; DoUser1: @@ -1059,10 +1059,10 @@ Class SilverBullet : SWWMWeapon { if ( invoker.zoomed ) { - invoker.dezoomstate = ResolveState("DoDeselect"); - return ResolveState("UnZoom"); + invoker.dezoomstate = ResolveState('DoDeselect'); + return ResolveState('UnZoom'); } - return ResolveState("DoDeselect"); + return ResolveState('DoDeselect'); } Stop; DoDeselect: @@ -1073,7 +1073,7 @@ Class SilverBullet : SWWMWeapon Flash: XZWZ A 2 Bright { - let l = Spawn("SWWMWeaponLight",pos); + let l = Spawn('SWWMWeaponLight',pos); l.args[3] = 200; l.target = self; } diff --git a/zscript/weapons/swwm_thiccboolet_fx.zsc b/zscript/weapons/swwm_thiccboolet_fx.zsc index 19226b0b2..f25187db5 100644 --- a/zscript/weapons/swwm_thiccboolet_fx.zsc +++ b/zscript/weapons/swwm_thiccboolet_fx.zsc @@ -99,7 +99,7 @@ Class SilverImpact : SWWMNonInteractiveActor for ( int i=0; igametic)&&((failtime-gametic)%8>=4); - Screen.DrawText(AmmoFont,Font.FindFontColor("MiniIce"),bx-22,by-8,String.Format("%3d",clamp(int(chg),0,100)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0)); + Screen.DrawText(AmmoFont,Font.FindFontColor('MiniIce'),bx-22,by-8,String.Format("%3d",clamp(int(chg),0,100)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0)); double ch = chg*20./100.; Screen.DrawTexture(AmmoBar,false,bx-5,by-(2+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,20.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,Color(255,0,0,0)); Screen.DrawTexture(AmmoBar,false,bx-6,by-(3+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,20.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0));