mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-04 14:33:10 +00:00
And then God said, "Let there be light."
This commit is contained in:
@@ -129,6 +129,7 @@ var/datum/controller/subsystem/vote/SSvote
|
||||
for(var/key in current_votes)
|
||||
if(current_votes[key] == .)
|
||||
round_voters += key // Keep track of who voted for the winning round.
|
||||
|
||||
if((mode == "gamemode" && . == "Extended") || SSticker.hide_mode == 0) // Announce Extended gamemode, but not other gamemodes
|
||||
text += "<b>Vote Result: [.]</b>"
|
||||
else
|
||||
@@ -315,7 +316,7 @@ var/datum/controller/subsystem/vote/SSvote
|
||||
if(href_list["open"])
|
||||
OpenVotingUI(usr)
|
||||
var/isstaff = usr.client.holder && (usr.client.holder.rights & (R_ADMIN|R_MOD))
|
||||
|
||||
|
||||
switch(href_list["action"])
|
||||
if("cancel")
|
||||
if(isstaff)
|
||||
@@ -376,14 +377,14 @@ var/datum/controller/subsystem/vote/SSvote
|
||||
for(var/choice in choices)
|
||||
VUEUI_SET_IFNOTSET(data["choices"][choice], deepCopyList(choices[choice]), ., data)
|
||||
VUEUI_SET_CHECK(data["choices"][choice]["votes"], choices[choice]["votes"], ., data) // Only votes trigger data update
|
||||
|
||||
|
||||
VUEUI_SET_CHECK(data["mode"], mode, ., data)
|
||||
VUEUI_SET_CHECK(data["voted"], current_votes[user.ckey], ., data)
|
||||
VUEUI_SET_CHECK(data["endtime"], started_time + config.vote_period, ., data)
|
||||
VUEUI_SET_CHECK(data["allow_vote_restart"], config.allow_vote_restart, ., data)
|
||||
VUEUI_SET_CHECK(data["allow_vote_mode"], config.allow_vote_mode, ., data)
|
||||
VUEUI_SET_CHECK(data["allow_extra_antags"], (!antag_add_failed && config.allow_extra_antags), ., data)
|
||||
|
||||
|
||||
if(!question)
|
||||
VUEUI_SET_CHECK(data["question"], capitalize(mode), ., data)
|
||||
else
|
||||
@@ -391,7 +392,7 @@ var/datum/controller/subsystem/vote/SSvote
|
||||
VUEUI_SET_CHECK(data["isstaff"], (user.client.holder && (user.client.holder.rights & (R_ADMIN|R_MOD))), ., data)
|
||||
var/slevel = get_security_level()
|
||||
VUEUI_SET_CHECK(data["is_code_red"], (slevel == "red" || slevel == "delta"), ., data)
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/controller/subsystem/vote/proc/OpenVotingUI(var/mob/user)
|
||||
|
||||
@@ -595,6 +595,14 @@ var/global/list/additional_antag_types = list()
|
||||
candidates += player.mind
|
||||
players -= player
|
||||
|
||||
// If we don't have enough antags, draft people who voted for the round.
|
||||
if(candidates.len < required_enemies)
|
||||
for(var/mob/abstract/new_player/player in players)
|
||||
if(player.ckey in SSvote.round_voters)
|
||||
log_debug("[player.key] voted for this round, so we are drafting them.")
|
||||
candidates += player.mind
|
||||
players -= player
|
||||
|
||||
return candidates // Returns: The number of people who had the antagonist role set to yes, regardless of recomended_enemies, if that number is greater than required_enemies
|
||||
// required_enemies if the number of people with that role set to yes is less than recomended_enemies,
|
||||
// Less if there are not enough valid players in the game entirely to make required_enemies.
|
||||
|
||||
Reference in New Issue
Block a user