Fix grayscale with 89-color palette

Fixes #19
This commit is contained in:
Jat15 2017-12-11 10:35:30 +01:00 committed by GitHub
parent 3c8b698e8e
commit 5dc464a4b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,7 +179,7 @@ function unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end
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 })