mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Updated from feedback given
This commit is contained in:
parent
2108dc3b76
commit
27f640fd5a
@ -123,25 +123,23 @@ public Item GetItem( ulong itemid )
|
||||
return new Item( itemid, this );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The amount of item's the user is subscribed to for this App
|
||||
/// </summary>
|
||||
public uint GetAmountSubsribed()
|
||||
{
|
||||
return ugc.GetNumSubscribedItems();
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates a list of all item's that the user is currently subscribed
|
||||
/// to for this App. This does not query titles or descriptions but
|
||||
/// allows you to get the directories, state and ID of any subscribed Item.
|
||||
/// This is mostly useful for getting all subscribed items install location.
|
||||
/// This is mostly useful for getting all subscribed items install location
|
||||
/// on initial load to load all workshop content
|
||||
/// </summary>
|
||||
public Item[] GetSubscribedItems(uint amount)
|
||||
public unsafe Item[] GetSubscribedItems()
|
||||
{
|
||||
Item[] items;
|
||||
uint subAmount;
|
||||
var amount = ugc.GetNumSubscribedItems();
|
||||
PublishedFileId_t[] vecSubscribedItems = new PublishedFileId_t[amount];
|
||||
uint subAmount = ugc.GetSubscribedItems(vecSubscribedItems, amount);
|
||||
|
||||
fixed (PublishedFileId_t* vecSubscribedItems_ptr = vecSubscribedItems)
|
||||
{
|
||||
subAmount = ugc.GetSubscribedItems(vecSubscribedItems_ptr, amount);
|
||||
}
|
||||
if (subAmount < amount)
|
||||
items = new Item[subAmount];
|
||||
else
|
||||
|
@ -284,12 +284,9 @@ public bool GetQueryUGCStatistic( UGCQueryHandle_t handle /*UGCQueryHandle_t*/,
|
||||
}
|
||||
|
||||
// uint
|
||||
public uint GetSubscribedItems( PublishedFileId_t[] pvecPublishedFileID /*PublishedFileId_t **/, uint cMaxEntries /*uint32*/ )
|
||||
public uint GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID /*PublishedFileId_t **/, uint cMaxEntries /*uint32*/ )
|
||||
{
|
||||
fixed (PublishedFileId_t* pvecPublishedFileID_ptr = pvecPublishedFileID)
|
||||
{
|
||||
return platform.ISteamUGC_GetSubscribedItems((IntPtr)pvecPublishedFileID_ptr, cMaxEntries);
|
||||
}
|
||||
return platform.ISteamUGC_GetSubscribedItems( (IntPtr) pvecPublishedFileID, cMaxEntries );
|
||||
}
|
||||
|
||||
// SteamAPICall_t
|
||||
|
Loading…
Reference in New Issue
Block a user