From 2c8a91c362630bd7d055bf4728d3b7856a137150 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Wed, 28 Aug 2013 05:31:42 -0400 Subject: [PATCH] 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. --- listnodes.sh | 0 misc_nodes.lua | 2 +- shutters.lua | 241 +++++++------------------------------------------ 3 files changed, 36 insertions(+), 207 deletions(-) mode change 100755 => 100644 listnodes.sh diff --git a/listnodes.sh b/listnodes.sh old mode 100755 new mode 100644 diff --git a/misc_nodes.lua b/misc_nodes.lua index 17dd36d..a0cd0de 100644 --- a/misc_nodes.lua +++ b/misc_nodes.lua @@ -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, diff --git a/shutters.lua b/shutters.lua index f6b2da1..d1b23f5 100644 --- a/shutters.lua +++ b/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 = = - }, -}) +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 = = - }, -}) +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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) - -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 = = - }, -}) + 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 = = + }, + }) +end minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")