2015-06-04 13:15:54 -04:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Windows.Media;
|
2015-06-24 14:57:16 -04:00
|
|
|
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
2015-07-09 17:05:42 -04:00
|
|
|
|
using Filtration.ObjectModel.LootExplosionStudio;
|
2015-06-04 13:15:54 -04:00
|
|
|
|
|
2015-06-24 14:57:16 -04:00
|
|
|
|
namespace Filtration.ObjectModel.BlockItemTypes
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
2015-06-24 14:57:16 -04:00
|
|
|
|
public class BaseTypeBlockItem : StringListBlockItem
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
public override string PrefixText { get { return "BaseType"; } }
|
|
|
|
|
|
|
|
|
|
public override int MaximumAllowed
|
|
|
|
|
{
|
|
|
|
|
get { return 1; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string DisplayHeading
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Base Type";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string SummaryText
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (Items.Count > 0 && Items.Count < 4)
|
|
|
|
|
{
|
|
|
|
|
return "Item Base Types: " +
|
|
|
|
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
|
|
|
|
}
|
|
|
|
|
if (Items.Count >= 4)
|
|
|
|
|
{
|
|
|
|
|
var remaining = Items.Count - 3;
|
|
|
|
|
return "Item Base Types: " + Items.Take(3)
|
|
|
|
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
|
|
|
|
.TrimEnd(' ')
|
|
|
|
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
|
|
|
|
}
|
|
|
|
|
return "Item Base Types: (none)";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override Color SummaryBackgroundColor
|
|
|
|
|
{
|
|
|
|
|
get { return Colors.MediumTurquoise; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override Color SummaryTextColor
|
|
|
|
|
{
|
|
|
|
|
get { return Colors.Black; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int SortOrder
|
|
|
|
|
{
|
|
|
|
|
get { return 11; }
|
|
|
|
|
}
|
2015-07-09 17:05:42 -04:00
|
|
|
|
|
|
|
|
|
public override string GetLootItemProperty(LootItem lootItem)
|
|
|
|
|
{
|
|
|
|
|
return lootItem.BaseType;
|
|
|
|
|
}
|
2015-06-04 13:15:54 -04:00
|
|
|
|
}
|
|
|
|
|
}
|