![]() |
Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
|
Go to the source code of this file.
Data Structures | |
| class | SCR_VotingManagerComponentClass |
Typedefs | |
| typedef func | ScriptInvoker_VotingManagerStartMethod |
| typedef ScriptInvokerBase< ScriptInvoker_VotingManagerStartMethod > | ScriptInvoker_VotingManagerStart |
| typedef func | ScriptInvoker_VotingManagerEndMethod |
| typedef ScriptInvokerBase< ScriptInvoker_VotingManagerEndMethod > | ScriptInvoker_VotingManagerEnd |
| typedef func | ScriptInvoker_VotingManagerPlayerMethod |
| typedef ScriptInvokerBase< ScriptInvoker_VotingManagerPlayerMethod > | ScriptInvoker_VotingManagerPlayer |
| typedef func | ScriptInvoker_VotingManagerVoteCountChangedMethod |
| typedef ScriptInvokerBase< ScriptInvoker_VotingManagerVoteCountChangedMethod > | ScriptInvoker_VotingManagerVoteCountChanged |
Functions | |
| void | ScriptInvoker_VotingManagerStartMethod (EVotingType type, int value) |
| void | ScriptInvoker_VotingManagerEndMethod (EVotingType type, int value, int winner) |
| void | ScriptInvoker_VotingManagerPlayerMethod (EVotingType type, int value, int playerID) |
| void | ScriptInvoker_VotingManagerVoteCountChangedMethod (EVotingType type, int value, int voteCount) |
| SCR_VotingManagerComponentClass SCR_BaseGameModeComponentClass | Attribute (desc:"Voting Templates, please use configs and the VotingManagerComponent prefab for default gamemode voting templates")] protected ref array< ref SCR_VotingBase > m_aVotingTemplates |
| void | Vote (int playerID, EVotingType type, int value) |
| void | RemoveVote (int playerID, EVotingType type, int value) |
| protected void | RPC_PlayerVoteCountChanged (EVotingType type, int value, int voteCount) |
| bool | StartVoting (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| void | EndVoting (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE, EVotingOutcome outcome=EVotingOutcome.EVALUATE) |
| int | GetPlayerVote (int playerID, EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| bool | GetVoteCounts (EVotingType type, int value, out int currentVotes, out int votesRequired) |
| ScriptInvoker_VotingManagerStart | GetOnVotingStart () |
| ScriptInvoker_VotingManagerVoteCountChanged | GetOnVoteCountChanged () |
| ScriptInvoker_VotingManagerEnd | GetOnVotingEnd () |
| ScriptInvoker_VotingManagerPlayer | GetOnVote () |
| ScriptInvoker_VotingManagerPlayer | GetOnRemoveVote () |
| ScriptInvoker_VotingManagerStart | GetOnVoteLocal () |
| ScriptInvoker_VotingManagerStart | GetOnRemoveVoteLocal () |
| ScriptInvoker_VotingManagerStart | GetOnAbstainVoteLocal () |
| int | GetHostPlayerID () |
| bool | IsVotingAvailable (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| bool | IsVoting (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| bool | IsVotingAboutPlayer (int playerID, EVotingType type) |
| void | AbstainVoteLocally (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| bool | HasAbstainedLocally (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| float | GetRemainingDurationOfVote (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| int | GetVotingsAboutPlayer (int playerID, out notnull array< EVotingType > outVotingTypes, bool onlyTemplates=false, bool onlyAvailable=false) |
| int | GetAllVotingsAboutPlayer (bool aboutPlayer, out notnull array< EVotingType > outVotingTypes, bool onlyTemplates=false, bool onlyAvailable=false) |
| int | GetAllVotingsWithValue (out notnull array< EVotingType > outVotingTypes, array< EVotingType > outValues, bool onlyTemplates=false, bool onlyAvailable=false) |
| int | GetAllVotingValues (EVotingType type, out notnull array< int > outValues, bool onlyTemplates=false, bool onlyAvailable=false) |
| SCR_VotingUIInfo | GetVotingInfo (EVotingType type) |
| string | GetValueName (EVotingType type, int value) |
| void | VoteLocal (EVotingType type, int value) |
| void | RemoveVoteLocal (EVotingType type, int value) |
| int | GetLocalVote (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| bool | IsLocalVote (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE) |
| void | Log () |
| Print out information about all ongoing voting instances. More... | |
| protected void | EndVoting (SCR_VotingBase voting, EVotingOutcome outcome=EVotingOutcome.EVALUATE) |
| protected SCR_VotingBase | FindVoting (EVotingType type, int value) |
| protected SCR_VotingBase | FindTemplate (EVotingType type) |
| protected SCR_VotingBase | CreateVotingInstance (EVotingType type, int value, float remainingDuration=-1, int currentVoteCount=-1) |
| protected void | DeleteVotingInstance (EVotingType type, int value, int winner) |
| protected void | StartVotingBroadcast (EVotingType type, int value) |
| protected void | EndVotingBroadcast (EVotingType type, int value, int winner) |
| override void | OnPlayerConnected (int playerId) |
| override void | OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout) |
| override bool | RplSave (ScriptBitWriter writer) |
| override bool | RplLoad (ScriptBitReader reader) |
| override protected void | EOnFrame (IEntity owner, float timeSlice) |
| void | SCR_VotingManagerComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
| typedef ScriptInvokerBase<ScriptInvoker_VotingManagerEndMethod> ScriptInvoker_VotingManagerEnd |
Definition at line 7 of file SCR_VotingManagerComponent.c.
Definition at line 6 of file SCR_VotingManagerComponent.c.
| typedef ScriptInvokerBase<ScriptInvoker_VotingManagerPlayerMethod> ScriptInvoker_VotingManagerPlayer |
Definition at line 11 of file SCR_VotingManagerComponent.c.
Definition at line 10 of file SCR_VotingManagerComponent.c.
| typedef ScriptInvokerBase<ScriptInvoker_VotingManagerStartMethod> ScriptInvoker_VotingManagerStart |
Definition at line 3 of file SCR_VotingManagerComponent.c.
Definition at line 2 of file SCR_VotingManagerComponent.c.
| typedef ScriptInvokerBase<ScriptInvoker_VotingManagerVoteCountChangedMethod> ScriptInvoker_VotingManagerVoteCountChanged |
Definition at line 15 of file SCR_VotingManagerComponent.c.
Definition at line 14 of file SCR_VotingManagerComponent.c.
| void AbstainVoteLocally | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Local player has abstained from voting eg: VoteRemove was called
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 324 of file SCR_VotingManagerComponent.c.
| SCR_VotingManagerComponentClass SCR_BaseGameModeComponentClass Attribute | ( | desc:"Voting | Templates, |
| please use configs and the VotingManagerComponent prefab for default gamemode voting templates" | |||
| ) |
| protected SCR_VotingBase CreateVotingInstance | ( | EVotingType | type, |
| int | value, | ||
| float | remainingDuration = -1, |
||
| int | currentVoteCount = -1 |
||
| ) |
Definition at line 649 of file SCR_VotingManagerComponent.c.
| protected void DeleteVotingInstance | ( | EVotingType | type, |
| int | value, | ||
| int | winner | ||
| ) |
Definition at line 698 of file SCR_VotingManagerComponent.c.
| void EndVoting | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE, |
||
| EVotingOutcome | outcome = EVotingOutcome.EVALUATE |
||
| ) |
End voting.
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
| [in] | outcome | How should the winner be evaluated |
Definition at line 164 of file SCR_VotingManagerComponent.c.
| protected void EndVoting | ( | SCR_VotingBase | voting, |
| EVotingOutcome | outcome = EVotingOutcome.EVALUATE |
||
| ) |
Definition at line 601 of file SCR_VotingManagerComponent.c.
| protected void EndVotingBroadcast | ( | EVotingType | type, |
| int | value, | ||
| int | winner | ||
| ) |
Definition at line 753 of file SCR_VotingManagerComponent.c.
| override protected void EOnFrame | ( | IEntity | owner, |
| float | timeSlice | ||
| ) |
Definition at line 836 of file SCR_VotingManagerComponent.c.
| protected SCR_VotingBase FindTemplate | ( | EVotingType | type | ) |
Definition at line 635 of file SCR_VotingManagerComponent.c.
| protected SCR_VotingBase FindVoting | ( | EVotingType | type, |
| int | value | ||
| ) |
Definition at line 624 of file SCR_VotingManagerComponent.c.
| int GetAllVotingsAboutPlayer | ( | bool | aboutPlayer, |
| out notnull array< EVotingType > | outVotingTypes, | ||
| bool | onlyTemplates = false, |
||
| bool | onlyAvailable = false |
||
| ) |
Get all active player vote types (not caring which player is the target) Does not care what player the target is or if it is a referendum or election
| [in] | aboutPlayer | Player True to return votings that are about players, false to return those which are not about players |
| [out] | outVotingTypes | Array to be filled with vote types |
| [in] | onlyTemplates | True to scan all voting templates, not only active votings |
| [in] | onlyAvailable | True to scan only votings which can be available in current situation, evaluated by SCR_VotingBase.IsAvailable(). Note that Vote class specific values such as m_bFactionSpecific in SCR_VotingKick are not properly checked and need a IsVotingAvailable specifically if not checking for templates only |
Definition at line 403 of file SCR_VotingManagerComponent.c.
| int GetAllVotingsWithValue | ( | out notnull array< EVotingType > | outVotingTypes, |
| array< EVotingType > | outValues, | ||
| bool | onlyTemplates = false, |
||
| bool | onlyAvailable = false |
||
| ) |
Get all votings with value defined. Returns only referendums, not elections
| [out] | outVotingTypes | Array to be filled with vote types |
| [out] | outValues | Array to be filled with vote values |
| [in] | onlyTemplates | True to scan all voting templates, not only active votings |
| [in] | onlyAvailable | True to scan only votings which can be available in current situation, evaluated by SCR_VotingBase.IsAvailable(). Note that Vote class specific values such as m_bFactionSpecific in SCR_VotingKick are not properly checked and need a IsVotingAvailable specifically if not checking for templates only |
Definition at line 428 of file SCR_VotingManagerComponent.c.
| int GetAllVotingValues | ( | EVotingType | type, |
| out notnull array< int > | outValues, | ||
| bool | onlyTemplates = false, |
||
| bool | onlyAvailable = false |
||
| ) |
Get a array of all active votes with the specific voteType
| [in] | type | The type of active vote that needs to be searched |
| [out] | outValues | list of all active vote values of the given type |
| [in] | onlyTemplates | True to scan all voting templates, not only active votings |
| [in] | onlyAvailable | True to scan only votings which can be available in current situation, evaluated by SCR_VotingBase.IsAvailable(). Note that Vote class specific values such as m_bFactionSpecific in SCR_VotingKick are not properly checked and need a IsVotingAvailable specifically if not checking for templates only |
Definition at line 455 of file SCR_VotingManagerComponent.c.
| int GetHostPlayerID | ( | ) |
Get player ID of the host player.
Definition at line 276 of file SCR_VotingManagerComponent.c.
| int GetLocalVote | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Get local vote for given voting. It is purely informative and does not affect voting outcome
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 564 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerStart GetOnAbstainVoteLocal | ( | ) |
Get event called on player when they remove their vote.
Definition at line 265 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerPlayer GetOnRemoveVote | ( | ) |
Get event called on server when a player removes their vote.
Definition at line 241 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerStart GetOnRemoveVoteLocal | ( | ) |
Get event called on player when they remove their vote.
Definition at line 257 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerPlayer GetOnVote | ( | ) |
Get event called on server when a player casts a vote.
Definition at line 233 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerVoteCountChanged GetOnVoteCountChanged | ( | ) |
Get event called everywhere when a player voted or abstained
Definition at line 217 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerStart GetOnVoteLocal | ( | ) |
Get event called on player when they cast a vote.
Definition at line 249 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerEnd GetOnVotingEnd | ( | ) |
Get event called everywhere when a voting ends (e.g., time runs out, number of votes reaches threshold, or the player about whom the voting was disconnects).
Definition at line 225 of file SCR_VotingManagerComponent.c.
| ScriptInvoker_VotingManagerStart GetOnVotingStart | ( | ) |
Get event called everywhere when a new voting is created.
Definition at line 209 of file SCR_VotingManagerComponent.c.
| int GetPlayerVote | ( | int | playerID, |
| EVotingType | type, | ||
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Get value cast by given player.
| [in] | playerID | Player who cast the vote |
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 177 of file SCR_VotingManagerComponent.c.
| float GetRemainingDurationOfVote | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
| string GetValueName | ( | EVotingType | type, |
| int | value | ||
| ) |
Get name of the value.
| [in] | type | Type of the vote |
| [in] | value | Value |
Definition at line 490 of file SCR_VotingManagerComponent.c.
| bool GetVoteCounts | ( | EVotingType | type, |
| int | value, | ||
| out int | currentVotes, | ||
| out int | votesRequired | ||
| ) |
Get the amount of players needed
| [in] | type | Type of the vote |
| [in] | value | Value of the vote |
| [out] | currentVotes | Current votes the vote has |
| [out] | votesRequired | Votes required to be successfull return True if successfully obtained the requirement data |
Definition at line 194 of file SCR_VotingManagerComponent.c.
| SCR_VotingUIInfo GetVotingInfo | ( | EVotingType | type | ) |
Get UI representation of given voting.
| [in] | type | Type of the vote |
Definition at line 476 of file SCR_VotingManagerComponent.c.
| int GetVotingsAboutPlayer | ( | int | playerID, |
| out notnull array< EVotingType > | outVotingTypes, | ||
| bool | onlyTemplates = false, |
||
| bool | onlyAvailable = false |
||
| ) |
Get all votings about given player. Returns only referendums, not elections e.g., vote to KICK a player is a referendum, but vote to make him/her an ADMIN is election in which multiple players can compete, therefore it's not a vote about the player)
| [in] | playerID | Player ID |
| [out] | outVotingTypes | Array to be filled with vote types |
| [in] | onlyTemplates | True to scan all voting templates, not only active votings |
| [in] | onlyAvailable | True to scan only votings which can be available in current situation, evaluated by SCR_VotingBase.IsAvailable(). Note that Vote class specific values such as m_bFactionSpecific in SCR_VotingKick are not properly checked and need a IsVotingAvailable specifically if not checking for templates only |
Definition at line 375 of file SCR_VotingManagerComponent.c.
| bool HasAbstainedLocally | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
If local player has abstained from voting eg: VoteRemove was called
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 341 of file SCR_VotingManagerComponent.c.
| bool IsLocalVote | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Check if local vote was cast. It is purely informative and does not affect voting outcome
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 579 of file SCR_VotingManagerComponent.c.
| bool IsVoting | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Check if a voting with given params is currently in effect.
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 300 of file SCR_VotingManagerComponent.c.
| bool IsVotingAboutPlayer | ( | int | playerID, |
| EVotingType | type | ||
| ) |
Check if there is a vote of certain type about given player. e.g., is there a vote about player being kicked?
| [in] | playerID | Player ID |
| [in] | type | Type of the vote |
Definition at line 311 of file SCR_VotingManagerComponent.c.
| bool IsVotingAvailable | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Check if a voting is available in the current world.
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 289 of file SCR_VotingManagerComponent.c.
| void Log | ( | ) |
Print out information about all ongoing voting instances.
Definition at line 586 of file SCR_VotingManagerComponent.c.
| void RemoveVote | ( | int | playerID, |
| EVotingType | type, | ||
| int | value | ||
| ) |
Remove previously cast vote. To be called from SCR_VoterComponent! Do not call from elsewhere unless you want to subvert democracy!
| [in] | playerID | Player who cast the vote |
| [in] | type | Type of the vote |
| [in] | value | Voted value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 113 of file SCR_VotingManagerComponent.c.
| void RemoveVoteLocal | ( | EVotingType | type, |
| int | value | ||
| ) |
Remove local vote for given voting. It is purely informative and does not affect voting outcome To be called from SCR_VoterComponent!
| [in] | type | Type of the vote |
| [in] | value | Voted value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 536 of file SCR_VotingManagerComponent.c.
| protected void RPC_PlayerVoteCountChanged | ( | EVotingType | type, |
| int | value, | ||
| int | voteCount | ||
| ) |
Definition at line 130 of file SCR_VotingManagerComponent.c.
| override bool RplLoad | ( | ScriptBitReader | reader | ) |
Definition at line 810 of file SCR_VotingManagerComponent.c.
| override bool RplSave | ( | ScriptBitWriter | writer | ) |
Definition at line 788 of file SCR_VotingManagerComponent.c.
| void SCR_VotingManagerComponent | ( | IEntityComponentSource | src, |
| IEntity | ent, | ||
| IEntity | parent | ||
| ) |
| [in] | src | |
| [in] | ent | |
| [in] | parent |
Definition at line 878 of file SCR_VotingManagerComponent.c.
| void ScriptInvoker_VotingManagerEndMethod | ( | EVotingType | type, |
| int | value, | ||
| int | winner | ||
| ) |
| void ScriptInvoker_VotingManagerPlayerMethod | ( | EVotingType | type, |
| int | value, | ||
| int | playerID | ||
| ) |
| void ScriptInvoker_VotingManagerStartMethod | ( | EVotingType | type, |
| int | value | ||
| ) |
| void ScriptInvoker_VotingManagerVoteCountChangedMethod | ( | EVotingType | type, |
| int | value, | ||
| int | voteCount | ||
| ) |
| bool StartVoting | ( | EVotingType | type, |
| int | value = SCR_VotingBase.DEFAULT_VALUE |
||
| ) |
Start voting.
| [in] | type | Type of the vote |
| [in] | value | Target value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 145 of file SCR_VotingManagerComponent.c.
| protected void StartVotingBroadcast | ( | EVotingType | type, |
| int | value | ||
| ) |
Definition at line 734 of file SCR_VotingManagerComponent.c.
| void Vote | ( | int | playerID, |
| EVotingType | type, | ||
| int | value | ||
| ) |
Vote! If the voting does not exist yet, start it. To be called from SCR_VoterComponent! Do not call from elsewhere unless you want to subvert democracy!
| [in] | playerID | Player who cast the vote |
| [in] | type | Type of the vote |
| [in] | value | Voted value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 69 of file SCR_VotingManagerComponent.c.
| void VoteLocal | ( | EVotingType | type, |
| int | value | ||
| ) |
Save local vote for given voting. It is purely informative and does not affect voting outcome To be called from SCR_VoterComponent!
| [in] | type | Type of the vote |
| [in] | value | Voted value, depends on the type (e.g., for KICK it's player ID) |
Definition at line 505 of file SCR_VotingManagerComponent.c.
| protected ref set<SCR_VotingBase> m_aAbstainedVotingInstances = new set<SCR_VotingBase>() |
Definition at line 33 of file SCR_VotingManagerComponent.c.
| protected ref array<ref SCR_VotingBase> m_aVotingInstances = {} |
Definition at line 32 of file SCR_VotingManagerComponent.c.
| protected float m_fUpdateLength |
Definition at line 31 of file SCR_VotingManagerComponent.c.
| protected float m_fUpdateStep |
Definition at line 28 of file SCR_VotingManagerComponent.c.
| protected int m_iHostPlayerID = -1 |
Definition at line 30 of file SCR_VotingManagerComponent.c.
Definition at line 34 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerStart m_OnAbstainVoteLocal = new ScriptInvoker_VotingManagerStart() |
Definition at line 42 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerPlayer m_OnRemoveVote = new ScriptInvoker_VotingManagerPlayer() |
Definition at line 39 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerStart m_OnRemoveVoteLocal = new ScriptInvoker_VotingManagerStart() |
Definition at line 41 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerPlayer m_OnVote = new ScriptInvoker_VotingManagerPlayer() |
Definition at line 38 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerStart m_OnVoteLocal = new ScriptInvoker_VotingManagerStart() |
Definition at line 40 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerEnd m_OnVotingEnd = new ScriptInvoker_VotingManagerEnd() |
Definition at line 37 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerStart m_OnVotingStart = new ScriptInvoker_VotingManagerStart() |
Definition at line 36 of file SCR_VotingManagerComponent.c.
| protected ref ScriptInvoker_VotingManagerVoteCountChanged m_PlayerVoteCountChanged = new ScriptInvoker_VotingManagerVoteCountChanged() |
Definition at line 43 of file SCR_VotingManagerComponent.c.