From: Zefram Date: Sun, 20 Jul 2014 19:19:05 +0000 (+0100) Subject: Pair door with door of any type X-Git-Tag: 0.4.11~63 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ea3fcdd077265d4ae3e9b4d17eacf338324f4608;p=oweals%2Fminetest_game.git Pair door with door of any type Mirror the setup of a door placed next to any door, not just next to a door of the same type. This is particularly useful where there are multiple door types that have the same appearance, but one wants the doors of a pair to have different behaviour in some other respect. --- diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 75c6620c..bb327b85 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -90,7 +90,7 @@ function doors.register_door(name, def) elseif p2 == 3 then pt3.z = pt3.z-1 end - if not string.find(minetest.get_node(pt3).name, name.."_b_") then + if minetest.get_item_group(minetest.get_node(pt3).name, "door") == 0 then minetest.set_node(pt, {name=name.."_b_1", param2=p2}) minetest.set_node(pt2, {name=name.."_t_1", param2=p2}) else