Add new doors

This commit is contained in:
jp 2015-08-16 13:24:57 +02:00
parent 573be7d5bf
commit 192eabd709
18 changed files with 60 additions and 10 deletions

View File

@ -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 = {
@ -282,6 +300,24 @@ minetest.register_craft({
}
})
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",
recipe = {

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

BIN
textures/xdecor_brownc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

BIN
textures/xdecor_grey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

BIN
textures/xdecor_rust.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B