diff --git a/Torch.Server/Views/ModListControl.xaml b/Torch.Server/Views/ModListControl.xaml index 8d563be..11969ab 100644 --- a/Torch.Server/Views/ModListControl.xaml +++ b/Torch.Server/Views/ModListControl.xaml @@ -3,15 +3,14 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:viewModels="clr-namespace:Torch.Server.ViewModels" - xmlns:s="clr-namespace:System" + xmlns:viewModels="clr-namespace:Torch.Server.ViewModels" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" MouseMove="UserControl_MouseMove"> - + diff --git a/Torch.Server/Views/WorldGeneratorDialog.xaml.cs b/Torch.Server/Views/WorldGeneratorDialog.xaml.cs index 8f44c78..98beb07 100644 --- a/Torch.Server/Views/WorldGeneratorDialog.xaml.cs +++ b/Torch.Server/Views/WorldGeneratorDialog.xaml.cs @@ -47,9 +47,13 @@ namespace Torch.Server var scenarios = MyLocalCache.GetAvailableWorldInfos(new List {Path.Combine(MyFileSystem.ContentPath, "CustomWorlds")}); foreach (var tup in scenarios) { + if (tup.Item2 == null) + continue; + string directory = tup.Item1; MyWorldInfo info = tup.Item2; - string localizedName = MyTexts.GetString(MyStringId.GetOrCompute(info.SessionName)); + var sessionNameId = MyStringId.GetOrCompute(info.SessionName); + string localizedName = MyTexts.GetString(sessionNameId); var checkpoint = MyLocalCache.LoadCheckpoint(directory, out _); checkpoint.OnlineMode = MyOnlineModeEnum.PUBLIC; _checkpoints.Add(new PremadeCheckpointItem { Name = localizedName, Icon = Path.Combine(directory, "thumb.jpg"), Path = directory, Checkpoint = checkpoint});