diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 21004a163e..1f6de94092 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -27,6 +27,11 @@ if(glass_colour_type && ishuman(user)) . += "Alt-click to toggle its colors." +/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" diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index c848dbdfa8..e5201c665c 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -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" diff --git a/code/modules/clothing/glasses/prescription_kit.dm b/code/modules/clothing/glasses/prescription_kit.dm new file mode 100644 index 0000000000..ea9c681c4e --- /dev/null +++ b/code/modules/clothing/glasses/prescription_kit.dm @@ -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!") diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index 630a3629cf..a4ac4b092d 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -12,16 +12,6 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL -/datum/design/health_hud_prescription - name = "Prescription Health Scanner HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. This one has a prescription lens." - id = "health_hud_prescription" - build_type = PROTOLATHE - materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 350) - build_path = /obj/item/clothing/glasses/hud/health/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL - /datum/design/health_hud_night name = "Night Vision Health Scanner HUD" desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness." @@ -42,16 +32,6 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_SECURITY -/datum/design/security_hud_prescription - name = "Prescription Security HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status. This one has a prescription lens." - id = "security_hud_prescription" - build_type = PROTOLATHE - materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 350) - build_path = /obj/item/clothing/glasses/hud/security/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SECURITY - /datum/design/security_hud_night name = "Night Vision Security HUD" desc = "A heads-up display which provides id data and vision in complete darkness." @@ -72,16 +52,6 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_SCIENCE -/datum/design/diagnostic_hud_prescription - name = "Prescription Diagnostic HUD" - desc = "A HUD used to analyze and determine faults within robotic machinery. This one has a prescription lens." - id = "diagnostic_hud_prescription" - build_type = PROTOLATHE - materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/gold = 350) - build_path = /obj/item/clothing/glasses/hud/diagnostic/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE - /datum/design/diagnostic_hud_night name = "Night Vision Diagnostic HUD" desc = "Upgraded version of the diagnostic HUD designed to function during a power failure." @@ -112,16 +82,6 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING -/datum/design/mesons_prescription - name = "Prescription Optical Meson Scanners" - desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition. Prescription lens has been added into this design." - id = "mesons_prescription" - build_type = PROTOLATHE - materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 350) - build_path = /obj/item/clothing/glasses/meson/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING - /datum/design/engine_goggles name = "Engineering Scanner Goggles" desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes." @@ -132,16 +92,6 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING -/datum/design/engine_goggles_prescription - name = "Prescription Engineering Scanner Goggles" - desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes. Prescription lens has been added into this design." - id = "engine_goggles_prescription" - build_type = PROTOLATHE - materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/plasma = 100, /datum/material/silver = 350) - build_path = /obj/item/clothing/glasses/meson/engine/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - /datum/design/tray_goggles name = "Optical T-Ray Scanners" desc = "Used by engineering staff to see underfloor objects such as cables and pipes." @@ -152,16 +102,6 @@ category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING -/datum/design/tray_goggles_prescription - name = "Prescription Optical T-Ray Scanners" - desc = "Used by engineering staff to see underfloor objects such as cables and pipes. Prescription lens has been added into this design." - id = "tray_goggles_prescription" - build_type = PROTOLATHE - materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 150) - build_path = /obj/item/clothing/glasses/meson/engine/tray/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - /datum/design/nvgmesons name = "Night Vision Optical Meson Scanners" desc = "Prototype meson scanners fitted with an extra sensor which amplifies the visible light spectrum and overlays it to the UHD display." @@ -175,22 +115,22 @@ /datum/design/night_vision_goggles name = "Night Vision Goggles" desc = "Goggles that let you see through darkness unhindered." - id = "night_visision_goggles" + id = "night_vision_goggles" build_type = PROTOLATHE materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/plasma = 350, /datum/material/uranium = 1000) build_path = /obj/item/clothing/glasses/night category = list("Equipment") departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY -/datum/design/night_vision_goggles_glasses - name = "Prescription Night Vision Goggles" - desc = "Goggles that let you see through darkness unhindered. Corrects vision." - id = "night_visision_goggles_glasses" +/datum/design/prescription_kit + name = "Prescription Lens Kit" + desc = "A do-it-yourself kit that lets you add a prescription overlay to any HUDs or other eyewear. Even the ones that shouldn't." + id = "prescription_kit" build_type = PROTOLATHE - materials = list(/datum/material/iron = 600, /datum/material/glass = 600, /datum/material/plasma = 350, /datum/material/uranium = 1000) - build_path = /obj/item/clothing/glasses/night/prescription + materials = list(/datum/material/iron = 500, /datum/material/glass = 200, /datum/material/silver = 100) // silver because i guess all the prescription HUDs had it? + build_path = /obj/item/prescription_kit category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_ENGINEERING + departmental_flags = DEPARTMENTAL_FLAG_ALL ///////////////////////////////////////// //////////////////Misc/////////////////// diff --git a/code/modules/research/techweb/nodes/biotech_nodes.dm b/code/modules/research/techweb/nodes/biotech_nodes.dm index 350bbaa5c3..1a3aa2644e 100644 --- a/code/modules/research/techweb/nodes/biotech_nodes.dm +++ b/code/modules/research/techweb/nodes/biotech_nodes.dm @@ -13,7 +13,7 @@ display_name = "Advanced Biotechnology" description = "Advanced Biotechnology" prereq_ids = list("biotech") - design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "defibrillator_compact", "smartdartgun", "medicinalsmartdart", "pHmeter", "hypospray_mkii", "containmentbodybag") + design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "defibrillator_compact", "smartdartgun", "medicinalsmartdart", "pHmeter", "hypospray_mkii", "containmentbodybag", "prescription_kit") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) /datum/techweb_node/bio_process diff --git a/code/modules/research/techweb/nodes/computer_hud_nodes.dm b/code/modules/research/techweb/nodes/computer_hud_nodes.dm index 0f2cf2e4bd..780c146fee 100644 --- a/code/modules/research/techweb/nodes/computer_hud_nodes.dm +++ b/code/modules/research/techweb/nodes/computer_hud_nodes.dm @@ -40,7 +40,7 @@ display_name = "Integrated HUDs" description = "The usefulness of computerized records, projected straight onto your eyepiece!" prereq_ids = list("comp_recordkeeping", "emp_basic") - design_ids = list("health_hud", "security_hud", "diagnostic_hud", "scigoggles", "health_hud_prescription", "security_hud_prescription", "diagnostic_hud_prescription") + design_ids = list("health_hud", "security_hud", "diagnostic_hud", "scigoggles") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500) /datum/techweb_node/NVGtech @@ -48,7 +48,7 @@ display_name = "Night Vision Technology" description = "Allows seeing in the dark without actual light!" prereq_ids = list("integrated_HUDs", "adv_engi", "emp_adv") - design_ids = list("health_hud_night", "security_hud_night", "diagnostic_hud_night", "night_visision_goggles", "nvgmesons", "night_visision_goggles_glasses") + design_ids = list("health_hud_night", "security_hud_night", "diagnostic_hud_night", "night_vision_goggles", "nvgmesons") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) /datum/techweb_node/computer_board_gaming diff --git a/code/modules/research/techweb/nodes/engineering_nodes.dm b/code/modules/research/techweb/nodes/engineering_nodes.dm index 2b5d6f3cc1..1deb97c3bd 100644 --- a/code/modules/research/techweb/nodes/engineering_nodes.dm +++ b/code/modules/research/techweb/nodes/engineering_nodes.dm @@ -17,8 +17,7 @@ description = "Pushing the boundaries of physics, one chainsaw-fist at a time." prereq_ids = list("engineering", "emp_basic") design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask" , "rcd_loaded", "rpd", - "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "rcd_upgrade_frames", - "rcd_upgrade_simple_circuits", "rcd_ammo_large", "sheetifier") + "rcd_upgrade_frames", "rcd_upgrade_simple_circuits", "rcd_ammo_large", "sheetifier") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000) /datum/techweb_node/anomaly diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 62fe5bbf92..01bb25535f 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/tgstation.dme b/tgstation.dme index c010fc66fe..af966bb6eb 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2034,6 +2034,7 @@ #include "code\modules\clothing\glasses\engine_goggles.dm" #include "code\modules\clothing\glasses\hud.dm" #include "code\modules\clothing\glasses\phantomthief.dm" +#include "code\modules\clothing\glasses\prescription_kit.dm" #include "code\modules\clothing\gloves\_gloves.dm" #include "code\modules\clothing\gloves\boxing.dm" #include "code\modules\clothing\gloves\color.dm"