mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-14 23:58:12 +03:00
Added Async to some async calls
This commit is contained in:
parent
6981eb4a73
commit
69ec868227
@ -51,7 +51,7 @@ namespace Steamworks
|
|||||||
/// a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully
|
/// a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully
|
||||||
/// blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items".
|
/// blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<InventoryResult?> Consume( int amount = 1 )
|
public async Task<InventoryResult?> ConsumeAsync( int amount = 1 )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = default( SteamInventoryResult_t );
|
||||||
if ( !SteamInventory.Internal.ConsumeItem( ref sresult, Id, (uint)amount ) )
|
if ( !SteamInventory.Internal.ConsumeItem( ref sresult, Id, (uint)amount ) )
|
||||||
@ -63,7 +63,7 @@ namespace Steamworks
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Split stack into two items
|
/// Split stack into two items
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<InventoryResult?> SplitStack( int quantity = 1 )
|
public async Task<InventoryResult?> SplitStackAsync( int quantity = 1 )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = default( SteamInventoryResult_t );
|
||||||
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, Id, (uint)quantity, ulong.MaxValue ) )
|
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, Id, (uint)quantity, ulong.MaxValue ) )
|
||||||
@ -75,7 +75,7 @@ namespace Steamworks
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add x units of the target item to this item
|
/// Add x units of the target item to this item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<InventoryResult?> Add( InventoryItem add, int quantity = 1 )
|
public async Task<InventoryResult?> AddAsync( InventoryItem add, int quantity = 1 )
|
||||||
{
|
{
|
||||||
var sresult = default( SteamInventoryResult_t );
|
var sresult = default( SteamInventoryResult_t );
|
||||||
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, add.Id, (uint)quantity, Id ) )
|
if ( !SteamInventory.Internal.TransferItemQuantity( ref sresult, add.Id, (uint)quantity, Id ) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user