From 0ae4becfbe2c56aaba00843b0a4893f0efcd9509 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 18 Jan 2021 07:43:48 +0100 Subject: [PATCH] [MIRROR] Stops encrypted report spam (#2761) * Stops encrypted report spam (#56165) Adds a do_after() to the in-spect scanner, and moves its examine_more() into examine(). Removes an unneeded second way to print a report using attack() * Stops encrypted report spam Co-authored-by: Thunder12345 --- code/game/objects/items/documents.dm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index a640074cabe..d2dbe526c7d 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -69,13 +69,10 @@ throw_range = 1 throw_speed = 1 -/obj/item/inspector/attack(mob/living/M, mob/living/user) - . = ..() - print_report() - /obj/item/inspector/attack_self(mob/user) . = ..() - print_report() + if(do_after(user, 5 SECONDS, target = user, progress=TRUE)) + print_report() ///Prints out a report for bounty purposes, and plays a short audio blip. /obj/item/inspector/proc/print_report() @@ -86,19 +83,17 @@ /obj/item/report name = "encrypted station inspection" - desc = "Contains detailed information about the station's current status, too bad you can't really read it. You can almost make out some of the words..." + desc = "Contains detailed information about the station's current status, too bad you can't really read it." icon = 'icons/obj/bureaucracy.dmi' icon_state = "slipfull" ///What area the inspector scanned when the report was made. Used to verify the security bounty. var/area/scanned_area -/obj/item/report/examine_more(mob/user) +/obj/item/report/examine(mob/user) . = ..() - var/list/msg = list("You examine [src] closer, and note the following...") if(scanned_area?.name) - msg += "\the [src] contains data on [scanned_area.name]." + . += "\The [src] contains data on [scanned_area.name]." else if(scanned_area) - msg += "\the [src] contains data on an vague area on station, you should throw it away." + . += "\The [src] contains data on a vague area on station, you should throw it away." else - msg += "Wait a minute, this thing's blank! You should throw it away." - return msg + . += "Wait a minute, this thing's blank! You should throw it away."