accessibility or some shit ig

This commit is contained in:
Hatterhat
2022-12-26 03:45:26 -06:00
parent 5ee1e5414f
commit ab827ff8dc
9 changed files with 64 additions and 108 deletions
+8 -4
View File
@@ -27,6 +27,11 @@
if(glass_colour_type && ishuman(user))
. += "<span class='notice'>Alt-click to toggle its colors.</span>"
/obj/item/clothing/glasses/proc/prescribe()
vision_correction = TRUE
name = "prescription [src]"
desc += " These have been fitted with a prescription overlay device, and thus correct some vision deficiencies."
/obj/item/clothing/glasses/visor_toggling()
..()
if(visor_vars_to_toggle & VISOR_VISIONFLAGS)
@@ -128,10 +133,9 @@
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
glass_colour_type = /datum/client_colour/glass_colour/green
/obj/item/clothing/glasses/night/prescription
name = "prescription night vision goggles"
desc = "NVGs but for those with nearsightedness."
vision_correction = 1
/obj/item/clothing/glasses/night/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/night/syndicate
name = "combat night vision goggles"
+19 -31
View File
@@ -14,6 +14,7 @@
if(G.vision_correction)
vision_correction = TRUE
name = "prescription [name]"
desc += " These have been made with some form of vision-correcting eyewear, thus making them innately correct some vision deficiencies."
return
/obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot)
@@ -55,14 +56,9 @@
hud_type = DATA_HUD_MEDICAL_ADVANCED
glass_colour_type = /datum/client_colour/glass_colour/lightblue
/obj/item/clothing/glasses/hud/health/prescription
name = "prescription health scanner HUD"
desc = "A heads-up display, made with a prescription lens, that scans the humans in view and provides accurate data about their health status."
icon_state = "healthhud"
hud_type = DATA_HUD_MEDICAL_ADVANCED
vision_correction = 1
glass_colour_type = /datum/client_colour/glass_colour/lightblue
/obj/item/clothing/glasses/hud/health/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/hud/health/night
name = "night vision health scanner HUD"
desc = "An advanced medical heads-up display that allows doctors to find patients in complete darkness."
@@ -88,9 +84,9 @@
tint = 1
glass_colour_type = /datum/client_colour/glass_colour/blue
/obj/item/clothing/glasses/hud/health/sunglasses/prescription
name = "prescription medical HUDSunglasses"
vision_correction = 1
/obj/item/clothing/glasses/hud/health/sunglasses/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/hud/health/eyepatch
name = "eyepatch medHUD"
@@ -117,17 +113,13 @@
flash_protect = 1
tint = 1
/obj/item/clothing/glasses/hud/diagnostic/prescription
name = "prescription diagnostic HUD"
desc = "A heads-up display capable of analyzing the integrity and status of robotics and exosuits. This one has a prescription lens."
icon_state = "diagnostichud"
hud_type = DATA_HUD_DIAGNOSTIC_BASIC
vision_correction = 1
glass_colour_type = /datum/client_colour/glass_colour/lightorange
/obj/item/clothing/glasses/hud/diagnostic/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/hud/diagnostic/sunglasses/prescription
name = "prescription diagnostic HUDSunglasses"
vision_correction = 1
/obj/item/clothing/glasses/hud/diagnostic/sunglasses/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/hud/diagnostic/night
name = "night vision diagnostic HUD"
@@ -155,13 +147,9 @@
hud_type = DATA_HUD_SECURITY_ADVANCED
glass_colour_type = /datum/client_colour/glass_colour/red
/obj/item/clothing/glasses/hud/security/prescription
name = "prescription security HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records. This one has a prescription lens so you can see the banana peal that slipped you."
icon_state = "securityhud"
hud_type = DATA_HUD_SECURITY_ADVANCED
vision_correction = 1
glass_colour_type = /datum/client_colour/glass_colour/red
/obj/item/clothing/glasses/hud/security/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/hud/security/chameleon
name = "chameleon security HUD"
@@ -200,9 +188,9 @@
desc = "A heads-up display that connects directly to the optical nerve of the user, replacing the need for that useless eyeball."
icon_state = "hudpatch"
/obj/item/clothing/glasses/hud/security/sunglasses/prescription
name = "prescription security HUDSunglasses"
vision_correction = 1
/obj/item/clothing/glasses/hud/security/sunglasses/prescription/Initialize(mapload)
. = ..()
prescribe()
/obj/item/clothing/glasses/hud/security/night
name = "night vision security HUD"
@@ -0,0 +1,24 @@
// don't you love single purpose files? i do too.
/obj/item/prescription_kit
name = "prescription lens kit"
desc = "A kit containing all the needed tools and parts to develop and apply a self-modifying prescription lens overlay device to any eyewear."
icon = 'icons/obj/device.dmi'
icon_state = "modkit"
/obj/item/prescription_kit/examine_more(mob/user)
. = ..()
/obj/item/prescription_kit/attack_obj(obj/O, mob/living/user)
if(!istype(O, /obj/item/clothing/glasses))
return ..()
if(istype(O, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/target_glasses = O
if(target_glasses.vision_correction)
to_chat(user, span_notice("These are already fitted with prescription lenses or otherwise already correct vision!"))
return
playsound(src, 'sound/items/screwdriver.ogg', 50, 1)
user.visible_message(span_notice("[user] fits \the [target_glasses] with a prescription overlay device."), span_notice("You fit \the [target_glasses] with a prescription overlay device."))
target_glasses.prescribe()
target_glasses.balloon_alert(user, "prescription fitted!")