Barotrauma Client Doc
Barotrauma.Networking.Client Class Reference
Inheritance diagram for Barotrauma.Networking.Client:

Public Member Functions

 Client (string name, byte sessionId)
 
GetVote< T > (VoteType voteType)
 
void SetVote (VoteType voteType, object value)
 
bool SessionOrAccountIdMatches (string userId)
 
void WritePermissions (IWriteMessage msg)
 
void ReadPermissions (IReadMessage inc)
 
void Dispose ()
 
void UpdateVoipSound ()
 
void SetPermissions (ClientPermissions permissions, IEnumerable< Identifier > permittedConsoleCommands)
 
void SetPermissions (ClientPermissions permissions, IEnumerable< DebugConsole.Command > permittedConsoleCommands)
 
void GivePermission (ClientPermissions permission)
 
void RemovePermission (ClientPermissions permission)
 
bool HasPermission (ClientPermissions permission)
 
void ResetVotes ()
 

Static Public Member Functions

static void ReadPermissions (IReadMessage inc, out ClientPermissions permissions, out List< DebugConsole.Command > permittedCommands)
 
static string SanitizeName (string name)
 

Public Attributes

string Name
 
UInt16 NameId
 
readonly byte SessionId
 An ID for this client for the current session. THIS IS NOT A PERSISTENT VALUE. DO NOT STORE THIS LONG-TERM. IT CANNOT BE USED TO IDENTIFY PLAYERS ACROSS SESSIONS. More...
 
AccountInfo AccountInfo
 
LanguageIdentifier Language
 
UInt16 Ping
 
Identifier PreferredJob
 
CharacterTeamType TeamID
 
CharacterTeamType PreferredTeam
 
bool UsingFreeCam
 Is the client using the 'freecam' console command? More...
 
UInt16 CharacterID
 
bool HasSpawned
 
HashSet< IdentifierGivenAchievements = new HashSet<Identifier>()
 
ClientPermissions Permissions = ClientPermissions.None
 
readonly HashSet< DebugConsole.CommandPermittedConsoleCommands = new HashSet<DebugConsole.Command>()
 
bool IsOwner
 
bool IsDownloading
 
float Karma
 

Static Public Attributes

const int MaxNameLength = 32
 

Properties

static IReadOnlyList< ClientClientList [get]
 
ulong SteamID [get]
 
Option< AccountIdAccountId [get]
 The ID of the account used to authenticate this session. This value can be used as a persistent value to identify players in the banlist and campaign saves. More...
 
Character????? Character [get, set]
 
Vector2? SpectatePos [get, set]
 
bool Spectating [get]
 
bool?? Muted [get, set]
 
bool HasPermissions [get]
 
VoipQueue VoipQueue [get]
 
bool InGame [get, set]
 
VoipSound VoipSound [get, set]
 
float RadioNoise [get, set]
 
bool?? MutedLocally [get, set]
 
bool AllowKicking [get]
 

Detailed Description

Definition at line 10 of file LuaBarotraumaAdditions.cs.

Constructor & Destructor Documentation

◆ Client()

Barotrauma.Networking.Client.Client ( string  name,
byte  sessionId 
)

Member Function Documentation

◆ Dispose()

void Barotrauma.Networking.Client.Dispose ( )

◆ GetVote< T >()

T Barotrauma.Networking.Client.GetVote< T > ( VoteType  voteType)

◆ GivePermission()

void Barotrauma.Networking.Client.GivePermission ( ClientPermissions  permission)

◆ HasPermission()

bool Barotrauma.Networking.Client.HasPermission ( ClientPermissions  permission)

◆ ReadPermissions() [1/2]

void Barotrauma.Networking.Client.ReadPermissions ( IReadMessage  inc)

◆ ReadPermissions() [2/2]

static void Barotrauma.Networking.Client.ReadPermissions ( IReadMessage  inc,
out ClientPermissions  permissions,
out List< DebugConsole.Command permittedCommands 
)
static

◆ RemovePermission()

void Barotrauma.Networking.Client.RemovePermission ( ClientPermissions  permission)

◆ ResetVotes()

void Barotrauma.Networking.Client.ResetVotes ( )

◆ SanitizeName()

static string Barotrauma.Networking.Client.SanitizeName ( string  name)
static

◆ SessionOrAccountIdMatches()

bool Barotrauma.Networking.Client.SessionOrAccountIdMatches ( string  userId)

◆ SetPermissions() [1/2]

