ta4_doser: Fix a bug that caused a server crash

This commit is contained in:
Joachim Stolberg 2020-11-07 19:53:21 +01:00
parent b9454b2173
commit 5c14b3bfbe

View File

@ -157,9 +157,11 @@ local function untake(recipe, pos, liquids)
for _,item in pairs(recipe.input) do for _,item in pairs(recipe.input) do
if item.name ~= "" then if item.name ~= "" then
local outdir = liquids[item.name] or reload_liquids(pos)[item.name] local outdir = liquids[item.name] or reload_liquids(pos)[item.name]
if outdir then
liquid.untake(pos, outdir, item.name, item.num) liquid.untake(pos, outdir, item.name, item.num)
end end
end end
end
end end
local function dosing(pos, nvm, elapsed) local function dosing(pos, nvm, elapsed)