Merge 2c4096ff2c37a464e861462934b787d356df1ddf into 52fc1f6bbc9d20fcd52e3ac6fee86c2a85b628e5

This commit is contained in:
azakhi 2018-08-20 18:19:25 +00:00 committed by GitHub
commit 42af920026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 469 additions and 25 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 => 22;
} }
} }

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 => 19;
} }
} }

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 => 23;
} }
} }

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 => 18;
} }
} }

View File

@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public sealed class DisableDropSoundBlockItem : BooleanBlockItem, IAudioVisualBlockItem
{
public DisableDropSoundBlockItem()
{
}
public DisableDropSoundBlockItem(bool booleanValue) : base(booleanValue)
{
}
public override string PrefixText => "DisableDropSound";
public override string DisplayHeading => "Disable Drop Sound";
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public override int SortOrder => 27;
}
}

View File

@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Drop Level " + FilterPredicate; public override string SummaryText => "Drop Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DodgerBlue; public override Color SummaryBackgroundColor => Colors.DodgerBlue;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 13; public override int SortOrder => 14;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 100; public override int Maximum => 100;
} }

View File

@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public sealed class ElderMapBlockItem : BooleanBlockItem
{
public ElderMapBlockItem()
{
}
public ElderMapBlockItem(bool booleanValue) : base(booleanValue)
{
}
public override string PrefixText => "ElderMap";
public override string DisplayHeading => "Elder Map";
public override Color SummaryBackgroundColor => Colors.DarkGoldenrod;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 9;
}
}

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 => 24;
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,28 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class GemLevelBlockItem : NumericFilterPredicateBlockItem
{
public GemLevelBlockItem()
{
}
public GemLevelBlockItem(FilterPredicateOperator predicateOperator, int predicateOperand)
: base(predicateOperator, predicateOperand)
{
}
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 => 15;
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 => 20;
}
}

View File

@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Height " + FilterPredicate; public override string SummaryText => "Height " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.LightBlue; public override Color SummaryBackgroundColor => Colors.LightBlue;
public override Color SummaryTextColor => Colors.Black; public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 10; public override int SortOrder => 11;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 6; public override int Maximum => 6;
} }

View File

@ -20,7 +20,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Item Level " + FilterPredicate; public override string SummaryText => "Item Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray; public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 12; public override int SortOrder => 13;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 100; public override int Maximum => 100;
} }

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 => 26;
} }
} }

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 => 17;
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

@ -39,7 +39,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryBackgroundColor => Colors.GhostWhite; public override Color SummaryBackgroundColor => Colors.GhostWhite;
public override Color SummaryTextColor => Colors.Black; public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 9; public override int SortOrder => 10;
private SocketColor StringToSocketColor(char socketColorString) private SocketColor StringToSocketColor(char socketColorString)
{ {

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 => 25;
} }
} }

View File

@ -0,0 +1,28 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class StackSizeBlockItem : NumericFilterPredicateBlockItem
{
public StackSizeBlockItem()
{
}
public StackSizeBlockItem(FilterPredicateOperator predicateOperator, int predicateOperand)
: base(predicateOperator, predicateOperand)
{
}
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 => 16;
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 => 21;
} }
} }

View File

@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Width " + FilterPredicate; public override string SummaryText => "Width " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.MediumPurple; public override Color SummaryBackgroundColor => Colors.MediumPurple;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 11; public override int SortOrder => 12;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 2; public override int Maximum => 2;
} }

View File

@ -61,6 +61,10 @@
<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\DisableDropSoundBlockItem.cs" />
<Compile Include="BlockItemTypes\ElderMapBlockItem.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,9 +81,10 @@
<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" />
<Compile Include="Commands\ICommand.cs" /> <Compile Include="Commands\ICommand.cs" />
<Compile Include="Commands\ItemFilterScript\PasteBlockCommand.cs" /> <Compile Include="Commands\ItemFilterScript\PasteBlockCommand.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockToBottomCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlockToBottomCommand.cs" />
@ -100,7 +105,7 @@
<Compile Include="Enums\ThemeComponentType.cs" /> <Compile Include="Enums\ThemeComponentType.cs" />
<Compile Include="Extensions\EnumHelper.cs" /> <Compile Include="Extensions\EnumHelper.cs" />
<Compile Include="Extensions\ItemRarityExtensions.cs" /> <Compile Include="Extensions\ItemRarityExtensions.cs" />
<Compile Include="Factories\IItemFilterScriptFactory.cs" /> <Compile Include="Factories\IItemFilterScriptFactory.cs" />
<Compile Include="FilteredItem.cs" /> <Compile Include="FilteredItem.cs" />
<Compile Include="IAudioVisualBlockItem.cs" /> <Compile Include="IAudioVisualBlockItem.cs" />
<Compile Include="IItemFilterBlockItem.cs" /> <Compile Include="IItemFilterBlockItem.cs" />
@ -108,7 +113,7 @@
<Compile Include="ItemFilterBlock.cs" /> <Compile Include="ItemFilterBlock.cs" />
<Compile Include="ItemFilterBlockGroup.cs" /> <Compile Include="ItemFilterBlockGroup.cs" />
<Compile Include="ItemFilterScript.cs" /> <Compile Include="ItemFilterScript.cs" />
<Compile Include="ItemFilterScriptSettings.cs" /> <Compile Include="ItemFilterScriptSettings.cs" />
<Compile Include="ItemSet.cs" /> <Compile Include="ItemSet.cs" />
<Compile Include="NumericFilterPredicate.cs" /> <Compile Include="NumericFilterPredicate.cs" />
<Compile Include="PathOfExileNamedColors.cs" /> <Compile Include="PathOfExileNamedColors.cs" />

