Ugc.Editor visibility

This commit is contained in:
Garry Newman 2019-05-07 16:41:18 +01:00
parent 43c3aa35f5
commit 8560d94a18

View File

@ -55,6 +55,11 @@ internal Editor( WorkshopFileType filetype ) : this()
public Editor WithContent( System.IO.DirectoryInfo t ) { this.ContentFolder = t; return this; }
public Editor WithContent( string folderName ) { return WithContent( new System.IO.DirectoryInfo( folderName ) ); }
RemoteStoragePublishedFileVisibility? Visibility;
public Editor WithPublicVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Public; return this; }
public Editor WithFriendsOnlyVisibility() { Visibility = RemoteStoragePublishedFileVisibility.FriendsOnly; return this; }
public Editor WithPrivateVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Private; return this; }
List<string> Tags;
public Editor WithTag( string tag )
@ -112,6 +117,7 @@ public async Task<PublishResult> SubmitAsync( IProgress<float> progress = null )
if ( Language != null ) SteamUGC.Internal.SetItemUpdateLanguage( handle, Language );
if ( ContentFolder != null ) SteamUGC.Internal.SetItemContent( handle, ContentFolder.FullName );
if ( PreviewFile != null ) SteamUGC.Internal.SetItemPreview( handle, PreviewFile );
if ( Visibility.HasValue ) SteamUGC.Internal.SetItemVisibility( handle, Visibility.Value );
if ( Tags != null && Tags.Count > 0 )
{
using ( var a = SteamParamStringArray.From( Tags.ToArray() ) )