Add new block types added in 3.3

This commit is contained in:
azakhi 2018-08-09 16:48:11 +03:00
parent 52fc1f6bbc
commit 400688573c
19 changed files with 123 additions and 14 deletions

View File

@ -66,6 +66,9 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -16,6 +16,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBackgroundColor"; public override string PrefixText => "SetBackgroundColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Background Color"; public override string DisplayHeading => "Background Color";
public override int SortOrder => 18; public override int SortOrder => 21;
} }
} }

View File

@ -33,6 +33,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryBackgroundColor => Colors.MediumTurquoise; public override Color SummaryBackgroundColor => Colors.MediumTurquoise;
public override Color SummaryTextColor => Colors.Black; public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 16; public override int SortOrder => 18;
} }
} }

View File

@ -16,6 +16,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBorderColor"; public override string PrefixText => "SetBorderColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Border Color"; public override string DisplayHeading => "Border Color";
public override int SortOrder => 19; public override int SortOrder => 22;
} }
} }

View File

@ -33,6 +33,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryBackgroundColor => Colors.MediumSeaGreen; public override Color SummaryBackgroundColor => Colors.MediumSeaGreen;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 15; public override int SortOrder => 17;
} }
} }

View File

@ -16,7 +16,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetFontSize"; public override string PrefixText => "SetFontSize";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Font Size"; public override string DisplayHeading => "Font Size";
public override int SortOrder => 20; public override int SortOrder => 23;
public override int Minimum => 11; public override int Minimum => 11;
public override int Maximum => 45; public override int Maximum => 45;
} }

View File

@ -0,0 +1,18 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class GemLevelBlockItem : NumericFilterPredicateBlockItem
{
public override string PrefixText => "GemLevel";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Gem Level";
public override string SummaryText => "Gem Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 14;
public override int Minimum => 0;
public override int Maximum => 40;
}
}

View File

@ -0,0 +1,38 @@
using System.Linq;
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class HasExplicitModBlockItem : StringListBlockItem
{
public override string PrefixText => "HasExplicitMod";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Has Explicit Mod";
public override string SummaryText
{
get
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Explicit Mods: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Item Explicit Mods: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Explicit Mods: (none)";
}
}
public override Color SummaryBackgroundColor => Colors.MidnightBlue;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 19;
}
}

View File

@ -17,6 +17,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "PlayAlertSoundPositional"; public override string PrefixText => "PlayAlertSoundPositional";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Play Positional Alert Sound"; public override string DisplayHeading => "Play Positional Alert Sound";
public override int SortOrder => 22; public override int SortOrder => 25;
} }
} }

View File

@ -30,7 +30,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription(); ((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription();
public override Color SummaryBackgroundColor => Colors.LightCoral; public override Color SummaryBackgroundColor => Colors.LightCoral;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 14; public override int SortOrder => 16;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => (int)ItemRarity.Unique; public override int Maximum => (int)ItemRarity.Unique;
} }

View File

@ -17,6 +17,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "PlayAlertSound"; public override string PrefixText => "PlayAlertSound";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Play Alert Sound"; public override string DisplayHeading => "Play Alert Sound";
public override int SortOrder => 21; public override int SortOrder => 24;
} }
} }

View File

@ -0,0 +1,18 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class StackSizeBlockItem : NumericFilterPredicateBlockItem
{
public override string PrefixText => "StackSize";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Stack Size";
public override string SummaryText => "Stack Size " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 15;
public override int Minimum => 0;
public override int Maximum => 1000;
}
}

View File

@ -16,6 +16,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetTextColor"; public override string PrefixText => "SetTextColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Text Color"; public override string DisplayHeading => "Text Color";
public override int SortOrder => 17; public override int SortOrder => 20;
} }
} }

View File

@ -61,6 +61,8 @@
<Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" /> <Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" />
<Compile Include="BlockItemTypes\BorderColorBlockItem.cs" /> <Compile Include="BlockItemTypes\BorderColorBlockItem.cs" />
<Compile Include="BlockItemTypes\ClassBlockItem.cs" /> <Compile Include="BlockItemTypes\ClassBlockItem.cs" />
<Compile Include="BlockItemTypes\GemLevelBlockItem.cs" />
<Compile Include="BlockItemTypes\HasExplicitModBlockItem.cs" />
<Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" /> <Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" />
<Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" /> <Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" />
<Compile Include="BlockItemTypes\ElderItemBlockItem.cs" /> <Compile Include="BlockItemTypes\ElderItemBlockItem.cs" />
@ -77,6 +79,7 @@
<Compile Include="BlockItemTypes\SocketsBlockItem.cs" /> <Compile Include="BlockItemTypes\SocketsBlockItem.cs" />
<Compile Include="BlockItemTypes\PositionalSoundBlockItem.cs" /> <Compile Include="BlockItemTypes\PositionalSoundBlockItem.cs" />
<Compile Include="BlockItemTypes\SoundBlockItem.cs" /> <Compile Include="BlockItemTypes\SoundBlockItem.cs" />
<Compile Include="BlockItemTypes\StackSizeBlockItem.cs" />
<Compile Include="BlockItemTypes\TextColorBlockItem.cs" /> <Compile Include="BlockItemTypes\TextColorBlockItem.cs" />
<Compile Include="BlockItemTypes\WidthBlockItem.cs" /> <Compile Include="BlockItemTypes\WidthBlockItem.cs" />
<Compile Include="Commands\CommandManager.cs" /> <Compile Include="Commands\CommandManager.cs" />

View File

@ -266,6 +266,21 @@ namespace Filtration.Parser.Services
} }
break; break;
} }
case "GemLevel":
{
AddNumericFilterPredicateItemToBlockItems<GemLevelBlockItem>(block, trimmedLine);
break;
}
case "StackSize":
{
AddNumericFilterPredicateItemToBlockItems<StackSizeBlockItem>(block, trimmedLine);
break;
}
case "HasExplicitMod":
{
AddStringListItemToBlockItems<HasExplicitModBlockItem>(block, trimmedLine);
break;
}
} }
} }

View File

@ -107,6 +107,9 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -73,6 +73,9 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -76,6 +76,11 @@
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" AutoCompleteItemsSource="{Binding ElementName=TopLevelGrid, Path=DataContext.AutoCompleteItemBaseTypes}" /> <userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" AutoCompleteItemsSource="{Binding ElementName=TopLevelGrid, Path=DataContext.AutoCompleteItemBaseTypes}" />
</DataTemplate> </DataTemplate>
<!-- Explicit Mods Template -->
<DataTemplate DataType="{x:Type blockItemTypes:HasExplicitModBlockItem}">
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" />
</DataTemplate>
<!-- Socket Groups Template --> <!-- Socket Groups Template -->
<DataTemplate DataType="{x:Type blockItemTypes:SocketGroupBlockItem}"> <DataTemplate DataType="{x:Type blockItemTypes:SocketGroupBlockItem}">
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" /> <userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" />

View File

@ -159,7 +159,10 @@ namespace Filtration.ViewModels
typeof (CorruptedBlockItem), typeof (CorruptedBlockItem),
typeof (ElderItemBlockItem), typeof (ElderItemBlockItem),
typeof (ShaperItemBlockItem), typeof (ShaperItemBlockItem),
typeof (ShapedMapBlockItem) typeof (ShapedMapBlockItem),
typeof (GemLevelBlockItem),
typeof (StackSizeBlockItem),
typeof (HasExplicitModBlockItem)
}; };
public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type> public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type>