//=============================================================================
// DumbInv. Dumb inventory.
//		
//=============================================================================
class DumbInv expands Inventory;

var bool bTeamOnly;
var byte LockerTeam;

var class<Weapon> LWeapon[16];
var int AbsoluteAmmo[16];
var int AmmoDifAllowed[16];
var int AmmoPickup[16];


function PostBeginPlay()
{
	Super.PostBeginPlay();
	Texture = None;
}

event float BotDesireability( pawn Bot )
{
local float BotDes;

	If (bTeamOnly && Level.Game.IsA('TeamGamePlus'))
		{
			If (Bot.PlayerReplicationInfo.Team == LockerTeam)
				BotDes = Weaponry(Bot);
			else
				BotDes = -1;
		}
		else
				BotDes = Weaponry(Bot);

	If (VSize(Bot.Location - Location) < 48)
		BotDes = -1;

	return BotDes;
}


function float Weaponry( pawn P)
{
local int i, WeaponCounter, AmmoCounter;
local Weapon InvK;
local float Total;

	WeaponCounter = 0;
	AmmoCounter = 0;

	For (i=0; i<16; i++)
	{
		if (LWeapon[i] != None)
		{
			If (P.FindInventoryType(LWeapon[i]) != None)
			{
				InvK = Weapon(P.FindInventoryType(LWeapon[i]));
				If( (AbsoluteAmmo[i] - InvK.AmmoType.AmmoAmount) > AmmoDifAllowed[i] && AbsoluteAmmo[i]!=0)
					AmmoCounter++;
			}
			else
				WeaponCounter++;
			
		}
	}

	Total = WeaponCounter * 0.2 + AmmoCounter * 0.1;

	if (Total <= 0)
		Total = -1;

	return Total;
}


function BecomeItem(){}

function GiveTo( pawn Other ){}

function inventory SpawnCopy( pawn Other ){}

function SetRespawn(){}

auto state Pickup
{
    function Touch( actor Other );
}

function Touch( actor Other );


defaultproperties
{
	DrawType=DT_None
	RemoteRole=ROLE_DumbProxy
	bHidden=True
	ReSpawnTime=0.100000
	PickupMessage=""
	PickupSound=None
}

