Prevent unnecessarily downloading subscribed/legacy workshop items
All checks were successful
Build / Build Launcher (push) Successful in 1m12s
All checks were successful
Build / Build Launcher (push) Successful in 1m12s
Fix gitignore
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,3 +5,6 @@ riderModule.iml
|
|||||||
/_ReSharper.Caches/
|
/_ReSharper.Caches/
|
||||||
/.idea/.idea.CringeLauncher/.idea
|
/.idea/.idea.CringeLauncher/.idea
|
||||||
/.vs
|
/.vs
|
||||||
|
/CringeLauncher/Bin64
|
||||||
|
/CringeLauncher/pub
|
||||||
|
*.user
|
||||||
|
@@ -45,8 +45,9 @@ public static class SteamAPI
|
|||||||
"Download finished for {Id} with {State}", t.m_nPublishedFileId.m_PublishedFileId, t.m_eResult);
|
"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 =>
|
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)
|
foreach (var id in toDownload)
|
||||||
{
|
{
|
||||||
LogFile.Log.Info("Updating workshop item {Id}", id);
|
LogFile.Log.Info("Updating workshop item {Id}", id);
|
||||||
|
Reference in New Issue
Block a user