Fixes bugs with AI examining and nearsighted updates

This commit is contained in:
Crazylemon64
2018-10-07 20:24:32 -07:00
parent 92e781c3c3
commit dc63265d94
4 changed files with 18 additions and 4 deletions
@@ -114,7 +114,7 @@
if(G.tint)
update_tint()
if(G.prescription)
clear_fullscreen("nearsighted")
update_nearsighted_effects()
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
update_sight()
update_inv_glasses()
@@ -266,8 +266,7 @@
if(G.tint)
update_tint()
if(G.prescription)
if(disabilities & NEARSIGHTED)
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
update_nearsighted_effects()
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
update_sight()
update_inv_glasses(redraw_mob)
@@ -18,3 +18,10 @@
if((health >= (config.health_threshold_dead + config.health_threshold_crit) * 0.5) && getBrainLoss()<120)
update_revive()
create_debug_log("revived from healing, trigger reason: [reason]")
/mob/living/carbon/human/update_nearsighted_effects()
var/obj/item/clothing/glasses/G = glasses
if((disabilities & NEARSIGHTED) && (!istype(G) || !G.prescription))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
else
clear_fullscreen("nearsighted")
@@ -11,5 +11,5 @@
create_debug_log("woke up, trigger reason: [reason]")
//diag_hud_set_status()
/mob/living/silicon/ai/has_vision()
/mob/living/silicon/ai/has_vision(information_only = FALSE)
return ..() && !lacks_power()