Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VotingBase.c File Reference

Go to the source code of this file.

Classes

class  SCR_VotingBase
class  SCR_VotingReferendum

Functions

SCR_VotingReferendum SCR_VotingBase BaseContainerProps ()
float GetRatio ()
override bool AddPlayerVotedServer (int playerID)
override bool RemovePlayerVotedServer (int playerID)
override void SetVote (int playerID, int value=DEFAULT_VALUE)
override bool RemoveVote (int playerID)
override bool RemoveValue (int value)
override bool IsMatching (EVotingType type, int value=DEFAULT_VALUE)
override bool Evaluate (out EVotingOutcome outcome)
override int GetWinner ()
override int GetPlayerVote (int playerID)
override int GetValue ()
override void Log ()
override void InitFromTemplate (SCR_VotingBase template, int startingPlayerID, int value, float remainingDuration)
SCR_VotingReferendum SCR_VotingBase SCR_BaseContainerCustomTitleEnum (EVotingType, "m_Type")

Variables

ref set< intm_aPlayerIDs = new set<int>()
int m_iValue

Function Documentation

◆ AddPlayerVotedServer()

override bool BaseContainerProps::AddPlayerVotedServer ( int playerID)
protected

Definition at line 10 of file SCR_VotingBase.c.

◆ BaseContainerProps()

SCR_VotingReferendum SCR_VotingBase BaseContainerProps ( )

Election of specific type. Once it starts, players can vote for multiple values. The voting ends when proportion of votes for single value is larger than threshold, or if time expires. If the vote had enough participation, the value with the most votes wins, otherwise the vote fails.

◆ Evaluate()

override bool BaseContainerProps::Evaluate ( out EVotingOutcome outcome)
protected

Definition at line 87 of file SCR_VotingBase.c.

◆ GetPlayerVote()

override int BaseContainerProps::GetPlayerVote ( int playerID)
protected

Definition at line 102 of file SCR_VotingBase.c.

◆ GetRatio()

float BaseContainerProps::GetRatio ( )
protected

Definition at line 4 of file SCR_VotingBase.c.

◆ GetValue()

override int BaseContainerProps::GetValue ( )
protected

Definition at line 111 of file SCR_VotingBase.c.

◆ GetWinner()

override int BaseContainerProps::GetWinner ( )
protected

Definition at line 93 of file SCR_VotingBase.c.

◆ InitFromTemplate()

override void BaseContainerProps::InitFromTemplate ( SCR_VotingBase template,
int startingPlayerID,
int value,
float remainingDuration )
protected

Definition at line 127 of file SCR_VotingBase.c.

◆ IsMatching()

override bool BaseContainerProps::IsMatching ( EVotingType type,
int value = DEFAULT_VALUE )
protected

Definition at line 81 of file SCR_VotingBase.c.

◆ Log()

override void BaseContainerProps::Log ( )
protected

Definition at line 117 of file SCR_VotingBase.c.

◆ RemovePlayerVotedServer()

override bool BaseContainerProps::RemovePlayerVotedServer ( int playerID)
protected

Definition at line 32 of file SCR_VotingBase.c.

◆ RemoveValue()

override bool BaseContainerProps::RemoveValue ( int value)
protected

Definition at line 75 of file SCR_VotingBase.c.

◆ RemoveVote()

override bool BaseContainerProps::RemoveVote ( int playerID)
protected

Definition at line 60 of file SCR_VotingBase.c.

◆ SCR_BaseContainerCustomTitleEnum()

SCR_VotingReferendum SCR_VotingBase SCR_BaseContainerCustomTitleEnum ( EVotingType ,
"m_Type"  )

Definition at line 603 of file SCR_VotingBase.c.

◆ SetVote()

override void BaseContainerProps::SetVote ( int playerID,
int value = DEFAULT_VALUE )
protected

Definition at line 54 of file SCR_VotingBase.c.

Variable Documentation

◆ m_aPlayerIDs

ref set<int> m_aPlayerIDs = new set<int>()
protected

Definition at line 0 of file SCR_VotingBase.c.

◆ m_iValue

int m_iValue
protected

Definition at line 1 of file SCR_VotingBase.c.