mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
Drop nodes as items when dugged and no room in inventory and dont remove dropped items when no room in inventory
This commit is contained in:
@@ -109,7 +109,10 @@ minetest.register_entity("__builtin:item", {
|
||||
|
||||
on_punch = function(self, hitter)
|
||||
if self.itemstring ~= '' then
|
||||
hitter:get_inventory():add_item("main", self.itemstring)
|
||||
local left = hitter:get_inventory():add_item("main", self.itemstring)
|
||||
if not left:is_empty() then
|
||||
return
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
end,
|
||||
|
Reference in New Issue
Block a user