diff --git a/crafts.lua b/crafts.lua index 41b05e8..9ef42d6 100644 --- a/crafts.lua +++ b/crafts.lua @@ -1459,6 +1459,8 @@ minetest.register_craft( { -- wood and glass (grid style) +-- bare + minetest.register_craft( { output = "homedecor:door_wood_glass_bottom_left 2", recipe = { @@ -1484,6 +1486,106 @@ minetest.register_craft( { }, }) +-- mahogany + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_mahogany_bottom_left 2", + recipe = { + "default:dirt", + "default:coal_lump", + "homedecor:door_wood_glass_bottom_left", + "homedecor:door_wood_glass_bottom_left" + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_mahogany_bottom_right 2", + recipe = { + "default:dirt", + "default:coal_lump", + "homedecor:door_wood_glass_bottom_right", + "homedecor:door_wood_glass_bottom_right" + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_mahogany_bottom_left 2", + recipe = { + "unifieddyes:dark_orange", + "homedecor:door_wood_glass_bottom_left", + "homedecor:door_wood_glass_bottom_left" + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_mahogany_bottom_right 2", + recipe = { + "unifieddyes:dark_orange", + "homedecor:door_wood_glass_bottom_right", + "homedecor:door_wood_glass_bottom_right" + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_mahogany_bottom_left", + recipe = { + "homedecor:door_wood_glass_mahogany_bottom_right" + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_mahogany_bottom_right", + recipe = { + "homedecor:door_wood_glass_mahogany_bottom_left" + }, +}) + +-- white + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_white_bottom_left 2", + recipe = { + "unifieddyes:white_paint", + "homedecor:door_wood_glass_bottom_left", + "homedecor:door_wood_glass_bottom_left" + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_white_bottom_right 2", + recipe = { + "unifieddyes:white_paint", + "homedecor:door_wood_glass_bottom_right", + "homedecor:door_wood_glass_bottom_right" + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_white_bottom_left", + recipe = { + "homedecor:door_wood_glass_white_bottom_right" + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "homedecor:door_wood_glass_white_bottom_right", + recipe = { + "homedecor:door_wood_glass_white_bottom_left" + }, +}) + -- Solid glass with metal handle minetest.register_craft( { @@ -1542,7 +1644,6 @@ minetest.register_craft( { -- mahogany - minetest.register_craft( { type = "shapeless", output = "homedecor:door_closet_mahogany_bottom_left 2", diff --git a/door_glass_and_wood_mahogany.lua b/door_glass_and_wood_mahogany.lua new file mode 100644 index 0000000..851a598 --- /dev/null +++ b/door_glass_and_wood_mahogany.lua @@ -0,0 +1,220 @@ +-- This file supplies wood-and-glass doors (Grid-style, like old windows) + +-- Left-opening + +minetest.register_node("homedecor:door_wood_glass_mahogany_top_left", { + description = "wood/glass door top half", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_right_top.png", + "homedecor_door_wood_glass_mahogany_left_top.png", + }, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + drop = "homedecor:door_wood_glass_mahogany_bottom_left", + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "homedecor:door_wood_glass_mahogany_bottom_left" then + minetest.env:remove_node({x=pos.x, y=pos.y-1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2-1 + if nfdir < 0 then nfdir = 3 end + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_mahogany_top_right", param2=nfdir}) + minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = "homedecor:door_wood_glass_mahogany_bottom_right", param2=nfdir}) + end +}) + +minetest.register_node("homedecor:door_wood_glass_mahogany_bottom_left", { + description = "Wood and Glass Grid-Style Door", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_right_bottom.png", + "homedecor_door_wood_glass_mahogany_left_bottom.png", + }, + wield_image = "homedecor_door_wood_glass_mahogany_left_inv.png", + inventory_image = "homedecor_door_wood_glass_mahogany_left_inv.png", + wield_scale = {x=1,y=1,z=0.25}, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + on_place = function(itemstack, placer, pointed_thing) + fdir = minetest.dir_to_facedir(placer:get_look_dir()) + local pos = pointed_thing.above + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then + minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' ) + return + end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_mahogany_top_left", param2=fdir}) + return minetest.item_place(itemstack, placer, pointed_thing) + + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "homedecor:door_wood_glass_mahogany_top_left" then + minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2-1 + if nfdir < 0 then nfdir = 3 end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_mahogany_top_right", param2=nfdir}) + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_mahogany_bottom_right", param2=nfdir}) + end +}) + +-- Right-opening + +minetest.register_node("homedecor:door_wood_glass_mahogany_top_right", { + description = "wood/glass door top half", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_left_top.png", + "homedecor_door_wood_glass_mahogany_right_top.png", + }, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + drop = "homedecor:door_wood_glass_mahogany_bottom_left", + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "homedecor:door_wood_glass_mahogany_bottom_right" then + minetest.env:remove_node({x=pos.x, y=pos.y-1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2+1 + if nfdir > 3 then nfdir = 0 end + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_mahogany_top_left", param2=nfdir}) + minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = "homedecor:door_wood_glass_mahogany_bottom_left", param2=nfdir}) + end +}) + +minetest.register_node("homedecor:door_wood_glass_mahogany_bottom_right", { + description = "Wood and Glass Grid-Style Door (Right-opening)", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_tb.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_lr.png", + "homedecor_door_wood_glass_mahogany_left_bottom.png", + "homedecor_door_wood_glass_mahogany_right_bottom.png", + }, + wield_image = "homedecor_door_wood_glass_mahogany_right_inv.png", + inventory_image = "homedecor_door_wood_glass_mahogany_right_inv.png", + wield_scale = {x=1,y=1,z=0.25}, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + drop = "homedecor:door_wood_glass_mahogany_bottom_left", + on_place = function(itemstack, placer, pointed_thing) + fdir = minetest.dir_to_facedir(placer:get_look_dir()) + local pos = pointed_thing.above + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then + minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' ) + return + end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_mahogany_top_right", param2=fdir}) + return minetest.item_place(itemstack, placer, pointed_thing) + + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "homedecor:door_wood_glass_mahogany_top_right" then + minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2+1 + if nfdir > 3 then nfdir = 0 end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_mahogany_top_left", param2=nfdir}) + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_mahogany_bottom_left", param2=nfdir}) + end +}) diff --git a/door_glass_and_wood_white.lua b/door_glass_and_wood_white.lua new file mode 100644 index 0000000..7d66640 --- /dev/null +++ b/door_glass_and_wood_white.lua @@ -0,0 +1,220 @@ +-- This file supplies wood-and-glass doors (Grid-style, like old windows) + +-- Left-opening + +minetest.register_node("homedecor:door_wood_glass_white_top_left", { + description = "wood/glass door top half", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_right_top.png", + "homedecor_door_wood_glass_white_left_top.png", + }, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + drop = "homedecor:door_wood_glass_white_bottom_left", + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "homedecor:door_wood_glass_white_bottom_left" then + minetest.env:remove_node({x=pos.x, y=pos.y-1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2-1 + if nfdir < 0 then nfdir = 3 end + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_white_top_right", param2=nfdir}) + minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = "homedecor:door_wood_glass_white_bottom_right", param2=nfdir}) + end +}) + +minetest.register_node("homedecor:door_wood_glass_white_bottom_left", { + description = "Wood and Glass Grid-Style Door", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_right_bottom.png", + "homedecor_door_wood_glass_white_left_bottom.png", + }, + wield_image = "homedecor_door_wood_glass_white_left_inv.png", + inventory_image = "homedecor_door_wood_glass_white_left_inv.png", + wield_scale = {x=1,y=1,z=0.25}, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + on_place = function(itemstack, placer, pointed_thing) + fdir = minetest.dir_to_facedir(placer:get_look_dir()) + local pos = pointed_thing.above + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then + minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' ) + return + end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_white_top_left", param2=fdir}) + return minetest.item_place(itemstack, placer, pointed_thing) + + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "homedecor:door_wood_glass_white_top_left" then + minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2-1 + if nfdir < 0 then nfdir = 3 end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_white_top_right", param2=nfdir}) + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_white_bottom_right", param2=nfdir}) + end +}) + +-- Right-opening + +minetest.register_node("homedecor:door_wood_glass_white_top_right", { + description = "wood/glass door top half", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_left_top.png", + "homedecor_door_wood_glass_white_right_top.png", + }, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -3/32, 6/16, 8/16, 1/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -7/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + drop = "homedecor:door_wood_glass_white_bottom_left", + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "homedecor:door_wood_glass_white_bottom_right" then + minetest.env:remove_node({x=pos.x, y=pos.y-1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2+1 + if nfdir > 3 then nfdir = 0 end + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_white_top_left", param2=nfdir}) + minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = "homedecor:door_wood_glass_white_bottom_left", param2=nfdir}) + end +}) + +minetest.register_node("homedecor:door_wood_glass_white_bottom_right", { + description = "Wood and Glass Grid-Style Door (Right-opening)", + drawtype = "nodebox", + tiles = { + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_tb.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_lr.png", + "homedecor_door_wood_glass_white_left_bottom.png", + "homedecor_door_wood_glass_white_right_bottom.png", + }, + wield_image = "homedecor_door_wood_glass_white_right_inv.png", + inventory_image = "homedecor_door_wood_glass_white_right_inv.png", + wield_scale = {x=1,y=1,z=0.25}, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16} + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, 7/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -1/32, 6/16, 8/16, 3/32, 8/16 }, + { -8/16, -8/16, 6/16, 8/16, -6/16, 8/16 }, + { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, + { -1/16, -8/16, 6/16, 1/16, 8/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, + { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } + } + }, + drop = "homedecor:door_wood_glass_white_bottom_left", + on_place = function(itemstack, placer, pointed_thing) + fdir = minetest.dir_to_facedir(placer:get_look_dir()) + local pos = pointed_thing.above + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then + minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' ) + return + end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_white_top_right", param2=fdir}) + return minetest.item_place(itemstack, placer, pointed_thing) + + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "homedecor:door_wood_glass_white_top_right" then + minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z}) + end + end, + on_punch = function(pos, node, puncher) + nfdir=node.param2+1 + if nfdir > 3 then nfdir = 0 end + minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_wood_glass_white_top_left", param2=nfdir}) + minetest.env:add_node(pos, { name = "homedecor:door_wood_glass_white_bottom_left", param2=nfdir}) + end +}) diff --git a/init.lua b/init.lua index a0aee20..a09e626 100644 --- a/init.lua +++ b/init.lua @@ -13,6 +13,8 @@ dofile(minetest.get_modpath("homedecor").."/door_glass.lua") dofile(minetest.get_modpath("homedecor").."/door_glass_and_wood.lua") +dofile(minetest.get_modpath("homedecor").."/door_glass_and_wood_mahogany.lua") +dofile(minetest.get_modpath("homedecor").."/door_glass_and_wood_white.lua") dofile(minetest.get_modpath("homedecor").."/door_exterior_fancy.lua") dofile(minetest.get_modpath("homedecor").."/door_closet_oak.lua") dofile(minetest.get_modpath("homedecor").."/door_closet_mahogany.lua") diff --git a/textures/homedecor_door_wood_glass_mahogany_inv.png b/textures/homedecor_door_wood_glass_mahogany_inv.png new file mode 100644 index 0000000..3957093 Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_inv.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_left_bottom.png b/textures/homedecor_door_wood_glass_mahogany_left_bottom.png new file mode 100644 index 0000000..3f9490e Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_left_bottom.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_left_inv.png b/textures/homedecor_door_wood_glass_mahogany_left_inv.png new file mode 100644 index 0000000..e6a32cd Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_left_inv.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_left_top.png b/textures/homedecor_door_wood_glass_mahogany_left_top.png new file mode 100644 index 0000000..d0d3ade Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_left_top.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_lr.png b/textures/homedecor_door_wood_glass_mahogany_lr.png new file mode 100644 index 0000000..8e6c8f0 Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_lr.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_right_bottom.png b/textures/homedecor_door_wood_glass_mahogany_right_bottom.png new file mode 100644 index 0000000..c12eee2 Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_right_bottom.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_right_inv.png b/textures/homedecor_door_wood_glass_mahogany_right_inv.png new file mode 100644 index 0000000..23fcb81 Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_right_inv.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_right_top.png b/textures/homedecor_door_wood_glass_mahogany_right_top.png new file mode 100644 index 0000000..4c74aff Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_right_top.png differ diff --git a/textures/homedecor_door_wood_glass_mahogany_tb.png b/textures/homedecor_door_wood_glass_mahogany_tb.png new file mode 100644 index 0000000..7256f44 Binary files /dev/null and b/textures/homedecor_door_wood_glass_mahogany_tb.png differ diff --git a/textures/homedecor_door_wood_glass_white_inv.png b/textures/homedecor_door_wood_glass_white_inv.png new file mode 100644 index 0000000..3aa316e Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_inv.png differ diff --git a/textures/homedecor_door_wood_glass_white_left_bottom.png b/textures/homedecor_door_wood_glass_white_left_bottom.png new file mode 100644 index 0000000..fc55b83 Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_left_bottom.png differ diff --git a/textures/homedecor_door_wood_glass_white_left_inv.png b/textures/homedecor_door_wood_glass_white_left_inv.png new file mode 100644 index 0000000..5afeb62 Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_left_inv.png differ diff --git a/textures/homedecor_door_wood_glass_white_left_top.png b/textures/homedecor_door_wood_glass_white_left_top.png new file mode 100644 index 0000000..8afa073 Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_left_top.png differ diff --git a/textures/homedecor_door_wood_glass_white_lr.png b/textures/homedecor_door_wood_glass_white_lr.png new file mode 100644 index 0000000..2fcd80b Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_lr.png differ diff --git a/textures/homedecor_door_wood_glass_white_right_bottom.png b/textures/homedecor_door_wood_glass_white_right_bottom.png new file mode 100644 index 0000000..045215c Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_right_bottom.png differ diff --git a/textures/homedecor_door_wood_glass_white_right_inv.png b/textures/homedecor_door_wood_glass_white_right_inv.png new file mode 100644 index 0000000..b64ecef Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_right_inv.png differ diff --git a/textures/homedecor_door_wood_glass_white_right_top.png b/textures/homedecor_door_wood_glass_white_right_top.png new file mode 100644 index 0000000..5227088 Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_right_top.png differ diff --git a/textures/homedecor_door_wood_glass_white_tb.png b/textures/homedecor_door_wood_glass_white_tb.png new file mode 100644 index 0000000..41526b4 Binary files /dev/null and b/textures/homedecor_door_wood_glass_white_tb.png differ