Examine Hud hotfixing (#86607)

## About The Pull Request

I tested these in every single iteration but the final one.

So it was doing `string + list()` and runtiming because it lost a `. =
list()`

## Changelog

🆑 Melbert
fix: Med/sec hud examine 
/🆑
This commit is contained in:
MrMelbert
2024-09-11 11:44:43 +02:00
committed by GitHub
parent 032bf5fb44
commit 3cfef587eb
+11 -3
View File
@@ -472,25 +472,33 @@
return
/mob/living/carbon/human/get_hud_examine_info(mob/living/user)
. = list()
var/perpname = get_face_name(get_id_name(""))
var/title = ""
if(perpname && (HAS_TRAIT(user, TRAIT_SECURITY_HUD) || HAS_TRAIT(user, TRAIT_MEDICAL_HUD)) && (user.stat == CONSCIOUS || isobserver(user)) && user != src)
var/datum/record/crew/target_record = find_record(perpname)
if(target_record)
. += "Rank: [target_record.rank]"
. += "<a href='?src=[REF(src)];hud=1;photo_front=1;examine_time=[world.time]'>\[Front photo\]</a><a href='?src=[REF(src)];hud=1;photo_side=1;examine_time=[world.time]'>\[Side photo\]</a>"
if(HAS_TRAIT(user, TRAIT_MEDICAL_HUD) && HAS_TRAIT(user, TRAIT_SECURITY_HUD))
. += separator_hr("Medical & Security Analysis")
title = separator_hr("Medical & Security Analysis")
. += get_medhud_examine_info(user, target_record)
. += get_sechud_examine_info(user, target_record)
else if(HAS_TRAIT(user, TRAIT_MEDICAL_HUD))
. += separator_hr("Medical Analysis")
title = separator_hr("Medical Analysis")
. += get_medhud_examine_info(user, target_record)
else if(HAS_TRAIT(user, TRAIT_SECURITY_HUD))
. += separator_hr("Security Analysis")
title = separator_hr("Security Analysis")
. += get_sechud_examine_info(user, target_record)
// applies the separator correctly without an extra line break
if(title && length(.))
.[1] = title + .[1]
return .
/// Collects information displayed about src when examined by a user with a medical HUD.
/mob/living/carbon/proc/get_medhud_examine_info(mob/living/user, datum/record/crew/target_record)
. = list()