diff --git a/interface_mobs_api.lua b/interface_mobs_api.lua index 7f93476..cd6465c 100644 --- a/interface_mobs_api.lua +++ b/interface_mobs_api.lua @@ -9,6 +9,14 @@ function yl_speak_up.init_mob_table() return false end +-- this only makes sense if mobs_redo exists and is loaded +if(not(minetest.get_modpath("mobs")) + or not(minetest.global_exists("mobs")) + or not(mobs.mob_class)) then + minetest.log("action","[MOD] yl_speak_up Info: mobs_redo mod not found. Not loading interface.") + return +end + -- React to right-clicking a mobs_redo mob: -- * capture the mob with a lasso or net (if appropriate) @@ -103,6 +111,8 @@ function yl_speak_up.mobs_after_activate(self, staticdata, def, dtime) end +-- we need to override this function from mobs_redo mod so that color +-- changes to the name tag color are possible yl_speak_up.orig_mobs_update_tag = mobs.mob_class.update_tag -- update nametag and infotext mobs.mob_class.update_tag = function(self)