Skip to content

Commit

Permalink
Revert "Revert "Добавьте GITIGNORE- и GITATTRIBUTES-файлы.""
Browse files Browse the repository at this point in the history
This reverts commit a77013b.
  • Loading branch information
eugenikus8 committed May 27, 2024
1 parent 7b14b5c commit bea2959
Show file tree
Hide file tree
Showing 72 changed files with 3,439 additions and 2,384 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
20 changes: 10 additions & 10 deletions Filtration.ItemFilterPreview/Services/BlockItemMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public bool ItemBlockItemMatch(IItemFilterBlockItem blockItem, IItem item)
if (blockItemType == typeof(RarityBlockItem))
return RarityBlockItemMatch((RarityBlockItem)blockItem, item);

if (blockItemType == typeof(SocketsBlockItem))
return SocketsBlockItemMatch((SocketsBlockItem)blockItem, item);



if (blockItemType == typeof(WidthBlockItem))
return WidthBlockItemMatch((WidthBlockItem)blockItem, item);
Expand Down Expand Up @@ -123,16 +123,14 @@ private static bool QualityBlockItemMatch(QualityBlockItem qualityBlockItem, IIt
return NumericFilterPredicateBlockItemMatch(qualityBlockItem, item.Quality);
}



private static bool BaseArmourBlockItemMatch(BaseArmourBlockItem BaseArmourBlockItem, IItem item)
private static bool BaseDefencePercentileBlockItemMatch(BaseDefencePercentileBlockItem BaseDefencePercentileBlockItem, IItem item)
{
return NumericFilterPredicateBlockItemMatch(BaseArmourBlockItem, item.BaseArmour);
return NumericFilterPredicateBlockItemMatch(BaseDefencePercentileBlockItem, item.BaseDefencePercentile);
}

private static bool BaseDefencePercentileBlockItemMatch(BaseDefencePercentileBlockItem BaseDefencePercentileBlockItem, IItem item)
private static bool BaseArmourBlockItemMatch(BaseArmourBlockItem BaseArmourBlockItem, IItem item)
{
return NumericFilterPredicateBlockItemMatch(BaseDefencePercentileBlockItem, item.BaseDefencePercentile);
return NumericFilterPredicateBlockItemMatch(BaseArmourBlockItem, item.BaseArmour);
}

private static bool BaseEnergyShieldBlockItemMatch(BaseEnergyShieldBlockItem BaseEnergyShieldBlockItem, IItem item)
Expand Down Expand Up @@ -161,11 +159,13 @@ private static bool RarityBlockItemMatch(RarityBlockItem qualityBlockItem, IItem
return NumericFilterPredicateBlockItemMatch(qualityBlockItem, (int)item.ItemRarity);
}

private static bool SocketsBlockItemMatch(SocketsBlockItem socketsBlockItem, IItem item)
private static bool GemQualityTypeBlockItemMatch(GemQualityTypeBlockItem qualityBlockItem, IItem item)
{
return NumericFilterPredicateBlockItemMatch(socketsBlockItem, item.SocketCount);
return NumericFilterPredicateBlockItemMatch(qualityBlockItem, (int)item.GemQualityType);
}



private static bool WidthBlockItemMatch(WidthBlockItem widthBlockItem, IItem item)
{
return NumericFilterPredicateBlockItemMatch(widthBlockItem, item.Width);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public bool BooleanValue
}

public override string OutputText => PrefixText + " " + BooleanValue;
public override string SummaryText => DisplayHeading + " = " + BooleanValue;
public override string SummaryText => DisplayHeading + ": " + BooleanValue;
public override int MaximumAllowed => 1;

public void ToggleValue()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public AlternateQualityBlockItem(bool booleanValue) : base(booleanValue)
}

public override string PrefixText => "AlternateQuality";
public override string DisplayHeading => "Alternate Quality";
public override string DisplayHeading => "AlternateQuality";
public override Color SummaryBackgroundColor => Colors.GreenYellow;
public override Color SummaryTextColor => Colors.Black;
public override BlockItemOrdering SortOrder => BlockItemOrdering.AlternateQuality;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public AnyEnchantmentBlockItem(bool booleanValue) : base(booleanValue)
}

