Skip to content

Commit 35f47e5

Browse files
Rogier-5nerzhul
authored andcommitted
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.
1 parent 48b3bb9 commit 35f47e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/content_sao.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ void LuaEntitySAO::addedToEnvironment(u32 dtime_s)
175175
// Activate entity, supplying serialized state
176176
m_env->getScriptIface()->
177177
luaentity_Activate(m_id, m_init_state.c_str(), dtime_s);
178+
} else {
179+
m_prop.infotext = m_init_name;
178180
}
179181
}
180182

0 commit comments

Comments
 (0)