From 88149c627efa50e238da9b4bf2050a8af58854da Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Fri, 10 Nov 2023 19:19:46 +0000 Subject: [PATCH 1/2] lets observer see sec records --- code/modules/mob/living/carbon/human/examine.dm | 17 ++++++++++++++--- code/modules/mob/living/carbon/human/human.dm | 9 +++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 6e99ca1e5a15..4b115f67d6a5 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -5,6 +5,10 @@ if(user.sdisabilities & DISABILITY_BLIND || user.blinded || user.stat==UNCONSCIOUS) return list(SPAN_NOTICE("Something is there but you can't see it.")) + var/mob/dead/observer/observer = null + if(isobserver(user)) + observer = user + if(isxeno(user)) var/msg = "This is " @@ -435,7 +439,7 @@ for(var/implant in get_visible_implants()) msg += SPAN_WARNING("[t_He] has \a [implant] sticking out of [t_his] flesh!\n") - if(hasHUD(user,"security")) + if(hasHUD(user,"security") || (observer && observer.HUD_toggled["Security HUD"])) var/perpref @@ -450,8 +454,15 @@ if(R.fields["id"] == E.fields["id"]) criminal = R.fields["criminal"] - msg += "Criminal status: \[[criminal]\]\n" - msg += "Security records: \[View\] \[Add comment\]\n" + msg += "Criminal status:" + if(!observer) + msg += "\[[criminal]\]\n" + else + msg += "\[[criminal]\]\n" + + msg += "Security records: \[View\]" + if(!observer) + msg += " \[Add comment\]\n" if(hasHUD(user,"medical")) var/cardcolor = holo_card_color diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6bceb994a2a1..2ec8ccf2531d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -612,7 +612,7 @@ to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person.")) if(href_list["secrecord"]) - if(hasHUD(usr,"security")) + if(hasHUD(usr,"security") || isobserver(usr)) var/perpref = null var/read = 0 @@ -624,7 +624,7 @@ if(E.fields["ref"] == perpref) for(var/datum/data/record/R in GLOB.data_core.security) if(R.fields["id"] == E.fields["id"]) - if(hasHUD(usr,"security")) + if(hasHUD(usr,"security") || isobserver(usr)) to_chat(usr, "Name: [R.fields["name"]] Criminal Status: [R.fields["criminal"]]") to_chat(usr, "Incidents: [R.fields["incident"]]") to_chat(usr, "\[View Comment Log\]") @@ -633,7 +633,7 @@ if(!read) to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person.")) - if(href_list["secrecordComment"] && hasHUD(usr,"security")) + if(href_list["secrecordComment"] && (hasHUD(usr,"security") || isobserver(usr))) var/perpref = null if(wear_id) var/obj/item/card/id/ID = wear_id.GetID() @@ -662,7 +662,8 @@ continue comment_markup += text("Comment deleted by [] at []
", comment["deleted_by"], comment["deleted_at"]) to_chat(usr, comment_markup) - to_chat(usr, "\[Add comment\]
") + if(!isobserver(usr)) + to_chat(usr, "\[Add comment\]
") if(!read) to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person.")) From bc9a5a73d2b768903875b1e6c21faaef22f509e7 Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Fri, 10 Nov 2023 19:25:22 +0000 Subject: [PATCH 2/2] removes null assignment --- code/modules/mob/living/carbon/human/examine.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 4b115f67d6a5..26c8fd867f72 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -5,7 +5,7 @@ if(user.sdisabilities & DISABILITY_BLIND || user.blinded || user.stat==UNCONSCIOUS) return list(SPAN_NOTICE("Something is there but you can't see it.")) - var/mob/dead/observer/observer = null + var/mob/dead/observer/observer if(isobserver(user)) observer = user