add curtain rods and "opened" curtains

rods in brass, wrought iron, wood
opened curtains in same colors as regular
made all curtains use texture alpha, gave their textures ~90% opacity
moved curtains defs into window_treatments.lua
This commit is contained in:
Vanessa Ezekowitz 2014-08-10 17:37:58 -04:00
parent 6519231604
commit 256029f259
18 changed files with 115 additions and 39 deletions

View File

@ -994,8 +994,38 @@ for c in ipairs(curtaincolors) do
{ "wool:"..color, "", ""}, { "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 -- Recycling recipes

View File

@ -215,44 +215,6 @@ minetest.register_node("homedecor:pole_wrought_iron", {
walkable = true, 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 = = <default>
},
})
if color_d ~= color then
minetest.register_alias("homedecor:curtain_"..color_d, "homedecor:curtain_"..color)
end
end
local welcome_mat_colors = { "green", "brown", "grey" } local welcome_mat_colors = { "green", "brown", "grey" }
for _, color in ipairs(welcome_mat_colors) do for _, color in ipairs(welcome_mat_colors) do

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 B

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,4 +1,6 @@
local S = homedecor.gettext
minetest.register_node("homedecor:window_quartered", { minetest.register_node("homedecor:window_quartered", {
description = "Window", description = "Window",
tiles = { 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