mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-14 07:38:06 +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>
|
/// </summary>
|
||||||
public string PreviewImageUrl { get; internal set; }
|
public string PreviewImageUrl { get; internal set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The metadata string for this item
|
||||||
|
/// </summary>
|
||||||
|
public string Metadata { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Edit this item
|
/// Edit this item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -151,6 +151,7 @@ namespace Steamworks.Ugc
|
|||||||
CachedData = result.Value.CachedData,
|
CachedData = result.Value.CachedData,
|
||||||
ReturnsKeyValueTags = WantsReturnKeyValueTags ?? false,
|
ReturnsKeyValueTags = WantsReturnKeyValueTags ?? false,
|
||||||
ReturnsDefaultStats = WantsDefaultStats ?? true, //true by default
|
ReturnsDefaultStats = WantsDefaultStats ?? true, //true by default
|
||||||
|
ReturnsMetadata = WantsReturnMetadata ?? false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ namespace Steamworks.Ugc
|
|||||||
|
|
||||||
internal bool ReturnsKeyValueTags;
|
internal bool ReturnsKeyValueTags;
|
||||||
internal bool ReturnsDefaultStats;
|
internal bool ReturnsDefaultStats;
|
||||||
|
internal bool ReturnsMetadata;
|
||||||
|
|
||||||
public IEnumerable<Item> Entries
|
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 GetQueryUGCAdditionalPreview
|
||||||
// TODO GetQueryUGCChildren
|
// TODO GetQueryUGCChildren
|
||||||
// TODO GetQueryUGCMetadata
|
|
||||||
|
|
||||||
|
|
||||||
yield return item;
|
yield return item;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user