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:
jacob1 2015-08-31 23:51:50 -04:00
parent 9048a3c50e
commit df854f72a6
5 changed files with 7 additions and 6 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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();

View File

@ -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)

View File

@ -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");
}
}