Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added WithUnlistedVisibility to UgcEditor #762

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Facepunch.Steamworks/Structs/UgcEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public Editor( PublishedFileId fileId ) : this()
public Editor WithPublicVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Public; return this; }
public Editor WithFriendsOnlyVisibility() { Visibility = RemoteStoragePublishedFileVisibility.FriendsOnly; return this; }
public Editor WithPrivateVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Private; return this; }
public Editor WithUnlistedVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Unlisted; return this; }

List<string> Tags;
Dictionary<string, List<string>> KeyValueTags;
Expand Down Expand Up @@ -297,4 +298,4 @@ public struct PublishResult
/// </summary>
public bool NeedsWorkshopAgreement;
}
}
}
5 changes: 5 additions & 0 deletions Facepunch.Steamworks/Structs/UgcItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ public Item( PublishedFileId id ) : this()
/// True if this is only visible to the creator
/// </summary>
public bool IsPrivate => details.Visibility == RemoteStoragePublishedFileVisibility.Private;

/// <summary>
/// True if this is only visible to people with the URL
/// </summary>
public bool IsUnlisted => details.Visibility == RemoteStoragePublishedFileVisibility.Unlisted;

/// <summary>
/// True if this item has been banned
Expand Down