Prevent unnecessarily downloading subscribed/legacy workshop items
All checks were successful
Build / Build Launcher (push) Successful in 1m12s

Fix gitignore
This commit is contained in:
2024-08-25 22:30:28 -04:00
parent fbf02ad716
commit 46d915911b
2 changed files with 5 additions and 1 deletions

3
.gitignore vendored
View File

@@ -5,3 +5,6 @@ riderModule.iml
/_ReSharper.Caches/
/.idea/.idea.CringeLauncher/.idea
/.vs
/CringeLauncher/Bin64
/CringeLauncher/pub
*.user

View File

@@ -45,8 +45,9 @@ public static class SteamAPI
"Download finished for {Id} with {State}", t.m_nPublishedFileId.m_PublishedFileId, t.m_eResult);
});
//items could have other flags besides installed
var toDownload = ids.Where(b =>
(EItemState)SteamUGC.GetItemState(new(b)) != EItemState.k_EItemStateInstalled).ToArray();
((EItemState)SteamUGC.GetItemState(new(b)) & EItemState.k_EItemStateInstalled) == 0).ToArray();
foreach (var id in toDownload)
{
LogFile.Log.Info("Updating workshop item {Id}", id);