mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user