mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-12-25 10:10:29 +01:00
only use the node def's palette entry to check palette type
(don't assume it has to be paramtype2="color", otherwise that screws up uncolored nodes that need this check for on_use)
This commit is contained in:
parent
46a55946ef
commit
0cd0758c08
6
init.lua
6
init.lua
@ -522,18 +522,18 @@ function unifieddyes.on_use(itemstack, player, pointed_thing)
|
|||||||
local newnode = nodedef.ud_replacement_node
|
local newnode = nodedef.ud_replacement_node
|
||||||
local palette_type
|
local palette_type
|
||||||
|
|
||||||
if nodedef.paramtype2 == "color" then
|
|
||||||
if nodedef.palette == "unifieddyes_palette_extended.png" then
|
if nodedef.palette == "unifieddyes_palette_extended.png" then
|
||||||
palette_type = "extended"
|
palette_type = "extended"
|
||||||
else
|
elseif nodedef.palette == "unifieddyes_palette.png" then
|
||||||
palette_type = false
|
palette_type = false
|
||||||
end
|
|
||||||
elseif nodedef.paramtype2 == "colorfacedir" then
|
elseif nodedef.paramtype2 == "colorfacedir" then
|
||||||
palette_type = true
|
palette_type = true
|
||||||
elseif nodedef.paramtype2 == "colorwallmounted" then
|
elseif nodedef.paramtype2 == "colorwallmounted" then
|
||||||
palette_type = "wallmounted"
|
palette_type = "wallmounted"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print(palette_type)
|
||||||
|
|
||||||
if minetest.is_protected(pos, playername) and not minetest.check_player_privs(playername, {protection_bypass=true}) then
|
if minetest.is_protected(pos, playername) and not minetest.check_player_privs(playername, {protection_bypass=true}) then
|
||||||
minetest.record_protection_violation(pos, playername)
|
minetest.record_protection_violation(pos, playername)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user