Use new doors API from upstream
45
nodes.lua
@ -227,28 +227,23 @@ xdecor.register("cushion_block", {
|
||||
drop = "xdecor:cushion 2"
|
||||
})
|
||||
|
||||
local function door_access(door)
|
||||
return door:sub(1,6) == "prison"
|
||||
end
|
||||
local function door_access(door) return door:find("prison") 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[1].."_door", {
|
||||
description = string.gsub(" "..d[1], "%W%l", string.upper):sub(2):gsub("_", " ").." Door",
|
||||
inventory_image = "xdecor_"..d[1].."_door_inv.png",
|
||||
for _, d in pairs({"japanese", "prison", "rusty_prison",
|
||||
"screen", "slide", "woodglass"}) do
|
||||
doors.register(d.."_door", {
|
||||
tiles = {{name = "xdecor_"..d.."_door.png", backface_culling=true}},
|
||||
description = string.gsub(" "..d, "%W%l", string.upper):sub(2):gsub("_", " ").." Door",
|
||||
inventory_image = "xdecor_"..d.."_door_inv.png",
|
||||
protected = door_access(d),
|
||||
groups = {choppy=3, cracky=3, oddly_breakable_by_hand=1, flammable=2, door=1},
|
||||
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 = default.node_sound_wood_defaults(),
|
||||
sunlight = false
|
||||
material = ""
|
||||
})
|
||||
minetest.register_alias("xdecor:"..d.."_door", "doors:"..d.."_door")
|
||||
end
|
||||
|
||||
minetest.register_alias("xdecor:prison_rust_door", "doors:rusty_prison_door")
|
||||
|
||||
xdecor.register("empty_shelf", {
|
||||
description = "Empty Shelf",
|
||||
inventory = {size=24},
|
||||
@ -452,14 +447,14 @@ xdecor.register("multishelf", {
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
xpanes.register_pane("rust_bar", {
|
||||
description = "Rust Bars",
|
||||
tiles = {"xdecor_rust_bars.png"},
|
||||
xpanes.register_pane("rusty_bar", {
|
||||
description = "Rusty Iron Bars",
|
||||
tiles = {"xdecor_rusty_bars.png"},
|
||||
drawtype = "airlike",
|
||||
paramtype = "light",
|
||||
textures = {"xdecor_rust_bars.png", "xdecor_rust_bars.png", "xpanes_space.png"},
|
||||
inventory_image = "xdecor_rust_bars.png",
|
||||
wield_image = "xdecor_rust_bars.png",
|
||||
textures = {"xdecor_rusty_bars.png", "xdecor_rusty_bars.png", "xpanes_space.png"},
|
||||
inventory_image = "xdecor_rusty_bars.png",
|
||||
wield_image = "xdecor_rusty_bars.png",
|
||||
groups = {cracky=3, oddly_breakable_by_hand=2, pane=1},
|
||||
recipe = {
|
||||
{"", "default:dirt", ""},
|
||||
@ -467,6 +462,10 @@ xpanes.register_pane("rust_bar", {
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
minetest.register_alias("xpanes:rust_bar", "xpanes:rusty_bar")
|
||||
for i = 1, 15 do
|
||||
minetest.register_alias("xpanes:rust_bar_"..i, "xpanes:rusty_bar_"..i)
|
||||
end
|
||||
|
||||
xdecor.register("stonepath", {
|
||||
description = "Garden Stone Path",
|
||||
|
18
recipes.lua
@ -216,7 +216,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:japanese_door",
|
||||
output = "doors:japanese_door",
|
||||
recipe = {
|
||||
{"group:wood", "default:paper"},
|
||||
{"default:paper", "group:wood"},
|
||||
@ -267,7 +267,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:prison_door",
|
||||
output = "doors:prison_door",
|
||||
recipe = {
|
||||
{"xpanes:bar", "xpanes:bar"},
|
||||
{"xpanes:bar", "xpanes:bar"},
|
||||
@ -276,11 +276,11 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:prison_rust_door",
|
||||
output = "doors:rusty_prison_door",
|
||||
recipe = {
|
||||
{"xpanes:rust_bar", "xpanes:rust_bar"},
|
||||
{"xpanes:rust_bar", "xpanes:rust_bar"},
|
||||
{"xpanes:rust_bar", "xpanes:rust_bar"}
|
||||
{"xpanes:rusty_bar", "xpanes:rusty_bar"},
|
||||
{"xpanes:rusty_bar", "xpanes:rusty_bar"},
|
||||
{"xpanes:rusty_bar", "xpanes:rusty_bar"}
|
||||
}
|
||||
})
|
||||
|
||||
@ -294,7 +294,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:screen_door",
|
||||
output = "doors:screen_door",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood"},
|
||||
{"xpanes:chainlink", "xpanes:chainlink"},
|
||||
@ -303,7 +303,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:slide_door",
|
||||
output = "doors:slide_door",
|
||||
recipe = {
|
||||
{"default:paper", "default:paper"},
|
||||
{"default:paper", "default:paper"},
|
||||
@ -398,7 +398,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:woodglass_door",
|
||||
output = "doors:woodglass_door",
|
||||
recipe = {
|
||||
{"default:glass", "default:glass"},
|
||||
{"group:wood", "group:wood"},
|
||||
|
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 82 B |
BIN
textures/xdecor_japanese_door.png
Normal file
After Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 299 B |
BIN
textures/xdecor_prison_door.png
Normal file
After Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
BIN
textures/xdecor_rusty_prison_door.png
Normal file
After Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
BIN
textures/xdecor_screen_door.png
Normal file
After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 285 B |
BIN
textures/xdecor_slide_door.png
Normal file
After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 237 B |
BIN
textures/xdecor_woodglass_door.png
Normal file
After Width: | Height: | Size: 787 B |
Before Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 271 B |