Add a new server sorting method, Filtered Connected Drivers#162
Open
isaac-weisberg wants to merge 3 commits into
Open
Add a new server sorting method, Filtered Connected Drivers#162isaac-weisberg wants to merge 3 commits into
isaac-weisberg wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the server list of Content Manager, you can already sort servers by Connected Drivers.
However, nowadays there is a problem where server owners have some users be permanently listed as connected on the server, while not actually being connected to them, as a form of reserving a slot for a player. This causes the server to be displayed as if has 5 players on it, it's sorted accordingly, however, if you try to join it, you will find that the server is actually empty.
I also believe that the mechanisms involved here are not related in any way to the booking system - these phantom drivers are displayed literally as if they are random players already racing on the server, when they are not.
This limits the usefulness of Connected Drivers sorting because the core intent is to find servers that have players right now that you can race against.
I propose adding a new setting to Online settings of Content Manager, Filtered Connected Drivers and a new sorting mode.
Settings -> Content Manager -> Online -> Filtered Connected Drivers.Example:
Settings -> Content Manager -> Online -> Filtered Connected DriverstoSettings -> Content Manager -> Online -> Filtered Connected Drivers, effectively causing it to count as having "0 drivers" in the sorting algorithm.The default value for the filtering list is not provided.
Also the solution is a bit inefficient because it recalculates the driver list on every comparator call between 2 server instances, meaning that there is up to an exponential recalculation of filtered driver names in relation to the number of servers to sort. A good way to improve this is to make the filtered list of drivers count be stored on
ServerEntry, however, this will mean updating every server entry with the new filter list every time we go back to the server list, I imagine. I can do that too if necessary.