Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lets observer with SecHUD enabled see sec records on examine. #4890

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Birdtalon marked this conversation as resolved.
Show resolved Hide resolved
if(isobserver(user))
observer = user

if(isxeno(user))
var/msg = "<span class='info'>This is "

Expand Down Expand Up @@ -435,7 +439,7 @@
for(var/implant in get_visible_implants())
msg += SPAN_WARNING("<b>[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


Expand All @@ -450,8 +454,15 @@
if(R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]

msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=1'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=1'>\[Add comment\]</a>\n"
msg += "<span class = 'deptradio'>Criminal status:</span>"
if(!observer)
msg += "<a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
else
msg += "\[[criminal]\]\n"

msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=1'>\[View\]</a>"
if(!observer)
msg += " <a href='?src=\ref[src];secrecordadd=1'>\[Add comment\]</a>\n"

if(hasHUD(user,"medical"))
var/cardcolor = holo_card_color
Expand Down
9 changes: 5 additions & 4 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
to_chat(usr, "<b>Incidents:</b> [R.fields["incident"]]")
to_chat(usr, "<a href='?src=\ref[src];secrecordComment=1'>\[View Comment Log\]</a>")
Expand All @@ -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()
Expand Down Expand Up @@ -662,7 +662,8 @@
continue
comment_markup += text("<i>Comment deleted by [] at []</i><br />", comment["deleted_by"], comment["deleted_at"])
to_chat(usr, comment_markup)
to_chat(usr, "<a href='?src=\ref[src];secrecordadd=1'>\[Add comment\]</a><br />")
if(!isobserver(usr))
to_chat(usr, "<a href='?src=\ref[src];secrecordadd=1'>\[Add comment\]</a><br />")

if(!read)
to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person."))
Expand Down
Loading