mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 14:45:51 +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;
|
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>
|
/// <summary>
|
||||||
/// Attaches a piece of user generated content the user's entry on a leaderboard
|
/// Attaches a piece of user generated content the user's entry on a leaderboard
|
||||||
/// </summary>
|
/// </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;
|
if ( !r.HasValue ) return Result.Fail;
|
||||||
|
|
||||||
return r.Value.Result;
|
return r.Value.Result;
|
||||||
|
@ -8,7 +8,7 @@ public struct LeaderboardEntry
|
|||||||
public int GlobalRank;
|
public int GlobalRank;
|
||||||
public int Score;
|
public int Score;
|
||||||
public int[] Details;
|
public int[] Details;
|
||||||
// UGCHandle_t m_hUGC
|
public PublishedFileId? Ugc;
|
||||||
|
|
||||||
internal static LeaderboardEntry From( LeaderboardEntry_t e, int[] detailsBuffer )
|
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 ),
|
User = new Friend( e.SteamIDUser ),
|
||||||
GlobalRank = e.GlobalRank,
|
GlobalRank = e.GlobalRank,
|
||||||
Score = e.Score,
|
Score = e.Score,
|
||||||
Details = null
|
Details = null,
|
||||||
|
Ugc = e.UGC == 0 ? null : (PublishedFileId?) e.UGC
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( e.CDetails > 0 )
|
if ( e.CDetails > 0 )
|
||||||
|
@ -124,6 +124,8 @@ public Item( PublishedFileId id ) : this()
|
|||||||
public bool IsSubscribed => (State & ItemState.Subscribed) == ItemState.Subscribed;
|
public bool IsSubscribed => (State & ItemState.Subscribed) == ItemState.Subscribed;
|
||||||
public bool NeedsUpdate => (State & ItemState.NeedsUpdate) == ItemState.NeedsUpdate;
|
public bool NeedsUpdate => (State & ItemState.NeedsUpdate) == ItemState.NeedsUpdate;
|
||||||
|
|
||||||
|
public bool IsGameManagedItem => details.FileType == WorkshopFileType.GameManagedItem;
|
||||||
|
|
||||||
public string Directory
|
public string Directory
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Loading…
Reference in New Issue
Block a user