mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 00:47:29 +01:00
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.
This commit is contained in:
parent
48b3bb980d
commit
35f47e5461
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user