mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
rework
This commit is contained in:
@@ -355,22 +355,6 @@ void ClientCommandManager::handleGetScriptsCommand()
|
||||
#endif
|
||||
}
|
||||
|
||||
void ClientCommandManager::handleGetStatistic()
|
||||
{
|
||||
printCommandMessage("Command accepted.\t");
|
||||
|
||||
const boost::filesystem::path outPath = VCMIDirs::get().userExtractedPath() / "statistic";
|
||||
boost::filesystem::create_directories(outPath);
|
||||
|
||||
const boost::filesystem::path filePath = outPath / (vstd::getDateTimeISO8601Basic(std::time(nullptr)) + ".csv");
|
||||
std::ofstream file(filePath.c_str());
|
||||
std::string csv = CSH->client->gameState()->statistic.toCsv();
|
||||
file << csv;
|
||||
|
||||
printCommandMessage("Writing statistic done :)\n");
|
||||
printCommandMessage("Statistic files can be found in " + outPath.string() + " directory\n");
|
||||
}
|
||||
|
||||
void ClientCommandManager::handleGetTextCommand()
|
||||
{
|
||||
printCommandMessage("Command accepted.\t");
|
||||
@@ -613,9 +597,6 @@ void ClientCommandManager::processCommand(const std::string & message, bool call
|
||||
else if(message=="get scripts")
|
||||
handleGetScriptsCommand();
|
||||
|
||||
else if(message=="get statistic")
|
||||
handleGetStatistic();
|
||||
|
||||
else if(message=="get txt")
|
||||
handleGetTextCommand();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user