// Replace the map with a new map from files public static void Reset() { lock (_deserializationLock) { lock (_updateLock) { logger.Info("Backing up existing inventory data"); string inventoryToSave = JsonConvert.SerializeObject(Holder.factionInventories); BackupWorker.WriteBoth(FactionInventoryStateManager.ShopFileDirectory, inventoryToSave); Holder.factionInventories = new Dictionary <Faction, List <ShopDefItem> >(); } } }
// Replace the map with a new map from files public static void Reset() { lock (_deserializationLock) { lock (_updateLock) { logger.Info("Backing up existing player history"); string objectToSave = JsonConvert.SerializeObject(Holder.playerHistory); BackupWorker.WriteBoth(PlayerStateManager.StoragePath, objectToSave); Holder.playerHistory = null; Holder.playerHistory = new HashSet <PlayerHistory>(); } } }
// Replace the map with a new map from files public static void Reset() { lock (_deserializationLock) { lock (_updateLock) { logger.Info("Backing up existing starmap"); string mapToSave = JsonConvert.SerializeObject(Holder.currentMap); BackupWorker.WriteBoth(StarMapStateManager.MapFileDirectory, mapToSave); Holder.currentMap = null; Holder.currentMap = InitializeNewMap(); } } }