mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 15:23:43 +01:00
fermenter: return items to source inventory when faulted.
Items should be moved back to source inventory when machine fails due to incorrect type of items there (game internal error). Unused local variable removed. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This commit is contained in:
parent
54abd7bf55
commit
fe3ff47bd2
@ -116,11 +116,13 @@ local function convert_leaves_to_biogas(pos, meta)
|
||||
|
||||
-- take NUM_LEAVES items
|
||||
local items = {}
|
||||
local fault = false
|
||||
for i = 1, NUM_LEAVES do
|
||||
items[i] = tubelib.get_num_items(meta, "src", 1)
|
||||
if items[i] then -- input available?
|
||||
if not is_leaves(items[i]:get_name()) then
|
||||
for j = 1, #items do
|
||||
inv:add_item("src", items[j])
|
||||
end
|
||||
State:fault(pos, meta)
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user