From 9095f2ebe12f08a7d3157bf9810285e9424b7159 Mon Sep 17 00:00:00 2001 From: Krausus Date: Fri, 24 Jun 2016 12:30:49 -0400 Subject: [PATCH] Fixes Investigation Logs and Runtimes - Fixes investigation logs showing various unused subjects instead of the ones actually in use - Fixes runtime when trying to investigate-log - Fixes runtime when playing the station's "welcome" sound --- code/_globalvars/logging.dm | 2 + code/game/gamemodes/gameticker.dm | 2 +- code/modules/admin/admin_investigate.dm | 59 ++++--------------------- 3 files changed, 12 insertions(+), 51 deletions(-) diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index d975491a15c..e4223fcee55 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -12,3 +12,5 @@ var/list/combatlog = list() var/list/IClog = list() var/list/OOClog = list() var/list/adminlog = list() + +var/list/investigate_log_subjects = list("notes", "watchlist", "hrefs") diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index a4c4656391c..95934cf4815 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -152,7 +152,7 @@ var/round_start_time = 0 qdel(R) to_chat(world, "Enjoy the game!") - to_chat(world, sound('sound/AI/welcome.ogg'))// Skie + world << sound('sound/AI/welcome.ogg')// Skie if(holiday_master.holidays) to_chat(world, "and...") diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 7f709f431ba..3eb12b11e68 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -23,20 +23,20 @@ if(!message) return var/F = investigate_subject2file(subject) if(!F) return - to_chat(F, "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
") + investigate_log_subjects |= subject + F << "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
" //ADMINVERBS -/client/proc/investigate_show( subject in list("hrefs","notes","pda","singulo","atmos","watchlist","ntsl","gold core","cult", "experimentor", "wires") ) +/client/proc/investigate_show( subject in investigate_log_subjects ) set name = "Investigate" set category = "Admin" if(!holder) return switch(subject) - if("singulo") //general one-round-only stuff - var/F = investigate_subject2file(subject) - if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") - return - src << browse(F,"window=investigate[subject];size=800x300") + if("notes") + show_note() + + if("watchlist") + watchlist_show() if("hrefs") //persistant logs and stuff if(config && config.log_hrefs) @@ -49,50 +49,9 @@ to_chat(src, "Error: admin_investigate: Href Logging is not on.") return - if("pda") //general one-round-only stuff + else //general one-round-only stuff var/F = investigate_subject2file(subject) if(!F) to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") return src << browse(F,"window=investigate[subject];size=800x300") - - if("cult") - var/F = investigate_subject2file(subject) - if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") - return - src << browse(F,"window=investigate[subject];size=800x300") - - if("atmos") - var/F = investigate_subject2file(subject) - if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") - return - src << browse(F,"window=investigate[subject];size=800x300") - - if("ntsl") - var/F = investigate_subject2file(subject) - if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") - return - src << browse(F,"window=investigate[subject];size=800x300") - - if("experimentor") - var/F = investigate_subject2file(subject) - if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") - return - src << browse(F,"window=investigate[subject];size=800x300") - - if("wires") - var/F = investigate_subject2file(subject) - if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") - return - src << browse(F,"window=investigate[subject];size=800x300") - - if("watchlist") - watchlist_show() - - if("notes") - show_note() \ No newline at end of file