From 05fba3f5cee7f1064b3ffe7a8760f609f8e769ac Mon Sep 17 00:00:00 2001 From: ANAND Date: Fri, 3 Jan 2020 11:35:37 +0530 Subject: [PATCH] Allow wooden doors in maps (#551) --- mods/mtg/doors/init.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mods/mtg/doors/init.lua b/mods/mtg/doors/init.lua index 2865f59..d21122f 100644 --- a/mods/mtg/doors/init.lua +++ b/mods/mtg/doors/init.lua @@ -150,12 +150,13 @@ function _doors.door_toggle(pos, node, clicker) replace_old_owner_information(pos) - local tname = ctf.player(clicker:get_player_name()).team - local owner_team = meta:get_string("owner_team") - local is_right_team = tname == owner_team - if clicker and not minetest.check_player_privs(clicker, "protection_bypass") and - not is_right_team then - return false + -- If team door, check clicker's team + if node.name:find("doors:door_steel") then + local tname = ctf.player(clicker:get_player_name()).team + local owner_team = meta:get_string("owner_team") + if clicker and tname ~= owner_team then + return false + end end -- until Lua-5.2 we have no bitwise operators :(