diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index fcf5a5dd4a..4a0be437c3 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -290,19 +290,26 @@ parts += "[GLOB.TAB]Nobody died this shift!" return parts.Join("
") -/datum/controller/subsystem/ticker/proc/show_roundend_report(client/C,common_report, popcount) - var/list/report_parts = list() - - report_parts += personal_report(C, popcount) - report_parts += common_report +/client/proc/roundend_report_file() + return "data/roundend_reports/[ckey].html" +/datum/controller/subsystem/ticker/proc/show_roundend_report(client/C, previous = FALSE) var/datum/browser/roundend_report = new(C, "roundend") roundend_report.width = 800 roundend_report.height = 600 - roundend_report.set_content(report_parts.Join()) + var/content + var/filename = C.roundend_report_file() + if(!previous) + var/list/report_parts = list(personal_report(C), GLOB.common_report) + content = report_parts.Join() + C.verbs -= /client/proc/show_previous_roundend_report + fdel(filename) + text2file(content, filename) + else + content = file2text(filename) + roundend_report.set_content(content) roundend_report.stylesheets = list() - roundend_report.add_stylesheet("roundend",'html/browser/roundend.css') - + roundend_report.add_stylesheet("roundend", 'html/browser/roundend.css') roundend_report.open(0) /datum/controller/subsystem/ticker/proc/personal_report(client/C, popcount) @@ -327,8 +334,6 @@ else parts += "
" parts += "
" - if(!GLOB.survivor_report) - GLOB.survivor_report = survivor_report(popcount) parts += GLOB.survivor_report parts += "
" @@ -336,8 +341,9 @@ /datum/controller/subsystem/ticker/proc/display_report(popcount) GLOB.common_report = build_roundend_report() + GLOB.survivor_report = survivor_report(popcount) for(var/client/C in GLOB.clients) - show_roundend_report(C,GLOB.common_report, popcount) + show_roundend_report(C, FALSE) give_show_report_button(C) CHECK_TICK @@ -458,7 +464,7 @@ /datum/action/report/Trigger() if(owner && GLOB.common_report && SSticker.current_state == GAME_STATE_FINISHED) - SSticker.show_roundend_report(owner.client,GLOB.common_report) + SSticker.show_roundend_report(owner.client, FALSE) /datum/action/report/IsAvailable() return 1 diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 47cc5e0d25..dfecc6f633 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -223,6 +223,9 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) prefs.last_id = computer_id //these are gonna be used for banning fps = prefs.clientfps + if(fexists(roundend_report_file())) + verbs += /client/proc/show_previous_roundend_report + log_access("Login: [key_name(src)] from [address ? address : "localhost"]-[computer_id] || BYOND v[byond_version]") var/alert_mob_dupe_login = FALSE if(CONFIG_GET(flag/log_access)) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index e9c4c29a5e..ccf99b5b7e 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -294,3 +294,10 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR) to_chat(src, "You can't ignore yourself.") return ignore_key(selection) + +/client/proc/show_previous_roundend_report() + set name = "Your Last Round" + set category = "OOC" + set desc = "View the last round end report you've seen" + + SSticker.show_roundend_report(src, TRUE)