Closed kheldorn closed 7 years ago
This could be added, but I don't want to implement it for a few good reasons:
There is no native way to do this in C#. If I wanted to implement it I'd need to write a bunch of extra comparator code and use it - current code is based on simple LINQ OrderBy()
query.
You automatically assumed that everybody uses numeric order - this is not the case. In addition to that, ASF is multi-culture app and some cultures might use different meaning what is "natural order" for them - current order is universal as it's the same on every OS. I don't want to bring more culture differences, ASF already had tough time solving Turkish "i".
You can solve this yourself by adding 0
to first few of your bots, while if I changed sorting to your proposed one, one could no longer return back to previous one, and this is definitely not a candidate for config property.
Probably most important point - order should not matter when using any commands. !redeem
command for a long time had no fixed order and it was up to ASF as an implementation detail to decide how to forward keys, and I liked it this way, but users wanted to have a way to tell what order bots will follow - this is why I added alphabetical order on top of that, only to have a common order that I could put in a wiki, not a customizable way to choose which bots will get a key - I already said it in the past and I'll keep repeating it, order should not matter, if it matters for you, use given bot commands instead. Order is there for your convenience and explanation, not for a customization.
I'd probably be like "sure why not" if I had an easy way to do this, since I already have sorting in place, but point 1 and 4 are killing this issue for me, since I'm not only fan of order being an implementation detail, but also strong fan of having clear and nice code without too many fireworks that are not relevant.
Solution: Append 0
to your bot names, so bot05
is in front of bot10
.
Fair enough.
The wiki states "The actual bots order for all of the redeeming scenarios is alphabetical, excluding bots that are unavailable (not connected, stopped or likewise)."
While this is all fine I was wondering if the alphabetical order could be changed to natural order.
Let me explain:
My bots are called (not really): bot1, bot2, bot3, ... bot8, bot9, bot10, bot11, ... bot19, bot20, bot21, ... bot29, bot30, ...
Currently this makes the order ASF processes the bots the following: bot1, bot10, bot11, bot12, ... bot19, bot2, bot20, bot21, ... bot29, bot3, bot30, ... bot39, bot4, bot5, bot6, bot7, bot8, bot9
Any chance to get a natural sort order implemented that sorts the bots like a human would sort them?