From 57c96cea9a31bbd56938ae3b3a7aae0748fe12d7 Mon Sep 17 00:00:00 2001 From: warriorstar-orion Date: Wed, 16 Aug 2023 15:23:51 -0400 Subject: [PATCH] fix issues with manual sec record entry (#21882) --- code/modules/mob/living/carbon/human/human_examine.dm | 2 ++ code/modules/mob/living/carbon/human/human_mob.dm | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_examine.dm b/code/modules/mob/living/carbon/human/human_examine.dm index d0b9632b626..d17ef28765b 100644 --- a/code/modules/mob/living/carbon/human/human_examine.dm +++ b/code/modules/mob/living/carbon/human/human_examine.dm @@ -167,6 +167,8 @@ if(LAZYLEN(R.fields["comments"])) //if the commentlist is present var/list/comments = R.fields["comments"] commentLatest = LAZYACCESS(comments, comments.len) //get the latest entry from the comment log + if(islist(commentLatest)) + commentLatest = "[commentLatest["header"]]: [commentLatest["text"]]" else commentLatest = "No entries." //If present but without entries (=target is recognized crew) diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index 7772b0d8c09..41efdd8892f 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -760,7 +760,10 @@ read = 1 if(LAZYLEN(R.fields["comments"])) for(var/c in R.fields["comments"]) - to_chat(usr, c) + if(islist(c)) + to_chat(usr, "[c["header"]]: [c["text"]]") + else + to_chat(usr, c) else to_chat(usr, "No comments found") if(hasHUD(usr, EXAMINE_HUD_SECURITY_WRITE))