/// <summary>Stores a mod's statistics in the cache.</summary> public static bool SaveModStatistics(ModStatistics stats) { Debug.Assert(stats != null); string statsFilePath = GenerateModStatisticsFilePath(stats.modId); return(IOUtilities.WriteJsonObjectFile(statsFilePath, stats)); }
/// <summary>Retrieves a mod's statistics from the cache.</summary> public static ModStatistics LoadModStatistics(int modId) { string statsFilePath = GenerateModStatisticsFilePath(modId); ModStatistics stats = IOUtilities.ReadJsonObjectFile <ModStatistics>(statsFilePath); return(stats); }
/// <summary>Stores a mod's statistics in the cache.</summary> public static bool SaveModStatistics(ModStatistics stats) { Debug.Assert(stats != null); string statsFilePath = GenerateModStatisticsFilePath(stats.modId); return(LocalDataStorage.WriteJSONFile(statsFilePath, stats)); }