Files
Paradise/code/modules/clothing/glasses/glasses.dm
T

359 lines
10 KiB
Plaintext

/obj/item/clothing/glasses
name = "glasses"
icon = 'icons/obj/clothing/glasses.dmi'
//w_class = 2.0
//flags = GLASSESCOVERSEYES
//slot_flags = SLOT_EYES
//var/vision_flags = 0
//var/darkness_view = 0//Base human is 2
//var/invisa_view = 0
var/prescription = 0
var/prescription_upgradable = 0
var/see_darkness = 1
var/HUDType = 0
/obj/item/clothing/glasses/New()
. = ..()
if(prescription_upgradable && prescription)
// Pre-upgraded upgradable glasses
name = "prescription [name]"
/obj/item/clothing/glasses/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (user.stat || user.restrained() || !ishuman(user))
return ..()
var/mob/living/carbon/human/H = user
if(prescription_upgradable)
if(istype(O, /obj/item/clothing/glasses/regular))
if(prescription)
H << "You can't possibly imagine how adding more lenses would improve \the [name]."
return
H.unEquip(O)
O.loc = src // Store the glasses for later removal
H << "You fit \the [name] with lenses from \the [O]."
prescription = 1
name = "prescription [name]"
return
if(prescription && istype(O, /obj/item/weapon/screwdriver))
var/obj/item/clothing/glasses/regular/G = locate() in src
if(!G)
G = new(get_turf(H))
H << "You salvage the prescription lenses from \the [name]."
prescription = 0
name = initial(name)
H.put_in_hands(G)
return
return ..()
/obj/item/clothing/glasses/meson
name = "Optical Meson Scanner"
desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson"
item_state = "glasses"
origin_tech = "magnets=2;engineering=2"
vision_flags = SEE_TURFS
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/meson/night
name = "Night Vision Optical Meson Scanner"
desc = "An Optical Meson Scanner fitted with an amplified visible light spectrum overlay, providing greater visual clarity in darkness."
icon_state = "nvgmeson"
item_state = "glasses"
darkness_view = 8
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/meson/prescription
prescription = 1
/obj/item/clothing/glasses/meson/cyber
name = "Eye Replacement Implant"
desc = "An implanted replacement for a left eye with meson vision capabilities."
icon_state = "cybereye-green"
item_state = "eyepatch"
flags = NODROP
prescription_upgradable = 0
/obj/item/clothing/glasses/science
name = "Science Goggles"
desc = "nothing"
icon_state = "purple"
item_state = "glasses"
/obj/item/clothing/glasses/janitor
name = "Janitorial Goggles"
desc = "These'll keep the soap out of your eyes."
icon_state = "purple"
item_state = "glasses"
/obj/item/clothing/glasses/night
name = "Night Vision Goggles"
desc = "You can totally see in the dark now!"
icon_state = "night"
item_state = "glasses"
origin_tech = "magnets=2"
darkness_view = 8
see_darkness = 0
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/eyepatch
name = "eyepatch"
desc = "Yarr."
icon_state = "eyepatch"
item_state = "eyepatch"
/obj/item/clothing/glasses/monocle
name = "monocle"
desc = "Such a dapper eyepiece!"
icon_state = "monocle"
item_state = "headset" // lol
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/material
name = "Optical Material Scanner"
desc = "Very confusing glasses."
icon_state = "material"
item_state = "glasses"
origin_tech = "magnets=3;engineering=3"
vision_flags = SEE_OBJS
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/material/cyber
name = "Eye Replacement Implant"
desc = "An implanted replacement for a left eye with material vision capabilities."
icon_state = "cybereye-blue"
item_state = "eyepatch"
flags = NODROP
/obj/item/clothing/glasses/regular
name = "prescription glasses"
desc = "Made by Nerd. Co."
icon_state = "glasses"
item_state = "glasses"
prescription = 1
/obj/item/clothing/glasses/regular/hipster
name = "prescription glasses"
desc = "Made by Uncool. Co."
icon_state = "hipster_glasses"
item_state = "hipster_glasses"
/obj/item/clothing/glasses/threedglasses
desc = "A long time ago, people used these glasses to makes images from screens threedimensional."
name = "3D glasses"
icon_state = "3d"
item_state = "3d"
/obj/item/clothing/glasses/gglasses
name = "Green Glasses"
desc = "Forest green glasses, like the kind you'd wear when hatching a nasty scheme."
icon_state = "gglasses"
item_state = "gglasses"
/obj/item/clothing/glasses/sunglasses
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes."
name = "sunglasses"
icon_state = "sun"
item_state = "sunglasses"
darkness_view = 1
flash_protect = 1
tint = 1
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/virussunglasses
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes."
name = "sunglasses"
icon_state = "sun"
item_state = "sunglasses"
darkness_view = 1
flash_protect = 1
tint = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/welding
name = "welding goggles"
desc = "Protects the eyes from welders, approved by the mad scientist association."
icon_state = "welding-g"
item_state = "welding-g"
action_button_name = "Flip welding goggles"
var/up = 0
flash_protect = 2
tint = 2
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/welding/proc/getMask()
return global_hud.darkMask
/obj/item/clothing/glasses/welding/attack_self()
toggle()
/obj/item/clothing/glasses/welding/verb/toggle()
set category = "Object"
set name = "Adjust welding goggles"
set src in usr
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
src.flags |= GLASSESCOVERSEYES
flags_inv |= HIDEEYES
icon_state = initial(icon_state)
usr << "You flip the [src] down to protect your eyes."
flash_protect = 2
tint = initial(tint) //better than istype
else
src.up = !src.up
src.flags &= ~HEADCOVERSEYES
flags_inv &= ~HIDEEYES
icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face."
flash_protect = 0
tint = 0
usr.update_inv_glasses()
/obj/item/clothing/glasses/welding/superior
name = "superior welding goggles"
desc = "Welding goggles made from more expensive materials, strangely smells like potatoes."
icon_state = "rwelding-g"
item_state = "rwelding-g"
flash_protect = 2
tint = 0
action_button_name = "Flip welding goggles"
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/welding/superior/getMask()
return null
/obj/item/clothing/glasses/sunglasses/blindfold
name = "blindfold"
desc = "Covers the eyes, preventing sight."
icon_state = "blindfold"
item_state = "blindfold"
//vision_flags = BLIND
flash_protect = 2
tint = 3 //to make them blind
prescription_upgradable = 0
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/prescription
prescription = 1
/obj/item/clothing/glasses/sunglasses/big
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks many flashes."
icon_state = "bigsunglasses"
item_state = "bigsunglasses"
flash_protect = 1
tint = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/sechud
name = "HUDSunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunhud"
darkness_view = 1
flash_protect = 1
tint = 1
HUDType = SECHUD
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/sechud/prescription
prescription = 1
/obj/item/clothing/glasses/thermal
name = "Optical Thermal Scanner"
desc = "Thermals in the shape of glasses."
icon_state = "thermal"
item_state = "glasses"
origin_tech = "magnets=3"
vision_flags = SEE_MOBS
invisa_view = 2
flash_protect = -1
emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/M = src.loc
M << "\red The Optical Thermal Scanner overloads and blinds you!"
if(M.glasses == src)
M.eye_blind = 3
M.eye_blurry = 5
M.disabilities |= NEARSIGHTED
spawn(100)
M.disabilities &= ~NEARSIGHTED
..()
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
name = "Optical Meson Scanner"
desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson"
origin_tech = "magnets=3;syndicate=4"
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/thermal/monocle
name = "Thermoncle"
desc = "A monocle thermal."
icon_state = "thermoncle"
flags = null //doesn't protect eyes because it's a monocle, duh
/obj/item/clothing/glasses/thermal/eyepatch
name = "Optical Thermal Eyepatch"
desc = "An eyepatch with built-in thermal optics"
icon_state = "eyepatch"
item_state = "eyepatch"
/obj/item/clothing/glasses/thermal/jensen
name = "Optical Thermal Implants"
desc = "A set of implantable lenses designed to augment your vision"
icon_state = "thermalimplants"
item_state = "syringe_kit"
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/thermal/cyber
name = "Eye Replacement Implant"
desc = "An implanted replacement for a left eye with thermal vision capabilities."
icon_state = "cybereye-red"
item_state = "eyepatch"
flags = NODROP