]> git.lizzy.rs Git - xdecor.git/commitdiff
Add new doors
authorjp <jeanpatrick.guerrero@gmail.com>
Sun, 16 Aug 2015 11:24:57 +0000 (13:24 +0200)
committerjp <jeanpatrick.guerrero@gmail.com>
Sun, 16 Aug 2015 11:24:57 +0000 (13:24 +0200)
18 files changed:
crafts.lua
nodes.lua
textures/xdecor_brownb.png [new file with mode: 0644]
textures/xdecor_brownc.png [new file with mode: 0644]
textures/xdecor_grey.png [new file with mode: 0644]
textures/xdecor_prison_door_a.png [new file with mode: 0644]
textures/xdecor_prison_door_b.png [new file with mode: 0644]
textures/xdecor_prison_door_inv.png [new file with mode: 0644]
textures/xdecor_prison_rust_door_a.png [new file with mode: 0644]
textures/xdecor_prison_rust_door_b.png [new file with mode: 0644]
textures/xdecor_prison_rust_door_inv.png [new file with mode: 0644]
textures/xdecor_rust.png [new file with mode: 0644]
textures/xdecor_screen_door_a.png [new file with mode: 0644]
textures/xdecor_screen_door_b.png [new file with mode: 0644]
textures/xdecor_screen_door_inv.png [new file with mode: 0644]
textures/xdecor_slide_door_a.png [new file with mode: 0644]
textures/xdecor_slide_door_b.png [new file with mode: 0644]
textures/xdecor_slide_door_inv.png [new file with mode: 0644]

index fe9438b6a3c0682549ebf084f8c0e45278617803..cef8f70facdbafa7bdc1043e6797ede294e155d7 100644 (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 = {
@@ -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",
index 892a9e4470438376a89f835719d81ea730197c80..25cadb7885023bc64b2ab99363fbefef414b6300 100644 (file)
--- a/nodes.lua
+++ b/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
 
diff --git a/textures/xdecor_brownb.png b/textures/xdecor_brownb.png
new file mode 100644 (file)
index 0000000..298e28d
Binary files /dev/null and b/textures/xdecor_brownb.png differ
diff --git a/textures/xdecor_brownc.png b/textures/xdecor_brownc.png
new file mode 100644 (file)
index 0000000..4d0a2f0
Binary files /dev/null and b/textures/xdecor_brownc.png differ
diff --git a/textures/xdecor_grey.png b/textures/xdecor_grey.png
new file mode 100644 (file)
index 0000000..db7d1c3
Binary files /dev/null and b/textures/xdecor_grey.png differ
diff --git a/textures/xdecor_prison_door_a.png b/textures/xdecor_prison_door_a.png
new file mode 100644 (file)
index 0000000..1f3dae0
Binary files /dev/null and b/textures/xdecor_prison_door_a.png differ
diff --git a/textures/xdecor_prison_door_b.png b/textures/xdecor_prison_door_b.png
new file mode 100644 (file)
index 0000000..c013573
Binary files /dev/null and b/textures/xdecor_prison_door_b.png differ
diff --git a/textures/xdecor_prison_door_inv.png b/textures/xdecor_prison_door_inv.png
new file mode 100644 (file)
index 0000000..1828c24
Binary files /dev/null and b/textures/xdecor_prison_door_inv.png differ
diff --git a/textures/xdecor_prison_rust_door_a.png b/textures/xdecor_prison_rust_door_a.png
new file mode 100644 (file)
index 0000000..d88ef16
Binary files /dev/null and b/textures/xdecor_prison_rust_door_a.png differ
diff --git a/textures/xdecor_prison_rust_door_b.png b/textures/xdecor_prison_rust_door_b.png
new file mode 100644 (file)
index 0000000..a70028b
Binary files /dev/null and b/textures/xdecor_prison_rust_door_b.png differ
diff --git a/textures/xdecor_prison_rust_door_inv.png b/textures/xdecor_prison_rust_door_inv.png
new file mode 100644 (file)
index 0000000..e2431f1
Binary files /dev/null and b/textures/xdecor_prison_rust_door_inv.png differ
diff --git a/textures/xdecor_rust.png b/textures/xdecor_rust.png
new file mode 100644 (file)
index 0000000..36f4a4b
Binary files /dev/null and b/textures/xdecor_rust.png differ
diff --git a/textures/xdecor_screen_door_a.png b/textures/xdecor_screen_door_a.png
new file mode 100644 (file)
index 0000000..20a08e3
Binary files /dev/null and b/textures/xdecor_screen_door_a.png differ
diff --git a/textures/xdecor_screen_door_b.png b/textures/xdecor_screen_door_b.png
new file mode 100644 (file)
index 0000000..a9d3d48
Binary files /dev/null and b/textures/xdecor_screen_door_b.png differ
diff --git a/textures/xdecor_screen_door_inv.png b/textures/xdecor_screen_door_inv.png
new file mode 100644 (file)
index 0000000..94cbd8c
Binary files /dev/null and b/textures/xdecor_screen_door_inv.png differ
diff --git a/textures/xdecor_slide_door_a.png b/textures/xdecor_slide_door_a.png
new file mode 100644 (file)
index 0000000..bf92afe
Binary files /dev/null and b/textures/xdecor_slide_door_a.png differ
diff --git a/textures/xdecor_slide_door_b.png b/textures/xdecor_slide_door_b.png
new file mode 100644 (file)
index 0000000..a00dd69
Binary files /dev/null and b/textures/xdecor_slide_door_b.png differ
diff --git a/textures/xdecor_slide_door_inv.png b/textures/xdecor_slide_door_inv.png
new file mode 100644 (file)
index 0000000..8c34978
Binary files /dev/null and b/textures/xdecor_slide_door_inv.png differ