-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add lobby list request filtering #141
Conversation
I omitted comparison types for the filters as they don't seem very useful imho. I'm open to changing this, ofc |
First pretty cool that you are working on this! I just wanted to note that you can have a List/Array of String-, Numeric- and NearValueFilters, that why i would update the LobbyListFilter struct to actually support it. Another point on which im not certain about but the |
Thanks for the kind words! I didnt know you can pass in multiple key value pairs, i assumed you have to call the function multiple times. Is this done by passing a pointer to the array to the underlying steamworks-sys call? I just checked and you are correct, you can only pass in keys shorter than 256 characters |
That is correct, you have to call the function multiple times. What i meant was your helper type And to the comparison types: |
ok so ive added a few things as you suggested and some qol changes
|
Ok so turns out |
closes #140
Summary
added 7 functions for filtering out lobby requests:
set_lobby_list_filter
: adds filters defined in aLobbyListFilter
struct.set_request_lobby_list_string_filter
: adds filters for key value pairs of strings.set_request_lobby_list_numerical_filter
: adds filters for key value pairs of string number types.set_request_lobby_list_near_value_filter
: adds sorting based on which value is closer to the filterset_request_lobby_list_distance_filter
: adds filtering based on geographical distanceset_request_lobby_list_slots_available_filter
: adds filtering based on how many open slots a lobby hasset_request_lobby_list_result_count_filter
: adds the maximum number of results a request can resolve to.added 1 struct:
LobbyListFilter
: struct that holds every option possible for filteringadded 1 enum:
DistanceFilter
: thin wrapper overELobbyDistanceFilter
I included documentation for everything I added and one code example.