Bump zscript ver to 4.14.1, plus a whole lot of stuff.

- Try to get rid of all implicit casts from string to name, color or class.
 - Use FindClass where needed.
 - Used a map in a case where a dictionary was unneeded.
 - Use new bounce flags where needed.
 - Replace Legacy of Rust weapons/ammo.
This commit is contained in:
Mari the Deer 2025-03-13 14:45:01 +01:00
commit 80db58b0d0
128 changed files with 3074 additions and 3088 deletions

View file

@ -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()) )
{

View file

@ -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;

View file

@ -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);

View file

@ -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"));

View file

@ -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)));

View file

@ -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;

View file

@ -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<numpt; i++ )
{
@ -67,7 +67,7 @@ extend Class SWWMHandler
{
x.angle = e.Thing.angle;
x.bAMBUSH = e.Thing.bAMBUSH;
x.GiveInventory("DontDuplicate",1);
x.GiveInventory('DontDuplicate',1);
break;
}
}

View file

@ -16,11 +16,11 @@ extend Class SWWMHandler
// only Demolitionist can play voice lines
if ( !(players[consoleplayer].mo is 'Demolitionist') )
return 0;
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return 0;
String voicetype = CVar.FindCVar('swwm_voicetype').GetString();
// suppress non-rage comments when ragekit is active, only screaming allowed
if ( players[consoleplayer].mo.FindInventory("RagekitPower") && (type != "ragekit") ) return 0;
if ( players[consoleplayer].mo.FindInventory('RagekitPower') && (type != "ragekit") ) return 0;
// suppress beep-boop lines if voice channel already in use
if ( ((type == "buttonpush") || (type == "mrtouch") || (type == "mrflick"))
&& players[consoleplayer].mo.IsActorPlayingSound(CHAN_DEMOVOICE)
@ -92,7 +92,7 @@ extend Class SWWMHandler
{
// ez
whichline = Random[DemoLines](1,countem);
let lst = new("OnelinerHistory");
let lst = new('OnelinerHistory');
lst.type = type;
lst.lines.Push(whichline);
hnd.gdat.lastlines.Push(lst);
@ -114,7 +114,7 @@ extend Class SWWMHandler
static void CancelOneliner( String type )
{
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
if ( !hnd ) return;
if ( (hnd.onelinertype != type) || (hnd.onelinertic < gametic) ) return;
hnd.onelinertic = 0;

View file

@ -19,7 +19,7 @@ extend Class SWWMHandler
{
if ( !(p.mo is pc.Type) ) continue;
// perform a hotswap, code adapted from my .flow player morph in spooktober
let n = PlayerPawn(Actor.Spawn("Demolitionist",p.mo.pos));
let n = PlayerPawn(Actor.Spawn('Demolitionist',p.mo.pos));
n.player = p;
n.angle = p.mo.angle;
n.pitch = p.mo.pitch;
@ -27,7 +27,7 @@ extend Class SWWMHandler
p.mo.Destroy();
p.mo = n;
n.GiveDefaultInventory();
let e = Weapon(n.FindInventory("ExplodiumGun"));
let e = Weapon(n.FindInventory('ExplodiumGun'));
if ( e )
{
p.ReadyWeapon = null;
@ -44,14 +44,14 @@ extend Class SWWMHandler
SWWMCredits c = SWWMCredits.Find(p);
if ( !c )
{
c = new("SWWMCredits");
c = new('SWWMCredits');
c.ChangeStatNum(Thinker.STAT_STATIC);
c.myplayer = p;
}
SWWMLoreLibrary l = SWWMLoreLibrary.Find(p);
if ( !l )
{
l = new("SWWMLoreLibrary");
l = new('SWWMLoreLibrary');
l.ChangeStatNum(Thinker.STAT_STATIC);
l.myplayer = p;
}
@ -82,7 +82,7 @@ extend Class SWWMHandler
SWWMStats s = SWWMStats.Find(p);
if ( !s )
{
s = new("SWWMStats");
s = new('SWWMStats');
s.ChangeStatNum(Thinker.STAT_STATIC);
s.myplayer = p;
s.lastspawn = level.totaltime;

View file

@ -104,7 +104,7 @@ extend Class SWWMHandler
Class<Key> 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<Weapon>)(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();

View file

@ -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--;

View file

@ -6,203 +6,203 @@ extend Class SWWMHandler
private Class<Actor> GetDRLAReplacee( Class<Actor> 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<Actor> GetLOBReplacee( Class<Actor> 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<Actor> GetDRLAReplacement( Class<Actor> 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<Actor> GetLOBReplacement( Class<Actor> 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';

View file

@ -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;

View file

@ -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;

View file

@ -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()) )
{

View file

@ -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<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || !players[i].mo ) continue;
let cg = players[i].mo.FindInventory("GoldShell");
let cg = players[i].mo.FindInventory('GoldShell');
if ( cg ) totalneeded += cg.MaxAmount-cg.Amount;
else totalneeded = GetDefaultByType("GoldShell").MaxAmount;
else totalneeded = GetDefaultByType('GoldShell').MaxAmount;
}
// subtract any shells already in the world
let ti = ThinkerIterator.Create("GoldShell");
let ti = ThinkerIterator.Create('GoldShell');
GoldShell g;
while ( g = GoldShell(ti.Next()) )
{
@ -71,7 +71,7 @@ extend Class SWWMHandler
override void WorldThingDied( WorldEvent e )
{
if ( profiling ) ProfileTick();
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()) )
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);

View file

@ -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<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || !players[i].mo ) continue;
let f = Actor.Spawn("PartyTime",players[i].mo.pos);
let f = Actor.Spawn('PartyTime',players[i].mo.pos);
if ( altclear ) f.bSTANDSTILL = true;
else f.bAMBUSH = true;
if ( mapclearagain )

View file

@ -21,7 +21,7 @@ Class SWWMStaticHandler : StaticEventHandler
int checktic;
int maptime;
bool unloading;
ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions
ui Map<String, String> 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<Thinker> 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<Thinker.MAX_STATNUM; i++ )
{
let ti = ThinkerIterator.Create("Thinker",i);
let ti = ThinkerIterator.Create('Thinker',i);
foreach ( t:ti )
{
if ( t is 'Actor' ) continue;
@ -675,7 +675,7 @@ Class SWWMStaticHandler : StaticEventHandler
if ( e.IsManual ) return;
if ( e.Name.Left(16) ~== "swwmachievement." )
{
let c = Actor.Spawn("PartyTime",players[e.Args[0]].mo.pos);
let c = Actor.Spawn('PartyTime',players[e.Args[0]].mo.pos);
c.bSTANDSTILL = true;
if ( e.Args[0] == consoleplayer )
{
@ -691,7 +691,7 @@ Class SWWMStaticHandler : StaticEventHandler
}
else if ( e.Name ~== "swwmsessionid" )
{
let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC);
let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC);
let svd = SWWMSaveVerData(ti.Next());
if ( !uid ) uid = e.Args[0];
if ( svd && !svd.uid ) svd.uid = e.Args[0];
@ -714,7 +714,7 @@ Class SWWMStaticHandler : StaticEventHandler
String cver = StringTable.Localize("$SWWM_SHORTVER");
if ( tainted )
{
let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC);
let ti = ThinkerIterator.Create('SWWMSaveVerData',Thinker.STAT_STATIC);
let svd = SWWMSaveVerData(ti.Next());
if ( !svd ) Console.Printf("\cgWARNING:\n \cjSave contains no version data. Issues may happen.\c-");
else
@ -742,7 +742,7 @@ Class SWWMStaticHandler : StaticEventHandler
msgpick = Random[UIStuff](1,8);
String str = StringTable.Localize("$CRASHMSG"..msgpick.."A");
Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cf%s\c-",str);
let hnd = SWWMBrutalHandler(StaticEventHandler.Find("SWWMBrutalHandler"));
let hnd = SWWMBrutalHandler(StaticEventHandler.Find('SWWMBrutalHandler'));
if ( hnd && hnd.detected )
{
S_StartSound("crash/glass",CHAN_YABLEWIT,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1,ATTN_NONE);

View file

@ -59,7 +59,7 @@ extend Class SWWMStaticHandler
{
achievementstate.Insert(a.basename,"2");
EventHandler.SendNetworkEvent("swwmachievement."..a.basename,consoleplayer);
let notif = new("SWWMAchievementNotification").Init(a.basename,a.icon,a.hasformat?a.maxval:0);
let notif = new('SWWMAchievementNotification').Init(a.basename,a.icon,a.hasformat?a.maxval:0);
StatusBar.AttachMessage(notif,-3478);
lastachievementnotify = gametic+200;
}
@ -97,7 +97,7 @@ extend Class SWWMStaticHandler
{
achievementstate.Insert("everything","2");
EventHandler.SendNetworkEvent("swwmachievement."..achievementinfo[ev].basename,consoleplayer);
let notif = new("SWWMAchievementNotification").Init(achievementinfo[ev].basename,achievementinfo[ev].icon);
let notif = new('SWWMAchievementNotification').Init(achievementinfo[ev].basename,achievementinfo[ev].icon);
StatusBar.AttachMessage(notif,-3478);
lastachievementnotify = gametic+200;
}
@ -131,7 +131,7 @@ extend Class SWWMStaticHandler
else if ( !(gameinfo.gametype&GAME_HEXEN) && (ln[3] ~== "hexen") ) continue;
else if ( !(gameinfo.gametype&GAME_RAVEN) && (ln[3] ~== "raven") ) continue;
else if ( !(gameinfo.gametype&(GAME_DOOM|GAME_HERETIC)) && (ln[3] ~== "nothexen") ) continue;
let ac = new("SWWMAchievementInfo");
let ac = new('SWWMAchievementInfo');
ac.baseindex = bidx;
ac.basename = ln[0];
ac.icon = TexMan.CheckForTexture("graphics/Achievements/Achievement"..ac.basename..".png");