//=============================================================================
// sgItemLeecher
// by SK
//=============================================================================
class sgItemLeecher extends sgItem;

var Pawn Damager;

function PostBeginPlay()
{
	local Pawn p;
	local string sLocation;

	Super.PostBeginPlay();
}

event TakeDamage( int damage, Pawn instigatedBy, Vector hitLocation, 
  Vector momentum, name damageType )
{
    Damager = instigatedBy;
    Super.TakeDamage(damage, instigatedBy, hitLocation, momentum, damageType);
}

function Destruct()
{
    Super.Destruct();
}

function PlayFinishSound()
{
    PlaySound(FinishSound, SLOT_None, 5);
}

function Inventory GiveItem(Pawn target)
{
    local Pawn p;
    local Inventory inv;
    inv = Super.GiveItem(target);
    if ( inv != None )
    {
        //target.PlaySound(Sound'UnrealShare.Pickups.WeaponPickup', SLOT_None, target.SoundDampening*3);
	if (target.DrawScale < Target.default.DrawScale)
	{

        	for ( p = Level.PawnList; p != None; p = p.nextPawn )
            		if ( p.IsA('TournamentPlayer') &&
              		p.PlayerReplicationInfo.Team != Team )
                		TournamentPlayer(P).ReceiveLocalizedMessage(class'sgMidgetWarnMsg');
	}
    }
    return inv;
}

defaultproperties
{
    InventoryClass=Class'HyperLeecher'
    AmmoAmount=100
    SwitchToWeapon=True
    BuildingName="Hyper Leecher"
    BuildCost=350
    BuildTime=10.00
    Model=LodMesh'Botpack.BRifle2Pick'
    SkinRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.SuperContainerSkinT0'
    SkinBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.SuperContainerSkinT1'
    SkinGreenTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.SuperContainerSkinT2'
    SkinYellowTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.SuperContainerSkinT3'
    SpriteRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.CoreSpriteTeam0'
    SpriteBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.CoreSpriteTeam1'
    SpriteGreenTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.CoreSpriteTeam2'
    SpriteYellowTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.CoreSpriteTeam3'
    
    bNoUpgrade=True
}
