mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-22 15:33:52 +01:00
Merge pull request #21 from Jat15/patch-2
Fix grayscale with 89-color palette
This commit is contained in:
commit
0d654eafec
2
init.lua
2
init.lua
@ -179,7 +179,7 @@ function unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local paletteidx, hue = unifieddyes.getpaletteidx(lastdye, palette_type)
|
local paletteidx, hue = unifieddyes.getpaletteidx(lastdye, palette_type)
|
||||||
if palette_type == true then newname = string.gsub(newname, "_grey", "_"..unifieddyes.HUES[hue]) end
|
if palette_type == true and hue ~= 0 then newname = string.gsub(newname, "_grey", "_"..unifieddyes.HUES[hue]) end
|
||||||
|
|
||||||
minetest.set_node(pos, { name = newname, param2 = oldfdir + paletteidx })
|
minetest.set_node(pos, { name = newname, param2 = oldfdir + paletteidx })
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user