Fixed some forgotten checks for protections

master
npx 2017-01-31 22:26:58 +01:00
parent d3846c72de
commit c044ff294b
3 changed files with 10 additions and 1 deletions

View File

@ -22,6 +22,9 @@ mobs:register_arrow("nssm:duck_father", {
})
function duck_explosion(pos)
if minetest.is_protected(pos, "") then
return
end
pos.y = pos.y+1;
minetest.add_particlespawner({
amount = 10,

View File

@ -381,6 +381,9 @@ minetest.register_abm({
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.is_protected(pos, "") then
return
end
--local under = {x=pos.x, y=pos.y-1, z=pos.z}
--local n = minetest.env:get_node(under).name
--if n~= "air" then
@ -485,7 +488,7 @@ minetest.register_tool('nssm:sun_sword', {
},
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
if puncher:get_wielded_item():get_name() == 'nssm:sun_sword' then
if node.name ~= "air" then
if node.name ~= "air" and not minetest.is_protected(pos, "") then
minetest.add_node(pointed_thing.above, {name = "fire:basic_flame"})
end
end

View File

@ -4,6 +4,9 @@ minetest.register_entity("nssm:rainbow", {
velocity = 10,
on_step = function (self, pos, node, dtime)
local pos = self.object:getpos()
if minetest.is_protected(pos, "") then
return
end
local n = minetest.env:get_node(pos).name
if n ~= "default:nyancat_rainbow" then
if n=="air" then