Fix stack_max=1 items are being stored

This commit is contained in:
LNJ 2017-04-23 18:13:25 +02:00
parent 6f801da548
commit f83177346b
No known key found for this signature in database
GPG Key ID: 69268DBD835B6B0B

@ -226,12 +226,12 @@ core.register_entity("drawers:visual", {
-- get new stack max -- get new stack max
self.itemStackMax = ItemStack(self.itemName):get_stack_max() self.itemStackMax = ItemStack(self.itemName):get_stack_max()
self.maxCount = self.itemStackMax * self.stackMaxFactor self.maxCount = self.itemStackMax * self.stackMaxFactor
end
-- Don't add items stackable only to 1 -- Don't add items stackable only to 1
if self.itemStackMax == 1 then if self.itemStackMax == 1 then
return itemstack return itemstack
end end
end
-- set new counts: -- set new counts:
-- if new count is more than max_count -- if new count is more than max_count