From: Rogier-5 Date: Wed, 10 Aug 2016 22:22:32 +0000 (+0200) Subject: Add infotext containing entity type (e.g. mobs:cow) to unknown entities (#4431) X-Git-Tag: 0.4.15~281 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=35f47e5461042b3d190f8ea583aec2aa26f1c484;p=oweals%2Fminetest.git Add infotext containing entity type (e.g. mobs:cow) to unknown entities (#4431) If a mod is disabled, or upgraded without sufficient backward compatibility, then entities it has put into the world become unknown, and continue moving around, but are completely unrecognisable. This change allows the player to see their type, and therefore which mod is or was responsible. --- diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 53bf3154f..937363b76 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -175,6 +175,8 @@ void LuaEntitySAO::addedToEnvironment(u32 dtime_s) // Activate entity, supplying serialized state m_env->getScriptIface()-> luaentity_Activate(m_id, m_init_state.c_str(), dtime_s); + } else { + m_prop.infotext = m_init_name; } }