mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Added Inventory.DefinitionsWithPrices
This commit is contained in:
parent
6d78155ec6
commit
6c434df638
@ -248,6 +248,21 @@ public void Update()
|
||||
/// </summary>
|
||||
public Definition[] Definitions;
|
||||
|
||||
/// <summary>
|
||||
/// A list of item definitions that have prices and so can be bought.
|
||||
/// </summary>
|
||||
public IEnumerable<Definition> DefinitionsWithPrices
|
||||
{
|
||||
get
|
||||
{
|
||||
for( int i=0; i< Definitions.Length; i++ )
|
||||
{
|
||||
if (Definitions[i].LocalPrice > 0)
|
||||
yield return Definitions[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Utility, given a "1;VLV250" string, convert it to a 2.5
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user