diff --git a/code/modules/client/preference_setup/loadout/loadout_eyes.dm b/code/modules/client/preference_setup/loadout/loadout_eyes.dm index 5909b0eb2e..533cf88a51 100644 --- a/code/modules/client/preference_setup/loadout/loadout_eyes.dm +++ b/code/modules/client/preference_setup/loadout/loadout_eyes.dm @@ -42,15 +42,13 @@ display_name = "Security HUD, sunglasses (Security)" path = /obj/item/clothing/glasses/sunglasses/sechud -/datum/gear/eyes/secaviators - display_name = "Security HUD Aviators" +/datum/gear/eyes/security/aviator + display_name = "Security HUD Aviators (Security)" path = /obj/item/clothing/glasses/sunglasses/sechud/aviator - allowed_roles = list("Security Officer","Head of Security","Warden") -/datum/gear/eyes/secaviators/prescription - display_name = "Security HUD Aviators, prescription" +/datum/gear/eyes/security/aviator/prescription + display_name = "Security HUD Aviators, prescription (Security)" path = /obj/item/clothing/glasses/sunglasses/sechud/aviator/prescription - allowed_roles = list("Security Officer","Head of Security","Warden") /datum/gear/eyes/medical display_name = "Medical HUD (Medical)" @@ -61,10 +59,32 @@ display_name = "Medical HUD, prescription (Medical)" path = /obj/item/clothing/glasses/hud/health/prescription -/datum/gear/eyes/shades - display_name = "Sunglasses, fat (Security/Command)" - path = /obj/item/clothing/glasses/sunglasses/big - allowed_roles = list("Security Officer","Head of Security","Warden","Colony Director","Head of Personnel","Quartermaster","Internal Affairs Agent","Detective") +/datum/gear/eyes/medical/aviator + display_name = "Medical HUD Aviators (Medical)" + path = /obj/item/clothing/glasses/sunglasses/medhud/aviator + +/datum/gear/eyes/medical/aviator + display_name = "Medical HUD Aviators, prescription (Medical)" + path = /obj/item/clothing/glasses/sunglasses/medhud/aviator/prescription + +/datum/gear/eyes/meson + display_name = "Optical Meson Scanners (Engineering)" + path = /obj/item/clothing/glasses/meson + allowed_roles = list("Station Engineer","Chief Engineer","Atmospheric Technician") + +/datum/gear/eyes/meson/prescription + display_name = "Optical Meson Scanners, prescription (Engineering)" + path = /obj/item/clothing/glasses/meson/prescription + +/datum/gear/eyes/meson/aviator + display_name = "Optical Meson Aviators, (Engineering)" + path = /obj/item/clothing/glasses/meson/aviator + +/datum/gear/eyes/meson/aviator/prescription + 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" @@ -74,7 +94,16 @@ display_name = "Sunglasses, stylish aviators" path = /obj/item/clothing/glasses/fakesunglasses/aviator -/datum/gear/eyes/shades/prescriptionsun +/datum/gear/eyes/sun + display_name = "Sunglasses (Security/Command)" + path = /obj/item/clothing/glasses/sunglasses + allowed_roles = list("Security Officer","Head of Security","Warden","Colony Director","Head of Personnel","Quartermaster","Internal Affairs Agent","Detective") + +/datum/gear/eyes/sun/shades + display_name = "Sunglasses, fat (Security/Command)" + path = /obj/item/clothing/glasses/sunglasses/big + +/datum/gear/eyes/sun/prescriptionsun display_name = "sunglasses, presciption (Security/Command)" path = /obj/item/clothing/glasses/sunglasses/prescription cost = 2 diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 0208574e5b..53678c13e4 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -69,6 +69,19 @@ BLIND // can't see anything desc = "Optical Meson Scanner with prescription lenses." prescription = 1 +/obj/item/clothing/glasses/meson/aviator + name = "Engineering Aviators" + icon_state = "aviator_eng" + off_state = "aviator" + item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") + action_button_name = "Toggle HUD" + activation_sound = 'sound/effects/pop.ogg' + +/obj/item/clothing/glasses/meson/aviator/prescription + name = "Prescription Engineering Aviators" + desc = "Engineering Aviators with prescription lenses." + prescription = 1 + /obj/item/clothing/glasses/science name = "Science Goggles" desc = "The goggles do nothing!" @@ -242,20 +255,20 @@ BLIND // can't see anything icon_state = "bigsunglasses" /obj/item/clothing/glasses/fakesunglasses //Sunglasses without flash immunity - desc = "A pair of designer sunglasses. Doesn't seem like it'll block flashes." name = "stylish sunglasses" + desc = "A pair of designer sunglasses. Doesn't seem like it'll block flashes." icon_state = "sun" item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") /obj/item/clothing/glasses/fakesunglasses/aviator - desc = "A pair of designer sunglasses. Doesn't seem like it'll block flashes." name = "stylish aviators" - icon_state = "sec_flash" + desc = "A pair of designer sunglasses. Doesn't seem like it'll block flashes." + icon_state = "aviator" /obj/item/clothing/glasses/sunglasses/sechud name = "HUDSunglasses" desc = "Sunglasses with a HUD." - icon_state = "sunhud" + icon_state = "sunSecHud" var/obj/item/clothing/glasses/hud/security/hud = null New() @@ -269,10 +282,10 @@ BLIND // can't see anything icon_state = "swatgoggles" /obj/item/clothing/glasses/sunglasses/sechud/aviator - name = "HUD aviators" + name = "Security HUD aviators" desc = "Modified aviator glasses that can be switch between HUD and flash protection modes." - icon_state = "sec_hud" - off_state = "sec_flash" + icon_state = "aviator_sec" + off_state = "aviator" action_button_name = "Toggle Mode" var/on = 1 toggleable = 1 @@ -311,10 +324,68 @@ BLIND // can't see anything icon_state = off_state /obj/item/clothing/glasses/sunglasses/sechud/aviator/prescription - name = "Prescription HUD aviators" + name = "Prescription Security HUD aviators" desc = "Modified aviator glasses that can be switch between HUD and flash protection modes. Comes with bonus prescription lenses." prescription = 6 +/obj/item/clothing/glasses/sunglasses/medhud + name = "HUDSunglasses" + desc = "Sunglasses with a HUD." + icon_state = "sunMedHud" + var/obj/item/clothing/glasses/hud/health/hud = null + +/obj/item/clothing/glasses/sunglasses/medhud/New() + ..() + 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." diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5625d341b7..5269d940a0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -685,12 +685,20 @@ if(istype(src.head, /obj/item/clothing/head/helmet/space/emergency)) number -= 2 if(istype(src.glasses, /obj/item/clothing/glasses/thermal)) - number -= 1 + var/obj/item/clothing/glasses/thermal/T = src.glasses + if(T.active) + number -= 1 + if(istype(src.glasses, /obj/item/clothing/glasses/night)) + var/obj/item/clothing/glasses/night/N = src.glasses + if(N.active) + number -= 1 if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses)) if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses/sechud/aviator)) var/obj/item/clothing/glasses/sunglasses/sechud/aviator/S = src.glasses - if(!S.on) + if(!S.active) 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)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6fabb39264..014ba7eb0d 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1335,6 +1335,9 @@ if(istype(G, /obj/item/clothing/glasses/sunglasses/sechud)) var/obj/item/clothing/glasses/sunglasses/sechud/S = G O = S.hud + if(istype(G, /obj/item/clothing/glasses/sunglasses/medhud)) + var/obj/item/clothing/glasses/sunglasses/medhud/M = G + O = M.hud if(istype(O)) O.process_hud(src) if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING diff --git a/html/changelogs/Anewbe - Aviators.yml b/html/changelogs/Anewbe - Aviators.yml new file mode 100644 index 0000000000..bd82bbad19 --- /dev/null +++ b/html/changelogs/Anewbe - Aviators.yml @@ -0,0 +1,38 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Anewbe + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added Medical and Meson aviators." + - rscadd: "Medical and Meson aviators are now in the loadout, department locked." + - rscadd: "Meson Scanners have been added to the loadout, department locked." \ No newline at end of file diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index 1dd7c5af50..6657457344 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index 662e2f91cf..ff4ea400ed 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