View File

@ -318,6 +318,42 @@ namespace Filtration.Parser.Tests.Services
Assert.AreEqual(FilterPredicateOperator.Equal, blockItem.FilterPredicate.PredicateOperator); Assert.AreEqual(FilterPredicateOperator.Equal, blockItem.FilterPredicate.PredicateOperator);
} }
[Test]
public void TranslateStringToItemFilterBlock_GemLevel_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" GemLevel = 20";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is GemLevelBlockItem));
var blockItem = result.BlockItems.OfType<GemLevelBlockItem>().First();
Assert.AreEqual(20, blockItem.FilterPredicate.PredicateOperand);
Assert.AreEqual(FilterPredicateOperator.Equal, blockItem.FilterPredicate.PredicateOperator);
}
[Test]
public void TranslateStringToItemFilterBlock_StackSize_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" StackSize > 5";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is StackSizeBlockItem));
var blockItem = result.BlockItems.OfType<StackSizeBlockItem>().First();
Assert.AreEqual(5, blockItem.FilterPredicate.PredicateOperand);
Assert.AreEqual(FilterPredicateOperator.GreaterThan, blockItem.FilterPredicate.PredicateOperator);
}
[Test] [Test]
public void TranslateStringToItemFilterBlock_Corrupted_ReturnsCorrectObject() public void TranslateStringToItemFilterBlock_Corrupted_ReturnsCorrectObject()
{ {
@ -386,6 +422,23 @@ namespace Filtration.Parser.Tests.Services
Assert.IsFalse(blockItem.BooleanValue); Assert.IsFalse(blockItem.BooleanValue);
} }
[Test]
public void TranslateStringToItemFilterBlock_ElderMap_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" ElderMap false";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is ElderMapBlockItem));
var blockItem = result.BlockItems.OfType<ElderMapBlockItem>().First();
Assert.IsFalse(blockItem.BooleanValue);
}
[Test] [Test]
public void TranslateStringToItemFilterBlock_Identified_ReturnsCorrectObject() public void TranslateStringToItemFilterBlock_Identified_ReturnsCorrectObject()
{ {
@ -494,6 +547,25 @@ namespace Filtration.Parser.Tests.Services
Assert.Contains("Test BaseType 2", blockItem.Items); Assert.Contains("Test BaseType 2", blockItem.Items);
} }
[Test]
public void TranslateStringToItemFilterBlock_HasExplicitMod_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
@" HasExplicitMod ""Test Mod 1"" ""TestOneWordModInQuotes"" TestOneWordModNotInQuotes ""Test Mod 2""";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is HasExplicitModBlockItem));
var blockItem = result.BlockItems.OfType<HasExplicitModBlockItem>().First();
Assert.Contains("Test Mod 1", blockItem.Items);
Assert.Contains("TestOneWordModInQuotes", blockItem.Items);
Assert.Contains("TestOneWordModNotInQuotes", blockItem.Items);
Assert.Contains("Test Mod 2", blockItem.Items);
}
[Test] [Test]
public void TranslateStringToItemFilterBlock_Sockets_ReturnsCorrectObject() public void TranslateStringToItemFilterBlock_Sockets_ReturnsCorrectObject()
{ {
@ -802,7 +874,24 @@ namespace Filtration.Parser.Tests.Services
Assert.AreEqual("7", blockItem.Value); Assert.AreEqual("7", blockItem.Value);
Assert.AreEqual(95, blockItem.SecondValue); Assert.AreEqual(95, blockItem.SecondValue);
} }
[Test]
public void TranslateStringToItemFilterBlock_DisableDropSound_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" DisableDropSound True";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is DisableDropSoundBlockItem));
var blockItem = result.BlockItems.OfType<DisableDropSoundBlockItem>().First();
Assert.IsTrue(blockItem.BooleanValue);
}
[Test] [Test]
public void TranslateStringToItemFilterBlock_Everything_ReturnsCorrectObject() public void TranslateStringToItemFilterBlock_Everything_ReturnsCorrectObject()
{ {
@ -813,6 +902,8 @@ namespace Filtration.Parser.Tests.Services
"Show" + Environment.NewLine + "Show" + Environment.NewLine +
" ItemLevel >= 50" + Environment.NewLine + " ItemLevel >= 50" + Environment.NewLine +
" DropLevel < 70" + Environment.NewLine + " DropLevel < 70" + Environment.NewLine +
" GemLevel = 20" + Environment.NewLine +
" StackSize > 2" + Environment.NewLine +
" Quality = 15" + Environment.NewLine + " Quality = 15" + Environment.NewLine +
" Rarity <= Unique" + Environment.NewLine + " Rarity <= Unique" + Environment.NewLine +
" Identified True" + Environment.NewLine + " Identified True" + Environment.NewLine +
@ -820,8 +911,10 @@ namespace Filtration.Parser.Tests.Services
" ElderItem true" + Environment.NewLine + " ElderItem true" + Environment.NewLine +
" ShaperItem False" + Environment.NewLine + " ShaperItem False" + Environment.NewLine +
" ShapedMap TRUE" + Environment.NewLine + " ShapedMap TRUE" + Environment.NewLine +
" ElderMap False" + Environment.NewLine +
@" Class ""My Item Class"" AnotherClass ""AndAnotherClass""" + Environment.NewLine + @" Class ""My Item Class"" AnotherClass ""AndAnotherClass""" + Environment.NewLine +
@" BaseType MyBaseType ""Another BaseType""" + Environment.NewLine + @" BaseType MyBaseType ""Another BaseType""" + Environment.NewLine +
@" HasExplicitMod MyMod ""Another Mod""" + Environment.NewLine +
" JunkLine Let's ignore this one!" + Environment.NewLine + " JunkLine Let's ignore this one!" + Environment.NewLine +
" #Quality Commented out quality line" + Environment.NewLine + " #Quality Commented out quality line" + Environment.NewLine +
" Sockets >= 3" + Environment.NewLine + " Sockets >= 3" + Environment.NewLine +
@ -831,7 +924,8 @@ namespace Filtration.Parser.Tests.Services
" SetBackgroundColor 255 100 5" + Environment.NewLine + " SetBackgroundColor 255 100 5" + Environment.NewLine +
" SetBorderColor 0 0 0" + Environment.NewLine + " SetBorderColor 0 0 0" + Environment.NewLine +
" SetFontSize 50" + Environment.NewLine + " SetFontSize 50" + Environment.NewLine +
" PlayAlertSound 3" + Environment.NewLine; " PlayAlertSound 3" + Environment.NewLine +
" DisableDropSound False" + Environment.NewLine;
// Act // Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript); var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
@ -857,10 +951,21 @@ namespace Filtration.Parser.Tests.Services
var shapedMapBlockItem = result.BlockItems.OfType<ShapedMapBlockItem>().First(); var shapedMapBlockItem = result.BlockItems.OfType<ShapedMapBlockItem>().First();
Assert.IsTrue(shapedMapBlockItem.BooleanValue); Assert.IsTrue(shapedMapBlockItem.BooleanValue);
var elderMapBlockItem = result.BlockItems.OfType<ElderMapBlockItem>().First();
Assert.IsFalse(elderMapBlockItem.BooleanValue);
var dropLevelblockItem = result.BlockItems.OfType<DropLevelBlockItem>().First(); var dropLevelblockItem = result.BlockItems.OfType<DropLevelBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.LessThan, dropLevelblockItem.FilterPredicate.PredicateOperator); Assert.AreEqual(FilterPredicateOperator.LessThan, dropLevelblockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(70, dropLevelblockItem.FilterPredicate.PredicateOperand); Assert.AreEqual(70, dropLevelblockItem.FilterPredicate.PredicateOperand);
var gemLevelBlockItem = result.BlockItems.OfType<GemLevelBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.Equal, gemLevelBlockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(20, gemLevelBlockItem.FilterPredicate.PredicateOperand);
var stackSizeBlockItem = result.BlockItems.OfType<StackSizeBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.GreaterThan, stackSizeBlockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(2, stackSizeBlockItem.FilterPredicate.PredicateOperand);
var qualityblockItem = result.BlockItems.OfType<QualityBlockItem>().First(); var qualityblockItem = result.BlockItems.OfType<QualityBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.Equal, qualityblockItem.FilterPredicate.PredicateOperator); Assert.AreEqual(FilterPredicateOperator.Equal, qualityblockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(15, qualityblockItem.FilterPredicate.PredicateOperand); Assert.AreEqual(15, qualityblockItem.FilterPredicate.PredicateOperand);
@ -880,6 +985,11 @@ namespace Filtration.Parser.Tests.Services
Assert.Contains("MyBaseType", baseTypeblockItem.Items); Assert.Contains("MyBaseType", baseTypeblockItem.Items);
Assert.Contains("Another BaseType", baseTypeblockItem.Items); Assert.Contains("Another BaseType", baseTypeblockItem.Items);
var hasExplicitModBlockItem = result.BlockItems.OfType<HasExplicitModBlockItem>().First();
Assert.AreEqual(2, hasExplicitModBlockItem.Items.Count);
Assert.Contains("MyMod", hasExplicitModBlockItem.Items);
Assert.Contains("Another Mod", hasExplicitModBlockItem.Items);
var socketsblockItem = result.BlockItems.OfType<SocketsBlockItem>().First(); var socketsblockItem = result.BlockItems.OfType<SocketsBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.GreaterThanOrEqual, socketsblockItem.FilterPredicate.PredicateOperator); Assert.AreEqual(FilterPredicateOperator.GreaterThanOrEqual, socketsblockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(3, socketsblockItem.FilterPredicate.PredicateOperand); Assert.AreEqual(3, socketsblockItem.FilterPredicate.PredicateOperand);
@ -917,6 +1027,9 @@ namespace Filtration.Parser.Tests.Services
var soundblockItem = result.BlockItems.OfType<SoundBlockItem>().First(); var soundblockItem = result.BlockItems.OfType<SoundBlockItem>().First();
Assert.AreEqual("3", soundblockItem.Value); Assert.AreEqual("3", soundblockItem.Value);
Assert.AreEqual(79, soundblockItem.SecondValue); Assert.AreEqual(79, soundblockItem.SecondValue);
var disableDropSoundBlockItem = result.BlockItems.OfType<DisableDropSoundBlockItem>().First();
Assert.IsFalse(disableDropSoundBlockItem.BooleanValue);
} }
[Test] [Test]
@ -1334,6 +1447,38 @@ namespace Filtration.Parser.Tests.Services
Assert.AreEqual(expectedResult, result); Assert.AreEqual(expectedResult, result);
} }
[Test]
public void TranslateItemFilterBlockToString_GemLevel_ReturnsCorrectString()
{
// Arrange
var expectedResult = "Show" + Environment.NewLine +
" GemLevel <= 15";
_testUtility.TestBlock.BlockItems.Add(new GemLevelBlockItem(FilterPredicateOperator.LessThanOrEqual, 15));
// Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);
// Assert
Assert.AreEqual(expectedResult, result);
}
[Test]
public void TranslateItemFilterBlockToString_StackSize_ReturnsCorrectString()
{
// Arrange
var expectedResult = "Show" + Environment.NewLine +
" StackSize = 5";
_testUtility.TestBlock.BlockItems.Add(new StackSizeBlockItem(FilterPredicateOperator.Equal, 5));
// Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);
// Assert
Assert.AreEqual(expectedResult, result);
}
[Test] [Test]
public void TranslateItemFilterBlockToString_Quality_ReturnsCorrectString() public void TranslateItemFilterBlockToString_Quality_ReturnsCorrectString()
{ {
@ -1425,6 +1570,26 @@ namespace Filtration.Parser.Tests.Services
Assert.AreEqual(expectedResult, result); Assert.AreEqual(expectedResult, result);
} }
[Test]
public void TranslateItemFilterBlockToString_HasExplicitMod_ReturnsCorrectString()
{
// Arrange
var expectedResult = "Show" + Environment.NewLine +
" HasExplicitMod \"Test Mod\" \"Another Mod\" \"Yet Another Mod\"";
var hasExplicitModBlockItem = new HasExplicitModBlockItem();
hasExplicitModBlockItem.Items.Add("Test Mod");
hasExplicitModBlockItem.Items.Add("Another Mod");
hasExplicitModBlockItem.Items.Add("Yet Another Mod");
_testUtility.TestBlock.BlockItems.Add(hasExplicitModBlockItem);
// Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);
// Assert
Assert.AreEqual(expectedResult, result);
}
[Test] [Test]
public void TranslateItemFilterBlockToString_Sockets_ReturnsCorrectString() public void TranslateItemFilterBlockToString_Sockets_ReturnsCorrectString()
{ {
@ -1700,20 +1865,25 @@ namespace Filtration.Parser.Tests.Services
" ElderItem True" + Environment.NewLine + " ElderItem True" + Environment.NewLine +
" ShaperItem False" + Environment.NewLine + " ShaperItem False" + Environment.NewLine +
" ShapedMap True" + Environment.NewLine + " ShapedMap True" + Environment.NewLine +
" ElderMap True" + Environment.NewLine +
" Height <= 6" + Environment.NewLine + " Height <= 6" + Environment.NewLine +
" Height >= 2" + Environment.NewLine + " Height >= 2" + Environment.NewLine +
" Width = 3" + Environment.NewLine + " Width = 3" + Environment.NewLine +
" ItemLevel > 70" + Environment.NewLine + " ItemLevel > 70" + Environment.NewLine +
" ItemLevel <= 85" + Environment.NewLine + " ItemLevel <= 85" + Environment.NewLine +
" DropLevel > 56" + Environment.NewLine + " DropLevel > 56" + Environment.NewLine +
" GemLevel < 15" + Environment.NewLine +
" StackSize >= 4" + Environment.NewLine +
" Rarity = Unique" + Environment.NewLine + " Rarity = Unique" + Environment.NewLine +
" Class \"Body Armour\" \"Gloves\" \"Belt\" \"Two Hand Axes\"" + Environment.NewLine + " Class \"Body Armour\" \"Gloves\" \"Belt\" \"Two Hand Axes\"" + Environment.NewLine +
" BaseType \"Greater Life Flask\" \"Simple Robe\" \"Full Wyrmscale\"" + Environment.NewLine + " BaseType \"Greater Life Flask\" \"Simple Robe\" \"Full Wyrmscale\"" + Environment.NewLine +
" HasExplicitMod \"Guatelitzi's\" \"of Tacati\" \"Tyrannical\"" + Environment.NewLine +
" SetTextColor 255 89 0 56" + Environment.NewLine + " SetTextColor 255 89 0 56" + Environment.NewLine +
" SetBackgroundColor 0 0 0" + Environment.NewLine + " SetBackgroundColor 0 0 0" + Environment.NewLine +
" SetBorderColor 255 1 254" + Environment.NewLine + " SetBorderColor 255 1 254" + Environment.NewLine +
" SetFontSize 50" + Environment.NewLine + " SetFontSize 50" + Environment.NewLine +
" PlayAlertSound 6 90"; " PlayAlertSound 6 90" + Environment.NewLine +
" DisableDropSound True";
_testUtility.TestBlock.BlockItems.Add(new ActionBlockItem(BlockAction.Show)); _testUtility.TestBlock.BlockItems.Add(new ActionBlockItem(BlockAction.Show));
_testUtility.TestBlock.BlockItems.Add(new IdentifiedBlockItem(true)); _testUtility.TestBlock.BlockItems.Add(new IdentifiedBlockItem(true));
@ -1722,6 +1892,8 @@ namespace Filtration.Parser.Tests.Services
_testUtility.TestBlock.BlockItems.Add(new ItemLevelBlockItem(FilterPredicateOperator.GreaterThan, 70)); _testUtility.TestBlock.BlockItems.Add(new ItemLevelBlockItem(FilterPredicateOperator.GreaterThan, 70));
_testUtility.TestBlock.BlockItems.Add(new ItemLevelBlockItem(FilterPredicateOperator.LessThanOrEqual, 85)); _testUtility.TestBlock.BlockItems.Add(new ItemLevelBlockItem(FilterPredicateOperator.LessThanOrEqual, 85));
_testUtility.TestBlock.BlockItems.Add(new DropLevelBlockItem(FilterPredicateOperator.GreaterThan, 56)); _testUtility.TestBlock.BlockItems.Add(new DropLevelBlockItem(FilterPredicateOperator.GreaterThan, 56));
_testUtility.TestBlock.BlockItems.Add(new GemLevelBlockItem(FilterPredicateOperator.LessThan, 15));
_testUtility.TestBlock.BlockItems.Add(new StackSizeBlockItem(FilterPredicateOperator.GreaterThanOrEqual, 4));
_testUtility.TestBlock.BlockItems.Add(new QualityBlockItem(FilterPredicateOperator.GreaterThan, 2)); _testUtility.TestBlock.BlockItems.Add(new QualityBlockItem(FilterPredicateOperator.GreaterThan, 2));
_testUtility.TestBlock.BlockItems.Add(new RarityBlockItem(FilterPredicateOperator.Equal, (int)ItemRarity.Unique)); _testUtility.TestBlock.BlockItems.Add(new RarityBlockItem(FilterPredicateOperator.Equal, (int)ItemRarity.Unique));
var classItemblockItem = new ClassBlockItem(); var classItemblockItem = new ClassBlockItem();
@ -1735,6 +1907,11 @@ namespace Filtration.Parser.Tests.Services
baseTypeItemblockItem.Items.Add("Simple Robe"); baseTypeItemblockItem.Items.Add("Simple Robe");
baseTypeItemblockItem.Items.Add("Full Wyrmscale"); baseTypeItemblockItem.Items.Add("Full Wyrmscale");
_testUtility.TestBlock.BlockItems.Add(baseTypeItemblockItem); _testUtility.TestBlock.BlockItems.Add(baseTypeItemblockItem);
var hasExplicitModBlockItem = new HasExplicitModBlockItem();
hasExplicitModBlockItem.Items.Add("Guatelitzi's");
hasExplicitModBlockItem.Items.Add("of Tacati");
hasExplicitModBlockItem.Items.Add("Tyrannical");
_testUtility.TestBlock.BlockItems.Add(hasExplicitModBlockItem);
_testUtility.TestBlock.BlockItems.Add(new SocketsBlockItem(FilterPredicateOperator.LessThanOrEqual, 6)); _testUtility.TestBlock.BlockItems.Add(new SocketsBlockItem(FilterPredicateOperator.LessThanOrEqual, 6));
_testUtility.TestBlock.BlockItems.Add(new LinkedSocketsBlockItem(FilterPredicateOperator.GreaterThanOrEqual, 4)); _testUtility.TestBlock.BlockItems.Add(new LinkedSocketsBlockItem(FilterPredicateOperator.GreaterThanOrEqual, 4));
_testUtility.TestBlock.BlockItems.Add(new WidthBlockItem(FilterPredicateOperator.Equal, 3)); _testUtility.TestBlock.BlockItems.Add(new WidthBlockItem(FilterPredicateOperator.Equal, 3));
@ -1748,6 +1925,8 @@ namespace Filtration.Parser.Tests.Services
_testUtility.TestBlock.BlockItems.Add(new ElderItemBlockItem(true)); _testUtility.TestBlock.BlockItems.Add(new ElderItemBlockItem(true));
_testUtility.TestBlock.BlockItems.Add(new ShaperItemBlockItem(false)); _testUtility.TestBlock.BlockItems.Add(new ShaperItemBlockItem(false));
_testUtility.TestBlock.BlockItems.Add(new ShapedMapBlockItem(true)); _testUtility.TestBlock.BlockItems.Add(new ShapedMapBlockItem(true));
_testUtility.TestBlock.BlockItems.Add(new ElderMapBlockItem(true));
_testUtility.TestBlock.BlockItems.Add(new DisableDropSoundBlockItem(true));
// Act // Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock); var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);

View File

@ -155,7 +155,7 @@ namespace Filtration.Parser.Tests.Services
script.ItemFilterBlocks.Add(block1); script.ItemFilterBlocks.Add(block1);
script.ItemFilterBlocks.Add(block2); script.ItemFilterBlocks.Add(block2);
var expectedOutput = "# Script edited with Filtration - https://github.com/ben-wallis/Filtration" + Environment.NewLine + var expectedOutput = "# Script edited with Filtration - https://github.com/ben-wallis/Filtration" + Environment.NewLine + Environment.NewLine +
"# Test Filter 1" + Environment.NewLine + "# Test Filter 1" + Environment.NewLine +
"Show" + Environment.NewLine + "Show" + Environment.NewLine +
" ItemLevel > 5" + Environment.NewLine + " ItemLevel > 5" + Environment.NewLine +

View File

@ -266,6 +266,34 @@ 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;
}
case "ElderMap":
{
AddBooleanItemToBlockItems<ElderMapBlockItem>(block, trimmedLine);
break;
}
case "DisableDropSound":
{
// Only ever use the last DisableDropSound item encountered as multiples aren't valid.
RemoveExistingBlockItemsOfType<DisableDropSoundBlockItem>(block);
AddBooleanItemToBlockItems<DisableDropSoundBlockItem>(block, trimmedLine);
break;
}
} }
} }

