cycle through mobs

This commit is contained in:
Tai @ Flex 2016-08-20 13:53:06 +01:00
parent 40b17d4a94
commit c89830c00e

View File

@ -46,9 +46,15 @@ minetest.register_tool("vivarium:staff_stack", { -- this will be the wall staff
bomf(newpos,2 )
local luae = pointed_thing.ref:get_luaentity()
if luae.type == "monster" then
luae.type="npc"
luae.attacks_monsters=true
luae.state="walk"
elseif luae.type == "npc" then
luae.type = "animal"
elseif luae.type == "animal" then
luae.type = "monster"
end
end
return
end