NetroScript / backpack.tf-miscellaneous-extensions

This is an userscript to add miscellaneous functionality to backpack.tf.
Apache License 2.0
12 stars 7 forks source link

Better Spell Sorting #4

Closed joekiller closed 3 years ago

joekiller commented 3 years ago

Fix Voices from below detection. Normalize spell sorting and add alternative sort. The first spell sort always sorts by color effect first and the alt always sorts by footprints first.

joekiller commented 3 years ago

hrm. I might add a double spelled grouping for the weapons

NetroScript commented 3 years ago

Do you want to change any additional stuff in this PR, or would that be all you want to change? (Considering you not being sure yet).

joekiller commented 3 years ago

I got a little more coming thanks

joekiller commented 3 years ago

okay ready

NetroScript commented 3 years ago

Thanks for the PR 👍, but I would like to ask for 3 slight changes before merging it.

And should you feel like you have the spare time for it, I could also imagine it to replace the reverse functionality (when clicking a sort twice) with your alternative sorting specifically for the spelled items 😅. Because then you would still only have 1 entry in the list, but would still have the functionality you want.

(What I mean, if you click a sort, it shows for example 1,2,3,4 and when you click it again it shows 4,3,2,1 -> and because reversing the sort is useless for spelled items (or also for example painted items in most cases) it would be possible to change the sort based on when you click the function. Meaning the function sortBySpell would check if it was the lasttype, and if so use the alternative sorting and change the typename (like the current reverse in genericSort does), so if it gets clicked a 3rd time it is sorting type1 again))

If you don't have the time for it, I might do that at some point.

joekiller commented 3 years ago

Those are good ideas. I don't know what happened in those line endings but couldn't immediately fix it. I'll try to address the issue and ideas but we can race because I'm a tortoise right now for bandwidth.

joekiller commented 3 years ago

I think that does what you asked. Hope this is helpful!

NetroScript commented 3 years ago

Perfect 👌 that is exactly what I meant. Thanks for that.

Considering the line endings, now all files changed to LF, so that should be okay, considering LF is more common than CRLF. A bit messy in the commit history but should be fine for a one time thing.