View File

@ -251,8 +251,8 @@ namespace Filtration.Parser.Services
outputString += "# " + line + Environment.NewLine; outputString += "# " + line + Environment.NewLine;
} }
} }
outputString += Environment.NewLine;
} }
outputString += Environment.NewLine;
// ReSharper disable once LoopCanBeConvertedToQuery // ReSharper disable once LoopCanBeConvertedToQuery
foreach (var block in script.ItemFilterBlocks) foreach (var block in script.ItemFilterBlocks)

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

@ -114,6 +114,7 @@ Bear Trap
Behemoth Mace Behemoth Mace
Belfry Map Belfry Map
Bestel's Manuscript Bestel's Manuscript
Bestiary Orb
Beyond Leaguestone Beyond Leaguestone
Binding Shard Binding Shard
Birth of the Three Birth of the Three
@ -131,6 +132,7 @@ Blast Rain
Blessed Orb Blessed Orb
Blessing of Chayula Blessing of Chayula
Blessing of Esh Blessing of Esh
Blessing of God
Blessing of Tul Blessing of Tul
Blessing of Uul-Netol Blessing of Uul-Netol
Blessing of Xoph Blessing of Xoph
@ -244,6 +246,7 @@ Chaos Orb
Chaos Shard Chaos Shard
Chaotic Disposition Chaotic Disposition
Charged Dash Charged Dash
Charged Traps Support
Chateau Map Chateau Map
Chayula's Breachstone Chayula's Breachstone
Chest Splitter Chest Splitter
@ -492,6 +495,7 @@ Exalted Orb
Exalted Shard Exalted Shard
Excavation Map Excavation Map
Explosive Arrow Explosive Arrow
Explosive Trap
Exquisite Blade Exquisite Blade
Exquisite Leather Exquisite Leather
Eye Gouger Eye Gouger
@ -531,8 +535,10 @@ Flame Dash
Flame Surge Flame Surge
Flame Totem Flame Totem
Flameblast Flameblast
Flamethrower Trap
Flammability Flammability
Flanged Mace Flanged Mace
Flashpowder Keg
Flaying Knife Flaying Knife
Flesh Offering Flesh Offering
Fleshripper Fleshripper
@ -540,6 +546,7 @@ Flicker Strike
Flooded Mine Map Flooded Mine Map
Fluted Bascinet Fluted Bascinet
Footman Sword Footman Sword
Forbidden Power
Forge of the Phoenix Map Forge of the Phoenix Map
Fork Support Fork Support
Fortify Support Fortify Support
@ -654,6 +661,7 @@ Harbinger's Orb
Harbinger's Shard Harbinger's Shard
Harlequin Mask Harlequin Mask
Harmonic Spirit Shield Harmonic Spirit Shield
Harmony of Souls
Harpy Rapier Harpy Rapier
Haste Haste
Hatred Hatred
@ -705,6 +713,7 @@ Ignite Proliferation Support
Imbued Wand Imbued Wand
Immolate Support Immolate Support
Immortal Call Immortal Call
Immortal Resolve
Imp Dagger Imp Dagger
Imperial Bow Imperial Bow
Imperial Buckler Imperial Buckler
@ -712,6 +721,7 @@ Imperial Claw
Imperial Maul Imperial Maul
Imperial Skean Imperial Skean
Imperial Staff Imperial Staff
Imprinted Bestiary Orb
Incinerate Incinerate
Increased Area of Effect Support Increased Area of Effect Support
Increased Critical Damage Support Increased Critical Damage Support
@ -813,6 +823,7 @@ Light Quiver
Lighthouse Map Lighthouse Map
Lightning Arrow Lightning Arrow
Lightning Penetration Support Lightning Penetration Support
Lightning Spire Trap
Lightning Strike Lightning Strike
Lightning Tendrils Lightning Tendrils
Lightning Trap Lightning Trap
@ -923,6 +934,7 @@ Muttering Essence of Woe
Nailed Fist Nailed Fist
Necromancer Circlet Necromancer Circlet
Necromancer Silks Necromancer Silks
Necromancy Net
Necropolis Map Necropolis Map
Nemesis Leaguestone Nemesis Leaguestone
Nightmare Bascinet Nightmare Bascinet
@ -983,6 +995,7 @@ Penetrating Arrow Quiver
Peninsula Map Peninsula Map
Perandus Coin Perandus Coin
Perandus Leaguestone Perandus Leaguestone
Perfection
Pernarch Pernarch
Petrified Club Petrified Club
Phantasmagoria Map Phantasmagoria Map
@ -1082,7 +1095,10 @@ Regal Orb
Regal Shard Regal Shard
Regicide Mask Regicide Mask
Reinforced Greaves Reinforced Greaves
Reinforced Iron Net
Reinforced Kite Shield Reinforced Kite Shield
Reinforced Rope Net
Reinforced Steel Net
Reinforced Tower Shield Reinforced Tower Shield
Rejuvenation Totem Rejuvenation Totem
Relic Chambers Map Relic Chambers Map
@ -1185,6 +1201,7 @@ Scroll of Wisdom
Searching Eye Jewel Searching Eye Jewel
Searing Bond Searing Bond
Secutor Helm Secutor Helm
Seismic Trap
Sekhem Sekhem
Sekhema Feather Sekhema Feather
Sentinel Jacket Sentinel Jacket
@ -1264,8 +1281,12 @@ Silver Coin
Silver Flask Silver Flask
Silver Key Silver Key
Silver Locket Silver Locket
Simple Iron Net
Simple Robe Simple Robe
Simple Rope Net
Simple Steel Net
Sinner Tricorne Sinner Tricorne
Siphoning Trap
Skean Skean
Skinning Knife Skinning Knife
Slaughter Knife Slaughter Knife
@ -1292,6 +1313,7 @@ Sovereign Spiked Shield
Spark Spark
Sparkling Claw Sparkling Claw
Spectral Axe Spectral Axe
Spectral Shield Throw
Spectral Sword Spectral Sword
Spectral Throw Spectral Throw
Spell Cascade Support Spell Cascade Support
@ -1341,6 +1363,7 @@ Stibnite Flask
Stiletto Stiletto
Stone Axe Stone Axe
Stone Hammer Stone Hammer
Stone of Passage
Storm Barrier Support Storm Barrier Support
Storm Blade Storm Blade
Storm Burst Storm Burst
@ -1349,6 +1372,9 @@ Strand Map
Strapped Boots Strapped Boots
Strapped Leather Strapped Leather
Strapped Mitts Strapped Mitts
Strong Iron Net
Strong Rope Net
Strong Steel Net
Struck by Lightning Struck by Lightning
Studded Belt Studded Belt
Studded Round Shield Studded Round Shield
@ -1361,6 +1387,7 @@ Summon Chaos Golem
Summon Flame Golem Summon Flame Golem
Summon Ice Golem Summon Ice Golem
Summon Lightning Golem Summon Lightning Golem
Summon Phantasm on Kill Support
Summon Raging Spirit Summon Raging Spirit
Summon Skeleton Summon Skeleton
Summon Stone Golem Summon Stone Golem
@ -1377,6 +1404,7 @@ Talisman Leaguestone
Talon Axe Talon Axe
Tarnished Spirit Shield Tarnished Spirit Shield
Teak Round Shield Teak Round Shield
Tectonic Slam
Tempered Foil Tempered Foil
Tempest Leaguestone Tempest Leaguestone
Tempest Shield Tempest Shield
@ -1386,17 +1414,22 @@ Tenderizer
Terrace Map Terrace Map
Terror Claw Terror Claw
Terror Maul Terror Maul
Thaumaturgical Net
Thaumetic Emblem Thaumetic Emblem
Thaumetic Sulphite Thaumetic Sulphite
The Admirer
The Aesthete The Aesthete
The Arena Champion The Arena Champion
The Army of Blood
The Artist The Artist
The Avenger The Avenger
The Battle Born The Battle Born
The Beast
The Betrayal The Betrayal
The Black Flag The Black Flag
The Blazing Fire The Blazing Fire
The Body The Body
The Breach
The Brittle Emperor The Brittle Emperor
The Calling The Calling
The Carrion Crow The Carrion Crow
@ -1404,18 +1437,23 @@ The Cartographer
The Cataclysm The Cataclysm
The Catalyst The Catalyst
The Celestial Justicar The Celestial Justicar
The Celestial Stone
The Chains that Bind The Chains that Bind
The Coming Storm The Coming Storm
The Conduit The Conduit
The Cursed King The Cursed King
The Dapper Prodigy The Dapper Prodigy
The Dark Mage The Dark Mage
The Darkest Dream
The Deceiver
The Demoness The Demoness
The Devastator The Devastator
The Doctor The Doctor
The Doppelganger The Doppelganger
The Dragon The Dragon
The Dragon's Heart The Dragon's Heart
The Dreamer
The Dreamland
The Drunken Aristocrat The Drunken Aristocrat
The Encroaching Darkness The Encroaching Darkness
The Endurance The Endurance
@ -1425,6 +1463,7 @@ The Explorer
The Eye of Desire The Eye of Desire
The Eye of Fury The Eye of Fury
The Eye of the Dragon The Eye of the Dragon
The Fathomless Depths
The Feast The Feast
The Fiend The Fiend
The Fletcher The Fletcher
@ -1437,6 +1476,7 @@ The Garish Power
The Gemcutter The Gemcutter
The Gentleman The Gentleman
The Gladiator The Gladiator
The Hale Heart
The Harvester The Harvester
The Hermit The Hermit
The Hoarder The Hoarder
@ -1444,8 +1484,11 @@ The Hunger
The Immortal The Immortal
The Incantation The Incantation
The Inoculated The Inoculated
The Insatiable
The Inventor The Inventor
The Iron Bard
The Jester The Jester
The Jeweller's Boon
The King's Blade The King's Blade
The King's Heart The King's Heart
The Last One Standing The Last One Standing
@ -1454,9 +1497,12 @@ The Lion
The Lord in Black The Lord in Black
The Lover The Lover
The Lunaris Priestess The Lunaris Priestess
The Master
The Mayor
The Mercenary The Mercenary
The Metalsmith's Gift The Metalsmith's Gift
The Oath The Oath
The Obscured
The Offering The Offering
The One With All The One With All
The Opulent The Opulent
@ -1466,17 +1512,22 @@ The Penitent
The Poet The Poet
The Polymath The Polymath
The Porcupine The Porcupine
The Professor
The Puzzle
The Queen The Queen
The Rabid Rhoa The Rabid Rhoa
The Realm The Realm
The Risk The Risk
The Rite of Elements
The Road to Power The Road to Power
The Ruthless Ceinture The Ruthless Ceinture
The Saint's Treasure The Saint's Treasure
The Samurai's Eye
The Scarred Meadow The Scarred Meadow
The Scavenger The Scavenger
The Scholar The Scholar
The Sephirot The Sephirot
The Shaper's Key
The Sigil The Sigil
The Siren The Siren
The Soul The Soul
@ -1490,6 +1541,7 @@ The Sun
The Surgeon The Surgeon
The Surveyor The Surveyor
The Survivalist The Survivalist
The Sword King's Salute
The Teardrop The Teardrop
The Thaumaturgist The Thaumaturgist
The Throne The Throne
@ -1498,6 +1550,8 @@ The Traitor
The Trial The Trial
The Twins The Twins
The Tyrant The Tyrant
The Undaunted
The Undisputed
The Union The Union
The Valkyrie The Valkyrie
The Valley of Steel Boxes The Valley of Steel Boxes
@ -1509,10 +1563,12 @@ The Warlord
The Watcher The Watcher
The Web The Web
The Wind The Wind
The Witch
The Wolf The Wolf
The Wolf's Shadow The Wolf's Shadow
The Wolven King's Bite The Wolven King's Bite
The Wolverine The Wolverine
The World Eater
The Wrath The Wrath
The Wretched The Wretched
Thicket Bow Thicket Bow
@ -1523,6 +1579,7 @@ Thorn Rapier
Three Faces in the Dark Three Faces in the Dark
Three Hands Talisman Three Hands Talisman
Three Rat Talisman Three Rat Talisman
Three Voices
Thresher Claw Thresher Claw
Throat Stabber Throat Stabber
Thunderous Skies Thunderous Skies
@ -1590,6 +1647,8 @@ Uul-Netol's Breachstone
Vaal Arc Vaal Arc
Vaal Axe Vaal Axe
Vaal Blade Vaal Blade
Vaal Blade Vortex
Vaal Blight
Vaal Breach Vaal Breach
Vaal Buckler Vaal Buckler
Vaal Burning Arrow Vaal Burning Arrow
@ -1600,6 +1659,7 @@ Vaal Cyclone
Vaal Detonate Dead Vaal Detonate Dead
Vaal Discipline Vaal Discipline
Vaal Double Strike Vaal Double Strike
Vaal Earthquake
Vaal Fireball Vaal Fireball
Vaal Flameblast Vaal Flameblast
Vaal Gauntlets Vaal Gauntlets
@ -1612,6 +1672,9 @@ Vaal Haste
Vaal Hatchet Vaal Hatchet
Vaal Ice Nova Vaal Ice Nova
Vaal Immortal Call Vaal Immortal Call
Vaal Impurity of Fire
Vaal Impurity of Ice
Vaal Impurity of Lightning
Vaal Lightning Strike Vaal Lightning Strike
Vaal Lightning Trap Vaal Lightning Trap
Vaal Lightning Warp Vaal Lightning Warp
@ -1640,7 +1703,16 @@ Vault Map
Velvet Gloves Velvet Gloves
Velvet Slippers Velvet Slippers
Vengeance Vengeance
Vial of Awakening
Vial of Consequence
Vial of Dominance
Vial of Fate
Vial Of Power Vial Of Power
Vial of Sacrifice
Vial of Summoning
Vial of the Ghost
Vial of the Ritual
Vial of Transcendence
Vigilant Strike Vigilant Strike
Vile Staff Vile Staff
Vile Toxins Support Vile Toxins Support

