1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-26 03:52:22 +02:00

49 lines
795 B
Lua
Raw Normal View History

2022-03-15 19:59:38 +01:00
local Global = require 'utils.global'
local this = {
settings = {
chunk_load_tick = false,
chunks_charted = {}
}
}
Global.register(
this,
function(tbl)
this = tbl
end
)
local Public = {}
function Public.get(key)
if key then
return this[key]
else
return this
end
end
function Public.set(key, value)
if key and (value or value == false) then
this[key] = value
return this[key]
elseif key then
return this[key]
else
return this
end
end
function Public.remove(key, sub_key)
if key then
if this[key] and this[key][sub_key] then
this[key][sub_key] = nil
elseif this[key] then
this[key] = nil
end
end
end
return Public