public override string PrefixText => "AnyEnchantment";
public override string DisplayHeading => "Any Enchantment";
public override string DisplayHeading => "AnyEnchantment";
public override Color SummaryBackgroundColor => Colors.YellowGreen;
public override Color SummaryTextColor => Colors.Black;
public override BlockItemOrdering SortOrder => BlockItemOrdering.AnyEnchantment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public AreaLevelBlockItem(FilterPredicateOperator predicateOperator, int predica

public override string PrefixText => "AreaLevel";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Area Level";
public override string DisplayHeading => "AreaLevel";
public override string SummaryText => "Area Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.IndianRed;
public override Color SummaryTextColor => Colors.White;
Expand Down
6 changes: 3 additions & 3 deletions Filtration.ObjectModel/BlockItemTypes/BaseArmourlBlockItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public BaseArmourBlockItem(FilterPredicateOperator predicateOperator, int predic
}

public override string PrefixText => "BaseArmour";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Base Armour";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "BaseArmour";
public override string SummaryText => "Base Armour " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.PaleVioletRed;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseArmour;
public override int Minimum => 0;
public override int Maximum => 5555;
public override int Maximum => 9999;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public BaseDefencePercentileBlockItem(FilterPredicateOperator predicateOperator,
}

public override string PrefixText => "BaseDefencePercentile";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Base Defence Percentile";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "BaseDefencePercentile";
public override string SummaryText => "Base Defence Percentile " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.Gray;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseDefencePercentile;
public override int Minimum => 0;
public override int Maximum => 5555;
public override int Maximum => 100;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public BaseEnergyShieldBlockItem(FilterPredicateOperator predicateOperator, int
}

public override string PrefixText => "BaseEnergyShield";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Base Energy Shield";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "BaseEnergyShield";
public override string SummaryText => "Base Energy Shield " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.RoyalBlue;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseEnergyShield;
public override int Minimum => 0;
public override int Maximum => 5555;
public override int Maximum => 9999;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public BaseEvasionBlockItem(FilterPredicateOperator predicateOperator, int predi
}

public override string PrefixText => "BaseEvasion";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Base Evasion";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "BaseEvasion";
public override string SummaryText => "Base Evasion " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkOliveGreen;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseEvasion;
public override int Minimum => 0;
public override int Maximum => 5555;
public override int Maximum => 9999;
}
}
2 changes: 1 addition & 1 deletion Filtration.ObjectModel/BlockItemTypes/BaseTypeBlockItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class BaseTypeBlockItem : StringListBlockItem
{
public override string PrefixText => "BaseType";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Base Type";
public override string DisplayHeading => "BaseType";

public override string SummaryText
{
Expand Down
8 changes: 4 additions & 4 deletions Filtration.ObjectModel/BlockItemTypes/BaseWardlBlockItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public BaseWardBlockItem(FilterPredicateOperator predicateOperator, int predicat
}

public override string PrefixText => "BaseWard";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Base Ward";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "BaseWard";
public override string SummaryText => "Base Ward " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkGray;
public override Color SummaryBackgroundColor => Colors.BlueViolet;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseWard;
public override int Minimum => 0;
public override int Maximum => 5555;
public override int Maximum => 9999;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public BlightedMapBlockItem(bool booleanValue) : base(booleanValue)
}

public override string PrefixText => "BlightedMap";
public override string DisplayHeading => "Blighted Map";
public override string DisplayHeading => "BlightedMap";
public override Color SummaryBackgroundColor => Colors.Khaki;
public override Color SummaryTextColor => Colors.Black;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BligtedMap;
Expand Down
20 changes: 20 additions & 0 deletions Filtration.ObjectModel/BlockItemTypes/ContinueBlockItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;

namespace Filtration.ObjectModel.BlockItemTypes
{
public sealed class ContinueBlockItem : NilBlockItem
{
public ContinueBlockItem() : base()
{
}

public override string PrefixText => "Continue";
public override string DisplayHeading => "Continue";
public override string Description => "NotStopWhenItemMatchesThisBlock";
public override Color SummaryBackgroundColor => Colors.Orchid;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.Continue;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public CorruptedModsBlockItem(FilterPredicateOperator predicateOperator, int pre

public override string PrefixText => "CorruptedMods";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Corrupted Mods";
public override string DisplayHeading => "CorruptedMods";
public override string SummaryText => "Corrupted Mods " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.Firebrick;
public override Color SummaryTextColor => Colors.White;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public DropLevelBlockItem(FilterPredicateOperator predicateOperator, int predica

public override string PrefixText => "DropLevel";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Drop Level";
public override string DisplayHeading => "DropLevel";
public override string SummaryText => "Drop Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DodgerBlue;
public override Color SummaryTextColor => Colors.White;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@

namespace Filtration.ObjectModel.BlockItemTypes
{
public class ProphecyBlockItem : StringListBlockItem
public class EnchantmentPassiveNodeBlockItem : StringListBlockItem
{
public override string PrefixText => "Prophecy";
public override string PrefixText => "EnchantmentPassiveNode";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Prophecy";
public override string DisplayHeading => "ClusterJewelsNode";

public override string SummaryText
{
get
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Prophecies: " +
return "Cluster Jewels Node: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Prophecies: " + Items.Take(3)
return "Cluster Jewels Node: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Prophecies: (none)";
return "Cluster Jewels Node: (none)";
}
}

public override Color SummaryBackgroundColor => Colors.DarkMagenta;
public override Color SummaryBackgroundColor => Colors.CornflowerBlue;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.Prophecy;
public override BlockItemOrdering SortOrder => BlockItemOrdering.EnchantmentPassiveNode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public EnchantmentPassiveNumBlockItem(FilterPredicateOperator predicateOperator,

public override string PrefixText => "EnchantmentPassiveNum";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Cluster Jewels Passive Num";
public override string SummaryText => "Cluster Jewels Passive Num " + FilterPredicate;
public override string DisplayHeading => "ClusterJewelsPassive";
public override string SummaryText => "Cluster Jewels Passive " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateBlue;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.EnchantmentPassiveNum;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public FracturedItemBlockItem(bool booleanValue) : base(booleanValue)
}

public override string PrefixText => "FracturedItem";
public override string DisplayHeading => "Fractured Item";
public override Color SummaryBackgroundColor => Colors.Salmon;
public override Color SummaryTextColor => Colors.Black;
public override string DisplayHeading => "FracturedItem";
public override Color SummaryBackgroundColor => Colors.DarkCyan;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.FracturedItem;
}
}
4 changes: 2 additions & 2 deletions Filtration.ObjectModel/BlockItemTypes/GemLevelBlockItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public GemLevelBlockItem(FilterPredicateOperator predicateOperator, int predicat

public override string PrefixText => "GemLevel";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Gem Level";
public override string DisplayHeading => "GemLevel";
public override string SummaryText => "Gem Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryBackgroundColor => Colors.OliveDrab;
public override Color SummaryTextColor => Colors.White;
public override BlockItemOrdering SortOrder => BlockItemOrdering.GemLevel;
public override int Minimum => 0;
Expand Down
Loading

0 comments on commit bea2959

Please sign in to comment.