
ITEM.Name = "Dufflebag";

ITEM.Weight = .1;
ITEM.Size = 0;
ITEM.Model = "models/props_junk/garbage_bag001a.mdl";
ITEM.Usable = false;
ITEM.Wearable = true;

ITEM.Desc = "A dufflebag, dunno if it's legal or not..";

ITEM.License = 3;
ITEM.FactoryBuyable = true;
ITEM.FactoryPrice = 50;
ITEM.FactoryStock = 3;

function ITEM:CanPickup( ply )

	if( ply:HasItem( "dufflebag" ) ) then
		ply:PrintMessage( 3, "You already have a dufflebag" );
		return false;
	end
	
	return true;

end

function ITEM:OnPickup()

	if( self.Owner:HasItem( "backpack" ) ) then
		self.Owner:SetField( "inventory.MaxSize", 48 );
		self.Owner:SetPrivateFloat( "inventory.MaxSize", 48 );
	else
		self.Owner:SetField( "inventory.MaxSize", 28 );
		self.Owner:SetPrivateFloat( "inventory.MaxSize", 28 );
	end

end

function ITEM:OnDrop()

	if( self.Owner:HasItem( "backpack" ) ) then
		self.Owner:SetField( "inventory.MaxSize", 32 );
		self.Owner:SetPrivateFloat( "inventory.MaxSize", 32 );
	else
		self.Owner:SetField( "inventory.MaxSize", 6 );
		self.Owner:SetPrivateFloat( "inventory.MaxSize", 6 );
	end
	
	

end

