--[[
    Returns a new object of the registry's class and indexes it with the given key
]]

function Registry:add(key, ...)
	if self.objects[key] then
		warn(string.format("[Registry] - object already exists for key %s", tostring(key)))
		self:remove(key)
	end
	local object = self.class.new(key, ...)
	self.objects[key] = object
	return object
end
