farm_control.lua: fixed bug in check_levels for empty containers
This commit is contained in:
parent
f56763aa50
commit
58765ec296
1 changed files with 2 additions and 1 deletions
|
|
@ -39,7 +39,8 @@ function check_levels (levels, src)
|
||||||
end
|
end
|
||||||
local needs_farming = {}
|
local needs_farming = {}
|
||||||
for item, data in pairs(levels) do
|
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
|
if data[2] ~= nil then
|
||||||
table.insert(needs_farming, data[2])
|
table.insert(needs_farming, data[2])
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue