mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 06:35:49 +03:00
Added Workshop.itemHandle
This commit is contained in:
parent
c37ea38107
commit
f1dd4462f2
@ -50,6 +50,17 @@ internal static Item From( SteamNative.SteamUGCDetails_t details, Workshop works
|
|||||||
return item;
|
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 )
|
public void Download( bool highPriority = true )
|
||||||
{
|
{
|
||||||
UpdateState();
|
UpdateState();
|
||||||
|
@ -59,6 +59,16 @@ public Query CreateQuery()
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
|
public Item ItemHandle( ulong ItemId )
|
||||||
|
{
|
||||||
|
return Item.FromId( ItemId, this );
|
||||||
|
}
|
||||||
|
|
||||||
public Editor CreateItem( ItemType type )
|
public Editor CreateItem( ItemType type )
|
||||||
{
|
{
|
||||||
return new Editor() { workshop = this, Type = type };
|
return new Editor() { workshop = this, Type = type };
|
||||||
|
Loading…
Reference in New Issue
Block a user