Refactor atom HUDs to track source of HUD gain/loss. (#32091)

* Refactor atom HUDs to track source of HUD gain/loss.

* Retain shared images from different huds on removal.

* Fix some ghost HUD toggles.

* Add HUD sources to more hud add/remove calls.

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Check if a user has a hud before removing it, autodoc.

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
Alan
2026-08-28 23:44:05 +00:00
committed by GitHub
co-authored by CRUNCH
parent e5e3b2c16a
commit 635e4b170e
24 changed files with 98 additions and 87 deletions
@@ -39,11 +39,11 @@
remove_verb(src, /mob/living/verb/pulled)
remove_verb(src, /mob/verb/me_verb)
var/datum/atom_hud/med_hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
med_hud.add_hud_to(src)
med_hud.add_hud_to(src, "lightgeist")
/mob/living/basic/lightgeist/Destroy()
var/datum/atom_hud/med_hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
med_hud.remove_hud_from(src)
med_hud.remove_hud_from(src, "lightgeist")
return ..()
/mob/living/basic/lightgeist/melee_attack(atom/target, list/modifiers, ignore_cooldown)