Closed lightonflux closed 6 years ago
How about automatically sorting them by latest use of you?
That would change to often. Maybe by frequently used. So the most used station is at the top and the least used station at the bottom.
Maybe by frequently used.
That would mean you need to save it to disk because it needs to remember that after server restart.
Is that a bad thing? You need to save the stations to disk any way. You don't need to write after every use. You can have a counter that remembers the times the stations are used. Then after X uses of travelnet (invocations) or Y time (or a combination of both). E.g. save after 5mins or 10 uses, which ever comes first. (Just random example numbers).
That way you reduce writes and it should work good enough for most servers. As you don't restart all the time. If we want to tune it a bit we could have different intervals/time limits for servers and singleplayer (if that is possible for a mod). So singleplayer saves more often, because it has less players and shutsdown more often, and on a server which runs for long times you write to disk less often.
Sorting the station names by last used/most popular would change the order quite frequently in unexpected ways, depending mostly on what other players do. That seems very chaotic and not too helpful to me. The problem with less well sorted lists due to reattached travelnets does occour sometimes and is annoying for the users. I've added the buttons "move up" and "move down" which will move the current station up or down in the list and hopefully address the issue.
The buttons where added in commit 580cd12f964c0519f6056a4351d2d9849382387a
Sometimes you have to move the travelbox because of constructions. Then the button of the station moves to the buttom of the list. Which is quite annoying. It would be nice if one could change the button order so it does not depends on the placing order.