diff options
author | asl97 <asl97@outlook.com> | 2014-05-04 15:10:11 +0800 |
---|---|---|
committer | RealBadAngel <maciej.kasatkin@o2.pl> | 2014-05-06 04:22:51 +0200 |
commit | 45e1f05ffc08824f66e4a92f4fb04ba45a200e35 (patch) | |
tree | 8e508a5dcc60995841e267df677194ea25a7598a | |
parent | 30adc3b651b61de211c869a62c66a6aebb5db550 (diff) |
Move checking of node that should be ignore above protection checking
firing a laser into a sky while in someone land without hitting anything but air shouldn't get anyone ban
-rw-r--r-- | technic/tools/mining_lasers.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/technic/tools/mining_lasers.lua b/technic/tools/mining_lasers.lua index 50df526..e06c7bf 100644 --- a/technic/tools/mining_lasers.lua +++ b/technic/tools/mining_lasers.lua @@ -75,10 +75,6 @@ local function node_tab(z, d) end local function laser_node(pos, player) - if minetest.is_protected(pos, player:get_player_name()) then - minetest.record_protection_violation(pos, player:get_player_name()) - return - end local node = minetest.get_node(pos) if node.name == "air" or node.name == "ignore" @@ -86,6 +82,10 @@ local function laser_node(pos, player) or node.name == "default:lava_flowing" then return end + if minetest.is_protected(pos, player:get_player_name()) then + minetest.record_protection_violation(pos, player:get_player_name()) + return + end if node.name == "default:water_source" or node.name == "default:water_flowing" then minetest.remove_node(pos) |