mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Made nearsightedness not consume a fuckton of memory.
Also it now adds glasses on preview pic.
This commit is contained in:
@@ -1008,11 +1008,9 @@ datum/preferences
|
||||
gender = FEMALE
|
||||
else
|
||||
gender = MALE
|
||||
if("disabilities")
|
||||
if(disabilities == 0)
|
||||
disabilities = 1
|
||||
else
|
||||
disabilities = 0
|
||||
|
||||
if("disabilities") //please note: current code only allows nearsightedness as a disability
|
||||
disabilities = !disabilities//if you want to add actual disabilities, code that selects them should be here
|
||||
|
||||
if("hear_adminhelps")
|
||||
toggles ^= SOUND_ADMINHELP
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/obj/item
|
||||
var/prescription = 0
|
||||
|
||||
/obj/item/clothing
|
||||
name = "clothing"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//var/vision_flags = 0
|
||||
//var/darkness_view = 0//Base human is 2
|
||||
//var/invisa_view = 0
|
||||
//var/prescription = 0
|
||||
var/prescription = 0
|
||||
|
||||
/obj/item/clothing/glasses/meson
|
||||
name = "Optical Meson Scanner"
|
||||
@@ -19,6 +19,8 @@
|
||||
vision_flags = SEE_TURFS
|
||||
|
||||
/obj/item/clothing/glasses/meson/prescription
|
||||
name = "prescription mesons"
|
||||
desc = "Optical Meson Scanner with prescription lenses."
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/science
|
||||
@@ -123,6 +125,7 @@
|
||||
vision_flags = BLIND
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/prescription
|
||||
name = "prescription sunglasses"
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/big
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user