v1.2.6.0 (Winter Update)

This commit is contained in:
Regalis11
2023-12-14 16:11:27 +02:00
parent af8cc89fce
commit b91e85559d
375 changed files with 7771 additions and 2874 deletions
@@ -298,7 +298,7 @@ namespace Barotrauma.Steam
public static void OnItemDownloadComplete(ulong id, bool forceInstall = false)
{
if (!(Screen.Selected is MainMenuScreen) && !forceInstall)
if (Screen.Selected is not MainMenuScreen && !forceInstall)
{
if (!MainMenuScreen.WorkshopItemsToUpdate.Contains(id))
{
@@ -306,13 +306,26 @@ namespace Barotrauma.Steam
}
return;
}
else if (CanBeInstalled(id)
&& !ContentPackageManager.WorkshopPackages.Any(p =>
else if (!CanBeInstalled(id))
{
DebugConsole.Log($"Cannot install {id}");
InstallWaiter.StopWaiting(id);
}
else if (ContentPackageManager.WorkshopPackages.Any(p =>
p.UgcId.TryUnwrap(out var ugcId)
&& ugcId is SteamWorkshopId workshopId
&& workshopId.Value == id)
&& !InstallTaskCounter.IsInstalling(id))
&& workshopId.Value == id))
{
DebugConsole.Log($"Already installed {id}.");
InstallWaiter.StopWaiting(id);
}
else if (InstallTaskCounter.IsInstalling(id))
{
DebugConsole.Log($"Already installing {id}.");
}
else
{
DebugConsole.Log($"Finished downloading {id}, installing...");
TaskPool.Add($"InstallItem{id}", InstallMod(id), t => InstallWaiter.StopWaiting(id));
}
}