summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-01-26 19:02:55 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-01-26 19:02:55 -0500
commit4622d25e76684b36b9c187104b46168fb8bb481f (patch)
tree3ad039df185b6dc711d0c8df483c5e2ef5060fc1
parent3e93c10cfda7ce1744a05c3d1ce0815684eb23d5 (diff)
downloadunifieddyes-4622d25e76684b36b9c187104b46168fb8bb481f.tar
unifieddyes-4622d25e76684b36b9c187104b46168fb8bb481f.tar.gz
unifieddyes-4622d25e76684b36b9c187104b46168fb8bb481f.tar.bz2
unifieddyes-4622d25e76684b36b9c187104b46168fb8bb481f.tar.xz
unifieddyes-4622d25e76684b36b9c187104b46168fb8bb481f.zip
fix wrong param2 setting
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 68dbd6f..b5fb00d 100644
--- a/init.lua
+++ b/init.lua
@@ -280,9 +280,9 @@ function unifieddyes.on_rightclick(pos, node, player, stack, pointed_thing, newn
newnode = string.gsub(newnode, "_grey", "_"..HUES[hue])
end
end
+ node.param2 = paletteidx + (minetest.get_node(pos).param2 % 32)
end
node.name = newnode
- node.param2 = paletteidx + (minetest.get_node(pos).param2 % 32)
minetest.swap_node(pos, node)
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.