Low alpha now makes HUDs and tooltips not show up on you

This commit is contained in:
Anewbe
2018-08-22 18:00:10 -05:00
parent 6f909ce590
commit e8c9a44fbc
3 changed files with 14 additions and 4 deletions

View File

@@ -48,8 +48,9 @@
..() ..()
qdel(src) qdel(src)
/mob/living/simple_animal/hostile/mimic/MouseEntered(location, control, params) /mob/living/simple_animal/hostile/mimic/will_show_tooltip()
return // Do not call parent: Mimics shouldn't have tooltips! return FALSE
// //
// Crate Mimic // Crate Mimic

View File

@@ -1144,8 +1144,13 @@ mob/proc/yank_out_object()
/mob/proc/throw_item(atom/target) /mob/proc/throw_item(atom/target)
return return
/mob/proc/will_show_tooltip()
if(alpha <= EFFECTIVE_INVIS)
return FALSE
return TRUE
/mob/MouseEntered(location, control, params) /mob/MouseEntered(location, control, params)
if(usr != src && usr.is_preference_enabled(/datum/client_preference/mob_tooltips)) if(usr != src && usr.is_preference_enabled(/datum/client_preference/mob_tooltips) && src.will_show_tooltip())
openToolTip(user = usr, tip_src = src, params = params, title = get_nametag_name(usr), content = get_nametag_desc(usr)) openToolTip(user = usr, tip_src = src, params = params, title = get_nametag_name(usr), content = get_nametag_desc(usr))
..() ..()

View File

@@ -52,6 +52,10 @@
var/obj/screen/plane_master/PM = plane_masters[which] var/obj/screen/plane_master/PM = plane_masters[which]
if(!PM) if(!PM)
crash_with("Tried to alter [which] in plane_holder on [my_mob]!") crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
if(my_mob.alpha <= EFFECTIVE_INVIS)
state = FALSE
PM.set_visibility(state) PM.set_visibility(state)
if(PM.sub_planes) if(PM.sub_planes)
var/list/subplanes = PM.sub_planes var/list/subplanes = PM.sub_planes