ExperimentalGear/scripts/common/gameconfig.lua

14 lines
348 B
Lua
Raw Normal View History

Config = {}
function RefreshConfig()
local path, sep = debug.getinfo(1,"S").source:sub(2):match("(.*)([\\/])skins")
local f = io.open(path .. sep .. "Main.cfg", "r")
for line in f:lines("l") do
local key, value = line:match("(%w*)%s*=%s*\"?([^\"%s]*)\"?")
Config[key] = value
end
f:close()
end
RefreshConfig()