SteamLobbyBrowser - stingray.SteamLobbyBrowser object reference - Stingray Lua API Reference

stingray.SteamLobbyBrowser object reference

Description

The SteamLobbyBrowser provides access to the list of game lobbies available on the Steam.

Call refresh() to refresh the list.

Call num_lobbies() to get the number of available lobbies, and call lobby() to retrieve detailed information about each of those lobbies. You can use these details to determine if you want to join the lobby, and the Steam ID needed in order to connect.

Functions

Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

distance :

integer

A distance filter constant that indicates the required distance relationship between the player and the lobbies.

Returns
This function does not return any values.
Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

key :

string

The key that the filter applies to.

value :

any(string, integer)

The string or integer value to compare with the value stored in the lobby.

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.

comp :

integer

A comparison constant that indicates how the filter value should be compared to the lobby value.

Returns
This function does not return any values.
Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

key :

string

The key that the filter applies to.

value :

integer

The number to match. Note that this does not specify how close an integer must be to be a match.

Returns
This function does not return any values.
Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

slots :

integer

The minimum number of free slots.

Returns
This function does not return any values.
Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

index :

integer

The index of the lobby whose data you want to retrieve, within the list maintained by the lobby browser.

key :

string

A string key that describes the value.

Returns

string

The value stored for the specified key.

Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

boolean

Returns true if the list is currently refreshing, or false otherwise.

If this function returns true, calling refresh() will have no effect.

Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

i :

integer

The index of the lobby whose data you want to retrieve, within the list maintained by the lobby browser.

Returns

network_steam_lobby_info

A table that contains the information retrieved for the lobby.

Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

integer

The number of available lobbies.

Parameters

self :

stingray.SteamLobbyBrowser

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

Lobby Filter constants

The constants you can use when adding a comparison filter to the lobby browser in a call to add_filter().

EQUAL : integer

Equals to.

GREATER : integer

Greater than.
Greater or equal to.

LESS : integer

Less than.

LESS_OR_EQUAL : integer

Less than or equal to.

NOT_EQUAL : integer

Not equal to.

Lobby Filter constants

The constants you can use when adding a distance-based filter to the lobby browser in a call to add_distance_filter().

CLOSE : integer

Only same immediate region.

This is the default.

FAR : integer

About half-way around the globe (expect high latency).

WORLD : integer

No filtering (not recommended, expect multiple seconds of latency between the clients).