summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2015-08-27 09:42:27 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2015-08-27 09:42:27 +0100
commitd3625e3270f988fcd9c7860b3bd1c295cc793744 (patch)
tree0098c86411b368f481777ac9479e8a6c4667b7f2
parentc409f445d6c9f06f80c3fba1bbac7736db91755b (diff)
Fixed multiple chat when protector used to find others in area
-rw-r--r--depends.txt3
-rw-r--r--init.lua4
2 files changed, 6 insertions, 1 deletions
diff --git a/depends.txt b/depends.txt
index 4cfb8a9..b372d97 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,2 +1,3 @@
default
-doors \ No newline at end of file
+doors
+mobs? \ No newline at end of file
diff --git a/init.lua b/init.lua
index e1b70ba..c3407d1 100644
--- a/init.lua
+++ b/init.lua
@@ -143,6 +143,7 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
minetest.chat_send_player(digger,
"Members: " .. members .. ".")
end
+ break
end
end
@@ -354,6 +355,9 @@ minetest.register_entity("protector:display", {
-- wielditem seems to be scaled to 1.5 times original node size
visual_size = {x = 1.0 / 1.5, y = 1.0 / 1.5},
textures = {"protector:display_node"},
+ on_activate = function(self, staticdata)
+ if mobs and mobs.entity == false then self.object:remove() end
+ end,
on_step = function(self, dtime)
self.timer = (self.timer or 0) + dtime
if self.timer > 10 then