aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/config/sv_config.lua
blob: 2173dc04a3fb21347fc276ba675bb22598663bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--[[
	Allows addons to add config settings for easy manipulation
]]

local config = {}

--Master list of addons, and the config for each
local addons = {}

local function config_number(panel)
	error("TODO")
end
local config_types = {
	["number"] = config_number,
	["boolean"] = config_boolean,
	["option"] = config_option,
	["text"] = config_text,
}
function config.RegisterConfig(name,t,func)
	assert(config_types[t],string.format("Attempted to register unknown config type %q, allowed types are %s"),t,table.concat(table.GetKeys(config_types)))
	local tb = debug.getinfo(-1,"flnSu")
	print("Debug info was:")
	PrintTable(tb)
end

return config