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:
Tad Hardesty
2017-11-15 02:00:27 -08:00
parent a0ded89ca7
commit 8423e0e685
5 changed files with 19 additions and 34 deletions
+10 -8
View File
@@ -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)