Voting fix
This commit is contained in:
@@ -72,11 +72,11 @@ SUBSYSTEM_DEF(vote)
|
||||
for(var/mob/dead/new_player/P in GLOB.player_list)
|
||||
if(P.ready != PLAYER_READY_TO_PLAY && voted[P.ckey])
|
||||
choices[choices[voted[P.ckey]]]--
|
||||
for(var/option in choices)
|
||||
var/votes = choices[option]
|
||||
total_votes += votes
|
||||
if(votes > greatest_votes)
|
||||
greatest_votes = votes
|
||||
for(var/option in choices)
|
||||
var/votes = choices[option]
|
||||
total_votes += votes
|
||||
if(votes > greatest_votes)
|
||||
greatest_votes = votes
|
||||
//default-vote for everyone who didn't vote
|
||||
if(!CONFIG_GET(flag/default_no_vote) && choices.len)
|
||||
var/list/non_voters = GLOB.directory.Copy()
|
||||
@@ -90,11 +90,11 @@ SUBSYSTEM_DEF(vote)
|
||||
choices["Continue Playing"] += non_voters.len
|
||||
if(choices["Continue Playing"] >= greatest_votes)
|
||||
greatest_votes = choices["Continue Playing"]
|
||||
else if(mode == "gamemode")
|
||||
if(GLOB.master_mode in choices)
|
||||
choices[GLOB.master_mode] += non_voters.len
|
||||
if(choices[GLOB.master_mode] >= greatest_votes)
|
||||
greatest_votes = choices[GLOB.master_mode]
|
||||
else if(mode == "gamemode")
|
||||
if(GLOB.master_mode in choices)
|
||||
choices[GLOB.master_mode] += non_voters.len
|
||||
if(choices[GLOB.master_mode] >= greatest_votes)
|
||||
greatest_votes = choices[GLOB.master_mode]
|
||||
//get all options with that many votes and return them in a list
|
||||
. = list()
|
||||
if(greatest_votes)
|
||||
|
||||
@@ -251,7 +251,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
return rule.round_result()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/dynamic/proc/send_intercept_dynamic()
|
||||
/datum/game_mode/dynamic/send_intercept()
|
||||
. = "<b><i>Central Command Status Summary</i></b><hr>"
|
||||
switch(round(shown_threat))
|
||||
if(0 to 19)
|
||||
@@ -406,9 +406,6 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
rule.candidates.Cut() // The rule should not use candidates at this point as they all are null.
|
||||
addtimer(CALLBACK(src, /datum/game_mode/dynamic/.proc/execute_roundstart_rule, rule), rule.delay)
|
||||
|
||||
if (!CONFIG_GET(flag/no_intercept_report))
|
||||
addtimer(CALLBACK(src, .proc/send_intercept_dynamic), rand(waittime_l, waittime_h))
|
||||
|
||||
..()
|
||||
|
||||
/// Initializes the internal ruleset variables
|
||||
|
||||
Reference in New Issue
Block a user