diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs index bdab8f0..b915fe5 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs @@ -50,6 +50,17 @@ namespace Facepunch.Steamworks return item; } + internal static Item FromId( ulong id, Workshop workshop ) + { + var item = new Item(); + + item.workshop = workshop; + item.Id = id; + item.UpdateState(); + + return item; + } + public void Download( bool highPriority = true ) { UpdateState(); diff --git a/Facepunch.Steamworks/Interfaces/Workshop.cs b/Facepunch.Steamworks/Interfaces/Workshop.cs index e886957..6bb2a53 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.cs @@ -59,6 +59,16 @@ namespace Facepunch.Steamworks }; } + /// + /// Returns a class representing this ItemId. We don't query + /// item name, description etc. We don't verify that item exists. + /// We don't verify that this item belongs to your app. + /// + public Item ItemHandle( ulong ItemId ) + { + return Item.FromId( ItemId, this ); + } + public Editor CreateItem( ItemType type ) { return new Editor() { workshop = this, Type = type };