midas ability only works on "normal" type nodes

This commit is contained in:
tenplus1 2024-04-20 07:57:09 +01:00
parent 5596d2110b
commit a5b7cf4db3

View File

@ -380,11 +380,13 @@ function nssm:midas_ability( --ability to transform every blocks it touches in
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
local n = minetest.get_node(p).name
local d = minetest.registered_nodes[n]
if minetest.get_item_group(n, "unbreakable") == 1
or minetest.is_protected(p, "") or n == "air"
or (n == "bones:bones" and not nssm:affectbones(self))
or n == m_block then
if d.drawtype ~= "normal" or n == m_block
or minetest.get_item_group(n, "unbreakable") == 1
or minetest.is_protected(p, "")
or (n == "bones:bones" and not nssm:affectbones(self)) then
-- do nothing
else
minetest.set_node(p, {name = m_block})
end