Add state id to lua prompt

This commit is contained in:
Lion Kortlepel 2021-12-06 13:57:40 +01:00
parent 3cce875fbb
commit 817a146699
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -108,12 +108,13 @@ void TConsole::ChangeToLuaConsole(const std::string& LuaStateId) {
mIsLuaConsole = true; mIsLuaConsole = true;
if (mStateId != mDefaultStateId) { if (mStateId != mDefaultStateId) {
Application::Console().WriteRaw("Entered Lua console for state '" + mStateId + "'. To exit, type `exit()`"); Application::Console().WriteRaw("Entered Lua console for state '" + mStateId + "'. To exit, type `exit()`");
mCommandline.set_prompt("lua @" + LuaStateId + "> ");
} else { } else {
Application::Console().WriteRaw("Entered Lua console. To exit, type `exit()`"); Application::Console().WriteRaw("Entered Lua console. To exit, type `exit()`");
mCommandline.set_prompt("lua> ");
} }
// mCachedRegularHistory = mCommandline.history(); // mCachedRegularHistory = mCommandline.history();
// mCommandline.set_history(mCachedLuaHistory); // mCommandline.set_history(mCachedLuaHistory);
mCommandline.set_prompt("lua> ");
} }
} }