mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-17 06:45:18 -05:00
Fix pickup of dropped items when the player only takes a part of them
This commit is contained in:
parent
c61a2ef44f
commit
55097e1985
@ -111,6 +111,7 @@ minetest.register_entity("__builtin:item", {
|
|||||||
if self.itemstring ~= '' then
|
if self.itemstring ~= '' then
|
||||||
local left = hitter:get_inventory():add_item("main", self.itemstring)
|
local left = hitter:get_inventory():add_item("main", self.itemstring)
|
||||||
if not left:is_empty() then
|
if not left:is_empty() then
|
||||||
|
self.itemstring = left:to_string()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user