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:
parent
ceae806b68
commit
80db58b0d0
128 changed files with 3074 additions and 3088 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue