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

View File

@@ -159,6 +159,14 @@
/datum/dna/gene/disability/nearsighted/New()
block=GLASSESBLOCK
/datum/dna/gene/disability/nearsighted/activate(mob/living/M, connected, flags)
. = ..()
M.update_nearsighted_effects()
/datum/dna/gene/disability/nearsighted/deactivate(mob/living/M, connected, flags)
. = ..()
M.update_nearsighted_effects()
/datum/dna/gene/disability/lisp
name = "Lisp"
desc = "I wonder wath thith doeth."

View File

@@ -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)

View File

@@ -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")

View File

@@ -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()