Allow remove_handholds function to correctly handle nodes from other mods
This commit is contained in:
parent
235684e89b
commit
c71cfd6570
5
init.lua
5
init.lua
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user