From 664e99d34a8b96ac762c4b7a9349005c3aa8d5ec Mon Sep 17 00:00:00 2001 From: Zughy <4279489-marco_a@users.noreply.gitlab.com> Date: Fri, 8 Jan 2021 18:29:44 +0000 Subject: [PATCH] Sign and land owners always able to edit a sign --- api.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api.lua b/api.lua index 17bdd76..5b17b5c 100644 --- a/api.lua +++ b/api.lua @@ -623,11 +623,10 @@ end function signs_lib.rightclick_sign(pos, node, player, itemstack, pointed_thing) - local playername = player:get_player_name() - if not minetest.check_player_privs(playername, {signslib_edit = true}) then return end + if not signs_lib.can_modify(pos, player) then return end player:get_meta():set_string("signslib:pos", minetest.pos_to_string(pos)) - minetest.show_formspec(playername, "signs_lib:sign", get_sign_formspec(pos, node.name)) + minetest.show_formspec(player:get_player_name(), "signs_lib:sign", get_sign_formspec(pos, node.name)) end function signs_lib.destruct_sign(pos)