diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index 9dc62a5c..c429111a 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -994,8 +994,38 @@ for c in ipairs(curtaincolors) do { "wool:"..color, "", ""}, }, }) -end + minetest.register_craft( { + output = "homedecor:curtain_open_"..color, + recipe = { + { "homedecor:curtain_"..color }, + }, + }) + + minetest.register_craft( { + output = "homedecor:curtain_"..color, + recipe = { + { "homedecor:curtain_open_"..color }, + }, + }) + +end +local mats = { + { "brass", "homedecor:pole_brass" }, + { "wrought_iron", "homedecor:pole_wrought_iron" }, + { "wood", "default:stick" } +} + +for i in ipairs(mats) do + local material = mats[i][1] + local ingredient = mats[i][2] + minetest.register_craft( { + output = "homedecor:curtainrod_"..material.." 3", + recipe = { + { ingredient, ingredient, ingredient }, + }, + }) +end -- Recycling recipes diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index 714699f4..10ed68a6 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -215,44 +215,6 @@ minetest.register_node("homedecor:pole_wrought_iron", { walkable = true, }) --- - -local curtaincolors = { - "red", - "green", - "blue", - "white", - "pink", - "violet" -} - -for c in ipairs(curtaincolors) do - local color = curtaincolors[c] - local color_d = S(curtaincolors[c]) - - minetest.register_node("homedecor:curtain_"..color, { - description = S("Curtains (%s)"):format(color_d), - tiles = { "homedecor_curtain_"..color..".png" }, - inventory_image = "homedecor_curtain_"..color..".png", - wield_image = "homedecor_curtain_"..color..".png", - drawtype = 'signlike', - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - groups = { snappy = 3 }, - sounds = default.node_sound_leaves_defaults(), - paramtype2 = 'wallmounted', - selection_box = { - type = "wallmounted", - --wall_side = = - }, - }) - if color_d ~= color then - minetest.register_alias("homedecor:curtain_"..color_d, "homedecor:curtain_"..color) - end -end - local welcome_mat_colors = { "green", "brown", "grey" } for _, color in ipairs(welcome_mat_colors) do diff --git a/homedecor/textures/homedecor_curtain_blue.png b/homedecor/textures/homedecor_curtain_blue.png index a9342a59..0783cae5 100644 Binary files a/homedecor/textures/homedecor_curtain_blue.png and b/homedecor/textures/homedecor_curtain_blue.png differ diff --git a/homedecor/textures/homedecor_curtain_green.png b/homedecor/textures/homedecor_curtain_green.png index 00060a40..e98bc618 100644 Binary files a/homedecor/textures/homedecor_curtain_green.png and b/homedecor/textures/homedecor_curtain_green.png differ diff --git a/homedecor/textures/homedecor_curtain_open_blue.png b/homedecor/textures/homedecor_curtain_open_blue.png new file mode 100644 index 00000000..3cd4c556 Binary files /dev/null and b/homedecor/textures/homedecor_curtain_open_blue.png differ diff --git a/homedecor/textures/homedecor_curtain_open_green.png b/homedecor/textures/homedecor_curtain_open_green.png new file mode 100644 index 00000000..4be8adcf Binary files /dev/null and b/homedecor/textures/homedecor_curtain_open_green.png differ diff --git a/homedecor/textures/homedecor_curtain_open_pink.png b/homedecor/textures/homedecor_curtain_open_pink.png new file mode 100644 index 00000000..b601c182 Binary files /dev/null and b/homedecor/textures/homedecor_curtain_open_pink.png differ diff --git a/homedecor/textures/homedecor_curtain_open_red.png b/homedecor/textures/homedecor_curtain_open_red.png new file mode 100644 index 00000000..32561433 Binary files /dev/null and b/homedecor/textures/homedecor_curtain_open_red.png differ diff --git a/homedecor/textures/homedecor_curtain_open_violet.png b/homedecor/textures/homedecor_curtain_open_violet.png new file mode 100644 index 00000000..ad3bbc7f Binary files /dev/null and b/homedecor/textures/homedecor_curtain_open_violet.png differ diff --git a/homedecor/textures/homedecor_curtain_open_white.png b/homedecor/textures/homedecor_curtain_open_white.png new file mode 100644 index 00000000..85b07c2b Binary files /dev/null and b/homedecor/textures/homedecor_curtain_open_white.png differ diff --git a/homedecor/textures/homedecor_curtain_pink.png b/homedecor/textures/homedecor_curtain_pink.png index 4e99d498..0b2b67d2 100644 Binary files a/homedecor/textures/homedecor_curtain_pink.png and b/homedecor/textures/homedecor_curtain_pink.png differ diff --git a/homedecor/textures/homedecor_curtain_red.png b/homedecor/textures/homedecor_curtain_red.png index ce5b44d4..72c8c0a9 100644 Binary files a/homedecor/textures/homedecor_curtain_red.png and b/homedecor/textures/homedecor_curtain_red.png differ diff --git a/homedecor/textures/homedecor_curtain_violet.png b/homedecor/textures/homedecor_curtain_violet.png index 655b4973..333121bd 100644 Binary files a/homedecor/textures/homedecor_curtain_violet.png and b/homedecor/textures/homedecor_curtain_violet.png differ diff --git a/homedecor/textures/homedecor_curtain_white.png b/homedecor/textures/homedecor_curtain_white.png index 9824a79e..c2c22dcf 100644 Binary files a/homedecor/textures/homedecor_curtain_white.png and b/homedecor/textures/homedecor_curtain_white.png differ diff --git a/homedecor/textures/homedecor_curtainrod_brass_inv.png b/homedecor/textures/homedecor_curtainrod_brass_inv.png new file mode 100644 index 00000000..2ce1622e Binary files /dev/null and b/homedecor/textures/homedecor_curtainrod_brass_inv.png differ diff --git a/homedecor/textures/homedecor_curtainrod_wood_inv.png b/homedecor/textures/homedecor_curtainrod_wood_inv.png new file mode 100644 index 00000000..739ce857 Binary files /dev/null and b/homedecor/textures/homedecor_curtainrod_wood_inv.png differ diff --git a/homedecor/textures/homedecor_curtainrod_wrought_iron_inv.png b/homedecor/textures/homedecor_curtainrod_wrought_iron_inv.png new file mode 100644 index 00000000..1c8fcd5e Binary files /dev/null and b/homedecor/textures/homedecor_curtainrod_wrought_iron_inv.png differ diff --git a/homedecor/window_treatments.lua b/homedecor/window_treatments.lua index 42e78241..f70934dc 100644 --- a/homedecor/window_treatments.lua +++ b/homedecor/window_treatments.lua @@ -1,4 +1,6 @@ +local S = homedecor.gettext + minetest.register_node("homedecor:window_quartered", { description = "Window", tiles = { @@ -189,3 +191,85 @@ minetest.register_node("homedecor:blinds_thin", { }, }) +local curtaincolors = { + "red", + "green", + "blue", + "white", + "pink", + "violet" +} + +for c in ipairs(curtaincolors) do + local color = curtaincolors[c] + local color_d = S(curtaincolors[c]) + + minetest.register_node("homedecor:curtain_"..color, { + description = S("Curtains (%s)"):format(color_d), + tiles = { "homedecor_curtain_"..color..".png" }, + inventory_image = "homedecor_curtain_"..color..".png", + wield_image = "homedecor_curtain_"..color..".png", + drawtype = 'signlike', + sunlight_propagates = true, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + }, + }) + + minetest.register_node("homedecor:curtain_open_"..color, { + description = S("Curtains (%s)"):format(color_d), + tiles = { "homedecor_curtain_open_"..color..".png" }, + inventory_image = "homedecor_curtain_open_"..color..".png", + wield_image = "homedecor_curtain_open_"..color..".png", + drawtype = 'signlike', + sunlight_propagates = true, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + }, + }) + +end + +local mats = { + { "brass", "Brass", "homedecor_tile_brass2.png" }, + { "wrought_iron", "Wrought iron", "homedecor_tile_wrought_iron2.png" }, + { "wood", "Wooden", "default_wood.png" } +} + +for i in ipairs(mats) do + local material = mats[i][1] + local mat_name = mats[i][2] + local texture = mats[i][3] + minetest.register_node("homedecor:curtainrod_"..material, { + tiles = { texture }, + inventory_image = "homedecor_curtainrod_"..material.."_inv.png", + description = "Curtain Rod ("..mat_name..")", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + groups = { snappy = 3 }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.375, 0.5, -0.4375, 0.4375}, + {-0.4375, -0.5, 0.4375, -0.375, -0.4375, 0.5}, + {0.375, -0.5, 0.4375, 0.4375, -0.4375, 0.5} + } + } + }) +end