Allow remove_handholds function to correctly handle nodes from other mods

This commit is contained in:
ezhh 2018-06-19 00:20:53 +01:00
parent 235684e89b
commit c71cfd6570

View File

@ -56,7 +56,12 @@ local function remove_handholds(pos)
if node_pos then
local handholds_node = string.split(minetest.get_node(node_pos).name, ":")
if handholds_node[1] == "handholds" then
minetest.set_node(node_pos, {name = "default:"..handholds_node[2]})
else
handholds_node = string.split(minetest.get_node(node_pos).name, "_")
minetest.set_node(node_pos, {name = handholds_node[1]})
end
end
end