From fdb37bdaf5761fb1200f4e0a5df759bb121deb9e Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sun, 2 Jun 2019 02:45:01 -0400 Subject: [PATCH] fix wrong colorization table usage in table, standing, and desk lamps --- homedecor_lighting/init.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/homedecor_lighting/init.lua b/homedecor_lighting/init.lua index b79f6ef7..e87b8528 100644 --- a/homedecor_lighting/init.lua +++ b/homedecor_lighting/init.lua @@ -32,11 +32,12 @@ local brightn_light_source = { } local brightn_hex = { - 0xffd0d0d0, - 0xffd8d8d8, - 0xffe0e0e0, - 0xffe8e8e8, - 0xffffffff, + ["off"] = 0xffd0d0d0, + ["low"] = 0xffd8d8d8, + ["med"] = 0xffe0e0e0, + ["hi"] = 0xffe8e8e8, + ["on"] = 0xffffffff, + ["max"] = 0xffffffff, } local bright_to_word = { @@ -671,7 +672,7 @@ for light_brightn_name in pairs(brightn_light_source) do "homedecor_generic_metal.png", "homedecor_generic_metal.png", { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }, - { name = gen_ls_tex_white, color = brightn_hex[5] }, + { name = gen_ls_tex_white, color = brightn_hex[light_brightn_name] }, }, inventory_image = "homedecor_desk_lamp_inv.png", paramtype = "light", @@ -836,7 +837,7 @@ for light_brightn_name in pairs(brightn_light_source) do mesh = "homedecor_table_lamp.obj", tiles = { wool_brightened, - { name = gen_ls_tex_white, color = brightn_hex[brightness] }, + { name = gen_ls_tex_white, color = brightn_hex[light_brightn_name] }, { name = "homedecor_generic_wood_red.png", color = 0xffffffff }, { name = "homedecor_generic_metal.png", color = homedecor.color_black }, }, @@ -865,7 +866,7 @@ for light_brightn_name in pairs(brightn_light_source) do mesh = "homedecor_standing_lamp.obj", tiles = { wool_brightened, - { name = gen_ls_tex_white, color = brightn_hex[brightness] }, + { name = gen_ls_tex_white, color = brightn_hex[light_brightn_name] }, { name = "homedecor_generic_wood_red.png", color = 0xffffffff }, { name = "homedecor_generic_metal.png", color = homedecor.color_black }, },