Add new doors
42
crafts.lua
@ -199,9 +199,9 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "xdecor:japanese_door",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood"},
|
||||
{"default:paper", "default:paper"},
|
||||
{"group:wood", "group:wood"}
|
||||
{"group:wood", "default:paper"},
|
||||
{"default:paper", "group:wood"},
|
||||
{"group:wood", "default:paper"}
|
||||
}
|
||||
})
|
||||
|
||||
@ -273,6 +273,24 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:prison_door",
|
||||
recipe = {
|
||||
{"xpanes:bar", "xpanes:bar"},
|
||||
{"xpanes:bar", "xpanes:bar"},
|
||||
{"xpanes:bar", "xpanes:bar"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:prison_rust_door",
|
||||
recipe = {
|
||||
{"xpanes:rust_bar", "xpanes:rust_bar"},
|
||||
{"xpanes:rust_bar", "xpanes:rust_bar"},
|
||||
{"xpanes:rust_bar", "xpanes:rust_bar"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:rope",
|
||||
recipe = {
|
||||
@ -281,6 +299,24 @@ minetest.register_craft({
|
||||
{"farming:string"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:screen_door",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood"},
|
||||
{"xpanes:chainlink", "xpanes:chainlink"},
|
||||
{"group:wood", "group:wood"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:slide_door",
|
||||
recipe = {
|
||||
{"default:paper", "default:paper"},
|
||||
{"default:paper", "default:paper"},
|
||||
{"group:wood", "group:wood"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:stereo",
|
||||
|
28
nodes.lua
@ -257,16 +257,30 @@ xdecor.register("cushion", {
|
||||
node_box = xdecor.nodebox.slab_y(-0.5, 0.5)
|
||||
})
|
||||
|
||||
local door_types = {"woodglass", "japanese"}
|
||||
local function door_access(door)
|
||||
if door:find("prison") then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
local door_types = {
|
||||
{"japanese", "brown"},
|
||||
{"prison", "grey"},
|
||||
{"prison_rust", "rust"},
|
||||
{"screen", "brownb"},
|
||||
{"slide", "brownc"},
|
||||
{"woodglass", "brown"}
|
||||
}
|
||||
|
||||
for _, d in pairs(door_types) do
|
||||
doors.register_door("xdecor:"..d.."_door", {
|
||||
description = d:gsub("%l", string.upper, 1).." Door",
|
||||
inventory_image = "xdecor_"..d.."_door_inv.png",
|
||||
doors.register_door("xdecor:"..d[1].."_door", {
|
||||
description = d[1]:gsub("%l", string.upper, 1).." Door",
|
||||
inventory_image = "xdecor_"..d[1].."_door_inv.png",
|
||||
groups = {choppy=3, flammable=2, door=1},
|
||||
tiles_bottom = {"xdecor_"..d.."_door_b.png", "xdecor_brown.png"},
|
||||
tiles_top = {"xdecor_"..d.."_door_a.png", "xdecor_brown.png"},
|
||||
sounds = xdecor.wood
|
||||
tiles_bottom = {"xdecor_"..d[1].."_door_b.png", "xdecor_"..d[2]..".png"},
|
||||
tiles_top = {"xdecor_"..d[1].."_door_a.png", "xdecor_"..d[2]..".png"},
|
||||
only_placer_can_open = door_access(d[1]),
|
||||
sounds = xdecor.wood,
|
||||
sunlight = false
|
||||
})
|
||||
end
|
||||
|
||||
|
BIN
textures/xdecor_brownb.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
textures/xdecor_brownc.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
textures/xdecor_grey.png
Normal file
After Width: | Height: | Size: 82 B |
BIN
textures/xdecor_prison_door_a.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
textures/xdecor_prison_door_b.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
textures/xdecor_prison_door_inv.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
textures/xdecor_prison_rust_door_a.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
textures/xdecor_prison_rust_door_b.png
Normal file
After Width: | Height: | Size: 250 B |
BIN
textures/xdecor_prison_rust_door_inv.png
Normal file
After Width: | Height: | Size: 236 B |
BIN
textures/xdecor_rust.png
Normal file
After Width: | Height: | Size: 82 B |
BIN
textures/xdecor_screen_door_a.png
Normal file
After Width: | Height: | Size: 277 B |
BIN
textures/xdecor_screen_door_b.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
textures/xdecor_screen_door_inv.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
textures/xdecor_slide_door_a.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
textures/xdecor_slide_door_b.png
Normal file
After Width: | Height: | Size: 237 B |
BIN
textures/xdecor_slide_door_inv.png
Normal file
After Width: | Height: | Size: 212 B |