What's the proper way to initialize a cache to the game table? I cannot do it in on_load since game doesn't exist, yet. Right now, I've resorted to doing:
Code: Select all
local hacked_cache = nil
script.on_event (
defines.events.on_tick,
function (event)
if hacked_cache == nil then
build_hacked_cache()
end
...
)
Thanks for the assist.