local seen={}

function dump(t,i)
	seen[t]=true
	local s={}
	local n=0
	for k in pairs(t) do
		n=n+1 s[n]=k
	end
	table.sort(s)
	for k,v in ipairs(s) do
		local file = io.open("funcs.txt", "a")
		file:write(i,v)
		file:close()
		print(i,v)
		v=t[v]
		if type(v)=="table" and not seen[v] then
			dump(v,i.."\t")
		end
	end
end



function init()
	--dump(_G,"")
	-- Update the search path
	local module_folder = "scripts/"
	package.path = module_folder .. "?.lua;" .. package.path

	GRAPHICS.SET_DEBUG_LINES_AND_SPHERES_DRAWING_ACTIVE(1)
end
function tick()
	if (package.loaded.SWATteam ~= nil) then
		package.loaded.SWATteam = nil
	end
	SWATteam = require "SWATteam"
	SWATteam.tick()
	
end