mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-11-22 14:43:45 +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:
|
-- set new counts:
|
||||||
-- if new count is more than max_count
|
-- if new count is more than max_count
|
||||||
if (self.count + stackCount) > self.maxCount then
|
if (self.count + stackCount) > self.maxCount then
|
||||||
|
itemstack:set_count(self.count + stackCount - self.maxCount)
|
||||||
self.count = self.maxCount
|
self.count = self.maxCount
|
||||||
itemstack:set_count((self.count + stackCount) - self.maxCount)
|
|
||||||
else -- new count fits
|
else -- new count fits
|
||||||
self.count = self.count + stackCount
|
self.count = self.count + stackCount
|
||||||
-- this is for only removing one
|
-- this is for only removing one
|
||||||
|
Loading…
Reference in New Issue
Block a user