This commit is contained in:
Regalis11
2024-04-02 18:15:50 +03:00
parent 47badaf760
commit 95a8b89e2b
2 changed files with 18 additions and 8 deletions

View File

@@ -48,15 +48,19 @@ namespace Barotrauma.Steam
t =>
{
msgBox.Close();
if (!t.TryGetResult(out Steamworks.Ugc.Item?[]? itemsNullable)) { return; }
if (!t.TryGetResult(out Option<Steamworks.Ugc.Item>[]? itemOptions)) { return; }
var items = itemsNullable
.Where(it => it.HasValue)
.Select(it => it ?? default)
.ToArray();
items.ForEach(it => it.Subscribe());
InitiateDownloads(items, onComplete: () =>
List<Steamworks.Ugc.Item> itemsToDownload = new List<Steamworks.Ugc.Item>();
foreach (Option<Steamworks.Ugc.Item> itemOption in itemOptions)
{
if (itemOption.TryUnwrap(out var item))
{
itemsToDownload.Add(item);
}
}
itemsToDownload.ForEach(it => it.Subscribe());
InitiateDownloads(itemsToDownload, onComplete: () =>
{
ContentPackageManager.UpdateContentPackageList();
GameMain.Instance.ConnectCommand = Option<ConnectCommand>.Some(rejoinCommand);

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.3.0.2
-------------------------------------------------------------------------------------------------------------------------------------------------
- Fixed inability to download missing mods from the Steam Workshop when you're joining a server.
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.3.0.1
-------------------------------------------------------------------------------------------------------------------------------------------------