Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_VotingEditorOut Interface Reference
Inheritance diagram for SCR_VotingEditorOut:
SCR_VotingEditorIn SCR_VotingReferendum SCR_VotingBase

Public Member Functions

override bool IsAvailable (int value, bool isOngoing)
 Check if the voting is available in the current world.
 
override bool CanSendNotification (int value)
 Check if notification can be shown for this voting.
 
override void OnVotingEnd (int value=DEFAULT_VALUE, int winner=DEFAULT_VALUE)
 Event called when the voting ends.
 
- Public Member Functions inherited from SCR_VotingEditorIn
override bool Evaluate (out EVotingOutcome outcome)
 Evaluate if the voting can end.
 
override void InitFromTemplate (SCR_VotingBase template, int value, float remainingDuration)
 Initialise voting from given template.
 
- Public Member Functions inherited from SCR_VotingReferendum
override void SetVote (int playerID, int value=DEFAULT_VALUE)
 Set vote of given player.
 
override bool RemoveVote (int playerID)
 Remove vote of given player.
 
override bool RemoveValue (int value)
 Remove all votes for given value.
 
override bool IsMatching (EVotingType type, int value=DEFAULT_VALUE)
 Check if the voting is matching given params.
 
override int GetWinner ()
 Get winner of the vote.
 
override int GetPlayerVote (int playerID)
 
override int GetValue ()
 Get voting value.
 
override void Log ()
 
- Public Member Functions inherited from SCR_VotingBase
bool AddPlayerVotedServer (int playerID)
 A player has voted to approve (server only)
 
bool RemovePlayerVotedServer (int playerID)
 A player has voted to remove or abstain (server only)
 
void SetCurrentVoteCount (int currentVoteCount)
 Set the current amount of votes this vote has.
 
int GetCurrentVoteCount ()
 
int GetJoinServerVoteCooldown ()
 
int GetServerRuntimeIgnoreJoinServerCooldown ()
 
int GetVoteCooldownTime ()
 
bool HasCooldown ()
 
float GetLocalCooldownTimeStamp ()
 
void SetLocalCooldownTimeStamp (float newTimeStamp)
 Set the time stamp for cooldowns for this voting param[in] New Time stamp to set.
 
bool HasInitiatedVotingLocallyOnce ()
 
void SetHasInitiatedVotingLocallyOnce ()
 Set Has initiated voting locally at least once to true.
 
string GetValueName (int value)
 Get name of the value.
 
EVotingType GetType ()
 Get voting type.
 
SCR_VotingUIInfo GetInfo ()
 Get voting UI representation.
 
float GetRemainingDuration ()
 
bool IsValuePlayerID ()
 Check if the voting is about player IDs.
 
void SetVoteLocal (int value)
 Save local vote.
 
void RemoveVoteLocal ()
 Remove local vote.
 
int GetLocalVote ()
 Get local vote.
 
void Update (float timeSlice)
 Periodically update the voting.
 
int GetVoteCountRequired ()
 Get total players needed to make sure the vote is successfull.
 

Protected Member Functions

override bool EvaluateEditor (out EVotingOutcome outcome)
 
override int GetPlayerCount ()
 Get total player count of players that are valid to vote for the issue.
 
- Protected Member Functions inherited from SCR_VotingReferendum
float GetRatio ()
 
- Protected Member Functions inherited from SCR_VotingBase
bool EvaluateParticipation (int voteCount)
 

Additional Inherited Members

- Static Public Attributes inherited from SCR_VotingBase
static const int DEFAULT_VALUE = -1
 
- Protected Attributes inherited from SCR_VotingEditorIn
EEditorMode m_EditorModes
 
SCR_EditorManagerEntity m_EditorManager
 
- Protected Attributes inherited from SCR_VotingReferendum
ref set< int > m_aPlayerIDs = new set<int>()
 
int m_iValue
 
- Protected Attributes inherited from SCR_VotingBase
EVotingType m_Type
 
bool m_bIsValuePlayerID
 
float m_fDuration
 
float m_fThreshold
 
float m_iMinParticipation
 
int m_iMinVotes
 
ref SCR_VotingUIInfo m_Info
 
int m_iJoinServerVoteCooldown
 
int m_iServerRuntimeIgnoreJoinServerCooldown
 
int m_iVoteCooldownTime
 
float m_fVoteCooldownTimeStamp = -1
 
bool m_bHasInitiatedVotingLocallyOnce
 
int m_iLocalValue = DEFAULT_VALUE
 
int m_iCurrentVoteCount
 
ref array< int > m_aPlayersVoted_Server = {}
 

Member Function Documentation

◆ CanSendNotification()

override bool SCR_VotingEditorOut.CanSendNotification ( int value)

Check if notification can be shown for this voting.

Parameters
[in]valueVoting value
Returns
True if can send notification for this voting type

Implements SCR_VotingEditorIn.

◆ EvaluateEditor()

override bool SCR_VotingEditorOut.EvaluateEditor ( out EVotingOutcome outcome)
protected

Implements SCR_VotingEditorIn.

◆ GetPlayerCount()

override int SCR_VotingEditorOut.GetPlayerCount ( )
protected

Get total player count of players that are valid to vote for the issue.

Returns
Total count

Implements SCR_VotingBase.

◆ IsAvailable()

override bool SCR_VotingEditorOut.IsAvailable ( int value,
bool isOngoing )

Check if the voting is available in the current world.

Parameters
[in]valuePotential voting value
[in]isOngoingTrue if the voting was already initiated
Returns
True when available

Implements SCR_VotingEditorIn.

◆ OnVotingEnd()

override void SCR_VotingEditorOut.OnVotingEnd ( int value = DEFAULT_VALUE,
int winner = DEFAULT_VALUE )

Event called when the voting ends.

Parameters
[in]valueVoting value
[in]winnerWinning value

Implements SCR_VotingEditorIn.


The documentation for this interface was generated from the following file: