1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-23 07:10:19 +01:00

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.
This commit is contained in:
Zefram 2014-07-20 20:19:05 +01:00 committed by sfan5
parent 820e48badc
commit ea3fcdd077

View File

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