diff --git a/code/modules/client/preference_setup/loadout/loadout_eyes.dm b/code/modules/client/preference_setup/loadout/loadout_eyes.dm index d8757927b0..8a226d3905 100644 --- a/code/modules/client/preference_setup/loadout/loadout_eyes.dm +++ b/code/modules/client/preference_setup/loadout/loadout_eyes.dm @@ -38,6 +38,16 @@ display_name = "Security HUD, prescription (Security)" path = /obj/item/clothing/glasses/hud/security/prescription +/datum/gear/eyes/secaviators + display_name = "Security HUD Aviators" + path = /obj/item/clothing/glasses/sunglasses/sechud/toggle + allowed_roles = list("Security Officer","Head of Security","Warden") + +/datum/gear/eyes/secaviators/prescription + display_name = "Security HUD Aviators, prescription" + path = /obj/item/clothing/glasses/sunglasses/sechud/toggle/prescription + allowed_roles = list("Security Officer","Head of Security","Warden") + /datum/gear/eyes/medical display_name = "Medical HUD (Medical)" path = /obj/item/clothing/glasses/hud/health diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 904a946b5b..3755e8a03a 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -258,6 +258,55 @@ BLIND // can't see anything desc = "Flash-resistant goggles with inbuilt combat and security information." icon_state = "swatgoggles" +/obj/item/clothing/glasses/sunglasses/sechud/toggle + name = "HUD aviators" + desc = "Modified aviator glasses that can be switch between HUD and flash protection modes." + icon_state = "sec_hud" + off_state = "sec_flash" + action_button_name = "Toggle Mode" + var/on = 1 + toggleable = 1 + activation_sound = 'sound/effects/pop.ogg' + + var/hud_holder + +/obj/item/clothing/glasses/sunglasses/sechud/toggle/New() + ..() + hud_holder = hud + +/obj/item/clothing/glasses/sunglasses/sechud/toggle/Destroy() + qdel(hud_holder) + hud_holder = null + hud = null + . = ..() + +/obj/item/clothing/glasses/sunglasses/sechud/toggle/attack_self(mob/user) + if(toggleable && !user.incapacitated()) + on = !on + if(on) + flash_protection = FLASH_PROTECTION_NONE + src.hud = hud_holder + to_chat(user, "You switch the [src] to HUD mode.") + else + flash_protection = initial(flash_protection) + src.hud = null + to_chat(user, "You switch \the [src] to flash protection mode.") + update_icon() + user << activation_sound + user.update_inv_glasses() + user.update_action_buttons() + +/obj/item/clothing/glasses/sunglasses/sechud/toggle/update_icon() + if(on) + icon_state = initial(icon_state) + else + icon_state = off_state + +/obj/item/clothing/glasses/sunglasses/sechud/toggle/prescription + name = "Prescription 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/thermal name = "Optical Thermal Scanner" desc = "Thermals in the shape of glasses." diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index 930b8aea70..2afd8836d3 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 69a75b3018..662e2f91cf 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