From c9a568f2ce7af3e5cc0454e0c6d9e8f2cb0dd258 Mon Sep 17 00:00:00 2001 From: crabman77 Date: Sun, 22 May 2016 12:01:39 +0200 Subject: [PATCH] add function to remove old mobs -> ERROR[Server]: LuaEntity name "mobs:rat" not defined --- mods/mobs/init.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mods/mobs/init.lua b/mods/mobs/init.lua index 8dc9ee73..5bc9bb04 100755 --- a/mods/mobs/init.lua +++ b/mods/mobs/init.lua @@ -66,4 +66,19 @@ dofile(path.."/mff_menu.lua") minetest.register_alias("mobs:rat","mobs:chicken") -- aliases removed rat minetest.register_alias("mobs:rat_cooked", "mobs:chicken_cooked") + +local function remove_old(name) + minetest.register_entity(name, { + name = name, + on_activate = function(self, staticdata, dtime_s) + self.object:remove() + return + end, + }) +end + +remove_old("mobs:pumba") +remove_old("mobs:rat") + + minetest.log("action", "[MOD] Mobs Redo loaded")