1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

basic diagram

This commit is contained in:
Laserlicht
2024-08-12 20:14:36 +02:00
parent ca99dfd12f
commit 37283e51c3
7 changed files with 58 additions and 23 deletions

View File

@@ -140,15 +140,9 @@ void PlayerMessageProcessor::commandStatistic(PlayerColor player, const std::vec
if(!isHost)
return;
const boost::filesystem::path outPath = VCMIDirs::get().userCachePath() / "statistic";
boost::filesystem::create_directories(outPath);
std::string path = gameHandler->gameState()->statistic.writeCsv();
const boost::filesystem::path filePath = outPath / (vstd::getDateTimeISO8601Basic(std::time(nullptr)) + ".csv");
std::ofstream file(filePath.c_str());
std::string csv = gameHandler->gameState()->statistic.toCsv();
file << csv;
broadcastSystemMessage("Statistic files can be found in " + outPath.string() + " directory\n");
broadcastSystemMessage("Statistic files can be found in " + path + " directory\n");
}
void PlayerMessageProcessor::commandHelp(PlayerColor player, const std::vector<std::string> & words)