mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-26 01:13:49 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user