void Barotrauma.Networking.Client.SetPermissions ( ClientPermissions  permissions,
IEnumerable< DebugConsole.Command permittedConsoleCommands 
)

◆ SetPermissions() [2/2]

void Barotrauma.Networking.Client.SetPermissions ( ClientPermissions  permissions,
IEnumerable< Identifier permittedConsoleCommands 
)

◆ SetVote()

void Barotrauma.Networking.Client.SetVote ( VoteType  voteType,
object  value 
)

◆ UpdateVoipSound()

void Barotrauma.Networking.Client.UpdateVoipSound ( )

◆ WritePermissions()

void Barotrauma.Networking.Client.WritePermissions ( IWriteMessage  msg)

Member Data Documentation

◆ AccountInfo

AccountInfo Barotrauma.Networking.Client.AccountInfo

◆ CharacterID

UInt16 Barotrauma.Networking.Client.CharacterID

◆ GivenAchievements

HashSet<Identifier> Barotrauma.Networking.Client.GivenAchievements = new HashSet<Identifier>()

◆ HasSpawned

bool Barotrauma.Networking.Client.HasSpawned

◆ IsDownloading

bool Barotrauma.Networking.Client.IsDownloading

◆ IsOwner

bool Barotrauma.Networking.Client.IsOwner

◆ Karma

float Barotrauma.Networking.Client.Karma

◆ Language

LanguageIdentifier Barotrauma.Networking.Client.Language

◆ MaxNameLength

const int Barotrauma.Networking.Client.MaxNameLength = 32
static

◆ Name

string Barotrauma.Networking.Client.Name

◆ NameId

UInt16 Barotrauma.Networking.Client.NameId

◆ Permissions

ClientPermissions Barotrauma.Networking.Client.Permissions = ClientPermissions.None

◆ PermittedConsoleCommands

readonly HashSet<DebugConsole.Command> Barotrauma.Networking.Client.PermittedConsoleCommands = new HashSet<DebugConsole.Command>()

◆ Ping

UInt16 Barotrauma.Networking.Client.Ping

◆ PreferredJob

Identifier Barotrauma.Networking.Client.PreferredJob

◆ PreferredTeam

CharacterTeamType Barotrauma.Networking.Client.PreferredTeam

◆ SessionId

readonly byte Barotrauma.Networking.Client.SessionId

An ID for this client for the current session. THIS IS NOT A PERSISTENT VALUE. DO NOT STORE THIS LONG-TERM. IT CANNOT BE USED TO IDENTIFY PLAYERS ACROSS SESSIONS.

Definition at line 37 of file BarotraumaShared/SharedSource/Networking/Client.cs.

◆ TeamID

CharacterTeamType Barotrauma.Networking.Client.TeamID

◆ UsingFreeCam

bool Barotrauma.Networking.Client.UsingFreeCam

Is the client using the 'freecam' console command?

Definition at line 101 of file BarotraumaShared/SharedSource/Networking/Client.cs.

Property Documentation

◆ AccountId

Option<AccountId> Barotrauma.Networking.Client.AccountId
get

The ID of the account used to authenticate this session. This value can be used as a persistent value to identify players in the banlist and campaign saves.

Definition at line 46 of file BarotraumaShared/SharedSource/Networking/Client.cs.

◆ AllowKicking

bool Barotrauma.Networking.Client.AllowKicking
get

◆ Character

Character????? Barotrauma.Networking.Client.Character
getset

◆ ClientList

IReadOnlyList<Client> Barotrauma.Networking.Client.ClientList
staticget

Definition at line 12 of file LuaBarotraumaAdditions.cs.

◆ HasPermissions

bool Barotrauma.Networking.Client.HasPermissions
get

◆ InGame

bool Barotrauma.Networking.Client.InGame
getset

◆ Muted

bool?? Barotrauma.Networking.Client.Muted
getset

◆ MutedLocally

bool?? Barotrauma.Networking.Client.MutedLocally
getset

◆ RadioNoise

float Barotrauma.Networking.Client.RadioNoise
getset

◆ SpectatePos

Vector2? Barotrauma.Networking.Client.SpectatePos
getset

◆ Spectating

bool Barotrauma.Networking.Client.Spectating
get

◆ SteamID

ulong Barotrauma.Networking.Client.SteamID
get

Definition at line 26 of file LuaBarotraumaAdditions.cs.

◆ VoipQueue

VoipQueue Barotrauma.Networking.Client.VoipQueue
get

◆ VoipSound

VoipSound Barotrauma.Networking.Client.VoipSound
getset