//=============================================================================
// sgHealthPod.
// * Revised by 7DS'Lust
//=============================================================================
class sgHealthPod extends sgEquipmentSupplier;

function Supply(Pawn target)
{
	local Inventory inv;

    inv = target.FindInventoryType(class'sgArmor');
    if ( inv == None )
    {
        inv = Spawn(class'sgArmor', target);
        if ( inv != None )
            inv.GiveTo(target);
    }
    if ( inv != None && FRand() < 0.1 + (Grade/15) && inv.Charge < 25 +
      Grade*25 )
        inv.Charge = FMin(inv.Charge + 1, 25 + grade * 25 );
	
	if ( FRand() < 0.3 + (Grade/40) && Target.Health < 60 + (grade*15) )
        Target.Health = Target.Health + 1;
	
	if ( FRand() < 0.2 )
        Target.PlaySound(sound'SiegeUltimateRC7UB01Media.sgStockUp', SLOT_Misc,
          Target.SoundDampening*2.5);
}

defaultproperties
{
    BuildingName="Health Pod"
    BuildCost=250
    UpgradeCost=35
    BuildTime=45.00
    MaxEnergy=2500.00
    SpriteScale=0.32
    Model=LodMesh'Botpack.BigSprocket'
    SkinRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PoisonGuardianSkinT0'
    SkinBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.PoisonGuardianSkinT1'
    SpriteRedTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.HealthPodSkinT0'
    SpriteBlueTeam=Texture'SiegeUltimateRC7UB01Media.U.BuildingMaps.HealthPodSkinT1'
    DSofMFX=1.25
    MFXrotX=(Pitch=0,Yaw=5000,Roll=0),
    MultiSkins(0)=Texture'SiegeUltimateRC7UB01Media.GFX.sgSupSpriteT0'
    MultiSkins(1)=Texture'SiegeUltimateRC7UB01Media.GFX.sgSupSpriteT1'
    MultiSkins(2)=Texture'SiegeUltimateRC7UB01Media.GFX.sgSupSpriteT2'
    MultiSkins(3)=Texture'SiegeUltimateRC7UB01Media.GFX.sgSupSpriteT3'
}
