mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-28 15:45:29 +03:00
LobbyQuery String Filter
Added LobbyList FilterStringKeyValue method, fixed spacing on SteamMatchmaking.LobbyEnter_t.Install() parameter
This commit is contained in:
parent
ade772d195
commit
56efc9f48b
@ -43,6 +43,24 @@ public LobbyQuery FilterDistanceWorldwide()
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region String key/value filter
|
||||||
|
internal MatchMakingKeyValuePair_t? stringFilter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Filter by specified key/value pair
|
||||||
|
/// </summary>
|
||||||
|
public LobbyQuery FilterStringKeyValue( string nKey, string nValue )
|
||||||
|
{
|
||||||
|
stringFilter = new MatchMakingKeyValuePair_t
|
||||||
|
{
|
||||||
|
Key = nKey,
|
||||||
|
Value = nValue
|
||||||
|
};
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Slots Filter
|
#region Slots Filter
|
||||||
internal int? slotsAvailable;
|
internal int? slotsAvailable;
|
||||||
|
|
||||||
@ -71,7 +89,6 @@ public LobbyQuery WithMaxResults( int max )
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
void ApplyFilters()
|
void ApplyFilters()
|
||||||
{
|
{
|
||||||
if ( distance.HasValue )
|
if ( distance.HasValue )
|
||||||
@ -88,6 +105,11 @@ void ApplyFilters()
|
|||||||
{
|
{
|
||||||
SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter( maxResults.Value );
|
SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter( maxResults.Value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( stringFilter.HasValue )
|
||||||
|
{
|
||||||
|
SteamMatchmaking.Internal.AddRequestLobbyListStringFilter( stringFilter.Value.Key, stringFilter.Value.Value, LobbyComparison.Equal );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user