mirror of
https://github.com/joe7575/techpack.git
synced 2024-12-24 14:42:29 +01:00
Merge pull request #78 from oversword/issue-77
Use item stack count to avoid overfilling
This commit is contained in:
commit
6d2dea727d
@ -209,7 +209,8 @@ function techpack_warehouse.allow_metadata_inventory_put(self, pos, listname, in
|
||||
local main_stack = inv:get_stack("main", index)
|
||||
local item_name = inv:get_stack("filter", index):get_name()
|
||||
if listname == "input" and item_name == stack:get_name() then
|
||||
return math.min(stack:get_count(), self.inv_size - main_stack:get_count())
|
||||
local input_stack = inv:get_stack("input", index)
|
||||
return math.min(stack:get_count(), self.inv_size - main_stack:get_count() - input_stack:get_count())
|
||||
elseif listname == "filter" and item_name == main_stack:get_name() then
|
||||
return 1
|
||||
elseif listname == "shift" then
|
||||
|
Loading…
Reference in New Issue
Block a user