diff --git a/inventoryManager.lua b/inventoryManager.lua index 24426f4..3f917a2 100644 --- a/inventoryManager.lua +++ b/inventoryManager.lua @@ -39,7 +39,6 @@ local ok, err = xpcall(function() -- Override dofile to load modules into our _ENV so they inherit -- Opus's require/package (CC:Tweaked dofile uses _G instead). -local _ccDofile = dofile local function dofile(path) -- luacheck: ignore local fn, err = loadfile(path, nil, _ENV) if fn then return fn() @@ -148,9 +147,12 @@ local function broadcastState() -- Keep ctx in sync so display.lua can check ctx.craftTurtleOk directly ctx.craftTurtleOk = payload.craftTurtleOk - payload.smeltable = cfg.SMELTABLE - payload.craftable = cfg.CRAFTABLE - state.configDirty = false + -- Only include recipe tables when config has changed (they're large). + if state.configDirty then + payload.smeltable = cfg.SMELTABLE + payload.craftable = cfg.CRAFTABLE + state.configDirty = false + end ctx.networkModem.transmit(cfg.BROADCAST_CHANNEL, cfg.ORDER_CHANNEL, payload) state.lastBroadcastVersion = state.stateVersion