Added Workshop.Editor.KeyValues

This commit is contained in:
Garry Newman 2018-07-20 12:15:07 +01:00
parent e792d3b3b5
commit 6286e43066

View File

@ -27,6 +27,7 @@ public class Editor
public string ChangeNote { get; set; } = ""; public string ChangeNote { get; set; } = "";
public uint WorkshopUploadAppId { get; set; } public uint WorkshopUploadAppId { get; set; }
public string MetaData { get; set; } = null; public string MetaData { get; set; } = null;
public Dictionary<string, string[]> KeyValues { get; set; } = new Dictionary<string, string[]>();
public enum VisibilityType : int public enum VisibilityType : int
{ {
@ -186,10 +187,20 @@ private void PublishChanges()
workshop.ugc.SetItemMetadata( UpdateHandle, MetaData ); workshop.ugc.SetItemMetadata( UpdateHandle, MetaData );
} }
if ( KeyValues != null )
{
foreach ( var key in KeyValues )
{
foreach ( var value in key.Value )
{
workshop.ugc.AddItemKeyValueTag( UpdateHandle, key.Key, value );
}
}
}
/* /*
workshop.ugc.SetItemUpdateLanguage( UpdateId, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set workshop.ugc.SetItemUpdateLanguage( UpdateId, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
workshop.ugc.RemoveItemKeyValueTags( UpdateId, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key workshop.ugc.RemoveItemKeyValueTags( UpdateId, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key
workshop.ugc.AddItemKeyValueTag( UpdateId, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag.
workshop.ugc.AddItemPreviewFile( UpdateId, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size workshop.ugc.AddItemPreviewFile( UpdateId, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size
workshop.ugc.AddItemPreviewVideo( UpdateId, const char *pszVideoID ) = 0; // add preview video for this item workshop.ugc.AddItemPreviewVideo( UpdateId, const char *pszVideoID ) = 0; // add preview video for this item
workshop.ugc.UpdateItemPreviewFile( UpdateId, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size workshop.ugc.UpdateItemPreviewFile( UpdateId, uint32 index, const char *pszPreviewFile ) = 0; // updates an existing preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size