mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 06:35:49 +03:00
Added missing methods needed by Chippy
This commit is contained in:
parent
5cb1496e80
commit
42762eabbd
@ -200,5 +200,13 @@ public static bool ShowWorkshopEula()
|
||||
return status?.Accepted;
|
||||
}
|
||||
|
||||
public static PublishedFileId[] GetSubscribedItemIds()
|
||||
{
|
||||
var count = Internal.GetNumSubscribedItems();
|
||||
var ids = new PublishedFileId[count];
|
||||
Internal.GetSubscribedItems(ids, count);
|
||||
|
||||
return ids;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,9 +51,9 @@ public struct Leaderboard
|
||||
/// <summary>
|
||||
/// Attaches a piece of user generated content the user's entry on a leaderboard
|
||||
/// </summary>
|
||||
public async Task<Result> AttachUgc( Ugc file )
|
||||
public async Task<Result> AttachUgc( PublishedFileId file )
|
||||
{
|
||||
var r = await SteamUserStats.Internal.AttachLeaderboardUGC( Id, file.Handle );
|
||||
var r = await SteamUserStats.Internal.AttachLeaderboardUGC( Id, file.Value );
|
||||
if ( !r.HasValue ) return Result.Fail;
|
||||
|
||||
return r.Value.Result;
|
||||
|
@ -8,7 +8,7 @@ public struct LeaderboardEntry
|
||||
public int GlobalRank;
|
||||
public int Score;
|
||||
public int[] Details;
|
||||
// UGCHandle_t m_hUGC
|
||||
public PublishedFileId? Ugc;
|
||||
|
||||
internal static LeaderboardEntry From( LeaderboardEntry_t e, int[] detailsBuffer )
|
||||
{
|
||||
@ -17,7 +17,8 @@ internal static LeaderboardEntry From( LeaderboardEntry_t e, int[] detailsBuffer
|
||||
User = new Friend( e.SteamIDUser ),
|
||||
GlobalRank = e.GlobalRank,
|
||||
Score = e.Score,
|
||||
Details = null
|
||||
Details = null,
|
||||
Ugc = e.UGC == 0 ? null : (PublishedFileId?) e.UGC
|
||||
};
|
||||
|
||||
if ( e.CDetails > 0 )
|
||||
|
@ -124,6 +124,8 @@ public Item( PublishedFileId id ) : this()
|
||||
public bool IsSubscribed => (State & ItemState.Subscribed) == ItemState.Subscribed;
|
||||
public bool NeedsUpdate => (State & ItemState.NeedsUpdate) == ItemState.NeedsUpdate;
|
||||
|
||||
public bool IsGameManagedItem => details.FileType == WorkshopFileType.GameManagedItem;
|
||||
|
||||
public string Directory
|
||||
{
|
||||
get
|
||||
|
Loading…
Reference in New Issue
Block a user