Refactors vote code (#18403)

* Vote refactor

* Tweaks

* Review tweaks

* Tweak
This commit is contained in:
AffectedArc07
2022-07-20 22:13:41 +01:00
committed by GitHub
parent 444650ac7a
commit 20add76efb
18 changed files with 364 additions and 470 deletions
-10
View File
@@ -256,16 +256,6 @@
candidates += player.mind
players -= player
// If we don't have enough antags, draft people who voted for the round.
if(candidates.len < recommended_enemies)
for(var/key in SSvote.round_voters)
for(var/mob/new_player/player in players)
if(player.ckey == key)
player_draft_log += "[player.key] voted for this round, so we are drafting them."
candidates += player.mind
players -= player
break
// Remove candidates who want to be antagonist but have a job that precludes it
if(restricted_jobs)
for(var/datum/mind/player in candidates)
-1
View File
@@ -81,7 +81,6 @@
STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
else
STOP_PROCESSING(SSfastprocess, src)
SStgui.close_uis(src)
return ..()
//user: The mob that is suiciding
-3
View File
@@ -226,9 +226,6 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
if(GLOB.configuration.general.server_features)
features += GLOB.configuration.general.server_features
if(GLOB.configuration.vote.allow_restart_votes)
features += "vote"
if(GLOB.configuration.url.wiki_url)
features += "<a href=\"[GLOB.configuration.url.wiki_url]\">Wiki</a>"