Made nearsightedness not consume a fuckton of memory.

Also it now adds glasses on preview pic.
This commit is contained in:
Spamcat
2013-05-03 23:58:56 +04:00
parent 203873bef9
commit f7f6c682cf
5 changed files with 18 additions and 11 deletions
+8 -2
View File
@@ -1227,8 +1227,14 @@
if(blinded) blind.layer = 18
else blind.layer = 0
if( disabilities & NEARSIGHTED && ((glasses && !glasses.prescription) || !glasses))
client.screen += global_hud.vimpaired
if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
if(glasses) //to every /obj/item
var/obj/item/clothing/glasses/G = glasses
if(!G.prescription)
client.screen += global_hud.vimpaired
else
client.screen += global_hud.vimpaired
if(eye_blurry) client.screen += global_hud.blurry
if(druggy) client.screen += global_hud.druggy
@@ -558,6 +558,9 @@ datum/preferences
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(disabilities & NEARSIGHTED)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)