vote improvements

Lets admins skip vote wait (so long as one isn't in progress), gives feedback to people who try to start a vote too soon.
This commit is contained in:
Remie Richards
2016-04-29 17:17:49 +01:00
parent 407ae0e7cd
commit a5ec86da08

View File

@@ -145,9 +145,19 @@ var/datum/subsystem/vote/SSvote
/datum/subsystem/vote/proc/initiate_vote(vote_type, initiator_key)
if(!mode)
if(started_time != null)
if(started_time)
var/next_allowed_time = (started_time + config.vote_delay)
if(next_allowed_time > world.time)
if(mode)
usr << "<span class='warning'>There is already a vote in progress! please wait for it to finish.</span>"
return 0
var/admin = FALSE
var/ckey = ckey(initiator_key)
if((admin_datums[ckey]) || (ckey in deadmins))
admin = TRUE
if(next_allowed_time > world.time && !admin)
usr << "<span class='warning'>A vote was initiated recently, you must wait roughly [(next_allowed_time-world.time)/10] seconds before a new vote can be started!</span>"
return 0
reset()