only print 'Loaded autorun.lua' to screen (not to console/stdout.txt)
All the other debug output was already removed in earlier commits
This commit is contained in:
parent
9048a3c50e
commit
df854f72a6
@ -1464,7 +1464,7 @@ void GameController::ParticleDebug(int mode, int x, int y)
|
||||
else
|
||||
logmessage << "Updated particles #" << debug_currentParticle << " through #" << i;
|
||||
}
|
||||
gameModel->Log(logmessage.str());
|
||||
gameModel->Log(logmessage.str(), false);
|
||||
|
||||
sim->UpdateParticles(debug_currentParticle, i);
|
||||
if (i < NPART-1)
|
||||
|
@ -924,13 +924,14 @@ GameSave * GameModel::GetPlaceSave()
|
||||
return placeSave;
|
||||
}
|
||||
|
||||
void GameModel::Log(string message)
|
||||
void GameModel::Log(string message, bool printToFile)
|
||||
{
|
||||
consoleLog.push_front(message);
|
||||
if(consoleLog.size()>100)
|
||||
consoleLog.pop_back();
|
||||
notifyLogChanged(message);
|
||||
std::cout << message << std::endl;
|
||||
if (printToFile)
|
||||
std::cout << message << std::endl;
|
||||
}
|
||||
|
||||
deque<string> GameModel::GetLog()
|
||||
|
@ -187,7 +187,7 @@ public:
|
||||
ui::Point GetZoomWindowPosition();
|
||||
void SetClipboard(GameSave * save);
|
||||
void SetPlaceSave(GameSave * save);
|
||||
void Log(string message);
|
||||
void Log(string message, bool printToFile);
|
||||
deque<string> GetLog();
|
||||
GameSave * GetClipboard();
|
||||
GameSave * GetPlaceSave();
|
||||
|
@ -31,7 +31,7 @@ std::string CommandInterface::FormatCommand(std::string command)
|
||||
|
||||
void CommandInterface::Log(LogType type, std::string message)
|
||||
{
|
||||
m->Log(message);
|
||||
m->Log(message, type == LogError || type == LogNotice);
|
||||
}
|
||||
|
||||
int CommandInterface::GetPropertyOffset(std::string key, FormatType & format)
|
||||
|
@ -358,7 +358,7 @@ void LuaScriptInterface::Init()
|
||||
if(luaL_loadfile(l, "autorun.lua") || lua_pcall(l, 0, 0, 0))
|
||||
luacon_ci->Log(CommandInterface::LogError, luacon_geterror());
|
||||
else
|
||||
luacon_ci->Log(CommandInterface::LogNotice, "Loaded autorun.lua");
|
||||
luacon_ci->Log(CommandInterface::LogWarning, "Loaded autorun.lua");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user