mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-05-11 05:10:22 +02:00
check whether the machine is protected, not the target
This commit is contained in:
parent
0ae7e0db19
commit
61bab4ef83
12
wielder.lua
12
wielder.lua
@ -336,11 +336,7 @@ if pipeworks.enable_node_breaker then
|
||||
masquerade_as_owner = true,
|
||||
sneak = false,
|
||||
act = function(virtplayer, pointed_thing)
|
||||
local player_name = virtplayer:get_player_name()
|
||||
if (
|
||||
minetest.is_protected(pointed_thing.above, player_name) or
|
||||
minetest.is_protected(pointed_thing.under, player_name)
|
||||
) then
|
||||
if minetest.is_protected(vector.add(virtplayer:get_pos(), assumed_eye_pos), virtplayer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
|
||||
@ -435,11 +431,7 @@ if pipeworks.enable_deployer then
|
||||
masquerade_as_owner = true,
|
||||
sneak = false,
|
||||
act = function(virtplayer, pointed_thing)
|
||||
local player_name = virtplayer:get_player_name()
|
||||
if (
|
||||
minetest.is_protected(pointed_thing.above, player_name) or
|
||||
minetest.is_protected(pointed_thing.under, player_name)
|
||||
) then
|
||||
if minetest.is_protected(vector.add(virtplayer:get_pos(), assumed_eye_pos), virtplayer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user