Mark the node via its metadata if it's been painted with 256-color palette

This commit is contained in:
Vanessa Ezekowitz 2017-02-24 19:21:15 -05:00
parent cf89bc6a24
commit e0c87656ed
1 changed files with 6 additions and 0 deletions

View File

@ -626,6 +626,9 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
end
node.name = newnode
minetest.swap_node(pos, node)
if palette_type == "extended" then
meta:set_string("palette", "ext")
end
if not creative_mode then
return itemstack
end
@ -648,6 +651,9 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
newnode.param2 = paletteidx
end
minetest.swap_node(pos, newnode)
if palette_type == "extended" then
meta:set_string("palette", "ext")
end
if not creative_mode then
return itemstack
end