From ddd4f1b1962b6fd6a9e22057457979bb16868290 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sun, 12 Jul 2015 07:57:43 -0400 Subject: [PATCH] round end stats --- code/_globalvars/misc.dm | 4 +++- code/game/gamemodes/game_mode.dm | 3 ++- code/game/gamemodes/gameticker.dm | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 2a936dde7b4..24ea8620193 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -62,4 +62,6 @@ var/score_richestkey = null var/score_dmgestname = null // who had the most damage on the shuttle (but was still alive) var/score_dmgestjob = null var/score_dmgestdamage = 0 -var/score_dmgestkey = null \ No newline at end of file +var/score_dmgestkey = null + +var/TAB = "    " \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 997926885ec..394eb9cff4e 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -115,6 +115,8 @@ Implants; // if(revdata) // feedback_set_details("revision","[revdata.revision]") feedback_set_details("server_ip","[world.internet_address]:[world.port]") + start_state = new /datum/station_state() + start_state.count() return 1 @@ -264,7 +266,6 @@ Implants; feedback_set("escaped_on_pod_5",escaped_on_pod_5) send2mainirc("A round of [src.name] has ended - [surviving_total] survivors, [ghosts] ghosts.") - return 0 diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 0c9aec27196..6b597689a9a 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -463,6 +463,16 @@ var/global/datum/controller/gameticker/ticker /datum/controller/gameticker/proc/declare_completion() + //Round statistics report + var/datum/station_state/end_state = new /datum/station_state() + end_state.count() + var/station_integrity = min(round( 100.0 * start_state.score(end_state), 0.1), 100.0) + + world << "
[TAB]Shift Duration: [round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]" + world << "
[TAB]Station Integrity: [mode.station_was_nuked ? "Destroyed" : "[station_integrity]%"]" + world << "
" + + //Silicon laws report for (var/mob/living/silicon/ai/aiPlayer in mob_list) if (aiPlayer.stat != 2) world << "[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the game were:"