Merge branch 'Citadel-Station-13:master' into Projectile_Rework

This commit is contained in:
Solaris-Shade
2022-03-19 11:23:16 -04:00
committed by GitHub
32 changed files with 542 additions and 337 deletions
+9 -6
View File
@@ -396,12 +396,15 @@ SUBSYSTEM_DEF(air)
*/
/datum/controller/subsystem/air/proc/run_delay_heuristics()
if(!equalize_enabled)
cost_equalize = 0
if(should_do_equalization)
eq_cooldown--
if(eq_cooldown <= 0)
equalize_enabled = TRUE
if(should_do_equalization)
if(!equalize_enabled)
cost_equalize = 0
if(should_do_equalization)
eq_cooldown--
if(eq_cooldown <= 0)
equalize_enabled = TRUE
else
equalize_enabled = FALSE
var/total_thread_time = cost_turfs + cost_equalize + cost_groups + cost_post_process
if(total_thread_time)
var/wait_ms = wait * 100
+17 -5
View File
@@ -32,6 +32,8 @@ SUBSYSTEM_DEF(vote)
var/list/stored_modetier_results = list() // The aggregated tier list of the modes available in secret.
var/transfer_votes_done = 0
/datum/controller/subsystem/vote/fire() //called by master_controller
if(mode)
if(end_time < world.time)
@@ -248,8 +250,18 @@ SUBSYSTEM_DEF(vote)
if(vote_system == SCORE_VOTING)
calculate_scores(vote_title_text)
if(vote_system == HIGHEST_MEDIAN_VOTING)
calculate_highest_median(vote_title_text) // nothing uses this at the moment
var/list/winners = vote_system == INSTANT_RUNOFF_VOTING ? get_runoff_results() : get_result()
calculate_highest_median(vote_title_text)
var/list/winners = list()
if(mode == "transfer")
var/amount_required = 3 + transfer_votes_done
transfer_votes_done += 1
text += "\nExtending requires at least [amount_required] votes to win."
if(choices[VOTE_CONTINUE] < amount_required || choices[VOTE_TRANSFER] >= choices[VOTE_CONTINUE])
winners = list(VOTE_TRANSFER)
else
winners = list(VOTE_CONTINUE)
else
winners = vote_system == INSTANT_RUNOFF_VOTING ? get_runoff_results() : get_result()
var/was_roundtype_vote = mode == "roundtype" || mode == "dynamic"
if(winners.len > 0)
if(was_roundtype_vote)
@@ -305,7 +317,7 @@ SUBSYSTEM_DEF(vote)
if(vote_system == SCHULZE_VOTING)
admintext += "\nIt should be noted that this is not a raw tally of votes (impossible in ranked choice) but the score determined by the schulze method of voting, so the numbers will look weird!"
else if(vote_system == HIGHEST_MEDIAN_VOTING)
admintext += "\nIt should be noted that this is not a raw tally of votes but the number of runoffs done by majority judgement!"
admintext += "\nIt should be noted that this is not a raw tally of votes but rather the median score plus a tiebreaker!"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
admintext += "\n<b>[choices[i]]:</b> [votes]"
@@ -339,7 +351,7 @@ SUBSYSTEM_DEF(vote)
if(SSmapping.changemap(config.maplist[.]))
to_chat(world, "<span class='boldannounce'>The map vote has chosen [VM.map_name] for next round!</span>")
if("transfer") // austation begin -- Crew autotransfer vote
if(. == "Initiate Crew Transfer")
if(. == VOTE_TRANSFER)
SSshuttle.autoEnd()
var/obj/machinery/computer/communications/C = locate() in GLOB.machines
if(C)
@@ -446,7 +458,7 @@ SUBSYSTEM_DEF(vote)
continue
choices |= M
if("transfer") // austation begin -- Crew autotranfer vote
choices.Add("Initiate Crew Transfer","Continue Playing") // austation end
choices.Add(VOTE_TRANSFER,VOTE_CONTINUE) // austation end
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
choices.Add("dynamic", "extended")
if("custom")