feat: remove itemDB initialization and related flush calls for streamlined inventory management

This commit is contained in:
MayaTheShy
2026-03-25 22:38:10 -04:00
parent 5dd9bd9344
commit 641a317873

View File

@@ -52,8 +52,6 @@ end
local log = dofile(_path("lib/log.lua"))
local ui = dofile(_path("lib/ui.lua"))
local itemDB = dofile(_path("lib/itemDB.lua"))
itemDB.init(_configPath(".item_names.db"))
-------------------------------------------------
-- Load modules (factory pattern → shared context)
@@ -85,7 +83,6 @@ ctx.display = display
local craftEngine = dofile(_path("lib/craft.lua"))
craftEngine.init(cfg.recipeBook, ops.getItemTotal)
ctx.craftEngine = craftEngine
ctx.itemDB = itemDB
-- Convenience aliases
local cache = state.cache
@@ -390,7 +387,6 @@ local function main()
sleep(cfg.SCAN_INTERVAL)
pcall(ops.refreshCache)
pcall(ops.checkAlerts)
pcall(function() itemDB.flush() end)
pcall(function() cfg.recipeBook.flush() end)
state.needsRedraw = true
state.smelterNeedsRedraw = true