mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Workshop.Item.Download returns a boolean
This commit is contained in:
parent
6982d05042
commit
63b31976c0
@ -48,19 +48,20 @@ internal static Item From( SteamNative.SteamUGCDetails_t details, Workshop works
|
||||
return item;
|
||||
}
|
||||
|
||||
public void Download( bool highPriority = true )
|
||||
public bool Download( bool highPriority = true )
|
||||
{
|
||||
if ( Installed ) return;
|
||||
if ( Downloading ) return;
|
||||
if ( Installed ) return true;
|
||||
if ( Downloading ) return true;
|
||||
|
||||
if ( !workshop.ugc.DownloadItem( Id, highPriority ) )
|
||||
{
|
||||
Console.WriteLine( "Download Failed" );
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
workshop.OnFileDownloaded += OnFileDownloaded;
|
||||
workshop.OnItemInstalled += OnItemInstalled;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Subscribe()
|
||||
|
Loading…
Reference in New Issue
Block a user