fix wrong param2 setting

This commit is contained in:
Vanessa Ezekowitz 2017-01-26 19:02:55 -05:00
parent 3e93c10cfd
commit 4622d25e76

View File

@ -280,9 +280,9 @@ function unifieddyes.on_rightclick(pos, node, player, stack, pointed_thing, newn
newnode = string.gsub(newnode, "_grey", "_"..HUES[hue]) newnode = string.gsub(newnode, "_grey", "_"..HUES[hue])
end end
end end
node.param2 = paletteidx + (minetest.get_node(pos).param2 % 32)
end end
node.name = newnode node.name = newnode
node.param2 = paletteidx + (minetest.get_node(pos).param2 % 32)
minetest.swap_node(pos, node) minetest.swap_node(pos, node)
else -- this path is used when you're just painting an existing node, rather than replacing one. else -- this path is used when you're just painting an existing node, rather than replacing one.
newnode = oldnode -- note that here, newnode/oldnode are a full node, not just the name. newnode = oldnode -- note that here, newnode/oldnode are a full node, not just the name.