mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 14:48:02 +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 @@ namespace Facepunch.Steamworks
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when an item has been downloaded. This could have been
|
/// Called when an item has been downloaded. This could have been
|
||||||
/// because of a call to Download or because of a subscription triggered
|
/// because of a call to Download.
|
||||||
/// via the browser/app.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<ulong, Callbacks.Result> OnFileDownloaded;
|
public event Action<ulong, Callbacks.Result> OnFileDownloaded;
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ namespace Facepunch.Steamworks
|
|||||||
/// because of a call to Download or because of a subscription triggered
|
/// because of a call to Download or because of a subscription triggered
|
||||||
/// via the browser/app.
|
/// via the browser/app.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal event Action<ulong> OnItemInstalled;
|
public event Action<ulong> OnItemInstalled;
|
||||||
|
|
||||||
internal Workshop( BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage )
|
internal Workshop( BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage )
|
||||||
{
|
{
|
||||||
@ -67,7 +66,7 @@ namespace Facepunch.Steamworks
|
|||||||
|
|
||||||
private void onItemInstalled( SteamNative.ItemInstalled_t obj, bool failed )
|
private void onItemInstalled( SteamNative.ItemInstalled_t obj, bool failed )
|
||||||
{
|
{
|
||||||
if ( OnItemInstalled != null )
|
if ( OnItemInstalled != null && obj.AppID == Client.Instance.AppId )
|
||||||
OnItemInstalled( obj.PublishedFileId );
|
OnItemInstalled( obj.PublishedFileId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user