Advanced Health Scanner HUD (#31930)

* Advanced Health Scanner HUD

The CMO's locker now spawns with a pair of Advanced MedHUDs. They function as regular health scanner huds with the addition of having flash protection, meaning they'll no longer be the only head without it roundstart. Only one pair spawns in the locker and they can't be scanned by the mechanic's scanner.

I wanted to add science goggles function as well but I'm too stupid to do it currently so if this gets merged I might try to PR that at a later date. I also don't entirely love the sprite so I'll probably mess with it more.

* Sprite Updates, Syndicate Scanner

* Adds science soggle effect
This commit is contained in:
djkramer123
2022-01-29 15:39:18 -05:00
committed by GitHub
parent 7be74af23f
commit 96b45fc13b
4 changed files with 82 additions and 0 deletions

View File

@@ -131,6 +131,7 @@
/obj/item/clothing/gloves/latex,
/obj/item/clothing/shoes/brown,
/obj/item/device/radio/headset/heads/cmo,
/obj/item/clothing/glasses/hud/health/cmo,
/obj/item/weapon/storage/belt/medical,
/obj/item/device/flash,
/obj/item/weapon/reagent_containers/hypospray,

View File

@@ -25,6 +25,87 @@
process_med_hud(M)
/obj/item/clothing/glasses/hud/health/cmo
name = "Advanced Health Scanner HUD"
prescription = 1
desc = "A heads-up display that scans the humanoid carbon lifeforms in view and provides accurate data about their health status as well as reveals pathogens in sight. The tinted glass protects the wearer from bright flashes of light."
icon_state = "cmohud"
eyeprot = 1
mech_flags = MECH_SCAN_ILLEGAL
actions_types = list(/datum/action/item_action/toggle_goggles)
var/on = FALSE
/obj/item/clothing/glasses/hud/health/cmo/attack_self(mob/user)
toggle(user)
/obj/item/clothing/glasses/hud/health/cmo/proc/toggle(mob/user)
if (user.incapacitated())
return
if (on)
on = FALSE
to_chat(user, "You turn the pathogen scanner off.")
disable(user)
else
on = TRUE
to_chat(user, "You turn the pathogen scanner on.")
enable(user)
user.handle_regular_hud_updates()
/obj/item/clothing/glasses/hud/health/cmo/equipped(mob/M, slot)
..()
if (!M.client)
return
if(slot == slot_glasses)
if (on)
enable(M)
/obj/item/clothing/glasses/hud/health/cmo/unequipped(mob/M, from_slot)
..()
if (!M.client)
return
if(from_slot == slot_glasses)
disable(M)
/obj/item/clothing/glasses/hud/health/cmo/proc/enable(mob/M)
var/toggle = 0
if (ishuman(M))
var/mob/living/carbon/human/H = M
if (H.glasses == src)
toggle = 1
if (ismonkey(M))
var/mob/living/carbon/monkey/H = M
if (H.glasses == src)
toggle = 1
if (toggle)
playsound(M,'sound/misc/click.ogg',30,0,-5)
science_goggles_wearers.Add(M)
for (var/obj/item/I in infected_items)
if (I.pathogen)
M.client.images |= I.pathogen
for (var/mob/living/L in infected_contact_mobs)
if (L.pathogen)
M.client.images |= L.pathogen
for (var/obj/effect/pathogen_cloud/C in pathogen_clouds)
if (C.pathogen)
M.client.images |= C.pathogen
for (var/obj/effect/decal/cleanable/C in infected_cleanables)
if (C.pathogen)
M.client.images |= C.pathogen
/obj/item/clothing/glasses/hud/health/cmo/proc/disable(mob/M)
playsound(M,'sound/misc/click.ogg',30,0,-5)
science_goggles_wearers.Remove(M)
for (var/obj/item/I in infected_items)
M.client.images -= I.pathogen
for (var/mob/living/L in infected_contact_mobs)
M.client.images -= L.pathogen
for (var/obj/effect/pathogen_cloud/C in pathogen_clouds)
M.client.images -= C.pathogen
for (var/obj/effect/decal/cleanable/C in infected_cleanables)
M.client.images -= C.pathogen
/obj/item/clothing/glasses/hud/security
name = "Security HUD"
desc = "A heads-up display that scans the humanoid carbon lifeforms in view and provides accurate data about their ID status and security records."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB