Cleans up MedAviator code, adds normal aviators to the Command/Sec loadout

This commit is contained in:
Anewbe
2017-10-23 16:30:09 -05:00
parent ca84cd326a
commit 09ff4c1a3a
3 changed files with 25 additions and 53 deletions

View File

@@ -61,11 +61,11 @@
/datum/gear/eyes/medical/aviator
display_name = "Medical HUD Aviators (Medical)"
path = /obj/item/clothing/glasses/sunglasses/medhud/aviator
path = /obj/item/clothing/glasses/hud/health/aviator
/datum/gear/eyes/medical/aviator/prescription
display_name = "Medical HUD Aviators, prescription (Medical)"
path = /obj/item/clothing/glasses/sunglasses/medhud/aviator/prescription
path = /obj/item/clothing/glasses/hud/health/aviator/prescription
/datum/gear/eyes/meson
display_name = "Optical Meson Scanners (Engineering, Science)"
@@ -93,8 +93,6 @@
display_name = "Optical Meson Aviators, prescription (Engineering)"
path = /obj/item/clothing/glasses/meson/aviator/prescription
/datum/gear/eyes/meson/aviator/prescription
/datum/gear/eyes/glasses/fakesun
display_name = "Sunglasses, stylish"
path = /obj/item/clothing/glasses/fakesunglasses
@@ -112,6 +110,10 @@
display_name = "Sunglasses, fat (Security/Command)"
path = /obj/item/clothing/glasses/sunglasses/big
/datum/gear/eyes/sun/aviators
display_name = "Sunglasses, aviators (Security/Command)"
path = /obj/item/clothing/glasses/sunglasses/aviator
/datum/gear/eyes/sun/prescriptionsun
display_name = "sunglasses, presciption (Security/Command)"
path = /obj/item/clothing/glasses/sunglasses/prescription

View File

@@ -82,6 +82,20 @@ BLIND // can't see anything
desc = "Engineering Aviators with prescription lenses."
prescription = 1
/obj/item/clothing/glasses/hud/health/aviator
name = "medical HUD aviators"
desc = "Modified aviator glasses with a toggled health HUD."
icon_state = "aviator_med"
off_state = "aviator"
action_button_name = "Toggle Mode"
toggleable = 1
activation_sound = 'sound/effects/pop.ogg'
/obj/item/clothing/glasses/hud/health/aviator/prescription
name = "prescription medical HUD aviators"
desc = "Modified aviator glasses with a toggled health HUD. Comes with bonus prescription lenses."
prescription = 6
/obj/item/clothing/glasses/science
name = "Science Goggles"
desc = "The goggles do nothing!"
@@ -206,6 +220,11 @@ BLIND // can't see anything
item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses")
darkness_view = -1
/obj/item/clothing/glasses/sunglasses/aviator
name = "aviators"
desc = "A pair of designer sunglasses."
icon_state = "aviator"
/obj/item/clothing/glasses/welding
name = "welding goggles"
desc = "Protects the eyes from welders, approved by the mad scientist association."
@@ -353,53 +372,6 @@ BLIND // can't see anything
src.hud = new/obj/item/clothing/glasses/hud/health(src)
return
/obj/item/clothing/glasses/sunglasses/medhud/aviator
name = "medical HUD aviators"
desc = "Modified aviator glasses with a toggled health HUD."
icon_state = "aviator_med"
off_state = "aviator"
action_button_name = "Toggle Mode"
var/on = 1
toggleable = 1
activation_sound = 'sound/effects/pop.ogg'
var/hud_holder
/obj/item/clothing/glasses/sunglasses/medhud/aviator/New()
..()
hud_holder = hud
/obj/item/clothing/glasses/sunglasses/medhud/aviator/Destroy()
qdel(hud_holder)
hud_holder = null
hud = null
. = ..()
/obj/item/clothing/glasses/sunglasses/medhud/aviator/attack_self(mob/user)
if(toggleable && !user.incapacitated())
on = !on
if(on)
src.hud = hud_holder
to_chat(user, "You switch the [src] to HUD mode.")
else
src.hud = null
to_chat(user, "You switch \the [src] off.")
update_icon()
user << activation_sound
user.update_inv_glasses()
user.update_action_buttons()
/obj/item/clothing/glasses/sunglasses/medhud/aviator/update_icon()
if(on)
icon_state = initial(icon_state)
else
icon_state = off_state
/obj/item/clothing/glasses/sunglasses/medhud/aviator/prescription
name = "prescription medical HUD aviators"
desc = "Modified aviator glasses with a toggled health HUD. Comes with bonus prescription lenses."
prescription = 6
/obj/item/clothing/glasses/thermal
name = "optical thermal scanner"
desc = "Thermals in the shape of glasses."

View File

@@ -713,8 +713,6 @@
var/obj/item/clothing/glasses/sunglasses/sechud/aviator/S = src.glasses
if(!S.on)
number += 1
else if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses/medhud/aviator))
number += 0
else
number += 1
if(istype(src.glasses, /obj/item/clothing/glasses/welding))