Added Inventory.DefinitionsWithPrices

This commit is contained in:
Garry Newman 2018-01-31 12:52:02 +00:00
parent 6d78155ec6
commit 6c434df638

View File

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