mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Antag examine fix (#11144)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
48a876646d
commit
18a69b2ca7
@@ -106,7 +106,7 @@
|
||||
title = "🔍 | Flavor Text"
|
||||
|
||||
. += span_details(title,fluff_info_temp)
|
||||
var/is_antagish = ((mind && mind.special_role) || isobserver(src)) //ghosts don't have minds
|
||||
var/is_antagish = antag_check()
|
||||
var/antag_info_temp = A.get_description_antag()
|
||||
if(is_antagish && antag_info_temp)
|
||||
. += span_details("🏴☠️ | Antag Information",antag_info_temp)
|
||||
@@ -117,17 +117,19 @@
|
||||
temp += a + "\n"
|
||||
. += span_details("🛠️ | Interaction Information",temp)
|
||||
|
||||
/mob/proc/antag_check()
|
||||
if(mind && (mind.special_role || mind.antag_holder.is_antag())) //We're a /mob and have a mind and antag status.
|
||||
return TRUE
|
||||
if(isobserver(src)) //We're an observer. We always are able to see stuff antags see.
|
||||
return TRUE
|
||||
var/datum/component/antag/comp = GetComponent(/datum/component/antag)
|
||||
if(comp)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/proc/update_examine_panel(var/atom/A)
|
||||
if(client)
|
||||
var/is_antag
|
||||
if((mind && mind.special_role) || isobserver(src)) //todo: Phase out special_role entirely and make it check for component/antag entirely.
|
||||
is_antag = TRUE
|
||||
else if(isliving(src))
|
||||
var/datum/component/antag/comp = GetComponent(/datum/component/antag)
|
||||
if(comp)
|
||||
is_antag = TRUE
|
||||
else if(mind && mind.antag_holder.is_antag())
|
||||
is_antag = TRUE
|
||||
var/is_antag = antag_check()
|
||||
client.update_description_holders(A, is_antag)
|
||||
SSstatpanels.set_examine_tab(client)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user