From 5e6b28b5ccb4e72e22156235c453f4ab291e2433 Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Tue, 14 Nov 2023 05:04:17 +0100
Subject: [PATCH] [MIRROR] Fixes Invisimin to not show up on HUDs [MDB IGNORE]
(#25000)
* Fixes Invisimin to not show up on HUDs (#79605)
## About The Pull Request
Adds _**2 lines of code**_ that enables and disables being able to be
spotted with sec/med huds.
## Why It's Good For The Game
Fixes https://github.com/tgstation/tgstation/issues/72198 and
https://github.com/tgstation/tgstation/issues/36709 since they're the
same issue. This has been around for almost a year now which suggets
that maybe this verb wasn't being used much anyways. But fixes are fixes
and fixed code is healthy code.
## Changelog
:cl: TwistedSilicon
fix: invisimin verb now makes you invisible to all HUDs too! No more
floating healthbars or job identifiers giving you away while you sneak
around.
/:cl:
Before
https://github.com/tgstation/tgstation/assets/106436013/02b7999b-ae7b-4f79-bd0e-d353d0026db2
After
### MedHuds
https://github.com/tgstation/tgstation/assets/106436013/0845c623-8ea1-4c95-825b-008d0be1a428
### SecHuds
https://github.com/tgstation/tgstation/assets/106436013/8af5cd9d-ad6a-4758-8efd-1cce9ca7a643
No more of this:

(So for the love of GOD do not invismin next to a chasm or SM shard,
since not even you know where you are anymore.)
* Fixes Invisimin to not show up on HUDs
---------
Co-authored-by: TwistedCicrularConvexLens <106436013+TwistedCicrularConvexLens@users.noreply.github.com>
---
code/modules/admin/admin_verbs.dm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 988eb1c8287..e3574081e0b 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -394,10 +394,12 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(isnull(holder) || isnull(mob))
return
if(mob.invisimin)
+ mob.add_to_all_human_data_huds()
mob.invisimin = FALSE
mob.RemoveInvisibility(INVISIBILITY_SOURCE_INVISIMIN)
to_chat(mob, span_boldannounce("Invisimin off. Invisibility reset."), confidential = TRUE)
else
+ mob.remove_from_all_data_huds()
mob.invisimin = TRUE
mob.SetInvisibility(INVISIBILITY_OBSERVER, INVISIBILITY_SOURCE_INVISIMIN, INVISIBILITY_PRIORITY_ADMIN)
to_chat(mob, span_adminnotice("Invisimin on. You are now as invisible as a ghost."), confidential = TRUE)