Fix item supply bug.
This commit is contained in:
parent
dd7f8b0494
commit
e29e4e9dce
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user