mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 16:07:36 +01:00
Implement new voting restrictions into config (#1919)
As per the discussion. If NO_DEAD_VOTE is enabled, only new_player mobs and observers who went from the lobby to observing are barred from voting. Ref this discussion: https://forums.aurorastation.org/viewtopic.php?f=18&t=7866&start=10#p75880
This commit is contained in:
@@ -194,8 +194,15 @@ datum/controller/vote
|
||||
|
||||
proc/submit_vote(var/ckey, var/vote)
|
||||
if(mode)
|
||||
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
|
||||
return 0
|
||||
if(config.vote_no_dead && usr && !usr.client.holder)
|
||||
if (isnewplayer(usr))
|
||||
usr << "<span class='warning'>You must be playing or have been playing to start a vote.</span>"
|
||||
return 0
|
||||
else if (isobserver(usr))
|
||||
var/mob/dead/observer/O = usr
|
||||
if (O.started_as_observer)
|
||||
usr << "<span class='warning'>You must be playing or have been playing to start a vote.</span>"
|
||||
return 0
|
||||
if(vote && vote >= 1 && vote <= choices.len)
|
||||
if(current_votes[ckey])
|
||||
choices[choices[current_votes[ckey]]]--
|
||||
@@ -211,6 +218,16 @@ datum/controller/vote
|
||||
// Transfer votes are their own little special snowflake
|
||||
var/next_allowed_time = 0
|
||||
if (vote_type == "crew_transfer")
|
||||
if (config.vote_no_dead && !usr.client.holder)
|
||||
if (isnewplayer(usr))
|
||||
usr << "<span class='warning'>You must be playing or have been playing to start a vote.</span>"
|
||||
return 0
|
||||
else if (isobserver(usr))
|
||||
var/mob/dead/observer/O = usr
|
||||
if (O.started_as_observer)
|
||||
usr << "<span class='warning'>You must be playing or have been playing to start a vote.</span>"
|
||||
return 0
|
||||
|
||||
if (last_transfer_vote)
|
||||
next_allowed_time = (last_transfer_vote + config.vote_delay)
|
||||
else
|
||||
|
||||
@@ -162,7 +162,8 @@ VOTE_AUTOGAMEMODE_TIMELEFT 100
|
||||
## min delay (deciseconds) before a transfer vote can be called (default 120 minutes)
|
||||
TRANSFER_TIMEOUT 72000
|
||||
|
||||
## prevents dead players from voting or starting votes
|
||||
## Prevets lobby-sitters and ghosts who went straight from the lobby to observing from voting.
|
||||
## Ghosts who died will still be able to vote.
|
||||
#NO_DEAD_VOTE
|
||||
|
||||
## players' votes default to "No vote" (otherwise, default to "No change")
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: Skull132
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- tweak: "Modified the voting limitation system to only prohibit voting for lobby sitters and ghosts who went straight from the lobby to observing."
|
||||
Reference in New Issue
Block a user