return function(t,o,n)if not t or not o then return false elseif t==o then return true end if not n then n={}end for t,P in pairs(t)do if o[t]~=P and not n[t]then return false end end for o,P in pairs(o)do if t[o]~=P and not n[o]then return false end end return true end
--[[
	Takes two tables A and B, returns if they have the same key-value pairs
	Except ignored keys
]]
return function(A, B, ignore)
	if not A or not B then
		return false
	elseif A == B then
		return true
	end
	if not ignore then
		ignore = {}
	end

	for key, value in pairs(A) do
		if B[key] ~= value and not ignore[key] then
			return false
		end
	end
	for key, value in pairs(B) do
		if A[key] ~= value and not ignore[key] then
			return false
		end
	end

	return true
end
