mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-11-21 22:23:44 +01:00
Fix bug: not removing items from stack if drawer is nearly full
This commit is contained in:
parent
42206a1eca
commit
1862ddbef3
@ -188,8 +188,8 @@ core.register_entity("drawers:visual", {
|
||||
-- set new counts:
|
||||
-- if new count is more than max_count
|
||||
if (self.count + stackCount) > self.maxCount then
|
||||
itemstack:set_count(self.count + stackCount - self.maxCount)
|
||||
self.count = self.maxCount
|
||||
itemstack:set_count((self.count + stackCount) - self.maxCount)
|
||||
else -- new count fits
|
||||
self.count = self.count + stackCount
|
||||
-- this is for only removing one
|
||||
|
Loading…
Reference in New Issue
Block a user