diff --git a/Plugin.ClientModLoader/ModInjector.cs b/Plugin.ClientModLoader/ModInjector.cs index d1441fb..839d9f1 100644 --- a/Plugin.ClientModLoader/ModInjector.cs +++ b/Plugin.ClientModLoader/ModInjector.cs @@ -26,8 +26,11 @@ internal static class ModInjector [HarmonyPatch(typeof(MyWorkshop), nameof(MyWorkshop.DownloadWorldModsBlockingInternal))] [HarmonyPostfix] - private static void DownloadModsBlockingPostfix(List mods, List __state) + private static void DownloadModsBlockingPostfix(MyWorkshop.ResultData ret, List mods, List __state) { + if (ret.Result != VRage.GameServices.MyGameServiceCallResult.OK) + return; //world will not load, and mod data isn't loaded + var worldMods = __state.Select(b => b.PublishedFileId).ToImmutableHashSet(); var resolvedMods = mods.ToImmutableDictionary(b => b.PublishedFileId); diff --git a/Plugin.ClientModLoader/ModListComponent.cs b/Plugin.ClientModLoader/ModListComponent.cs index 72bf66d..7cf7540 100644 --- a/Plugin.ClientModLoader/ModListComponent.cs +++ b/Plugin.ClientModLoader/ModListComponent.cs @@ -273,7 +273,7 @@ public class ModListComponent : IRenderComponent var description = details.m_rgchDescription; list.Add(new(details.m_nPublishedFileId.m_PublishedFileId, title, string.IsNullOrEmpty(item.Tooltip) - ? description[..Math.Min(description.Length - 1, 255)] + ? description[..Math.Min(description.Length, 255)] : item.Tooltip, item.Description, description, $"https://steamcommunity.com/sharedfiles/filedetails/?id={details.m_nPublishedFileId.m_PublishedFileId}",