mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 13:52:31 +01:00
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
This commit is contained in:
parent
30adc3b651
commit
45e1f05ffc
@ -75,10 +75,6 @@ local function node_tab(z, d)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function laser_node(pos, player)
|
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)
|
local node = minetest.get_node(pos)
|
||||||
if node.name == "air"
|
if node.name == "air"
|
||||||
or node.name == "ignore"
|
or node.name == "ignore"
|
||||||
@ -86,6 +82,10 @@ local function laser_node(pos, player)
|
|||||||
or node.name == "default:lava_flowing" then
|
or node.name == "default:lava_flowing" then
|
||||||
return
|
return
|
||||||
end
|
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"
|
if node.name == "default:water_source"
|
||||||
or node.name == "default:water_flowing" then
|
or node.name == "default:water_flowing" then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user