More deathmatch stuff.
This commit is contained in:
parent
8e3a26487c
commit
3dd2b45f2a
14 changed files with 64 additions and 12 deletions
|
|
@ -556,7 +556,13 @@ Class HammerspaceEmbiggener : Inventory
|
|||
|
||||
// used when cheating or trading, this version does not give ammo and is meant
|
||||
// only for GiveInventory, so it shouldn't be spawned in the world
|
||||
Class TradedHammerspaceEmbiggener : HammerspaceEmbiggener {}
|
||||
Class TradedHammerspaceEmbiggener : HammerspaceEmbiggener
|
||||
{
|
||||
Default
|
||||
{
|
||||
-COUNTITEM;
|
||||
}
|
||||
}
|
||||
|
||||
// used to denote "merged" embiggeners, changes color based on amount
|
||||
// green (2+)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,15 @@ Mixin Class SWWMAutoUseFix
|
|||
{
|
||||
if ( GetClass() == item.GetClass() )
|
||||
{
|
||||
if ( Use(true) ) Amount--;
|
||||
if ( deathmatch && !bALWAYSPICKUP )
|
||||
{
|
||||
// don't allow picking up any more than just one copy in DM unless it can be auto-used
|
||||
if ( Use(true) ) Amount--;
|
||||
else return true;
|
||||
}
|
||||
else if ( Use(true) ) Amount--;
|
||||
// sell excess if there's a price
|
||||
if ( bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina != 0) )
|
||||
if ( !deathmatch && bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina != 0) )
|
||||
{
|
||||
int sellprice = int(abs(Stamina)*.5);
|
||||
SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2));
|
||||
|
|
@ -18,6 +24,16 @@ Mixin Class SWWMAutoUseFix
|
|||
}
|
||||
return Super.HandlePickup(item);
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !deathmatch ) return Super.TryPickup(toucher);
|
||||
// pretend to have a max amount of 0 so we can only be picked up if we can be used
|
||||
int oldmax = MaxAmount;
|
||||
MaxAmount = 0;
|
||||
bool ret = Super.TryPickup(toucher);
|
||||
MaxAmount = oldmax;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Class CrossLineFinder : LineTracer
|
||||
|
|
|
|||
|
|
@ -1280,6 +1280,11 @@ Class Omnisight : Inventory
|
|||
}
|
||||
return false;
|
||||
}
|
||||
override bool ShouldSpawn()
|
||||
{
|
||||
if ( deathmatch ) return false;
|
||||
return Super.ShouldSpawn();
|
||||
}
|
||||
Default
|
||||
{
|
||||
//$Title Omnisight
|
||||
|
|
@ -1913,6 +1918,11 @@ Class SWWMLamp : Inventory
|
|||
Amount++;
|
||||
return true;
|
||||
}
|
||||
override bool ShouldSpawn()
|
||||
{
|
||||
if ( deathmatch ) return false;
|
||||
return Super.ShouldSpawn();
|
||||
}
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue