Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into hydroponics

This commit is contained in:
Zuhayr
2014-07-26 15:39:25 +09:30
13 changed files with 109 additions and 101 deletions

View File

@@ -12,6 +12,7 @@ datum/controller/vote
var/list/voted = list()
var/list/voting = list()
var/list/current_votes = list()
var/list/additional_text = list()
var/auto_muted = 0
New()
@@ -63,6 +64,7 @@ datum/controller/vote
voted.Cut()
voting.Cut()
current_votes.Cut()
additional_text.Cut()
/* if(auto_muted && !ooc_allowed)
auto_muted = 0
@@ -210,6 +212,13 @@ datum/controller/vote
if(ticker.current_state >= 2)
return 0
choices.Add(config.votable_modes)
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/F in choices)
for (var/T in L)
var/datum/game_mode/M = new T()
if (M.config_tag == F)
additional_text.Add("<td align = 'center'>[M.required_players]</td>")
break
if("crew_transfer")
if(check_rights(R_ADMIN|R_MOD, 0))
question = "End the shift?"
@@ -290,16 +299,24 @@ datum/controller/vote
if(mode)
if(question) . += "<h2>Vote: '[question]'</h2>"
else . += "<h2>Vote: [capitalize(mode)]</h2>"
. += "Time Left: [time_remaining] s<hr><ul>"
. += "Time Left: [time_remaining] s<hr>"
. += "<table width = '100%'><tr><td align = 'center'><b>Choices</b></td><td align = 'center'><b>Votes</b></td>"
if(capitalize(mode) == "Gamemode") .+= "<td align = 'center'><b>Minimum Players</b></td></b></tr>"
for(var/i = 1, i <= choices.len, i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
. += "<tr>"
if(current_votes[C.ckey] == i)
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></b></li>"
. += "<td><b><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></b></td><td align = 'center'>[votes]</td>"
else
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></li>"
. += "<td><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></b></td><td align = 'center'>[votes]</td>"
. += "</ul><hr>"
if (additional_text.len >= i)
. += additional_text[i]
. += "</tr>"
. += "</table><hr>"
if(admin)
. += "(<a href='?src=\ref[src];vote=cancel'>Cancel Vote</a>) "
else