From c3ca4673d18bbed0500674a397d349016e7c8482 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Tue, 25 Oct 2016 13:59:48 +0100 Subject: [PATCH] Workshop.GetItem --- Facepunch.Steamworks/Interfaces/Workshop.Item.cs | 12 +++++++++--- Facepunch.Steamworks/Interfaces/Workshop.cs | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs index bc023c6..23cf685 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs @@ -26,12 +26,16 @@ public class Item public DateTime Modified { get; private set; } public DateTime Created { get; private set; } + public Item( ulong Id, Workshop workshop ) + { + this.Id = Id; + this.workshop = workshop; + } + internal static Item From( SteamNative.SteamUGCDetails_t details, Workshop workshop ) { - var item = new Item(); + var item = new Item( details.m_nPublishedFileId, workshop); - item.workshop = workshop; - item.Id = details.m_nPublishedFileId; item.Title = details.m_rgchTitle; item.Description = details.m_rgchDescription; item.OwnerId = details.m_ulSteamIDOwner; @@ -202,6 +206,8 @@ public Editor Edit() string _ownerName = null; + + public string OwnerName { get diff --git a/Facepunch.Steamworks/Interfaces/Workshop.cs b/Facepunch.Steamworks/Interfaces/Workshop.cs index 518c9c5..e886957 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.cs @@ -69,6 +69,11 @@ public Editor EditItem( ulong itemId ) return new Editor() { workshop = this, Id = itemId }; } + public Item GetItem( ulong itemid ) + { + return new Item( itemid, this ); + } + public enum Order { RankedByVote = 0,