mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 14:08:06 +03:00
getting dependencies/children
This commit is contained in:
parent
6e2ab8b735
commit
75dc868064
@ -108,6 +108,10 @@ namespace Steamworks.Ugc
|
||||
/// The number of downvotes of this item
|
||||
/// </summary>
|
||||
public uint VotesDown => details.VotesDown;
|
||||
/// <summary>
|
||||
/// Dependencies/children of this item or collection, available only from WithDependencies(true) queries
|
||||
/// </summary>
|
||||
public PublishedFileId[] Children;
|
||||
|
||||
public bool IsInstalled => (State & ItemState.Installed) == ItemState.Installed;
|
||||
public bool IsDownloading => (State & ItemState.Downloading) == ItemState.Downloading;
|
||||
|
@ -152,6 +152,7 @@ namespace Steamworks.Ugc
|
||||
ReturnsKeyValueTags = WantsReturnKeyValueTags ?? false,
|
||||
ReturnsDefaultStats = WantsDefaultStats ?? true, //true by default
|
||||
ReturnsMetadata = WantsReturnMetadata ?? false,
|
||||
ReturnsChildren = WantsReturnChildren ?? false,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ namespace Steamworks.Ugc
|
||||
internal bool ReturnsKeyValueTags;
|
||||
internal bool ReturnsDefaultStats;
|
||||
internal bool ReturnsMetadata;
|
||||
internal bool ReturnsChildren;
|
||||
|
||||
public IEnumerable<Item> Entries
|
||||
{
|
||||
@ -73,8 +74,16 @@ namespace Steamworks.Ugc
|
||||
}
|
||||
}
|
||||
|
||||
uint numChildren = item.details.NumChildren;
|
||||
if ( ReturnsChildren && numChildren > 0 )
|
||||
{
|
||||
var children = new PublishedFileId[numChildren];
|
||||
if ( SteamUGC.Internal.GetQueryUGCChildren( Handle, i, children, numChildren ) )
|
||||
{
|
||||
item.Children = children;
|
||||
}
|
||||
}
|
||||
// TODO GetQueryUGCAdditionalPreview
|
||||
// TODO GetQueryUGCChildren
|
||||
|
||||
yield return item;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user