mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 23:53:47 +01:00
reduces a massive amount of endround lag (#23306)
* reduces a massive amount of endround lag * more improvements
This commit is contained in:
@@ -530,26 +530,31 @@ SUBSYSTEM_DEF(ticker)
|
||||
ending_station_state.count()
|
||||
var/station_integrity = min(round( 100.0 * GLOB.start_state.score(ending_station_state), 0.1), 100.0)
|
||||
|
||||
to_chat(world, "<BR>[TAB]Shift Duration: <B>[round(ROUND_TIME / 36000)]:[add_zero("[ROUND_TIME / 600 % 60]", 2)]:[ROUND_TIME / 100 % 6][ROUND_TIME / 100 % 10]</B>")
|
||||
to_chat(world, "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>")
|
||||
to_chat(world, "<BR>")
|
||||
var/list/end_of_round_info = list()
|
||||
end_of_round_info += "<BR>[TAB]Shift Duration: <B>[round(ROUND_TIME / 36000)]:[add_zero("[ROUND_TIME / 600 % 60]", 2)]:[ROUND_TIME / 100 % 6][ROUND_TIME / 100 % 10]</B>"
|
||||
end_of_round_info += "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>"
|
||||
end_of_round_info += "<BR>"
|
||||
|
||||
//Silicon laws report
|
||||
for(var/mob/living/silicon/ai/aiPlayer in GLOB.mob_list)
|
||||
var/ai_ckey = safe_get_ckey(aiPlayer)
|
||||
|
||||
if(aiPlayer.stat != 2)
|
||||
to_chat(world, "<b>[aiPlayer.name] (Played by: [ai_ckey])'s laws at the end of the game were:</b>")
|
||||
if(aiPlayer.stat != DEAD)
|
||||
end_of_round_info += "<b>[aiPlayer.name] (Played by: [ai_ckey])'s laws at the end of the game were:</b>"
|
||||
else
|
||||
to_chat(world, "<b>[aiPlayer.name] (Played by: [ai_ckey])'s laws when it was deactivated were:</b>")
|
||||
aiPlayer.show_laws(TRUE)
|
||||
end_of_round_info += "<b>[aiPlayer.name] (Played by: [ai_ckey])'s laws when it was deactivated were:</b>"
|
||||
aiPlayer.laws_sanity_check()
|
||||
for(var/datum/ai_law/law as anything in aiPlayer.laws.sorted_laws)
|
||||
if(law == aiPlayer.laws.zeroth_law)
|
||||
end_of_round_info += "<span class='danger'>[law.get_index()]. [law.law]</span>"
|
||||
else
|
||||
end_of_round_info += "[law.get_index()]. [law.law]"
|
||||
|
||||
if(aiPlayer.connected_robots.len)
|
||||
var/robolist = "<b>The AI's loyal minions were:</b> "
|
||||
if(length(aiPlayer.connected_robots))
|
||||
end_of_round_info += "<b>The AI's loyal minions were:</b> "
|
||||
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
|
||||
var/robo_ckey = safe_get_ckey(robo)
|
||||
robolist += "[robo.name][robo.stat ? " (Deactivated)" : ""] (Played by: [robo_ckey])"
|
||||
to_chat(world, "[robolist]")
|
||||
end_of_round_info += "[robo.name][robo.stat ? " (Deactivated)" : ""] (Played by: [robo_ckey])"
|
||||
|
||||
var/dronecount = 0
|
||||
|
||||
@@ -562,37 +567,38 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/robo_ckey = safe_get_ckey(robo)
|
||||
|
||||
if(!robo.connected_ai)
|
||||
if(robo.stat != 2)
|
||||
to_chat(world, "<b>[robo.name] (Played by: [robo_ckey]) survived as an AI-less borg! Its laws were:</b>")
|
||||
if(robo.stat != DEAD)
|
||||
end_of_round_info += "<b>[robo.name] (Played by: [robo_ckey]) survived as an AI-less borg! Its laws were:</b>"
|
||||
else
|
||||
to_chat(world, "<b>[robo.name] (Played by: [robo_ckey]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:</b>")
|
||||
end_of_round_info += "<b>[robo.name] (Played by: [robo_ckey]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:</b>"
|
||||
|
||||
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
|
||||
robo.laws.show_laws(world)
|
||||
robo.laws_sanity_check()
|
||||
for(var/datum/ai_law/law as anything in robo.laws.sorted_laws)
|
||||
if(law == robo.laws.zeroth_law)
|
||||
end_of_round_info += "<span class='danger'>[law.get_index()]. [law.law]</span>"
|
||||
else
|
||||
end_of_round_info += "[law.get_index()]. [law.law]"
|
||||
|
||||
if(dronecount)
|
||||
to_chat(world, "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] this round.")
|
||||
end_of_round_info += "<b>There [dronecount > 1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount > 1 ? "drones" : "drone"] this round."
|
||||
|
||||
if(mode.eventmiscs.len)
|
||||
var/emobtext = ""
|
||||
if(length(mode.eventmiscs))
|
||||
for(var/datum/mind/eventmind in mode.eventmiscs)
|
||||
emobtext += printeventplayer(eventmind)
|
||||
emobtext += "<br>"
|
||||
emobtext += printobjectives(eventmind)
|
||||
emobtext += "<br>"
|
||||
emobtext += "<br>"
|
||||
to_chat(world, emobtext)
|
||||
end_of_round_info += printeventplayer(eventmind)
|
||||
end_of_round_info += printobjectives(eventmind)
|
||||
end_of_round_info += "<br>"
|
||||
|
||||
mode.declare_completion()//To declare normal completion.
|
||||
|
||||
//calls auto_declare_completion_* for all modes
|
||||
for(var/handler in typesof(/datum/game_mode/proc))
|
||||
if(findtext("[handler]","auto_declare_completion_"))
|
||||
call(mode, handler)()
|
||||
end_of_round_info += mode.get_end_of_round_antagonist_statistics()
|
||||
|
||||
for(var/datum/team/team in GLOB.antagonist_teams)
|
||||
team.on_round_end()
|
||||
|
||||
// Save the data before end of the round griefing
|
||||
SSpersistent_data.save()
|
||||
to_chat(world, end_of_round_info.Join("<br>"))
|
||||
|
||||
// Display the scoreboard window
|
||||
score.scoreboard()
|
||||
|
||||
@@ -602,9 +608,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
//Ask the event manager to print round end information
|
||||
SSevents.RoundEnd()
|
||||
|
||||
// Save the data before end of the round griefing
|
||||
SSpersistent_data.save()
|
||||
|
||||
//make big obvious note in game logs that round ended
|
||||
log_game("///////////////////////////////////////////////////////")
|
||||
log_game("///////////////////// ROUND ENDED /////////////////////")
|
||||
|
||||
Reference in New Issue
Block a user