Allow wooden doors in maps (#551)

This commit is contained in:
ANAND 2020-01-03 11:35:37 +05:30 committed by GitHub
parent 22e2e03798
commit 05fba3f5ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,12 +150,13 @@ function _doors.door_toggle(pos, node, clicker)
replace_old_owner_information(pos) replace_old_owner_information(pos)
local tname = ctf.player(clicker:get_player_name()).team -- If team door, check clicker's team
local owner_team = meta:get_string("owner_team") if node.name:find("doors:door_steel") then
local is_right_team = tname == owner_team local tname = ctf.player(clicker:get_player_name()).team
if clicker and not minetest.check_player_privs(clicker, "protection_bypass") and local owner_team = meta:get_string("owner_team")
not is_right_team then if clicker and tname ~= owner_team then
return false return false
end
end end
-- until Lua-5.2 we have no bitwise operators :( -- until Lua-5.2 we have no bitwise operators :(