Fix item supply bug.

This commit is contained in:
SFENCE 2022-04-11 19:14:58 +02:00
parent dd7f8b0494
commit e29e4e9dce

View File

@ -22,7 +22,10 @@ if appliances.have_pipeworks then
if self.recipes then
if self.have_input then
if (self.input_stack_size <= 1) then
return self:recipe_inventory_can_put(pos, self.input_stack, 1, stack, owner);
local can_insert = self:recipe_inventory_can_put(pos, self.input_stack, 1, stack, owner);
if (can_insert~=0) then
return can_insert;
end
else
for index = 1,self.input_stack_size do
local can_insert = self:recipe_inventory_can_put(pos, self.input_stack, index, stack, owner);
@ -48,7 +51,10 @@ if appliances.have_pipeworks then
if self.have_input then
if (self.input_stack_size <= 1) then
return inv:add_item(self.input_stack, stack);
local can_insert = self:recipe_inventory_can_put(pos, self.input_stack, 1, stack, owner);
if can_insert~=0 then
return inv:add_item(self.input_stack, stack);
end
else
for index = 1,self.input_stack_size do
local can_insert = self:recipe_inventory_can_put(pos, self.input_stack, index, stack, owner);