Overhaul the "swap weapon" prompt display.
This commit is contained in:
parent
507126b7b1
commit
67d8235459
7 changed files with 240 additions and 12 deletions
|
|
@ -136,6 +136,31 @@ extend Class SWWMHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ( e.Name.Left(15) ~== "swwmwpnswaptip." )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
if ( !bar ) return;
|
||||
// network IDs finally becoming useful here
|
||||
uint ida = e.Name.Mid(15,8).ToInt(16);
|
||||
uint idb = e.Name.Mid(23,8).ToInt(16);
|
||||
let wa = Inventory(Object.GetNetworkEntity(ida));
|
||||
let wb = Inventory(Object.GetNetworkEntity(idb));
|
||||
if ( !wa || !wb ) return;
|
||||
if ( e.Args[0] )
|
||||
{
|
||||
// force to expire
|
||||
if ( bar.cstip ) bar.cstip.Expire(wa,wb);
|
||||
return;
|
||||
}
|
||||
if ( bar.cstip )
|
||||
{
|
||||
bar.cstip.Poke(wa,wb);
|
||||
return;
|
||||
}
|
||||
let tt = new("SWWMWeaponSwapTip").Init(wa,wb);
|
||||
bar.cstip = tt;
|
||||
bar.AttachMessage(tt,-2911);
|
||||
}
|
||||
else if ( e.Name.Left(12) ~== "swwmnametag." )
|
||||
{
|
||||
let bar = SWWMStatusBar(StatusBar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue