Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues #19: Player Count Filters #91

Closed

Conversation

ArthurMousatov
Copy link

@ArthurMousatov ArthurMousatov commented Jun 1, 2023

As per Issue #19, this PR adds 3 new filters: Filtering Full Servers, Filtering Max Players, Filtering Min Players.

image

There is, however, a small issue with the NumericUpDown AvaloniaUI element: it does not allow null-able values (yet? see: AvaloniaUI/Avalonia#8113). Because of this, once the player count max value is set, there is no way to reset it, For now, I see 3 solutions:

  • Check and see if an updated AvaloniaUI has the nullable Numeric Value
  • Set a sensible default for max/min to specify we don't want to use these filters (-1?)
  • Use a default Text Input Box instead of a NumericUpDown box

Open to Input!

@ArthurMousatov ArthurMousatov changed the title Player count filters Issues #19: Player Count Filters Jun 1, 2023
@PJB3005
Copy link
Member

PJB3005 commented Jun 11, 2023

For the count filters thing, I think maybe the best solution would be a separate check box that enables the number field?

@ArthurMousatov
Copy link
Author

For the count filters thing, I think maybe the best solution would be a separate check box that enables the number field?

Sure, I pushed some changes.

image

@PJB3005
Copy link
Member

PJB3005 commented Aug 8, 2023

Sorry for taking so long to get to this. I'll just quickly clean it up and merge it.

PJB3005 added a commit that referenced this pull request Aug 9, 2023
Based on #91

I ended up doing this somewhat differently. The ServerFilter model (and the DB table) were intended to be a set, so storing the actual count values in them didn't make much sense. Instead I decided to store the actual count values as a regular CVar. This also meant the code for the basic filters handling didn't need massive revamps.
@PJB3005
Copy link
Member

PJB3005 commented Aug 9, 2023

Done in that commit.

@PJB3005 PJB3005 closed this Aug 9, 2023
Skyedra pushed a commit to Skyedra/SS14.Launcher that referenced this pull request Aug 28, 2023
… Hide Empty / Hide Full

Based on space-wizards#91

I ended up doing this somewhat differently. The ServerFilter model (and the DB table) were intended to be a set, so storing the actual count values in them didn't make much sense. Instead I decided to store the actual count values as a regular CVar. This also meant the code for the basic filters handling didn't need massive revamps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants