mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
reduces a massive amount of endround lag (#23306)
* reduces a massive amount of endround lag * more improvements
This commit is contained in:
@@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_changeling()
|
||||
if(length(changelings))
|
||||
var/text = "<FONT size = 3><B>The changelings were:</B></FONT>"
|
||||
var/list/text = list("<FONT size = 3><B>The changelings were:</B></FONT>")
|
||||
for(var/datum/mind/changeling in changelings)
|
||||
var/changelingwin = TRUE
|
||||
|
||||
@@ -107,7 +107,4 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E
|
||||
else
|
||||
text += "<br><font color='red'><B>The changeling has failed.</B></font>"
|
||||
SSblackbox.record_feedback("tally", "changeling_success", 1, "FAIL")
|
||||
|
||||
to_chat(world, text)
|
||||
|
||||
return TRUE
|
||||
return text.Join("")
|
||||
|
||||
@@ -376,7 +376,7 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
SSticker.mode_result = "cult loss - staff stopped the cult"
|
||||
to_chat(world, "<span class='warning'> <FONT size = 3>The staff managed to stop the cult!</FONT></span>")
|
||||
|
||||
var/endtext
|
||||
var/list/endtext = list()
|
||||
endtext += "<br><b>The cultists' objectives were:</b>"
|
||||
for(var/datum/objective/obj in cult_objs.presummon_objs)
|
||||
endtext += "<br>[obj.explanation_text] - "
|
||||
@@ -391,5 +391,5 @@ GLOBAL_LIST_EMPTY(all_cults)
|
||||
else
|
||||
endtext += "<font color='green'><B>Success!</B></font>"
|
||||
|
||||
to_chat(world, endtext)
|
||||
to_chat(world, endtext.Join(""))
|
||||
..()
|
||||
|
||||
@@ -505,3 +505,16 @@
|
||||
var/datum/atom_hud/antag/antaghud = GLOB.huds[ANTAG_HUD_EVENTMISC]
|
||||
antaghud.leave_hud(mob_mind.current)
|
||||
set_antag_hud(mob_mind.current, null)
|
||||
|
||||
/// Gets the value of all end of round stats through auto_declare and returns them
|
||||
/datum/game_mode/proc/get_end_of_round_antagonist_statistics()
|
||||
. = list()
|
||||
. += auto_declare_completion_traitor()
|
||||
. += auto_declare_completion_vampire()
|
||||
. += auto_declare_completion_enthralled()
|
||||
. += auto_declare_completion_changeling()
|
||||
. += auto_declare_completion_nuclear()
|
||||
. += auto_declare_completion_wizard()
|
||||
. += auto_declare_completion_revolution()
|
||||
. += auto_declare_completion_abduction()
|
||||
listclearnulls(.)
|
||||
|
||||
@@ -211,22 +211,22 @@
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_abduction()
|
||||
var/text = ""
|
||||
if(abductors.len)
|
||||
var/list/text = list()
|
||||
if(length(abductors))
|
||||
text += "<br><span class='big'><b>The abductors were:</b></span><br>"
|
||||
for(var/datum/mind/abductor_mind in abductors)
|
||||
text += printplayer(abductor_mind)
|
||||
text += "<br>"
|
||||
text += printobjectives(abductor_mind)
|
||||
text += "<br>"
|
||||
if(abductees.len)
|
||||
if(length(abductees))
|
||||
text += "<br><span class='big'><b>The abductees were:</b></span><br>"
|
||||
for(var/datum/mind/abductee_mind in abductees)
|
||||
text += printplayer(abductee_mind)
|
||||
text += "<br>"
|
||||
text += printobjectives(abductee_mind)
|
||||
text += "<br>"
|
||||
to_chat(world, text)
|
||||
return text.Join("")
|
||||
|
||||
//Landmarks
|
||||
// TODO: Split into seperate landmarks for prettier ships
|
||||
|
||||
@@ -389,8 +389,8 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_nuclear()
|
||||
if(syndicates.len || GAMEMODE_IS_NUCLEAR)
|
||||
var/text = "<br><FONT size=3><B>The syndicate operatives were:</B></FONT>"
|
||||
if(length(syndicates) || GAMEMODE_IS_NUCLEAR)
|
||||
var/list/text = list("<br><FONT size=3><B>The syndicate operatives were:</B></FONT>")
|
||||
|
||||
var/purchases = ""
|
||||
var/TC_uses = 0
|
||||
@@ -420,8 +420,7 @@
|
||||
if(TC_uses==0 && station_was_nuked && !is_operatives_are_dead())
|
||||
text += "<BIG><IMG CLASS=icon SRC=\ref['icons/badass.dmi'] ICONSTATE='badass'></BIG>"
|
||||
|
||||
to_chat(world, text)
|
||||
return 1
|
||||
return text.Join("")
|
||||
|
||||
/proc/nukelastname(mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
|
||||
var/randomname = pick(GLOB.last_names)
|
||||
|
||||
@@ -182,15 +182,14 @@
|
||||
num_revs++
|
||||
if(num_survivors)
|
||||
to_chat(world, "[TAB]Command's Approval Rating: <B>[100 - round((num_revs/num_survivors)*100, 0.1)]%</B>") // % of loyal crew
|
||||
var/text = "<br><font size=3><b>The head revolutionaries were:</b></font>"
|
||||
var/list/text = list("<br><font size=3><b>The head revolutionaries were:</b></font>")
|
||||
for(var/datum/mind/headrev in head_revolutionaries)
|
||||
text += printplayer(headrev, 1)
|
||||
text += "<br>"
|
||||
to_chat(world, text)
|
||||
|
||||
// we dont show the revolutionaries because there are a LOT of them
|
||||
|
||||
text = "<br><font size=3><b>The heads of staff were:</b></font>"
|
||||
text = list("<br><font size=3><b>The heads of staff were:</b></font>")
|
||||
var/list/heads = get_all_heads()
|
||||
for(var/datum/mind/head in heads)
|
||||
var/target = (head in targets)
|
||||
@@ -198,7 +197,7 @@
|
||||
text += "<span class='boldannounce'>Target</span>"
|
||||
text += printplayer(head, 1)
|
||||
text += "<br>"
|
||||
to_chat(world, text)
|
||||
return text.Join("")
|
||||
|
||||
/datum/game_mode/revolution/set_scoreboard_vars() // this proc is never called, someone remove it
|
||||
var/datum/scoreboard/scoreboard = SSticker.score
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_traitor()
|
||||
if(length(traitors))
|
||||
var/text = "<FONT size = 2><B>The traitors were:</B></FONT><br>"
|
||||
var/list/text = list("<FONT size = 2><B>The traitors were:</B></FONT><br>")
|
||||
for(var/datum/mind/traitor in traitors)
|
||||
var/traitorwin = TRUE
|
||||
text += printplayer(traitor)
|
||||
@@ -159,5 +159,4 @@
|
||||
text += "<br><br><b>The code phrases were:</b> <span class='danger'>[phrases]</span><br>\
|
||||
<b>The code responses were:</b> <span class='danger'>[responses]</span><br><br>"
|
||||
|
||||
to_chat(world, text)
|
||||
return TRUE
|
||||
return text.Join("")
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if(!length(vampires))
|
||||
return
|
||||
|
||||
var/text = "<FONT size = 2><B>The vampires were:</B></FONT>"
|
||||
var/list/text = list("<FONT size = 2><B>The vampires were:</B></FONT>")
|
||||
for(var/datum/mind/vampire in vampires)
|
||||
var/traitorwin = TRUE
|
||||
var/datum/antagonist/vampire/V = vampire.has_antag_datum(/datum/antagonist/vampire)
|
||||
@@ -101,14 +101,13 @@
|
||||
else
|
||||
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
|
||||
SSblackbox.record_feedback("tally", "vampire_success", 1, "FAIL")
|
||||
to_chat(world, text)
|
||||
return TRUE
|
||||
return text.Join("")
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_enthralled()
|
||||
if(!length(vampire_enthralled))
|
||||
return
|
||||
|
||||
var/text = "<FONT size = 2><B>The Enthralled were:</B></FONT>"
|
||||
var/list/text = list("<FONT size = 2><B>The Enthralled were:</B></FONT>")
|
||||
for(var/datum/mind/mind in vampire_enthralled)
|
||||
text += "<br>[mind.get_display_key()] was [mind.name] ("
|
||||
if(mind.current)
|
||||
@@ -121,6 +120,5 @@
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
to_chat(world, text)
|
||||
return TRUE
|
||||
return text.Join("")
|
||||
|
||||
|
||||
@@ -191,8 +191,8 @@
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_wizard()
|
||||
if(wizards.len)
|
||||
var/text = "<br><font size=3><b>the wizards/witches were:</b></font>"
|
||||
if(length(wizards))
|
||||
var/list/text = list("<br><font size=3><b>the wizards/witches were:</b></font>")
|
||||
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
|
||||
@@ -236,8 +236,7 @@
|
||||
i++
|
||||
text += "<br>"
|
||||
|
||||
to_chat(world, text)
|
||||
return 1
|
||||
return text.Join("")
|
||||
|
||||
//OTHER PROCS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user