mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
31 lines
479 B
Lua
31 lines
479 B
Lua
local Public = {}
|
|
|
|
-- one table to rule them all!
|
|
local Global = require 'utils.global'
|
|
local ffatable = {}
|
|
Global.register(
|
|
ffatable,
|
|
function(tbl)
|
|
ffatable = tbl
|
|
end
|
|
)
|
|
|
|
function Public.reset_table()
|
|
for k, _ in pairs(ffatable) do
|
|
ffatable[k] = nil
|
|
end
|
|
end
|
|
|
|
function Public.get_table()
|
|
return ffatable
|
|
end
|
|
|
|
local on_init = function()
|
|
Public.reset_table()
|
|
end
|
|
|
|
local Event = require 'utils.event'
|
|
Event.on_init(on_init)
|
|
|
|
return Public
|