Fixed some forgotten checks for protections
parent
d3846c72de
commit
c044ff294b
|
@ -22,6 +22,9 @@ mobs:register_arrow("nssm:duck_father", {
|
||||||
})
|
})
|
||||||
|
|
||||||
function duck_explosion(pos)
|
function duck_explosion(pos)
|
||||||
|
if minetest.is_protected(pos, "") then
|
||||||
|
return
|
||||||
|
end
|
||||||
pos.y = pos.y+1;
|
pos.y = pos.y+1;
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 10,
|
amount = 10,
|
||||||
|
|
|
@ -381,6 +381,9 @@ minetest.register_abm({
|
||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
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 under = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
--local n = minetest.env:get_node(under).name
|
--local n = minetest.env:get_node(under).name
|
||||||
--if n~= "air" then
|
--if n~= "air" then
|
||||||
|
@ -485,7 +488,7 @@ minetest.register_tool('nssm:sun_sword', {
|
||||||
},
|
},
|
||||||
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||||
if puncher:get_wielded_item():get_name() == 'nssm:sun_sword' then
|
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"})
|
minetest.add_node(pointed_thing.above, {name = "fire:basic_flame"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,6 +4,9 @@ minetest.register_entity("nssm:rainbow", {
|
||||||
velocity = 10,
|
velocity = 10,
|
||||||
on_step = function (self, pos, node, dtime)
|
on_step = function (self, pos, node, dtime)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
|
if minetest.is_protected(pos, "") then
|
||||||
|
return
|
||||||
|
end
|
||||||
local n = minetest.env:get_node(pos).name
|
local n = minetest.env:get_node(pos).name
|
||||||
if n ~= "default:nyancat_rainbow" then
|
if n ~= "default:nyancat_rainbow" then
|
||||||
if n=="air" then
|
if n=="air" then
|
||||||
|
|
Loading…
Reference in New Issue