mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-09-18 19:10:03 +03:00
Merge pull request #560 from dozd/master
RemoteStoragePublishedFileSubscribed_t and RemoteStoragePublishedFile…
This commit is contained in:
commit
ca77bd07bc
1 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,9 @@ namespace Steamworks
|
||||||
internal static void InstallEvents( bool server )
|
internal static void InstallEvents( bool server )
|
||||||
{
|
{
|
||||||
Dispatch.Install<DownloadItemResult_t>( x => OnDownloadItemResult?.Invoke( x.Result ), server );
|
Dispatch.Install<DownloadItemResult_t>( x => OnDownloadItemResult?.Invoke( x.Result ), server );
|
||||||
|
Dispatch.Install<RemoteStoragePublishedFileSubscribed_t>( x => OnItemSubscribed?.Invoke( x.AppID.Value, x.PublishedFileId ), server );
|
||||||
|
Dispatch.Install<RemoteStoragePublishedFileUnsubscribed_t>( x => OnItemUnsubscribed?.Invoke( x.AppID.Value, x.PublishedFileId ), server );
|
||||||
|
Dispatch.Install<ItemInstalled_t>( x => OnItemInstalled?.Invoke( x.AppID.Value, x.PublishedFileId ), server );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -33,6 +36,13 @@ namespace Steamworks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result> OnDownloadItemResult;
|
public static event Action<Result> OnDownloadItemResult;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Posted when new item is subscribed
|
||||||
|
/// </summary>
|
||||||
|
public static event Action<AppId, PublishedFileId> OnItemSubscribed;
|
||||||
|
public static event Action<AppId, PublishedFileId> OnItemUnsubscribed;
|
||||||
|
public static event Action<AppId, PublishedFileId> OnItemInstalled;
|
||||||
|
|
||||||
public static async Task<bool> DeleteFileAsync( PublishedFileId fileId )
|
public static async Task<bool> DeleteFileAsync( PublishedFileId fileId )
|
||||||
{
|
{
|
||||||
var r = await Internal.DeleteItem( fileId );
|
var r = await Internal.DeleteItem( fileId );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue