fix issues with manual sec record entry (#21882)

This commit is contained in:
warriorstar-orion
2023-08-16 20:23:51 +01:00
committed by GitHub
parent f3267d4325
commit 57c96cea9a
2 changed files with 6 additions and 1 deletions
@@ -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)
@@ -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, "<span class='warning'>No comments found</span>")
if(hasHUD(usr, EXAMINE_HUD_SECURITY_WRITE))