mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-11 18:40:25 +01:00
add function to remove old mobs -> ERROR[Server]: LuaEntity name "mobs:rat" not defined
This commit is contained in:
parent
70a52831eb
commit
c9a568f2ce
@ -66,4 +66,19 @@ dofile(path.."/mff_menu.lua")
|
|||||||
minetest.register_alias("mobs:rat","mobs:chicken") -- aliases removed rat
|
minetest.register_alias("mobs:rat","mobs:chicken") -- aliases removed rat
|
||||||
minetest.register_alias("mobs:rat_cooked", "mobs:chicken_cooked")
|
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")
|
minetest.log("action", "[MOD] Mobs Redo loaded")
|
||||||
|
Loading…
Reference in New Issue
Block a user