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)
/mob/living/simple_animal/hostile/mimic/MouseEntered(location, control, params)
return // Do not call parent: Mimics shouldn't have tooltips!
/mob/living/simple_animal/hostile/mimic/will_show_tooltip()
return FALSE
//
// Crate Mimic

View File

@@ -1144,8 +1144,13 @@ mob/proc/yank_out_object()
/mob/proc/throw_item(atom/target)
return
/mob/proc/will_show_tooltip()
if(alpha <= EFFECTIVE_INVIS)
return FALSE
return TRUE
/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))
..()

View File

@@ -11,7 +11,7 @@
my_mob = this_guy
//It'd be nice to lazy init these but some of them are important to just EXIST. Like without ghost planemaster, you can see ghosts. Go figure.
// 'Utility' planes
plane_masters[VIS_FULLBRIGHT] = new /obj/screen/plane_master/fullbright //Lighting system (lighting_overlay objects)
plane_masters[VIS_LIGHTING] = new /obj/screen/plane_master/lighting //Lighting system (but different!)
@@ -52,6 +52,10 @@
var/obj/screen/plane_master/PM = plane_masters[which]
if(!PM)
crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
if(my_mob.alpha <= EFFECTIVE_INVIS)
state = FALSE
PM.set_visibility(state)
if(PM.sub_planes)
var/list/subplanes = PM.sub_planes