mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Fix HUD conflicts and inappropriate HUD removals
The Odysseus's medical HUD and the RD hardsuit's diagnostic HUD no longer conflict with wearing those HUDs as glasses. HUDs from glasses are no longer removed inappropriately by taking off a flightsuit's helmet.
This commit is contained in:
+10
-8
@@ -31,11 +31,10 @@ GLOBAL_LIST_INIT(huds, list(
|
||||
/datum/atom_hud/proc/remove_hud_from(mob/M)
|
||||
if(!M)
|
||||
return
|
||||
if(src in M.permanent_huds)
|
||||
return
|
||||
for(var/atom/A in hudatoms)
|
||||
remove_from_single_hud(M, A)
|
||||
hudusers -= M
|
||||
if (!--hudusers[M])
|
||||
hudusers -= M
|
||||
for(var/atom/A in hudatoms)
|
||||
remove_from_single_hud(M, A)
|
||||
|
||||
/datum/atom_hud/proc/remove_from_hud(atom/A)
|
||||
if(!A)
|
||||
@@ -54,9 +53,12 @@ GLOBAL_LIST_INIT(huds, list(
|
||||
/datum/atom_hud/proc/add_hud_to(mob/M)
|
||||
if(!M)
|
||||
return
|
||||
hudusers[M] = TRUE
|
||||
for(var/atom/A in hudatoms)
|
||||
add_to_single_hud(M, A)
|
||||
if (!hudusers[M])
|
||||
hudusers[M] = 1
|
||||
for(var/atom/A in hudatoms)
|
||||
add_to_single_hud(M, A)
|
||||
else
|
||||
hudusers[M]++
|
||||
|
||||
/datum/atom_hud/proc/add_to_hud(atom/A)
|
||||
if(!A)
|
||||
|
||||
Reference in New Issue
Block a user