Class GHAGBackpack : Inventory replaces Backpack
{
	Default
	{
		Inventory.MaxAmount 10;
		+Inventory.AlwaysPickup;
	}
	
	override bool TryPickup(in out Actor toucher)
	{
		for (let probe = toucher.Inv; probe != NULL; probe = probe.Inv)
		{
			let ammoitem = Ammo(probe);
			if (ammoitem && ammoitem.GetParentAmmo() == ammoitem.GetClass())
			{
				if (toucher.countInv("GHAGBackpack") < self.MaxAmount)
				{
					toucher.setAmmoCapacity(ammoitem.getClassName(), int(double(toucher.getAmmoCapacity(ammoitem.getClassName())) * 1.2));
				}
				toucher.giveInventory(ammoitem.GetClassName(), int(double(toucher.getAmmoCapacity(ammoitem.getClassName())) * 0.1));
			}
		}
		
		return Super.TryPickup(toucher);
	}
	
	States
	{
		Spawn:
			BPAK A -1;
			Stop;
	}
}