PartyRoomclass
A Party. A Party with your friends.
Methods19
Showing 19 methods
public void CancelJoin()
Cancel a download, wait for the leader, or connection attempt while staying in the party. Does nothing in other stages, including after joining. Must be called on the main thread.
void—public void ConfigureGame(string gameIdent, Sandbox.Modals.CreateGameResults settings)
Save the setup for the currently selected game. Only the leader can change it.
| Parameter | Type | Description |
|---|---|---|
| gameIdent | string | — |
| settings | CreateGameResults | — |
void—public static System.Threading.Tasks.Task`1<Sandbox.PartyRoom.Entry[]> Find()
Find open parties with space for another member.
public static System.Threading.Tasks.Task`1<System.Nullable`1<Sandbox.PartyRoom.Entry>> GetEntryAsync(ulong id)
Refresh a party's details without joining it. Returns null if it is no longer available.
| Parameter | Type | Description |
|---|---|---|
| id | ulong | — |
public Sandbox.PartyRoom.MemberStatus GetMemberStatus(Sandbox.Friend member)
What this party member is doing - downloading the game, waiting, in it. Each member shares their own through the lobby, so this is at most half a second old.
| Parameter | Type | Description |
|---|---|---|
| member | Friend | — |
public bool IsGameSelected(Sandbox.Package package)
Whether this package matches the chosen game, including its revision when one was selected.
| Parameter | Type | Description |
|---|---|---|
| package | Package | — |
bool—public bool IsMemberReady(Sandbox.Friend member)
Whether this member is ready for the current game setup. The leader starts the game instead.
| Parameter | Type | Description |
|---|---|---|
| member | Friend | — |
bool—public static System.Threading.Tasks.Task`1<bool> Join(ulong id)
Join a party by its identifier, checking that it still exists and is a party.
| Parameter | Type | Description |
|---|---|---|
| id | ulong | — |
Task<bool>—public void Kick(Sandbox.SteamId friend)
Kick a member from the party. Only the owner can kick members.
| Parameter | Type | Description |
|---|---|---|
| friend | SteamId | — |
void—public void Leave()
Leave this party and stop following its leader.
void—public void MakePublic()
Make this party discoverable and joinable by everyone. Only the leader can do this.
void—public void RetryJoin()
Retry a failed or cancelled join on the next party update. Does nothing in other stages. Must be called on the main thread.
void—public void SelectGame(Sandbox.Package package)
Publish the leader's choice of game. Pass null to clear the choice.
| Parameter | Type | Description |
|---|---|---|
| package | Package | — |
void—public void SendChatMessage(string text)
| Parameter | Type | Description |
|---|---|---|
| text | string | — |
void—public bool SetOwner(Sandbox.SteamId friend)
Set the owner to someone else. You need to be the owner
| Parameter | Type | Description |
|---|---|---|
| friend | SteamId | — |
bool—public void SetPublic(bool isPublic)
Switch between a public party and an invitation-only party. Only the leader can do this.
| Parameter | Type | Description |
|---|---|---|
| isPublic | bool | — |
void—public void SetReady(bool ready)
Share whether the local member is ready for the selected game and its saved settings. Changing the setup clears everyone's readiness.
| Parameter | Type | Description |
|---|---|---|
| ready | bool | — |
void—No results match this filter.
Properties24
Showing 24 properties
public static Sandbox.PartyRoom Sandbox.PartyRoom.Current { get; set; }
The party we currently belong to, if any.
public System.Nullable`1<Sandbox.Menu.LoadingProgress> Sandbox.PartyRoom.DownloadProgress { get; set; }
A snapshot of this player's current download progress, or null when unavailable.
public System.Nullable`1<Sandbox.Menu.LoadingProgress> Sandbox.PartyRoom.HostDownloadProgress { get; set; }
A snapshot of the leader's download progress, separate from this player's download. Null when the leader is not loading or has not reported valid progress.
public bool Sandbox.PartyRoom.IsPublic { get; set; }
Whether this party is discoverable and joinable by everyone.
bool—public string Sandbox.PartyRoom.JoinError { get; set; }
A human-readable failure message, or null when there is no failure. Do not use it to determine the join stage.
string—public Sandbox.PartyRoom.JoinStage Sandbox.PartyRoom.JoiningStage { get; set; }
The local follower's join stage, or `Sandbox.PartyRoom.JoinStage.None` when no attempt exists.
public Sandbox.PartyRoom.OwnerJoinState Sandbox.PartyRoom.JoinState { get; set; }
The leader's advertised join state. Unknown or missing states report `Sandbox.PartyRoom.OwnerJoinState.None`.
public int Sandbox.PartyRoom.MaxMembers { get; set; }
The maximum number of members allowed in this party.
int—public int Sandbox.PartyRoom.MemberCount { get; set; }
The current number of members in this party.
int—public System.Collections.Generic.IEnumerable`1<Sandbox.Friend> Sandbox.PartyRoom.Members { get; set; }
A list of members in this party.
public string Sandbox.PartyRoom.Name { get; set; }
The party name, filtered using the local player's chat filter settings. Only the leader can change it.
string—public string Sandbox.PartyRoom.PackageIdent { get; set; }
What package is this party's owner playing?
string—public string Sandbox.PartyRoom.PackageTitle { get; set; }
The game title advertised by the party leader, which may be empty.
string—public string Sandbox.PartyRoom.SelectedGameIdent { get; set; }
The game the party intends to play, without starting downloads or following the leader.
string—public System.Nullable`1<Sandbox.Modals.CreateGameResults> Sandbox.PartyRoom.SelectedGameSettings { get; set; }
A copy of the leader's saved setup for the selected game, or null if it has not been configured.
public string Sandbox.PartyRoom.SelectedGameTitle { get; set; }
The title of the game the party intends to play.
string—public bool Sandbox.PartyRoom.VoiceCommunicationAllowed { get; set; }
Allow communication via voice when in the main menu.
bool—public bool Sandbox.PartyRoom.VoiceRecording { get; set; }
Whether we are recording voice for the party.
bool—No results match this filter.