Improves AR glasses, makes them available

Now you can start with them in loadout. They are no longer SUNglasses though, so they won't protect you from flashes.

There are several models, the loadout ones are the civilian ones.

- Civilian: Displays job ID icon based on the person's ID, and shows a health bar only if they are injured.
- Medical: Same as civlian, but displays advanced status (virus, borer, etc) along with backup implant status, and allows medical records access.
- Security: Same as civilian, but displays warrant and arrest status, and will automatically darken (electrochromic) in response to flashes, making the wearer immune, plus security records access.
- Engineering: Same as civilian, but will automatically darken to protect one's eyes during welding.
- Research: Same as civilian, but has a trendy goggle form factor for SCIENCE reasons.
- Omni: Has the combined features of all of the above. The only pair available spawns in the CD's office. (CC officers also)
This commit is contained in:
Arokha Sieyes
2017-03-05 20:58:59 -05:00
parent ebf50d073a
commit c7857a5bf3
22 changed files with 242 additions and 77 deletions
@@ -0,0 +1,7 @@
/datum/gear/eyes/arglasses
display_name = "AR glasses"
path = /obj/item/clothing/glasses/omnihud
/datum/gear/eyes/arglassespres
display_name = "AR glasses, prescription"
path = /obj/item/clothing/glasses/omnihud/prescription
@@ -0,0 +1,58 @@
/obj/item/clothing/glasses/proc/prescribe(var/mob/user)
prescription = !prescription
//Look it's really not that fancy. It's not ACTUALLY unique scrip data.
if(prescription)
name = "[initial(name)] (pr)"
user.visible_message("[user] replaces the lenses in \the [src] with a new prescription.")
else
name = "[initial(name)]"
user.visible_message("[user] replaces the prescription lenses in \the [src] with generics.")
playsound(user,'sound/items/screwdriver.ogg', 50, 1)
//Prescription kit
/obj/item/device/glasses_kit
name = "prescription glasses kit"
desc = "A kit containing all the needed tools and parts to develop and apply a prescription for someone."
icon = 'icons/obj/device.dmi'
icon_state = "modkit"
var/scrip_loaded = 0
/obj/item/device/glasses_kit/afterattack(var/target, var/mob/living/carbon/human/user, var/proximity)
if(!proximity)
return
if(!istype(user))
return
//Too difficult
if(target == user)
user << "<span class='warning'>You can't use this on yourself. Get someone to help you.</span>"
return
//We're applying a prescription
if(istype(target,/obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = target
if(!scrip_loaded)
user << "<span class='warning'>You need to build a prescription from someone first! Use the kit on someone.</span>"
return
if(do_after(user,5 SECONDS))
G.prescribe(user)
scrip_loaded = 0
//We're getting a prescription
else if(ishuman(target))
var/mob/living/carbon/human/T = target
if(T.glasses || (T.head && T.head.flags_inv & HIDEEYES))
user << "<span class='warning'>The person's eyes can't be covered!</span>"
return
T.visible_message("[user] begins making measurements for prescription lenses for [target].","[user] begins measuring your eyes. Hold still!")
if(do_after(user,5 SECONDS,T))
T.flash_eyes()
scrip_loaded = 1
T.visible_message("[user] finishes making prescription lenses for [target].","<span class='warning'>Gah, that's bright!</span>")
else
..()
+60 -24
View File
@@ -1,50 +1,86 @@
/obj/item/clothing/glasses/sunglasses/omnihud
name = "AR sunglasses"
desc = "The KHI-63 AR Sunglasses are a design from Kitsuhana Heavy Industries. \
Not as complete as specialist HUD systems in their standard configuration, but they \
do combine features from several different existing HUDs."
/obj/item/clothing/glasses/omnihud
name = "a.r. glasses"
desc = "The KHI-62 AR Glasses are a design from Kitsuhana Heavy Industries. These are a cheap export version \
for Nanotrasen. Probably not as complete as KHI could make them, but more readily available for NT."
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 3)
var/obj/item/clothing/glasses/hud/omni/hud = null
icon = 'icons/vore/custom_items_vr.dmi'
icon_override = 'icons/vore/custom_clothes_vr.dmi'
icon_state = "omniglasses"
var/mode = "civ"
icon_state = "glasses"
var/flash_prot = 0 //0 for none, 1 for flash weapon protection, 2 for welder protection
New()
..()
src.hud = new/obj/item/clothing/glasses/hud/omni(src)
return
/obj/item/clothing/glasses/sunglasses/omnihud/cmo
name = "AR-M sunglasses"
desc = "The KHI-63-M AR Sunglasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with advanced medical records integration."
proc/flashed()
if(flash_prot && ishuman(loc))
loc << "<span class='warning'>Your [src.name] darken to try and protect your eyes!</span>"
prescribe(var/mob/user)
prescription = !prescription
//Look it's really not that fancy. It's not ACTUALLY unique scrip data.
if(prescription)
name = "[initial(name)] (pr)"
user.visible_message("[user] uploads new prescription data to \the [src.name].")
else
name = "[initial(name)]"
user.visible_message("[user] deletes the prescription data of \the [src.name].")
playsound(user,'sound/items/screwdriver.ogg', 50, 1)
/obj/item/clothing/glasses/omnihud/prescription
name = "AR glasses (pr)"
prescription = 1
/obj/item/clothing/glasses/omnihud/med
name = "AR-M glasses"
desc = "The KHI-62-M AR glasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with medical records access and virus database integration."
mode = "med"
/obj/item/clothing/glasses/sunglasses/omnihud/hos
name = "AR-S sunglasses"
desc = "The KHI-63-S AR Sunglasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with advanced security records integration."
/obj/item/clothing/glasses/omnihud/sec
name = "AR-S glasses"
desc = "The KHI-62-S AR glasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with security records integration and flash protection."
mode = "sec"
flash_prot = 1 //Flash protection.
/obj/item/clothing/glasses/sunglasses/omnihud/best
name = "AR-B sunglasses"
desc = "The KHI-63-B AR Sunglasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with advanced medical and security records integration."
/obj/item/clothing/glasses/omnihud/eng
name = "AR-E glasses"
desc = "The KHI-62-E AR glasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with advanced electrochromic lenses to protect your eyes during welding."
mode = "civ"
flash_prot = 2 //Welding protection.
/obj/item/clothing/glasses/omnihud/rnd
name = "AR-R glasses"
desc = "The KHI-62-R AR glasses are a design from Kitsuhana Heavy Industries. \
These have been ... modified ... to fit into a different frame."
icon = 'icons/obj/clothing/glasses.dmi'
icon_override = null
icon_state = "purple"
mode = "civ"
/obj/item/clothing/glasses/omnihud/all
name = "AR-B glasses"
desc = "The KHI-62-B AR glasses are a design from Kitsuhana Heavy Industries. \
These have been upgraded with every feature the lesser models have. Now we're talkin'."
mode = "best"
flash_prot = 2 //Welding protection.
/obj/item/clothing/glasses/hud/omni
name = "internal omni hud"
desc = "You shouldn't see this. This is an internal item for sunglasses."
var/obj/item/clothing/glasses/sunglasses/omnihud/shades = null
desc = "You shouldn't see this. This is an internal item for glasses."
var/obj/item/clothing/glasses/omnihud/shades = null
vision_flags = SEE_MOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING
New()
..()
if(istype(loc,/obj/item/clothing/glasses/sunglasses/omnihud))
if(istype(loc,/obj/item/clothing/glasses/omnihud))
shades = loc
else
qdel(src)
@@ -114,10 +114,10 @@
//For OmniHUD records access for appropriate models
/proc/hasHUD_vr(mob/living/carbon/human/H, hudtype)
if(!(istype(H.glasses, /obj/item/clothing/glasses/sunglasses/omnihud)))
if(!(istype(H.glasses, /obj/item/clothing/glasses/omnihud)))
return 0 //Not wearing omnis, don't care.
var/obj/item/clothing/glasses/sunglasses/omnihud/omni = H.glasses
var/obj/item/clothing/glasses/omnihud/omni = H.glasses
switch(hudtype)
if("security")
@@ -32,6 +32,11 @@
hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud_med.dmi', src, "100")
hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
//VOREStation Add - Custom HUDs
hud_list[HEALTH_VR_HUD] = new /image/hud_overlay('icons/mob/hud_med_vr.dmi', src, "100")
hud_list[STATUS_R_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudhealthy")
hud_list[BACKUP_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudblank")
//VOREStation Add End
hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
hud_list[ID_HUD] = new /image/hud_overlay(using_map.id_hud_icons, src, "hudunknown")
hud_list[WANTED_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
@@ -710,6 +715,12 @@
var/obj/item/clothing/glasses/welding/W = src.glasses
if(!W.up)
number += 2
//VOREStation Add - Omnihud Handling
if(istype(src.glasses, /obj/item/clothing/glasses/omnihud))
var/obj/item/clothing/glasses/omnihud/omn = src.glasses
number += omn.flash_prot
omn.flashed()
//VOREStation Add End
return number
//Used by various things that knock people out by applying blunt trauma to the head.
+3 -2
View File
@@ -1334,8 +1334,8 @@
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
var/obj/item/clothing/glasses/hud/O = G
//VOREStation Add - Support for omnihud glasses
if(istype(G, /obj/item/clothing/glasses/sunglasses/omnihud))
var/obj/item/clothing/glasses/sunglasses/omnihud/S = G
if(istype(G, /obj/item/clothing/glasses/omnihud))
var/obj/item/clothing/glasses/omnihud/S = G
O = S.hud
//VOREStation Add End
if(istype(G, /obj/item/clothing/glasses/sunglasses/sechud))
@@ -1662,6 +1662,7 @@
else
holder.icon_state = "hudsyndicate"
hud_list[SPECIALROLE_HUD] = holder
attempt_vr(src,"handle_hud_list_vr",list()) //VOREStation Add - Custom HUDs.
hud_updateflag = 0
/mob/living/carbon/human/handle_stunned()
@@ -5,3 +5,33 @@
else if (nutrition <= 50 && stat != 2 && weight > 70 && weight_loss)
weight -= metabolism*(0.01*weight_loss) // starvation weight loss
/mob/living/carbon/human/proc/handle_hud_list_vr()
//Right-side status hud updates with left side one.
if (BITTEST(hud_updateflag, STATUS_HUD))
var/image/other_status = hud_list[STATUS_HUD]
var/image/status_r = hud_list[STATUS_R_HUD]
status_r.icon_state = other_status.icon_state
//Our custom health bar HUD
if (BITTEST(hud_updateflag, HEALTH_HUD))
var/image/other_health = hud_list[HEALTH_HUD]
var/image/health_us = hud_list[HEALTH_VR_HUD]
health_us.icon_state = other_health.icon_state
//Backup implant hud status
if (BITTEST(hud_updateflag, BACKUP_HUD))
var/image/holder = hud_list[BACKUP_HUD]
holder.icon_state = "hudblank"
for(var/obj/item/weapon/implant/I in src)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/backup))
if(!mind)
holder.icon_state = "hud_backup_nomind"
else if(!(mind.name in transcore.body_scans))
holder.icon_state = "hud_backup_nobody"
else
holder.icon_state = "hud_backup_norm"
+2 -2
View File
@@ -30,11 +30,11 @@
sort_string = "TAAAB"
/datum/design/item/hud/omni
name = "AR sunglasses"
name = "AR glasses"
id = "omnihud"
req_tech = list(TECH_MAGNET = 4, TECH_COMBAT = 3, TECH_BIO = 3)
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 1000)
build_path = /obj/item/clothing/glasses/sunglasses/omnihud
build_path = /obj/item/clothing/glasses/omnihud
sort_string = "GAAFB"
// Resleeving Circuitboards
+6 -3
View File
@@ -42,9 +42,12 @@
last_attempt = world.time
var/mob/living/carbon/human/H = loc
//Okay we're in a human with a mind at least
if(istype(H) && H == imp_in && H.mind && H.stat < DEAD)
transcore.m_backup(H.mind)
//We're in a human, at least.
if(istype(H))
BITSET(H.hud_updateflag, BACKUP_HUD)
//Okay we've got a mind at least
if(H == imp_in && H.mind && H.stat < DEAD)
transcore.m_backup(H.mind)
spawn(attempt_delay)
backup()
@@ -168,7 +168,7 @@
new /obj/item/weapon/card/id/centcom/fluff/aronai(src)
new /obj/item/fluff/permit/aronai_kadigan(src)
new /obj/item/clothing/under/rank/khi/fluff/aronai(src)
new /obj/item/clothing/glasses/sunglasses/omnihud(src)
new /obj/item/clothing/glasses/omnihud/all(src)
//Gun and holster
new /obj/item/weapon/gun/projectile/khi/pistol(src)
new /obj/item/ammo_magazine/c45m/flash(src)
@@ -785,10 +785,11 @@
starting_accessories = list(/obj/item/clothing/accessory/black)
//Kisukegema:Kisuke `the nerd` Gema
/obj/item/clothing/glasses/sunglasses/omnihud/kamina
/obj/item/clothing/glasses/omnihud/kamina
name = "Kamina glasses"
icon_state = "kamina"
desc = "ROW ROW, FIGHT THE POWER."
flash_prot = 1 //Why not.
//Kitsuhana Uniforms
/obj/item/clothing/under/rank/khi