votes now show number of votes, no longer mute OOC, and show results. It is no longer possible to call a crew transfer during red/delta alert, and a new proc called autotransfer() has been added, but has yet to have anything to trigger it.

This commit is contained in:
DJSnapshot
2013-09-24 23:41:21 -07:00
parent a11f1d4bdb
commit caa6cd6c8a
3 changed files with 21 additions and 7 deletions

View File

@@ -27,6 +27,8 @@
var/allow_admin_rev = 1 // allows admin revives
var/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default)
var/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
var/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called
var/vote_autotransfer_interval = 3600 // length of time before next sequential autotransfer vote
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
var/vote_no_dead = 0 // dead people can't vote (tbi)
// var/enable_authentication = 0 // goon authentication
@@ -265,6 +267,12 @@
if ("vote_period")
config.vote_period = text2num(value)
if ("vote_autotransfer_initial")
config.vote_autotransfer_initial = text2num(value)
if ("vote_autotransfer_interval")
config.vote_autotransfer_interval = text2num(value)
if ("allow_ai")
config.allow_ai = 1

View File

@@ -46,6 +46,10 @@ datum/controller/vote
voting.Cut()
proc/autotransfer()
initiate_vote("crew_transfer","the server")
proc/reset()
initiator = null
time_remaining = 0
@@ -56,13 +60,13 @@ datum/controller/vote
voting.Cut()
current_votes.Cut()
if(auto_muted && !ooc_allowed)
/* if(auto_muted && !ooc_allowed)
auto_muted = 0
ooc_allowed = !( ooc_allowed )
world << "<b>The OOC channel has been automatically enabled due to vote end.</b>"
log_admin("OOC was toggled automatically due to vote end.")
message_admins("OOC has been toggled on automatically.")
*/
proc/get_result()
//get the highest number of votes
@@ -202,6 +206,8 @@ datum/controller/vote
return 0
choices.Add(config.votable_modes)
if("crew_transfer")
if (get_security_level() == "red" || get_security_level() == "delta")
return 0
if(ticker.current_state <= 2)
return 0
question = "End the shift?"
@@ -230,7 +236,7 @@ datum/controller/vote
world << sound('sound/ambience/alarm4.ogg')
if("custom")
world << sound('sound/ambience/alarm4.ogg')
if(mode == "gamemode" && going)
/* if(mode == "gamemode" && going)
going = 0
world << "<font color='red'><b>Round start has been delayed.</b></font>"
if(mode == "crew_transfer" && ooc_allowed)
@@ -251,7 +257,7 @@ datum/controller/vote
world << "<b>The OOC channel has been automatically disabled due to a custom vote.</b>"
log_admin("OOC was toggled automatically due to custom vote.")
message_admins("OOC has been toggled off automatically.")
*/
@@ -278,9 +284,9 @@ datum/controller/vote
var/votes = choices[choices[i]]
if(!votes) votes = 0
if(current_votes[C.ckey] == i)
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></b></li>"
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></b></li>"
else
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></li>"
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></li>"
. += "</ul><hr>"
if(admin)