1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

place_node, dig_node and punch_node; an in-game tester tool; remove old code

This commit is contained in:
Perttu Ahola 2012-06-05 23:09:18 +03:00
parent b0f81c3253
commit c3658e7c79
5 changed files with 166 additions and 241 deletions

View file

@ -250,10 +250,12 @@ function minetest.node_dig(pos, node, digger)
wielded:add_wear(dp.wear)
digger:set_wielded_item(wielded)
-- Add dropped items
local _, dropped_item
for _, dropped_item in ipairs(drops) do
digger:get_inventory():add_item("main", dropped_item)
-- Add dropped items to object's inventory
if digger:get_inventory() then
local _, dropped_item
for _, dropped_item in ipairs(drops) do
digger:get_inventory():add_item("main", dropped_item)
end
end
end