From a2972098d97a53884fba7b3ca4487b9f409fa470 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 12 Jul 2017 17:17:26 -0400 Subject: [PATCH 1/3] Added AppId check to Workshop.onItemInstalled, like with onDownloadResult --- Facepunch.Steamworks/Interfaces/Workshop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.cs b/Facepunch.Steamworks/Interfaces/Workshop.cs index a305af2..504e3d5 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.cs @@ -67,7 +67,7 @@ public void Dispose() private void onItemInstalled( SteamNative.ItemInstalled_t obj, bool failed ) { - if ( OnItemInstalled != null ) + if ( OnItemInstalled != null && obj.AppID == Client.Instance.AppId ) OnItemInstalled( obj.PublishedFileId ); } From c9d36eb4acf4a40f3f2cab07d295db31977ed348 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 12 Jul 2017 17:18:29 -0400 Subject: [PATCH 2/3] Made OnItemInstalled event public so it can be used to handle workshop items being subscribed to in-game --- Facepunch.Steamworks/Interfaces/Workshop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.cs b/Facepunch.Steamworks/Interfaces/Workshop.cs index 504e3d5..8280851 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.cs @@ -39,7 +39,7 @@ public partial class Workshop : IDisposable /// because of a call to Download or because of a subscription triggered /// via the browser/app. /// - internal event Action OnItemInstalled; + public event Action OnItemInstalled; internal Workshop( BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage ) { From bf7ab5598b87611c666c232ee2569b0cd6640dc8 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 12 Jul 2017 17:19:55 -0400 Subject: [PATCH 3/3] Modified summary for OnFileDownloaded to more accurately represent my experience with the event. --- Facepunch.Steamworks/Interfaces/Workshop.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.cs b/Facepunch.Steamworks/Interfaces/Workshop.cs index 8280851..9491e2e 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.cs @@ -29,8 +29,7 @@ public partial class Workshop : IDisposable /// /// Called when an item has been downloaded. This could have been - /// because of a call to Download or because of a subscription triggered - /// via the browser/app. + /// because of a call to Download. /// public event Action OnFileDownloaded;