forked from nalc/homedecor_modpack
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:
parent
53e9690679
commit
2c8a91c362
0
listnodes.sh
Executable file → Normal file
0
listnodes.sh
Executable file → Normal file
|
@ -211,7 +211,7 @@ minetest.register_node("homedecor:curtain_"..color, {
|
|||
inventory_image = "homedecor_curtain_"..color..".png",
|
||||
wield_image = "homedecor_curtain_"..color..".png",
|
||||
drawtype = 'signlike',
|
||||
sunlight_propagates = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
|
|
241
shutters.lua
241
shutters.lua
|
@ -9,213 +9,42 @@ else
|
|||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
minetest.register_node('homedecor:shutter_black', {
|
||||
description = S("Wooden Shutter (Black)"),
|
||||
tiles = { 'homedecor_window_shutter_black.png' },
|
||||
inventory_image = 'homedecor_window_shutter_black.png',
|
||||
wield_image = 'homedecor_window_shutter_black.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>
|
||||
},
|
||||
})
|
||||
local shutters = {
|
||||
{"oak", "Unpainted oak"},
|
||||
{"mahogany", "Mahogany"},
|
||||
{"red", "Red"},
|
||||
{"yellow", "Yellow"},
|
||||
{"forest_green", "Forest green"},
|
||||
{"light_blue", "Light blue"},
|
||||
{"violet", "Violet"},
|
||||
{"black", "Black"},
|
||||
{"dark_grey", "Dark grey"},
|
||||
{"grey", "Grey"},
|
||||
{"white", "White"},
|
||||
}
|
||||
|
||||
minetest.register_node('homedecor:shutter_mahogany', {
|
||||
description = S("Wooden Shutter (Unpainted Mahogany)"),
|
||||
tiles = { 'homedecor_window_shutter_mahogany.png' },
|
||||
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>
|
||||
},
|
||||
})
|
||||
for i in ipairs(shutters) do
|
||||
local name = shutters[i][1]
|
||||
local desc = shutters[i][2]
|
||||
|
||||
minetest.register_node('homedecor:shutter_oak', {
|
||||
description = S("Wooden Shutter (Unpainted Oak)"),
|
||||
tiles = { 'homedecor_window_shutter_oak.png' },
|
||||
inventory_image = 'homedecor_window_shutter_oak.png',
|
||||
wield_image = 'homedecor_window_shutter_oak.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_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_node("homedecor:shutter_"..name, {
|
||||
description = S("Wooden Shutter ("..desc..")"),
|
||||
tiles = { "homedecor_window_shutter_"..name..".png" },
|
||||
inventory_image = "homedecor_window_shutter_"..name..".png",
|
||||
wield_image = "homedecor_window_shutter_"..name..".png",
|
||||
drawtype = 'signlike',
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = 'wallmounted',
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_side = = <default>
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||
|
|
Loading…
Reference in New Issue
Block a user