fix hue table type for wallmounted in craft helper

This commit is contained in:
Vanessa Dannenberg
2018-08-22 03:14:20 -04:00
parent 992bca7e15
commit b49ed1724b
2 changed files with 13 additions and 3 deletions

View File

@ -185,7 +185,11 @@ end
local function register_c(craft, hue, sat, val)
local color = ""
if val then
color = "dye:"..val..hue[1]..sat
if craft.palette == "wallmounted" then
color = "dye:"..val..hue..sat
else
color = "dye:"..val..hue[1]..sat
end
else
color = "dye:"..hue -- if val is nil, then it's grey.
end
@ -230,6 +234,10 @@ function unifieddyes.register_color_craft(craft)
for _,val in ipairs(vals_table) do
for _,sat in ipairs(sats_table) do
print("[UD] craft = ")
print(dump(craft))
print("[UD] hue = "..dump(hue).." ~~ sat = "..dump(sat).." ~~ val = "..dump(val))
if sat == "_s50" and val ~= "" and val ~= "medium_" and val ~= "dark_" then break end
register_c(craft, hue, sat, val)