summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLNJ <git@lnj.li>2017-04-23 18:13:25 +0200
committerLNJ <git@lnj.li>2017-04-23 18:15:27 +0200
commitf83177346bbc5d4c1ad0a8c2cd6a6d5a09b7780f (patch)
tree33724b5258a8af2524874cbfdaee27af9e5c6d25
parent6f801da5483670298ffdbdb3e153295af957e54e (diff)
Fix stack_max=1 items are being stored
-rwxr-xr-xlua/visual.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/visual.lua b/lua/visual.lua
index 522e2ab..a92a29b 100755
--- a/lua/visual.lua
+++ b/lua/visual.lua
@@ -226,11 +226,11 @@ core.register_entity("drawers:visual", {
-- get new stack max
self.itemStackMax = ItemStack(self.itemName):get_stack_max()
self.maxCount = self.itemStackMax * self.stackMaxFactor
+ end
- -- Don't add items stackable only to 1
- if self.itemStackMax == 1 then
- return itemstack
- end
+ -- Don't add items stackable only to 1
+ if self.itemStackMax == 1 then
+ return itemstack
end
-- set new counts: