From 35f47e5461042b3d190f8ea583aec2aa26f1c484 Mon Sep 17 00:00:00 2001 From: Rogier-5 Date: Thu, 11 Aug 2016 00:22:32 +0200 Subject: [PATCH] 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. --- src/content_sao.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; } }