diff options
| author | Flaise <[email protected]> | 2019-09-01 15:51:44 -0500 |
|---|---|---|
| committer | Flaise <[email protected]> | 2019-09-01 15:51:44 -0500 |
| commit | 248986d2a67cd23a88658d473ae8f5cae7d9663d (patch) | |
| tree | 2c8739e0208be551e962e93c17623224468b6430 /src/matchmaking.rs | |
| parent | SteamError is Copy and Clone, adjusted callback type constraints (diff) | |
| download | archived-steamworks-rs-248986d2a67cd23a88658d473ae8f5cae7d9663d.tar.xz archived-steamworks-rs-248986d2a67cd23a88658d473ae8f5cae7d9663d.zip | |
Binding for SetLobbyJoinable, FriendState derivations, small documentation adjustments
Diffstat (limited to 'src/matchmaking.rs')
| -rw-r--r-- | src/matchmaking.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/matchmaking.rs b/src/matchmaking.rs index 30e4fa1..f10eff1 100644 --- a/src/matchmaking.rs +++ b/src/matchmaking.rs @@ -168,6 +168,23 @@ impl <Manager> Matchmaking<Manager> { members } } + + /// Sets whether or not a lobby is joinable by other players. This always defaults to enabled + /// for a new lobby. + /// + /// If joining is disabled, then no players can join, even if they are a friend or have been + /// invited. + /// + /// Lobbies with joining disabled will not be returned from a lobby search. + /// + /// Returns true on success, false if the current user doesn't own the lobby. + pub fn set_lobby_joinable(&self, lobby: LobbyId, joinable: bool) -> bool { + unsafe { + sys::SteamAPI_ISteamMatchmaking_SetLobbyJoinable( + self.mm, sys::CSteamID(lobby.0), joinable + ) != 0 + } + } } #[test] |