farm_control.lua: fixed bug in check_levels for empty containers

This commit is contained in:
Emerson Rosen-Jones 2025-11-13 15:40:02 -05:00
parent f56763aa50
commit 58765ec296

View file

@ -39,7 +39,8 @@ function check_levels (levels, src)
end
local needs_farming = {}
for item, data in pairs(levels) do
if amounts[item] ~= nil and amounts[item] < data[1] then
if amounts[item] == nil then amounts[item] = 0 end
if amounts[item] < data[1] then
if data[2] ~= nil then
table.insert(needs_farming, data[2])
else