Workshop.GetItem

This commit is contained in:
Garry Newman 2016-10-25 13:59:48 +01:00
parent a66f84c0d5
commit c3ca4673d1
2 changed files with 14 additions and 3 deletions

View File

@ -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

View File

@ -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,