Table of Contents

Interface IVoteDisplay

Namespace
Uncreated.Warfare.Players
Assembly
Uncreated.Warfare.dll

Implements callbacks for vote updates, allowing them to be displayed on a HUD or similar.

public interface IVoteDisplay

Methods

PlayerJoinedVote(WarfarePlayer)

Invoked on the game thread when a player joins the vote.

void PlayerJoinedVote(WarfarePlayer player)

Parameters

player WarfarePlayer

PlayerLeftVote(WarfarePlayer)

Invoked on the game thread when a player leaves the vote.

void PlayerLeftVote(WarfarePlayer player)

Parameters

player WarfarePlayer

PlayerVoteUpdated(CSteamID, PlayerVoteState, PlayerVoteState)

Invoked when a player enters or changes their vote.

void PlayerVoteUpdated(CSteamID playerId, PlayerVoteState newVote, PlayerVoteState oldVote)

Parameters

playerId CSteamID
newVote PlayerVoteState
oldVote PlayerVoteState

VoteFinished(IVoteResult)

Invoked on the game thread when the vote finishes or gets cancelled.

void VoteFinished(IVoteResult result)

Parameters

result IVoteResult

VoteStarted(in VoteSettings, Func<WarfarePlayer, bool>?)

Invoked on the game thread when the vote first starts.

void VoteStarted(in VoteSettings settings, Func<WarfarePlayer, bool>? playerSelector)

Parameters

settings VoteSettings
playerSelector Func<WarfarePlayer, bool>