Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minetest.place_node broken #54

Open
wsor4035 opened this issue Oct 10, 2021 · 1 comment
Open

minetest.place_node broken #54

wsor4035 opened this issue Oct 10, 2021 · 1 comment

Comments

@wsor4035
Copy link

using minetest.place_node in a protected area even when owned by the player does not work at all

wsor4035 added a commit to TerraQuest-Studios/farlands_reloaded that referenced this issue Oct 10, 2021
@SmallJoker SmallJoker reopened this Mar 25, 2022
@SmallJoker
Copy link
Member

@wsor4035 Does this fix your issue?

diff --git a/api.lua b/api.lua
index e6fe90e..816d687 100644
--- a/api.lua
+++ b/api.lua
@@ -84,6 +84,9 @@ end
 
 -- Checks if the area is unprotected or owned by you
 function areas:canInteract(pos, name)
+       if name == "" then
+               return true -- Mods, namely minetest.item_place_node
+       end
        if minetest.check_player_privs(name, self.adminPrivs) then
                return true
        end

Also keep in mind that minetest.place_node respects buildable_to, whereas minetest.set_node ignores it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants