summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJat15 <jinan15@hotmail.com>2017-12-11 10:35:30 +0100
committerGitHub <noreply@github.com>2017-12-11 10:35:30 +0100
commit5dc464a4b22d318a5dd526453ec6ea55e906f645 (patch)
tree2f8ee0db1156c7fba7ca089af3b10e804dc2d682
parent3c8b698e8ea29dacd898811182fc20cc8b76e37d (diff)
downloadunifieddyes-5dc464a4b22d318a5dd526453ec6ea55e906f645.tar
unifieddyes-5dc464a4b22d318a5dd526453ec6ea55e906f645.tar.gz
unifieddyes-5dc464a4b22d318a5dd526453ec6ea55e906f645.tar.bz2
unifieddyes-5dc464a4b22d318a5dd526453ec6ea55e906f645.tar.xz
unifieddyes-5dc464a4b22d318a5dd526453ec6ea55e906f645.zip
Fix grayscale with 89-color palette
Fixes #19
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 74bb44d..487ac01 100644
--- a/init.lua
+++ b/init.lua
@@ -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 })