mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-12-25 02:00:27 +01:00
Mark the node via its metadata if it's been painted with 256-color palette
This commit is contained in:
parent
cf89bc6a24
commit
e0c87656ed
6
init.lua
6
init.lua
@ -626,6 +626,9 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
|
|||||||
end
|
end
|
||||||
node.name = newnode
|
node.name = newnode
|
||||||
minetest.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
|
if palette_type == "extended" then
|
||||||
|
meta:set_string("palette", "ext")
|
||||||
|
end
|
||||||
if not creative_mode then
|
if not creative_mode then
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
@ -648,6 +651,9 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
|
|||||||
newnode.param2 = paletteidx
|
newnode.param2 = paletteidx
|
||||||
end
|
end
|
||||||
minetest.swap_node(pos, newnode)
|
minetest.swap_node(pos, newnode)
|
||||||
|
if palette_type == "extended" then
|
||||||
|
meta:set_string("palette", "ext")
|
||||||
|
end
|
||||||
if not creative_mode then
|
if not creative_mode then
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user