View File

@ -16,6 +16,7 @@ Gems
Gloves Gloves
Helmets Helmets
Hybrid Flasks Hybrid Flasks
Incursion Item
Jewel Jewel
Labyrinth Item Labyrinth Item
Labyrinth Map Item Labyrinth Map Item

View File

@ -75,7 +75,12 @@
<DataTemplate DataType="{x:Type blockItemTypes:BaseTypeBlockItem}"> <DataTemplate DataType="{x:Type blockItemTypes:BaseTypeBlockItem}">
<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,11 @@ namespace Filtration.ViewModels
typeof (CorruptedBlockItem), typeof (CorruptedBlockItem),
typeof (ElderItemBlockItem), typeof (ElderItemBlockItem),
typeof (ShaperItemBlockItem), typeof (ShaperItemBlockItem),
typeof (ShapedMapBlockItem) typeof (ShapedMapBlockItem),
typeof (ElderMapBlockItem),
typeof (GemLevelBlockItem),
typeof (StackSizeBlockItem),
typeof (HasExplicitModBlockItem)
}; };
public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type> public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type>
@ -169,7 +173,8 @@ namespace Filtration.ViewModels
typeof (BorderColorBlockItem), typeof (BorderColorBlockItem),
typeof (FontSizeBlockItem), typeof (FontSizeBlockItem),
typeof (SoundBlockItem), typeof (SoundBlockItem),
typeof (PositionalSoundBlockItem) typeof (PositionalSoundBlockItem),
typeof (DisableDropSoundBlockItem)
}; };
public bool BlockEnabled public bool BlockEnabled