brig medic hud (#35693)

This commit is contained in:
jwhitak
2024-01-04 01:01:15 -06:00
committed by GitHub
parent c003d40bf3
commit 673c4e2def
2 changed files with 26 additions and 8 deletions

View File

@@ -259,7 +259,10 @@
"Brig Medic" = /obj/item/clothing/under/rank/medical/brigmedic,
),
slot_shoes_str = /obj/item/clothing/shoes/black,
slot_glasses_str = /obj/item/clothing/glasses/hud/health,
slot_glasses_str = list(
"Paramedic" = /obj/item/clothing/glasses/hud/health,
"Brig Medic" = /obj/item/clothing/glasses/hud/combinedsecmed
),
slot_wear_suit_str = list(
"Paramedic" = /obj/item/clothing/suit/storage/paramedic,
"Brig Medic" = /obj/item/clothing/suit/armor/vest/security/medic

View File

@@ -73,18 +73,25 @@
/obj/item/clothing/glasses/hud/health/attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/clothing/glasses/hud/security/scouter))
var/worn = FALSE
if(user.is_wearing_item(src, slot_glasses))
worn = TRUE
if(do_after(user, src, 1 SECONDS))
user.drop_item(src)
if(!user.drop_item(W))
to_chat(user, "<span class='warning'>You can't let go of \the [W].</span>")
return
var/obj/item/clothing/glasses/hud/combinedsecmed/I = new /obj/item/clothing/glasses/hud/combinedsecmed(src,W)
var/obj/item/clothing/glasses/hud/combinedsecmed/I = new /obj/item/clothing/glasses/hud/combinedsecmed(hhud = src, shud = W)
W.transfer_fingerprints_to(I)
I.base_health = src
I.base_sec = W
W.forceMove(I)
src.forceMove(I)
user.put_in_hands(I)
var/mob/living/carbon/human/H = user
if(worn && istype(H))
H.equip_to_slot_if_possible(I,slot_glasses,EQUIP_FAILACTION_DROP)
else
user.put_in_hands(I)
to_chat(user, "<span class='notice'>You synchronize \the [W] with \the [src].</span>")
/obj/item/clothing/glasses/hud/health/cmo
@@ -171,18 +178,25 @@
/obj/item/clothing/glasses/hud/security/scouter/attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/clothing/glasses/hud/health))
var/worn = FALSE
if(user.is_wearing_item(src, slot_glasses))
worn = TRUE
if(do_after(user, src, 1 SECONDS))
user.drop_item(src)
if(!user.drop_item(W))
to_chat(user, "<span class='warning'>You can't let go of \the [W].</span>")
return
var/obj/item/clothing/glasses/hud/combinedsecmed/I = new /obj/item/clothing/glasses/hud/combinedsecmed
var/obj/item/clothing/glasses/hud/combinedsecmed/I = new /obj/item/clothing/glasses/hud/combinedsecmed(hhud = W, shud = src)
W.transfer_fingerprints_to(I)
I.base_health = W
I.base_sec = src
W.forceMove(I)
src.forceMove(I)
user.put_in_hands(I)
var/mob/living/carbon/human/H = user
if(worn && istype(H))
H.equip_to_slot_if_possible(I,slot_glasses,EQUIP_FAILACTION_DROP)
else
user.put_in_hands(I)
to_chat(user, "<span class='notice'>You synchronize \the [W] with \the [src].</span>")
@@ -343,14 +357,15 @@
var/obj/item/clothing/glasses/hud/health/base_health = null
var/obj/item/clothing/glasses/hud/security/scouter/base_sec = null
/obj/item/clothing/glasses/hud/combinedsecmed/New(var/obj/item/clothing/glasses/hud/health/hhud = null,
/obj/item/clothing/glasses/hud/combinedsecmed/New(var/turf/location = null,
var/obj/item/clothing/glasses/hud/health/hhud = null,
var/obj/item/clothing/glasses/hud/security/scouter/shud = null)
..()
if(hhud)
if(istype(hhud))
base_health = hhud
else
base_health = new /obj/item/clothing/glasses/hud/health
if(shud)
if(istype(shud))
base_sec = shud
else
base_sec = new /obj/item/clothing/glasses/hud/security/scouter