mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 23:28:11 +03:00
Support return UGC metadata in query
This commit is contained in:
parent
ed45805029
commit
af36007f5d
@ -370,6 +370,11 @@ namespace Steamworks.Ugc
|
||||
/// </summary>
|
||||
public string PreviewImageUrl { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// The metadata string for this item
|
||||
/// </summary>
|
||||
public string Metadata { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Edit this item
|
||||
/// </summary>
|
||||
|
@ -151,6 +151,7 @@ namespace Steamworks.Ugc
|
||||
CachedData = result.Value.CachedData,
|
||||
ReturnsKeyValueTags = WantsReturnKeyValueTags ?? false,
|
||||
ReturnsDefaultStats = WantsDefaultStats ?? true, //true by default
|
||||
ReturnsMetadata = WantsReturnMetadata ?? false,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ namespace Steamworks.Ugc
|
||||
|
||||
internal bool ReturnsKeyValueTags;
|
||||
internal bool ReturnsDefaultStats;
|
||||
internal bool ReturnsMetadata;
|
||||
|
||||
public IEnumerable<Item> Entries
|
||||
{
|
||||
@ -63,10 +64,17 @@ namespace Steamworks.Ugc
|
||||
}
|
||||
}
|
||||
|
||||
if (ReturnsMetadata)
|
||||
{
|
||||
string metadata;
|
||||
if (SteamUGC.Internal.GetQueryUGCMetadata(Handle, i, out metadata))
|
||||
{
|
||||
item.Metadata = metadata;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO GetQueryUGCAdditionalPreview
|
||||
// TODO GetQueryUGCChildren
|
||||
// TODO GetQueryUGCMetadata
|
||||
|
||||
|
||||
yield return item;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user