summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorRogier-5 <rogier777@gmail.com>2016-08-11 00:22:32 +0200
committerNer'zhul <nerzhul@users.noreply.github.com>2016-08-11 00:22:32 +0200
commit35f47e5461042b3d190f8ea583aec2aa26f1c484 (patch)
tree3707add5d0fe443cdaf2497a338261256f328a02 /src/content_sao.cpp
parent48b3bb980d4a026d32739acc1982f16e3c303c5b (diff)
downloadminetest-35f47e5461042b3d190f8ea583aec2aa26f1c484.tar.gz
minetest-35f47e5461042b3d190f8ea583aec2aa26f1c484.tar.bz2
minetest-35f47e5461042b3d190f8ea583aec2aa26f1c484.zip
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.
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}
}