Skip to content

Commit

Permalink
VeryGoodGrammarAndFormattingChangesFuckCSharpIHateThisDumbAssOOPBullshit
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyAmphibian committed Dec 27, 2024
1 parent 0412972 commit 8b71394
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Content.Client/Construction/UI/ConstructionMenuPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private void OnGridViewRecipeSelected(object? sender, ConstructionPrototype? rec
PopulateInfo(_selected);
}

private int checkfuzzysearch(string hostfield,string searchtext){// return an int for futureproofing, if you wanted to sort by likeness, or something. doesn't matter much now, ints are compatible with boolean logic, anyways.
private int CheckFuzzySearch(string hostfield,string searchtext){// return an int for futureproofing, if you wanted to sort by likeness, or something. doesn't matter much now, ints are compatible with boolean logic, anyways.
int matchedtokens=0;
char[] str_seps={' ',':','.',',','/'}; //flatten punctuation.
string[] searchtokens = searchtext.Split(str_seps); //turn the search into tokens
Expand All @@ -180,9 +180,9 @@ private void OnGridViewRecipeSelected(object? sender, ConstructionPrototype? rec
}


private void OnViewPopulateRecipes(object? sender, (string search, string catagory, bool fuzzysearch) args)
private void OnViewPopulateRecipes(object? sender, (string search, string catagory, bool fuzzySearch) args)
{
var (search, category,fuzzysearch) = args;
var (search, category,fuzzySearch) = args;

var recipes = new List<ConstructionPrototype>();

Expand All @@ -205,7 +205,7 @@ private void OnViewPopulateRecipes(object? sender, (string search, string catago

if (!string.IsNullOrEmpty(search))
{
if ( fuzzysearch? checkfuzzysearch( string.IsNullOrEmpty(recipe.FuzzyName) ? recipe.Name : recipe.FuzzyName,search)==0 :(!recipe.Name.ToLowerInvariant().Contains(search.Trim().ToLowerInvariant())))
if ( fuzzySearch? CheckFuzzySearch( string.IsNullOrEmpty(recipe.FuzzyName) ? recipe.Name : recipe.FuzzyName,search)==0 :(!recipe.Name.ToLowerInvariant().Contains(search.Trim().ToLowerInvariant())))
continue;
}

Expand Down

0 comments on commit 8b71394

Please sign in to comment.