diff --git a/homedecor/bedroom.lua b/homedecor/bedroom.lua index e765e4a..683e53a 100644 --- a/homedecor/bedroom.lua +++ b/homedecor/bedroom.lua @@ -1,15 +1,21 @@ local S = homedecor.gettext local bedcolors = { - { "red", "#d00000:150" }, - { "green", "#00d000:150" }, - { "blue", "#0000d0:150" }, - { "violet", "#7000e0:150" }, - { "brown", "#603010:175" }, - { "darkgrey", "#101010:150" }, - { "orange", "#ff3000:150" }, - { "yellow", "#ffe000:150" }, - { "pink", "#ff80b0:150" } + { "black", "#000000:200" }, --new cg72 + { "brown", "#603010:175" }, + { "blue", "#0000d0:150" }, + { "cyan", "#009fa7:150" }, --new cg72 + { "darkgrey", "#101010:175" }, + { "dark_green", "#007000:150" }, + { "green", "#00d000:150" }, --new cg72 + { "grey", "#101010:100" }, --new cg72 + { "magenta", "#e0048b:150" }, --new cg72 + { "orange", "#ff3000:150" }, + { "pink", "#ff80b0:150" }, + { "red", "#d00000:150" }, + { "violet", "#7000e0:150" }, + { "white", "#000000:000" }, --new cg72 + { "yellow", "#ffe000:150" } } local bed_sbox = { diff --git a/lrfurn/armchairs.lua b/lrfurn/armchairs.lua index e038bb9..39999dd 100644 --- a/lrfurn/armchairs.lua +++ b/lrfurn/armchairs.lua @@ -1,14 +1,3 @@ -local armchairs_list = { - { "Red Armchair", "red"}, - { "Orange Armchair", "orange"}, - { "Yellow Armchair", "yellow"}, - { "Green Armchair", "green"}, - { "Blue Armchair", "blue"}, - { "Violet Armchair", "violet"}, - { "Black Armchair", "black"}, - { "Grey Armchair", "grey"}, - { "White Armchair", "white"}, -} local armchair_cbox = { type = "fixed", @@ -18,16 +7,16 @@ local armchair_cbox = { } } -for i in ipairs(armchairs_list) do - local armchairdesc = armchairs_list[i][1] - local colour = armchairs_list[i][2] +for i in ipairs(lrfurn.colors) do + local colour = lrfurn.colors[i][1] + local hue = lrfurn.colors[i][2] minetest.register_node("lrfurn:armchair_"..colour, { - description = armchairdesc, + description = "Armchair ("..colour..")", drawtype = "mesh", mesh = "lrfurn_armchair.obj", tiles = { - "lrfurn_sofa_"..colour..".png", + "lrfurn_bg_white.png^[colorize:"..hue.."^lrfurn_sofa_overlay.png", "lrfurn_sofa_bottom.png" }, paramtype = "light", diff --git a/lrfurn/init.lua b/lrfurn/init.lua index 7155f20..64e2ab9 100644 --- a/lrfurn/init.lua +++ b/lrfurn/init.lua @@ -8,6 +8,24 @@ lrfurn.fdir_to_fwd = { { -1, 0 }, } +lrfurn.colors = { -- mod changed to use colorize feature of minetest engine (cg72) + { "black", "#000000:230" }, + { "brown", "#251005:225" }, + { "blue", "#0000d0:225" }, + { "cyan", "#009fa7:250" }, + { "dark_grey", "#101010:175" }, + { "dark_green", "#007000:230" }, + { "green", "#00d000:250" }, + { "grey", "#101010:100" }, + { "magenta", "#e0048b:250" }, + { "orange", "#ee9000:240" }, + { "pink", "#ff90b0:250" }, + { "red", "#800000:240" }, + { "violet", "#9000d0:250" }, + { "white", "#000000:000" }, + { "yellow", "#dde000:240" } +} + function lrfurn.check_forward(pos, fdir, long, placer) if not fdir or fdir > 3 then fdir = 0 end diff --git a/lrfurn/longsofas.lua b/lrfurn/longsofas.lua index ceb1f1c..3bcd8ec 100644 --- a/lrfurn/longsofas.lua +++ b/lrfurn/longsofas.lua @@ -1,14 +1,3 @@ -local longsofas_list = { - { "Red Long Sofa", "red"}, - { "Orange Long Sofa", "orange"}, - { "Yellow Long Sofa", "yellow"}, - { "Green Long Sofa", "green"}, - { "Blue Long Sofa", "blue"}, - { "Violet Long Sofa", "violet"}, - { "Black Long Sofa", "black"}, - { "Grey Long Sofa", "grey"}, - { "White Long Sofa", "white"}, -} local longsofa_sbox = { type = "fixed", @@ -23,16 +12,16 @@ local longsofa_cbox = { } } -for i in ipairs(longsofas_list) do - local longsofadesc = longsofas_list[i][1] - local colour = longsofas_list[i][2] +for i in ipairs(lrfurn.colors) do + local colour = lrfurn.colors[i][1] + local hue = lrfurn.colors[i][2] minetest.register_node("lrfurn:longsofa_"..colour, { - description = longsofadesc, + description = "Long Sofa ("..colour..")", drawtype = "mesh", mesh = "lrfurn_sofa_long.obj", tiles = { - "lrfurn_sofa_"..colour..".png", + "lrfurn_bg_white.png^[colorize:"..hue.."^lrfurn_sofa_overlay.png", "lrfurn_sofa_bottom.png" }, paramtype = "light", diff --git a/lrfurn/sofas.lua b/lrfurn/sofas.lua index 366b8be..1f7c217 100644 --- a/lrfurn/sofas.lua +++ b/lrfurn/sofas.lua @@ -1,14 +1,4 @@ -local sofas_list = { - { "Red Sofa", "red"}, - { "Orange Sofa", "orange"}, - { "Yellow Sofa", "yellow"}, - { "Green Sofa", "green"}, - { "Blue Sofa", "blue"}, - { "Violet Sofa", "violet"}, - { "Black Sofa", "black"}, - { "Grey Sofa", "grey"}, - { "White Sofa", "white"}, -} + local sofa_sbox = { type = "fixed", @@ -23,16 +13,16 @@ local sofa_cbox = { } } -for i in ipairs(sofas_list) do - local sofadesc = sofas_list[i][1] - local colour = sofas_list[i][2] +for i in ipairs(lrfurn.colors) do + local colour = lrfurn.colors[i][1] + local hue = lrfurn.colors[i][2] minetest.register_node("lrfurn:sofa_"..colour, { - description = sofadesc, + description = "Sofa ("..colour..")", drawtype = "mesh", mesh = "lrfurn_sofa_short.obj", tiles = { - "lrfurn_sofa_"..colour..".png", + "lrfurn_bg_white.png^[colorize:"..hue.."^lrfurn_sofa_overlay.png", "lrfurn_sofa_bottom.png" }, paramtype = "light", diff --git a/lrfurn/textures/lrfurn_bg_white.png b/lrfurn/textures/lrfurn_bg_white.png new file mode 100644 index 0000000..a5adc1f Binary files /dev/null and b/lrfurn/textures/lrfurn_bg_white.png differ diff --git a/lrfurn/textures/lrfurn_sofa_black.png b/lrfurn/textures/lrfurn_sofa_black.png deleted file mode 100644 index de7f114..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_black.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_blue.png b/lrfurn/textures/lrfurn_sofa_blue.png deleted file mode 100644 index 552a042..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_blue.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_green.png b/lrfurn/textures/lrfurn_sofa_green.png deleted file mode 100644 index de76550..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_green.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_grey.png b/lrfurn/textures/lrfurn_sofa_grey.png deleted file mode 100644 index 406c114..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_grey.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_orange.png b/lrfurn/textures/lrfurn_sofa_orange.png deleted file mode 100644 index ac9e7e5..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_orange.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_overlay.png b/lrfurn/textures/lrfurn_sofa_overlay.png new file mode 100644 index 0000000..d02df2d Binary files /dev/null and b/lrfurn/textures/lrfurn_sofa_overlay.png differ diff --git a/lrfurn/textures/lrfurn_sofa_red.png b/lrfurn/textures/lrfurn_sofa_red.png deleted file mode 100644 index 3077a09..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_red.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_violet.png b/lrfurn/textures/lrfurn_sofa_violet.png deleted file mode 100644 index 098c5d7..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_violet.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_white.png b/lrfurn/textures/lrfurn_sofa_white.png deleted file mode 100644 index 27ff12a..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_white.png and /dev/null differ diff --git a/lrfurn/textures/lrfurn_sofa_yellow.png b/lrfurn/textures/lrfurn_sofa_yellow.png deleted file mode 100644 index 8c65423..0000000 Binary files a/lrfurn/textures/lrfurn_sofa_yellow.png and /dev/null differ