Unstable 1.2.4.0
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user