From ca8ef1ea71757dbc2264781177b3e5688a2b1920 Mon Sep 17 00:00:00 2001 From: Geeves Date: Tue, 22 Dec 2020 16:45:40 +0200 Subject: [PATCH] Skrell Srom Health Indicator (#10686) --- code/modules/mob/living/carbon/human/life.dm | 5 +++++ code/modules/mob/living/life.dm | 10 ++++++++-- code/modules/shareddream/brainghost.dm | 6 ++++++ html/changelogs/geeves-body_awareness.yml | 6 ++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/geeves-body_awareness.yml diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index fa78dd83bed..9c41987da86 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -796,6 +796,11 @@ var/tmp/last_frenzy_state var/tmp/last_oxy_overlay +/mob/living/carbon/human/can_update_hud() + if((!client && !bg) || QDELETED(src)) + return FALSE + return TRUE + /mob/living/carbon/human/handle_regular_hud_updates() if(hud_updateflag) // update our mob's hud overlays, AKA what others see flaoting above our head handle_hud_list() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index ff6bc3493ab..b49d0cf9e9b 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -113,12 +113,18 @@ //this handles hud updates. Calls update_vision() and handle_hud_icons() /mob/living/proc/handle_regular_hud_updates() - if(!client || QDELETED(src)) return 0 + if(!can_update_hud()) + return FALSE handle_hud_icons() handle_vision() - return 1 + return TRUE + +/mob/living/proc/can_update_hud() + if(!client || QDELETED(src)) + return FALSE + return TRUE /mob/living/proc/handle_vision() update_sight() diff --git a/code/modules/shareddream/brainghost.dm b/code/modules/shareddream/brainghost.dm index de9d59b5612..8cc059fa994 100644 --- a/code/modules/shareddream/brainghost.dm +++ b/code/modules/shareddream/brainghost.dm @@ -20,6 +20,12 @@ loc = pick(dream_entries) body = form + if(client) + client.screen |= body.healths + +/mob/living/brain_ghost/LateLogin() + ..() + client.screen |= body.healths /mob/living/brain_ghost/verb/awaken() set name = "Awaken" diff --git a/html/changelogs/geeves-body_awareness.yml b/html/changelogs/geeves-body_awareness.yml new file mode 100644 index 00000000000..62a3e69414a --- /dev/null +++ b/html/changelogs/geeves-body_awareness.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Skrell in Srom now get a health indicator that reflects that of their body, which gives them a rough idea of which state they're in." \ No newline at end of file