private void LoadListAsync(bool missions, bool appendBattleMaps) { if (missions) { AvailableSaves = MyLocalCache.GetAvailableMissionInfos(); } else { AvailableSaves = MyLocalCache.GetAvailableWorldInfos(); if (appendBattleMaps) { var availableBattles = MyLocalCache.GetAvailableBattlesInfos(); AvailableSaves.AddList(availableBattles); } } ContainsCorruptedWorlds = false; StringBuilder corruptedWorlds = new StringBuilder(); foreach (var pair in AvailableSaves) { Debug.Assert(pair != null); if (pair.Item2 == null) { corruptedWorlds.Append(Path.GetFileNameWithoutExtension(pair.Item1)).Append("\n"); ContainsCorruptedWorlds = true; } } if (ContainsCorruptedWorlds) { AvailableSaves.RemoveAll(x => x == null || x.Item2 == null); MyLog.Default.WriteLine("Corrupted worlds: "); MyLog.Default.WriteLine(corruptedWorlds.ToString()); } if (AvailableSaves.Count != 0) { AvailableSaves.Sort((a, b) => b.Item2.LastLoadTime.CompareTo(a.Item2.LastLoadTime)); } VerifyUniqueWorldID(AvailableSaves); }
protected override List <Tuple <string, MyWorldInfo> > GetAvailableSaves() { return(MyLocalCache.GetAvailableMissionInfos()); }