Merge pull request #44 from moldfield1995/master

Implemented Workshop Item Subscription
This commit is contained in:
Garry Newman 2017-07-26 17:13:19 +01:00 committed by GitHub
commit 7eb4a88cee
2 changed files with 13 additions and 1 deletions

View File

@ -63,6 +63,19 @@ namespace Facepunch.Steamworks
workshop.OnItemInstalled += OnItemInstalled; workshop.OnItemInstalled += OnItemInstalled;
} }
public void Subscribe()
{
workshop.ugc.SubscribeItem(Id);
SubscriptionCount++;
}
public void UnSubscribe()
{
workshop.ugc.UnsubscribeItem(Id);
SubscriptionCount--;
}
private void OnFileDownloaded( ulong fileid, Callbacks.Result result ) private void OnFileDownloaded( ulong fileid, Callbacks.Result result )
{ {
if ( fileid != Id ) return; if ( fileid != Id ) return;

View File

@ -122,7 +122,6 @@ namespace Facepunch.Steamworks
return new Item( itemid, this ); return new Item( itemid, this );
} }
/// <summary> /// <summary>
/// How a query should be ordered. /// How a query should be ordered.
/// </summary> /// </summary>