Och Noe 2018-10-22 23:00:57 +02:00
parent fdaa4dc1b8
commit d7620f7cb9
1 changed files with 3 additions and 0 deletions

View File

@ -242,6 +242,9 @@ function circular_saw.allow_metadata_inventory_put(
local incost = (incount * 8) + microstack:get_count()
local maxcost = (stackmax * 8) + 7
local cost = circular_saw:get_cost(inv, stackname)
if not cost then
return 0
end
if (incost + cost) > maxcost then
return math.max((maxcost - incost) / cost, 0)
end