Esempio n. 1
0
        /// <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));
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        /// <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));
        }