items = {}

dofile( "scripts/items/weapon_thingy.lua" )
dofile( "scripts/items/bomb_thingy.lua" )
dofile( "scripts/items/option_thingy.lua" )
dofile( "scripts/items/shield_thingy.lua" )
dofile( "scripts/items/energy.lua" )

function ProcessItems()
	for key, value in pairs(items) do
		value.y = value.y + value.speed
		SetObjPos( value.sprite, value.x, value.y, -0.25 )
		for i = 1, players_num do
			if intersect( value, players[i] ) then
				value.get(i)
				delete( items, key )
			elseif value.y > 400 then
				delete( items, key )
			end
		end
	end
end

function ResetItems()
	items = {}
end