mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Merge pull request #46 from richdog/master
Made changes surrounding OnItemInstalled and OnFileDownloaded events in Workshop.cs
This commit is contained in:
commit
6c4296a0fc
@ -29,8 +29,7 @@ public partial class Workshop : IDisposable
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public event Action<ulong, Callbacks.Result> OnFileDownloaded;
|
||||
|
||||
@ -39,7 +38,7 @@ public partial class Workshop : IDisposable
|
||||
/// because of a call to Download or because of a subscription triggered
|
||||
/// via the browser/app.
|
||||
/// </summary>
|
||||
internal event Action<ulong> OnItemInstalled;
|
||||
public event Action<ulong> OnItemInstalled;
|
||||
|
||||
internal Workshop( BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage )
|
||||
{
|
||||
@ -67,7 +66,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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user