Added plain wooden door without window - e.g. for bedroom/bathroom doors.
27
crafts.lua
@ -1429,6 +1429,33 @@ minetest.register_craft( {
|
|||||||
|
|
||||||
-- doors
|
-- doors
|
||||||
|
|
||||||
|
-- plain wood, non-windowed
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "homedecor:door_wood_plain_bottom_left 2",
|
||||||
|
recipe = {
|
||||||
|
{ "default:wood", "default:wood", "" },
|
||||||
|
{ "default:wood", "default:wood", "default:steel_ingot" },
|
||||||
|
{ "default:wood", "default:wood", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "homedecor:door_wood_plain_bottom_left",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:door_wood_plain_bottom_right"
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "homedecor:door_wood_plain_bottom_right",
|
||||||
|
recipe = {
|
||||||
|
"homedecor:door_wood_plain_bottom_left"
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
-- fancy exterior
|
-- fancy exterior
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
|
189
door_wood_plain.lua
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
-- This file supplies plain, non-windowed doors.
|
||||||
|
|
||||||
|
-- Left-opening
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:door_wood_plain_top_left", {
|
||||||
|
description = "wood/glass door top half",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_right_top.png",
|
||||||
|
"homedecor_door_wood_plain_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 = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16 }
|
||||||
|
},
|
||||||
|
drop = "homedecor:door_wood_plain_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_plain_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_plain_top_right", param2=nfdir})
|
||||||
|
minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = "homedecor:door_wood_plain_bottom_right", param2=nfdir})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:door_wood_plain_bottom_left", {
|
||||||
|
description = "Wood and Glass Grid-Style Door",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_right_bottom.png",
|
||||||
|
"homedecor_door_wood_plain_left_bottom.png",
|
||||||
|
},
|
||||||
|
wield_image = "homedecor_door_wood_plain_left_inv.png",
|
||||||
|
inventory_image = "homedecor_door_wood_plain_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 = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/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_plain_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_plain_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_plain_top_right", param2=nfdir})
|
||||||
|
minetest.env:add_node(pos, { name = "homedecor:door_wood_plain_bottom_right", param2=nfdir})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Right-opening
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:door_wood_plain_top_right", {
|
||||||
|
description = "wood/glass door top half",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_left_top.png",
|
||||||
|
"homedecor_door_wood_plain_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 = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16 }
|
||||||
|
},
|
||||||
|
drop = "homedecor:door_wood_plain_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_plain_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_plain_top_left", param2=nfdir})
|
||||||
|
minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = "homedecor:door_wood_plain_bottom_left", param2=nfdir})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:door_wood_plain_bottom_right", {
|
||||||
|
description = "Wood and Glass Grid-Style Door (Right-opening)",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_tb.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_lr.png",
|
||||||
|
"homedecor_door_wood_plain_left_bottom.png",
|
||||||
|
"homedecor_door_wood_plain_right_bottom.png",
|
||||||
|
},
|
||||||
|
wield_image = "homedecor_door_wood_plain_right_inv.png",
|
||||||
|
inventory_image = "homedecor_door_wood_plain_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 = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16 }
|
||||||
|
},
|
||||||
|
drop = "homedecor:door_wood_plain_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_plain_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_plain_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_plain_top_left", param2=nfdir})
|
||||||
|
minetest.env:add_node(pos, { name = "homedecor:door_wood_plain_bottom_left", param2=nfdir})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
1
init.lua
@ -11,6 +11,7 @@
|
|||||||
-- License: LGPL
|
-- License: LGPL
|
||||||
--
|
--
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("homedecor").."/door_wood_plain.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/door_glass.lua")
|
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.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/door_glass_and_wood_mahogany.lua")
|
dofile(minetest.get_modpath("homedecor").."/door_glass_and_wood_mahogany.lua")
|
||||||
|
BIN
textures/homedecor_door_wood_plain_left_bottom.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
textures/homedecor_door_wood_plain_left_inv.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
textures/homedecor_door_wood_plain_left_top.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
textures/homedecor_door_wood_plain_lr.png
Normal file
After Width: | Height: | Size: 724 B |
BIN
textures/homedecor_door_wood_plain_right_bottom.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
textures/homedecor_door_wood_plain_right_inv.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
textures/homedecor_door_wood_plain_right_top.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
textures/homedecor_door_wood_plain_tb.png
Normal file
After Width: | Height: | Size: 697 B |