Barotrauma Server Doc
Barotrauma.Voting Class Reference

Classes

interface  IVote
 
class  SubmarineVote
 
class  TransferVote
 

Public Types

enum class  VoteState {
  None = 0 , Started = 1 , Running = 2 , Passed = 3 ,
  Failed = 4
}
 

Public Member Functions

void StopSubmarineVote (bool passed)
 
void StopMoneyTransferVote (bool passed)
 
void StopActiveVote (bool passed)
 
void StartTransferVote (Client starter, Client from, int transferAmount, Client to)
 
void Update (float deltaTime)
 
void ServerRead (IReadMessage inc, Client sender, DoSProtection dosProtection)
 
void ServerWrite (IWriteMessage msg)
 

Static Public Member Functions

static T HighestVoted< T > (VoteType voteType, IEnumerable< Client > voters)
 
static T HighestVoted< T > (VoteType voteType, IEnumerable< Client > voters, out int voteCount)
 
static void ResetVotes (IEnumerable< Client > connectedClients, bool resetKickVotes)
 

Static Public Attributes

static IVote ActiveVote
 

Protected Member Functions

void RegisterRejectedVote (IVote vote)
 

Detailed Description

Member Enumeration Documentation

◆ VoteState

Enumerator
None 
Started 
Running 
Passed 
Failed 

Definition at line 8 of file BarotraumaShared/SharedSource/Networking/Voting.cs.

Member Function Documentation

◆ HighestVoted< T >() [1/2]

static T Barotrauma.Voting.HighestVoted< T > ( VoteType  voteType,
IEnumerable< Client voters 
)
static

◆ HighestVoted< T >() [2/2]

static T Barotrauma.Voting.HighestVoted< T > ( VoteType  voteType,
IEnumerable< Client voters,
out int  voteCount 
)
static

◆ RegisterRejectedVote()

void Barotrauma.Voting.RegisterRejectedVote ( IVote  vote)
protected

◆ ResetVotes()

static void Barotrauma.Voting.ResetVotes ( IEnumerable< Client connectedClients,
bool  resetKickVotes 
)
static

◆ ServerRead()

void Barotrauma.Voting.ServerRead ( IReadMessage  inc,
Client  sender,
DoSProtection  dosProtection 
)

◆ ServerWrite()

void Barotrauma.Voting.ServerWrite ( IWriteMessage  msg)

◆ StartTransferVote()

void Barotrauma.Voting.StartTransferVote ( Client  starter,
Client  from,
int  transferAmount,
Client  to 
)

◆ StopActiveVote()

void Barotrauma.Voting.StopActiveVote ( bool  passed)

◆ StopMoneyTransferVote()

void Barotrauma.Voting.StopMoneyTransferVote ( bool  passed)

◆ StopSubmarineVote()

void Barotrauma.Voting.StopSubmarineVote ( bool  passed)

◆ Update()

void Barotrauma.Voting.Update ( float  deltaTime)

Member Data Documentation

◆ ActiveVote

IVote Barotrauma.Voting.ActiveVote
static