Content Patcher

Content Patcher

378k Downloads

[Lookup Anything] Change character taste sorting

Icehawk78 opened this issue ยท 2 comments

commented

It might be more useful to sort the characters' loves/likes by listing what is in your inventory first, and what is owned by you second, and then everything else, and only alphabetical after that.

I'm not nearly as familiar with C# LINQ lambdas, but I imagine you should be able to do something (in LookupAnything/Framework/Fields/CharacterGiftTastesField.cs) to the effect of

Item[] items = giftTastes[showTaste]
                        .OrderBy(x => {return Array.IndexOf(x, inventory) > -1 ? 1 : -1;})
                        .ThenBy(...).ToArray() 

as long as you move the initialization to after ownedItems and inventory have been declared.

commented

Hi @Icehawk78. That makes sense; I'll look into it for an upcoming release. :)

commented

Done in develop for the upcoming release.