mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 14:15:47 +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;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Download( bool highPriority = true )
|
public bool Download( bool highPriority = true )
|
||||||
{
|
{
|
||||||
if ( Installed ) return;
|
if ( Installed ) return true;
|
||||||
if ( Downloading ) return;
|
if ( Downloading ) return true;
|
||||||
|
|
||||||
if ( !workshop.ugc.DownloadItem( Id, highPriority ) )
|
if ( !workshop.ugc.DownloadItem( Id, highPriority ) )
|
||||||
{
|
{
|
||||||
Console.WriteLine( "Download Failed" );
|
Console.WriteLine( "Download Failed" );
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
workshop.OnFileDownloaded += OnFileDownloaded;
|
workshop.OnFileDownloaded += OnFileDownloaded;
|
||||||
workshop.OnItemInstalled += OnItemInstalled;
|
workshop.OnItemInstalled += OnItemInstalled;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Subscribe()
|
public void Subscribe()
|
||||||
|
Loading…
Reference in New Issue
Block a user