10 #include <json/json.h>
36 if (Manager.
Custom.empty())
42 auto & Custom = a_Out[
"custom"];
43 for (
const auto & [Statistic, Value] : Manager.
Custom)
55 for (
auto it = a_In.begin(); it != a_In.end(); ++it)
57 const auto & Key = it.key().asString();
FileStream< std::ofstream > OutputFileStream
FileStream< std::ifstream > InputFileStream
static auto MakeStatisticsDirectory(const std::string &WorldPath, std::string &&FileName)
static void LoadCustomStatFromJSON(StatisticsManager &Manager, const Json::Value &a_In)
static void SaveStatToJSON(const StatisticsManager &Manager, Json::Value &a_Out)
std::string_view From(CustomStatistic a_ID)
CustomStatistic ToCustomStatistic(std::string_view a_ID)
std::pair< Namespace, std::string_view > SplitNamespacedID(std::string_view ID)
void Save(const StatisticsManager &Manager, const std::string &WorldPath, std::string &&FileName)
void Load(StatisticsManager &Manager, const std::string &WorldPath, std::string &&FileName)
static bool CreateFolder(const AString &a_FolderPath)
Creates a new folder with the specified name.
static AString GetPathSeparator()
Returns the path separator used by the current platform.
Class that manages the statistics and achievements of a single player.
std::unordered_map< CustomStatistic, StatValue > Custom