diff --git a/nodes.lua b/nodes.lua index d940c40..7cbaec1 100644 --- a/nodes.lua +++ b/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", diff --git a/recipes.lua b/recipes.lua index 116e23f..b4bc5fa 100644 --- a/recipes.lua +++ b/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"}, diff --git a/textures/xdecor_brown.png b/textures/xdecor_brown.png deleted file mode 100644 index c541a57..0000000 Binary files a/textures/xdecor_brown.png and /dev/null differ diff --git a/textures/xdecor_brownb.png b/textures/xdecor_brownb.png deleted file mode 100644 index 298e28d..0000000 Binary files a/textures/xdecor_brownb.png and /dev/null differ diff --git a/textures/xdecor_brownc.png b/textures/xdecor_brownc.png deleted file mode 100644 index 4d0a2f0..0000000 Binary files a/textures/xdecor_brownc.png and /dev/null differ diff --git a/textures/xdecor_grey.png b/textures/xdecor_grey.png deleted file mode 100644 index db7d1c3..0000000 Binary files a/textures/xdecor_grey.png and /dev/null differ diff --git a/textures/xdecor_japanese_door.png b/textures/xdecor_japanese_door.png new file mode 100644 index 0000000..1b44b0a Binary files /dev/null and b/textures/xdecor_japanese_door.png differ diff --git a/textures/xdecor_japanese_door_a.png b/textures/xdecor_japanese_door_a.png deleted file mode 100644 index fa466dc..0000000 Binary files a/textures/xdecor_japanese_door_a.png and /dev/null differ diff --git a/textures/xdecor_japanese_door_b.png b/textures/xdecor_japanese_door_b.png deleted file mode 100644 index db334e4..0000000 Binary files a/textures/xdecor_japanese_door_b.png and /dev/null differ diff --git a/textures/xdecor_prison_door.png b/textures/xdecor_prison_door.png new file mode 100644 index 0000000..ecd05d0 Binary files /dev/null and b/textures/xdecor_prison_door.png differ diff --git a/textures/xdecor_prison_door_a.png b/textures/xdecor_prison_door_a.png deleted file mode 100644 index 1f3dae0..0000000 Binary files a/textures/xdecor_prison_door_a.png and /dev/null differ diff --git a/textures/xdecor_prison_door_b.png b/textures/xdecor_prison_door_b.png deleted file mode 100644 index c013573..0000000 Binary files a/textures/xdecor_prison_door_b.png and /dev/null differ diff --git a/textures/xdecor_prison_rust_door_a.png b/textures/xdecor_prison_rust_door_a.png deleted file mode 100644 index d88ef16..0000000 Binary files a/textures/xdecor_prison_rust_door_a.png and /dev/null differ diff --git a/textures/xdecor_prison_rust_door_b.png b/textures/xdecor_prison_rust_door_b.png deleted file mode 100644 index a70028b..0000000 Binary files a/textures/xdecor_prison_rust_door_b.png and /dev/null differ diff --git a/textures/xdecor_rust.png b/textures/xdecor_rust.png deleted file mode 100644 index 36f4a4b..0000000 Binary files a/textures/xdecor_rust.png and /dev/null differ diff --git a/textures/xdecor_rust_bars.png b/textures/xdecor_rusty_bars.png similarity index 100% rename from textures/xdecor_rust_bars.png rename to textures/xdecor_rusty_bars.png diff --git a/textures/xdecor_rusty_prison_door.png b/textures/xdecor_rusty_prison_door.png new file mode 100644 index 0000000..b285244 Binary files /dev/null and b/textures/xdecor_rusty_prison_door.png differ diff --git a/textures/xdecor_prison_rust_door_inv.png b/textures/xdecor_rusty_prison_door_inv.png similarity index 100% rename from textures/xdecor_prison_rust_door_inv.png rename to textures/xdecor_rusty_prison_door_inv.png diff --git a/textures/xdecor_screen_door.png b/textures/xdecor_screen_door.png new file mode 100644 index 0000000..11feb15 Binary files /dev/null and b/textures/xdecor_screen_door.png differ diff --git a/textures/xdecor_screen_door_a.png b/textures/xdecor_screen_door_a.png deleted file mode 100644 index 20a08e3..0000000 Binary files a/textures/xdecor_screen_door_a.png and /dev/null differ diff --git a/textures/xdecor_screen_door_b.png b/textures/xdecor_screen_door_b.png deleted file mode 100644 index a9d3d48..0000000 Binary files a/textures/xdecor_screen_door_b.png and /dev/null differ diff --git a/textures/xdecor_slide_door.png b/textures/xdecor_slide_door.png new file mode 100644 index 0000000..fc18f5d Binary files /dev/null and b/textures/xdecor_slide_door.png differ diff --git a/textures/xdecor_slide_door_a.png b/textures/xdecor_slide_door_a.png deleted file mode 100644 index bf92afe..0000000 Binary files a/textures/xdecor_slide_door_a.png and /dev/null differ diff --git a/textures/xdecor_slide_door_b.png b/textures/xdecor_slide_door_b.png deleted file mode 100644 index a00dd69..0000000 Binary files a/textures/xdecor_slide_door_b.png and /dev/null differ diff --git a/textures/xdecor_woodglass_door.png b/textures/xdecor_woodglass_door.png new file mode 100644 index 0000000..93a6cca Binary files /dev/null and b/textures/xdecor_woodglass_door.png differ diff --git a/textures/xdecor_woodglass_door_a.png b/textures/xdecor_woodglass_door_a.png deleted file mode 100644 index 60a2663..0000000 Binary files a/textures/xdecor_woodglass_door_a.png and /dev/null differ diff --git a/textures/xdecor_woodglass_door_b.png b/textures/xdecor_woodglass_door_b.png deleted file mode 100644 index 335cdcc..0000000 Binary files a/textures/xdecor_woodglass_door_b.png and /dev/null differ