Condense shutters into a nice loop, give them wood sounds instead of leaves.

Make shutters and curtains pass sunlight through to avoid ugly shadows
vertical shadows.
This commit is contained in:
Vanessa Ezekowitz 2013-08-28 05:31:42 -04:00
parent 53e9690679
commit 2c8a91c362
3 changed files with 36 additions and 207 deletions

0
listnodes.sh Executable file → Normal file
View File

View File

@ -211,7 +211,7 @@ minetest.register_node("homedecor:curtain_"..color, {
inventory_image = "homedecor_curtain_"..color..".png", inventory_image = "homedecor_curtain_"..color..".png",
wield_image = "homedecor_curtain_"..color..".png", wield_image = "homedecor_curtain_"..color..".png",
drawtype = 'signlike', drawtype = 'signlike',
sunlight_propagates = false, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,

View File

@ -9,213 +9,42 @@ else
S = function ( s ) return s end S = function ( s ) return s end
end end
minetest.register_node('homedecor:shutter_black', { local shutters = {
description = S("Wooden Shutter (Black)"), {"oak", "Unpainted oak"},
tiles = { 'homedecor_window_shutter_black.png' }, {"mahogany", "Mahogany"},
inventory_image = 'homedecor_window_shutter_black.png', {"red", "Red"},
wield_image = 'homedecor_window_shutter_black.png', {"yellow", "Yellow"},
drawtype = 'signlike', {"forest_green", "Forest green"},
sunlight_propagates = false, {"light_blue", "Light blue"},
paramtype = "light", {"violet", "Violet"},
paramtype2 = "facedir", {"black", "Black"},
walkable = false, {"dark_grey", "Dark grey"},
groups = { snappy = 3 }, {"grey", "Grey"},
sounds = default.node_sound_leaves_defaults(), {"white", "White"},
paramtype2 = 'wallmounted', }
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_mahogany', { for i in ipairs(shutters) do
description = S("Wooden Shutter (Unpainted Mahogany)"), local name = shutters[i][1]
tiles = { 'homedecor_window_shutter_mahogany.png' }, local desc = shutters[i][2]
inventory_image = 'homedecor_window_shutter_mahogany.png',
wield_image = 'homedecor_window_shutter_mahogany.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_oak', { minetest.register_node("homedecor:shutter_"..name, {
description = S("Wooden Shutter (Unpainted Oak)"), description = S("Wooden Shutter ("..desc..")"),
tiles = { 'homedecor_window_shutter_oak.png' }, tiles = { "homedecor_window_shutter_"..name..".png" },
inventory_image = 'homedecor_window_shutter_oak.png', inventory_image = "homedecor_window_shutter_"..name..".png",
wield_image = 'homedecor_window_shutter_oak.png', wield_image = "homedecor_window_shutter_"..name..".png",
drawtype = 'signlike', drawtype = 'signlike',
sunlight_propagates = false, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = 'wallmounted', paramtype2 = 'wallmounted',
selection_box = { selection_box = {
type = "wallmounted", type = "wallmounted",
--wall_side = = <default> --wall_side = = <default>
}, },
}) })
end
minetest.register_node('homedecor:shutter_dark_grey', {
description = S("Wooden Shutter (Dark Grey)"),
tiles = { 'homedecor_window_shutter_dark_grey.png' },
inventory_image = 'homedecor_window_shutter_dark_grey.png',
wield_image = 'homedecor_window_shutter_dark_grey.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_forest_green', {
description = S("Wooden Shutter (Forest Green)"),
tiles = { 'homedecor_window_shutter_forest_green.png' },
inventory_image = 'homedecor_window_shutter_forest_green.png',
wield_image = 'homedecor_window_shutter_forest_green.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_grey', {
description = S("Wooden Shutter (Grey)"),
tiles = { 'homedecor_window_shutter_grey.png' },
inventory_image = 'homedecor_window_shutter_grey.png',
wield_image = 'homedecor_window_shutter_grey.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_light_blue', {
description = S("Wooden Shutter (Light Blue)"),
tiles = { 'homedecor_window_shutter_light_blue.png' },
inventory_image = 'homedecor_window_shutter_light_blue.png',
wield_image = 'homedecor_window_shutter_light_blue.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_violet', {
description = S("Wooden Shutter (Violet)"),
tiles = { 'homedecor_window_shutter_violet.png' },
inventory_image = 'homedecor_window_shutter_violet.png',
wield_image = 'homedecor_window_shutter_violet.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_red', {
description = S("Wooden Shutter (Red)"),
tiles = { 'homedecor_window_shutter_red.png' },
inventory_image = 'homedecor_window_shutter_red.png',
wield_image = 'homedecor_window_shutter_red.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_white', {
description = S("Wooden Shutter (White)"),
tiles = { 'homedecor_window_shutter_white.png' },
inventory_image = 'homedecor_window_shutter_white.png',
wield_image = 'homedecor_window_shutter_white.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_node('homedecor:shutter_yellow', {
description = S("Wooden Shutter (Yellow)"),
tiles = { 'homedecor_window_shutter_yellow.png' },
inventory_image = 'homedecor_window_shutter_yellow.png',
wield_image = 'homedecor_window_shutter_yellow.png',
drawtype = 'signlike',
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet") minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")