LobbyQuery String Filter

Added LobbyList FilterStringKeyValue method, fixed spacing on SteamMatchmaking.LobbyEnter_t.Install() parameter
This commit is contained in:
thesupersoup 2019-06-23 14:19:16 -07:00
parent ade772d195
commit 56efc9f48b
2 changed files with 24 additions and 2 deletions

View File

@ -43,6 +43,24 @@ namespace Steamworks.Data
}
#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
internal int? slotsAvailable;
@ -71,7 +89,6 @@ namespace Steamworks.Data
#endregion
void ApplyFilters()
{
if ( distance.HasValue )
@ -88,6 +105,11 @@ namespace Steamworks.Data
{
SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter( maxResults.Value );
}
if( stringFilter.HasValue )
{
SteamMatchmaking.Internal.AddRequestLobbyListStringFilter( stringFilter.Value.Key, stringFilter.Value.Value, LobbyComparison.Equal );
}
}
/// <summary>