local D=script.Parent local p=require(D.Core.Remote)local n=require(script.Default)local I=p.getCore()local b={}function b.fixConfig(D)for p,n in pairs(n)do D[p]=D[p]or n end end function b.getConfig()local D=b.config if D then return D end return I.config end return b
-- OptimisticSide
-- 5/8/2021
-- Config manager

local package = script.Parent

local Remote = require(package.Core.Remote)
local defaultConfig = require(script.Default)

local Core = Remote.getCore()

local Config = {}

-- Ensure config's validity with
-- the default settings.
function Config.fixConfig(config)
	for setting, default in pairs(defaultConfig) do
		config[setting] = config[setting] or default
	end
end

-- Get the system's config.
function Config.getConfig()
	-- Return if already stored locally.
	local localConfig = Config.config
	if localConfig then
		return localConfig
	end

	-- Otherwise, get it from core.
	return Core.config
end

return Config
