From 1f47292d34a0bc07ba5f19afc909b2b13a46c1d3 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 28 Aug 2019 01:38:00 -0400 Subject: [PATCH 1/2] GPS Location Status --- code/modules/mob/living/carbon/human/human.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d01c94875be..7ff8f8d6e1d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -168,6 +168,9 @@ show_stat_emergency_shuttle_eta() if(client.statpanel == "Status") + if(locate(/obj/item/gps) in GetAllContents()) + var/turf/T = get_turf(src) + stat(null, "GPS: [COORD(T)]") if(locate(/obj/item/assembly/health) in src) stat(null, "Health: [health]") if(internal) @@ -852,7 +855,7 @@ return var/read = 0 var/perpname = get_visible_name(TRUE) - + for(var/datum/data/record/E in data_core.general) if(E.fields["name"] == perpname) for(var/datum/data/record/R in data_core.medical) From d74e5288f3fe9f20682267e96c9369c7fd89668b Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 28 Aug 2019 01:47:50 -0400 Subject: [PATCH 2/2] refactor health sensors --- code/modules/mob/living/carbon/human/human.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 7ff8f8d6e1d..e5d61a9558f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -168,10 +168,11 @@ show_stat_emergency_shuttle_eta() if(client.statpanel == "Status") - if(locate(/obj/item/gps) in GetAllContents()) + var/total_user_contents = GetAllContents() // cache it + if(locate(/obj/item/gps) in total_user_contents) var/turf/T = get_turf(src) stat(null, "GPS: [COORD(T)]") - if(locate(/obj/item/assembly/health) in src) + if(locate(/obj/item/assembly/health) in total_user_contents) stat(null, "Health: [health]") if(internal) if(!internal.air_contents)