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
This commit is contained in:
ikarrus
2014-08-29 21:24:30 -06:00
parent c6993078a7
commit 7dc89c0d10
6 changed files with 37 additions and 16 deletions
+1 -1
View File
@@ -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
-4
View File
@@ -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)
+3 -8
View File
@@ -15,24 +15,19 @@
feedback_set_details("round_end_result","loss - blob took over")
world << "<FONT size = 3><B>The blob has taken over the station!</B></FONT>"
world << "<B>The entire station was eaten by the Blob</B>"
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 << "<FONT size = 3><B>Partial Win: The station has been destroyed!</B></FONT>"
world << "<B>Directive 7-12 has been successfully carried out preventing the Blob from spreading.</B>"
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 << "<FONT size = 3><B>The staff has won!</B></FONT>"
world << "<B>The alien organism has been eradicated from the station</B>"
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 << "<B>The station is [percent]% intact.</B>"
log_game("Blob mode was won with station [percent]% intact.")
log_game("Blob mode completed with a crew victory.")
world << "<span class='notice'>Rebooting in 30s</span>"
..()
return 1
+2
View File
@@ -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()
+25 -3
View File
@@ -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 << "<BR><BR><BR><FONT size=3><B>The round has ended.</B></FONT>"
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 << "<font color='blue'><b>You managed to survive, but were marooned on [station_name()]...</b></FONT>"
else
num_escapees++
Player << "<font color='green'><b>You managed to survive the events on [station_name()] as [Player.real_name].</b></FONT>"
else
Player << "<font color='green'><b>You managed to survive the events on [station_name()] as [Player.real_name].</b></FONT>"
else
Player << "<font color='red'><b>You did not survive the events on [station_name()]...</b></FONT>"
//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 << "<BR>[TAB]Shift Duration: <B>[round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B>"
world << "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>"
world << "<BR>[TAB]Total Population: <B>[joined_player_list.len]</B>"
world << "<BR>[TAB]Survival Rate: <B>[num_survivors] ([round((num_survivors/joined_player_list.len)*100, 0.1)]%)</B>"
if(station_evacuated)
world << "<BR>[TAB]Evacuation Rate: <B>[num_escapees] ([round((num_escapees/joined_player_list.len)*100, 0.1)]%)</B>"
world << "<BR>"
//Silicon laws report
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
if (aiPlayer.stat != 2 && aiPlayer.mind)
world << "<b>[aiPlayer.name] (Played by: [aiPlayer.mind.key])'s laws at the end of the round were:</b>"
@@ -344,6 +344,12 @@
else if(finished == 2)
feedback_set_details("round_end_result","loss - rev heads killed")
world << "<span class='danger'><FONT size = 3>The heads of staff managed to stop the revolution!</FONT></span>"
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 << "<BR>[TAB]Command's Approval Rating: <B>[100 - round((num_revs/living_mob_list.len)*100, 0.1)]%</B>" // % of loyal crew
..()
return 1