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

31 lines
479 B
Lua
Raw Normal View History

2021-02-06 12:42:10 -08:00
local Public = {}
-- one table to rule them all!
local Global = require 'utils.global'
local ffatable = {}
Global.register(
2021-03-24 16:46:00 +01:00
ffatable,
function(tbl)
ffatable = tbl
end
2021-02-06 12:42:10 -08:00
)
function Public.reset_table()
2021-03-24 16:46:00 +01:00
for k, _ in pairs(ffatable) do
ffatable[k] = nil
end
2021-02-06 12:42:10 -08:00
end
function Public.get_table()
2021-03-24 16:46:00 +01:00
return ffatable
2021-02-06 12:42:10 -08:00
end
2021-03-24 16:46:00 +01:00
local on_init = function()
Public.reset_table()
2021-02-06 12:42:10 -08:00
end
local Event = require 'utils.event'
Event.on_init(on_init)
2021-03-24 16:46:00 +01:00
return Public