vote
Vars | |
current_vote | The vote we're currently voting on. |
---|---|
generated_actions | A list of all generated action buttons |
last_vote_time | World.time we started our last vote |
possible_votes | All votes that we can possible vote for. |
voted | A list of all ckeys who have voted for the current vote. |
voting | A list of all ckeys currently voting for the current vote. |
Procs | |
can_vote_start | Checks if we can start a vote. |
end_vote | Ends the current vote. |
initiate_vote | Initiates a vote, allowing all players to vote on something. |
process_vote_result | Process the results of the vote. Collects all the winners, breaks any ties that occur, prints the results of the vote to the world, and finally follows through with the effects of the vote. |
reset | Resets all of our vars after votes conclude / are cancelled. |
submit_multi_vote | Any number of selections per person, and the selection with the most votes wins. |
submit_single_vote | One selection per person, and the selection with the most votes wins. |
Var Details
current_vote
The vote we're currently voting on.
generated_actions
A list of all generated action buttons
last_vote_time
World.time we started our last vote
possible_votes
All votes that we can possible vote for.
voted
A list of all ckeys who have voted for the current vote.
voting
A list of all ckeys currently voting for the current vote.
Proc Details
can_vote_start
Checks if we can start a vote.
- vote_initiator - The mob that initiated the vote.
- forced - Whether we're forcing the vote to go through regardless of existing votes or other circumstances.
Returns TRUE if we can start a vote, FALSE if we can't.
end_vote
Ends the current vote.
initiate_vote
Initiates a vote, allowing all players to vote on something.
- vote_type - The type of vote to initiate. Can be a /datum/vote typepath, a /datum/vote instance, or the name of a vote datum.
- vote_initiator_name - The ckey (if player initiated) or name that initiated a vote. Ex: "UristMcAdmin", "the server"
- vote_initiator - If a person / mob initiated the vote, this is the mob that did it
- forced - Whether we're forcing the vote to go through regardless of existing votes or other circumstances.
process_vote_result
Process the results of the vote. Collects all the winners, breaks any ties that occur, prints the results of the vote to the world, and finally follows through with the effects of the vote.
reset
Resets all of our vars after votes conclude / are cancelled.
submit_multi_vote
Any number of selections per person, and the selection with the most votes wins.
submit_single_vote
One selection per person, and the selection with the most votes wins.