mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds amount of required players to gamemode vote.
This commit is contained in:
@@ -12,6 +12,7 @@ datum/controller/vote
|
|||||||
var/list/voted = list()
|
var/list/voted = list()
|
||||||
var/list/voting = list()
|
var/list/voting = list()
|
||||||
var/list/current_votes = list()
|
var/list/current_votes = list()
|
||||||
|
var/list/additional_text = list()
|
||||||
var/auto_muted = 0
|
var/auto_muted = 0
|
||||||
|
|
||||||
New()
|
New()
|
||||||
@@ -63,6 +64,7 @@ datum/controller/vote
|
|||||||
voted.Cut()
|
voted.Cut()
|
||||||
voting.Cut()
|
voting.Cut()
|
||||||
current_votes.Cut()
|
current_votes.Cut()
|
||||||
|
additional_text.Cut()
|
||||||
|
|
||||||
/* if(auto_muted && !ooc_allowed)
|
/* if(auto_muted && !ooc_allowed)
|
||||||
auto_muted = 0
|
auto_muted = 0
|
||||||
@@ -210,6 +212,13 @@ datum/controller/vote
|
|||||||
if(ticker.current_state >= 2)
|
if(ticker.current_state >= 2)
|
||||||
return 0
|
return 0
|
||||||
choices.Add(config.votable_modes)
|
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(" - [M.required_players] players required")
|
||||||
|
break
|
||||||
if("crew_transfer")
|
if("crew_transfer")
|
||||||
if(check_rights(R_ADMIN|R_MOD, 0))
|
if(check_rights(R_ADMIN|R_MOD, 0))
|
||||||
question = "End the shift?"
|
question = "End the shift?"
|
||||||
@@ -295,9 +304,13 @@ datum/controller/vote
|
|||||||
var/votes = choices[choices[i]]
|
var/votes = choices[choices[i]]
|
||||||
if(!votes) votes = 0
|
if(!votes) votes = 0
|
||||||
if(current_votes[C.ckey] == i)
|
if(current_votes[C.ckey] == i)
|
||||||
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></b></li>"
|
. += "<li><b><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></b>"
|
||||||
else
|
else
|
||||||
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a></li>"
|
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]] ([votes] votes)</a>"
|
||||||
|
|
||||||
|
if (additional_text.len >= i)
|
||||||
|
. += additional_text[i]
|
||||||
|
. += "</li>"
|
||||||
|
|
||||||
. += "</ul><hr>"
|
. += "</ul><hr>"
|
||||||
if(admin)
|
if(admin)
|
||||||
|
|||||||
Reference in New Issue
Block a user