From caa6cd6c8af0f6bbf2ee69438941a35bd6de2281 Mon Sep 17 00:00:00 2001 From: DJSnapshot Date: Tue, 24 Sep 2013 23:41:21 -0700 Subject: [PATCH] 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. --- code/controllers/configuration.dm | 8 ++++++++ code/controllers/voting.dm | 18 ++++++++++++------ code/game/gamemodes/gameticker.dm | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index a22c9eec5f1..8552b56e1e5 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -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 diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index d03aa546f92..8be45cdf2e1 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -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 << "The OOC channel has been automatically enabled due to vote end." 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 << "Round start has been delayed." if(mode == "crew_transfer" && ooc_allowed) @@ -251,7 +257,7 @@ datum/controller/vote world << "The OOC channel has been automatically disabled due to a custom vote." 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) - . += "
  • [choices[i]]
  • " + . += "
  • [choices[i]] ([votes] votes)
  • " else - . += "
  • [choices[i]]
  • " + . += "
  • [choices[i]] ([votes] votes)
  • " . += "
    " if(admin) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 4d83aa5eefa..78a8fe69383 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -10,7 +10,7 @@ var/global/datum/controller/gameticker/ticker var/const/restart_timeout = 600 var/current_state = GAME_STATE_PREGAME - var/hide_mode = 1 + var/hide_mode = 0 var/datum/game_mode/mode = null var/event_time = null var/event = 0