Pass user name string instead of userdata

This commit is contained in:
James Stevenson 2016-07-08 20:12:22 -04:00
parent 0d33ff5b0b
commit 927c4b1f77

View file

@ -88,7 +88,7 @@ for _, node in pairs(nodes) do
newnode.inventory_image = '[inventorycube{tnt_top.png{'..node_texture..'{tnt_side.png' newnode.inventory_image = '[inventorycube{tnt_top.png{'..node_texture..'{tnt_side.png'
newnode.on_punch = function(pos, node, puncher, pointed_thing) newnode.on_punch = function(pos, node, puncher, pointed_thing)
minetest.after(5, function() minetest.after(5, function()
disintigrate(pos, 5, node_name, puncher, comp) disintigrate(pos, 5, node_name, puncher:get_player_name(), comp)
minetest.remove_node(pos) minetest.remove_node(pos)
end) end)
end end
@ -122,7 +122,7 @@ for _, node in pairs(nodes) do
newnode.inventory_image = '[inventorycube{'..node_texture..'{'..node_texture..'{'..node_texture..'^fun_caves_expand.png' newnode.inventory_image = '[inventorycube{'..node_texture..'{'..node_texture..'{'..node_texture..'^fun_caves_expand.png'
newnode.on_punch = function(pos, node, puncher, pointed_thing) newnode.on_punch = function(pos, node, puncher, pointed_thing)
minetest.after(5, function() minetest.after(5, function()
floor(pos, 100, node_name, puncher) floor(pos, 100, node_name, puncher:get_player_name())
minetest.set_node(pos, {name = node_name}) minetest.set_node(pos, {name = node_name})
end) end)
end end