Skip to content

Commit

Permalink
Add infotext containing entity type (e.g. mobs:cow) to unknown entiti…
Browse files Browse the repository at this point in the history
…es (#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.
  • Loading branch information
Rogier-5 authored and nerzhul committed Aug 10, 2016
1 parent 48b3bb9 commit 35f47e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content_sao.cpp
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 35f47e5

Please sign in to comment.