summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index e7eea42..1c4165d 100644
--- a/init.lua
+++ b/init.lua
@@ -97,7 +97,7 @@ function unifieddyes.is_buildable_to(placer_name, ...)
return true
end
-function unifieddyes.get_hsv(name)
+function unifieddyes.get_hsv(name) -- expects a node/item name
local hue = ""
local a,b
for _, i in ipairs(HUES) do
@@ -108,9 +108,13 @@ function unifieddyes.get_hsv(name)
end
end
- if string.find(name, "grey") then hue = "grey"
- elseif string.find(name, "white") then hue = "white"
- elseif string.find(name, "black") then hue = "black"
+ if string.find(name, "_light_grey") then hue = "light_grey"
+ elseif string.find(name, "_lightgrey") then hue = "light_grey"
+ elseif string.find(name, "_dark_grey") then hue = "dark_grey"
+ elseif string.find(name, "_darkgrey") then hue = "dark_grey"
+ elseif string.find(name, "_grey") then hue = "grey"
+ elseif string.find(name, "_white") then hue = "white"
+ elseif string.find(name, "_black") then hue = "black"
end
local sat = ""