From 7dc89c0d1025276b784fa3ff729a16e438b0b01e Mon Sep 17 00:00:00 2001 From: ikarrus Date: Fri, 29 Aug 2014 21:24:30 -0600 Subject: [PATCH] More Detailed End-Round Report End-Round report will now also declare some round statistics, including -Round duration -Station integrity -Total population -Survival Rate -Evacuation Rate -Command's Approval Rating (During rev only) Bugfix: -Ending the round as a brain will no longer report to the player that they have survived --- code/_globalvars/game_modes.dm | 2 +- code/game/gamemodes/blob/blob.dm | 4 --- code/game/gamemodes/blob/blob_finish.dm | 11 +++----- code/game/gamemodes/game_mode.dm | 2 ++ code/game/gamemodes/gameticker.dm | 28 +++++++++++++++++--- code/game/gamemodes/revolution/revolution.dm | 6 +++++ 6 files changed, 37 insertions(+), 16 deletions(-) diff --git a/code/_globalvars/game_modes.dm b/code/_globalvars/game_modes.dm index 519987d8880..0e43d1f89e8 100644 --- a/code/_globalvars/game_modes.dm +++ b/code/_globalvars/game_modes.dm @@ -3,4 +3,4 @@ var/master_mode = "traitor"//"extended" var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode var/wavesecret = 0 // meteor mode, delays wave progression, terrible name -var/datum/station_state/start_state = null // Used in blob mode +var/datum/station_state/start_state = null // Used in round-end report diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 8629d682434..7f9ca92088c 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -110,10 +110,6 @@ var/list/blob_nodes = list() else ERROR("Events variable is null in blob gamemode post setup.") - spawn(10) - start_state = new /datum/station_state() - start_state.count() - spawn(0) var/wait_time = rand(waittime_l, waittime_h) diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm index 80e2f54e93e..937d461247f 100644 --- a/code/game/gamemodes/blob/blob_finish.dm +++ b/code/game/gamemodes/blob/blob_finish.dm @@ -15,24 +15,19 @@ feedback_set_details("round_end_result","loss - blob took over") world << "The blob has taken over the station!" world << "The entire station was eaten by the Blob" - log_game("Blob mode was lost.") + log_game("Blob mode completed with a blob victory.") else if(station_was_nuked) feedback_set_details("round_end_result","halfwin - nuke") world << "Partial Win: The station has been destroyed!" world << "Directive 7-12 has been successfully carried out preventing the Blob from spreading." - log_game("Blob mode was tie (station destroyed).") + log_game("Blob mode completed with a tie (station destroyed).") else if(!blob_cores.len) feedback_set_details("round_end_result","win - blob eliminated") world << "The staff has won!" world << "The alien organism has been eradicated from the station" - - var/datum/station_state/end_state = new /datum/station_state() - end_state.count() - var/percent = round( 100.0 * start_state.score(end_state), 0.1) - world << "The station is [percent]% intact." - log_game("Blob mode was won with station [percent]% intact.") + log_game("Blob mode completed with a crew victory.") world << "Rebooting in 30s" ..() return 1 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 4f84c8e1fdc..cb1fbdd641a 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -81,6 +81,8 @@ if(report) spawn (rand(waittime_l, waittime_h)) send_intercept(0) + start_state = new /datum/station_state() + start_state.count() return 1 ///make_antag_chance() diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index fcc318999e8..e77b9e05c55 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -325,23 +325,45 @@ var/round_start_time = 0 /datum/controller/gameticker/proc/declare_completion() + var/station_evacuated + if(emergency_shuttle.location > 0) + station_evacuated = 1 + var/num_survivors = 0 + var/num_escapees = 0 + world << "


The round has ended." - for(var/mob/Player in player_list) + + //Player status report + for(var/mob/Player in mob_list) if(Player.mind) - if(Player.stat != DEAD) - if(emergency_shuttle.location > 0) //If the shuttle has already left the station + if(Player.stat != DEAD && !isbrain(Player)) + num_survivors++ + if(station_evacuated) //If the shuttle has already left the station var/turf/playerTurf = get_turf(Player) if(playerTurf.z != 2) Player << "You managed to survive, but were marooned on [station_name()]..." else + num_escapees++ Player << "You managed to survive the events on [station_name()] as [Player.real_name]." else Player << "You managed to survive the events on [station_name()] as [Player.real_name]." else Player << "You did not survive the events on [station_name()]..." + //Round statistics report + var/datum/station_state/end_state = new /datum/station_state() + end_state.count() + var/station_integrity = round( 100.0 * start_state.score(end_state), 0.1) + + 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 << "
[TAB]Total Population: [joined_player_list.len]" + world << "
[TAB]Survival Rate: [num_survivors] ([round((num_survivors/joined_player_list.len)*100, 0.1)]%)" + if(station_evacuated) + world << "
[TAB]Evacuation Rate: [num_escapees] ([round((num_escapees/joined_player_list.len)*100, 0.1)]%)" world << "
" + //Silicon laws report for (var/mob/living/silicon/ai/aiPlayer in mob_list) if (aiPlayer.stat != 2 && aiPlayer.mind) world << "[aiPlayer.name] (Played by: [aiPlayer.mind.key])'s laws at the end of the round were:" diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index a5f494187fc..2463989f813 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -344,6 +344,12 @@ else if(finished == 2) feedback_set_details("round_end_result","loss - rev heads killed") world << "The heads of staff managed to stop the revolution!" + var/num_revs = 0 + for(var/mob/living/carbon/mob in living_mob_list) + if(mob.mind) + if(mob.mind in head_revolutionaries || mob.mind in revolutionaries) + num_revs++ + world << "
[TAB]Command's Approval Rating: [100 - round((num_revs/living_mob_list.len)*100, 0.1)]%" // % of loyal crew ..() return 1