Attachable HUDs will now remember the type of glasses they are attached to. (#9446)

Fixes #9444
This commit is contained in:
mikomyazaki
2020-07-25 22:28:21 +03:00
committed by GitHub
parent 517ad6d8d5
commit 62f828e327
3 changed files with 12 additions and 2 deletions
+2
View File
@@ -299,6 +299,7 @@ BLIND // can't see anything
to_chat(user, SPAN_NOTICE("You attach a set of medical HUDs to your glasses."))
playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1)
var/obj/item/clothing/glasses/hud/health/prescription/P = new /obj/item/clothing/glasses/hud/health/prescription(user.loc)
P.glasses_type = src.type
user.put_in_hands(P)
qdel(src)
if(istype(W, /obj/item/clothing/glasses/hud/security))
@@ -307,6 +308,7 @@ BLIND // can't see anything
to_chat(user, SPAN_NOTICE("You attach a set of security HUDs to your glasses."))
playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1)
var/obj/item/clothing/glasses/hud/security/prescription/P = new /obj/item/clothing/glasses/hud/security/prescription(user.loc)
P.glasses_type = src.type
user.put_in_hands(P)
qdel(src)
+4 -2
View File
@@ -29,11 +29,12 @@
prescription = 1
icon_state = "healthhudpresc"
item_state = "healthhudpresc"
var/glasses_type = /obj/item/clothing/glasses/regular
/obj/item/clothing/glasses/hud/health/prescription/attack_self(mob/user)
to_chat(user, SPAN_NOTICE("You detach a set of medical HUDs from your glasses."))
playsound(src.loc, 'sound/weapons/blade_close.ogg', 50, 1)
var/obj/item/clothing/glasses/regular/R = new /obj/item/clothing/glasses/regular(user.loc)
var/obj/item/clothing/glasses/regular/R = new glasses_type(user.loc)
user.put_in_hands(R)
var/obj/item/clothing/glasses/hud/health/H = new /obj/item/clothing/glasses/hud/health(user.loc)
user.put_in_hands(H)
@@ -54,11 +55,12 @@
prescription = 1
icon_state = "sechudpresc"
item_state = "sechudpresc"
var/glasses_type = /obj/item/clothing/glasses/regular
/obj/item/clothing/glasses/hud/security/prescription/attack_self(mob/user)
to_chat(user, SPAN_NOTICE("You detach a set of security HUDs from your glasses."))
playsound(src.loc, 'sound/weapons/blade_close.ogg', 50, 1)
var/obj/item/clothing/glasses/regular/R = new /obj/item/clothing/glasses/regular(user.loc)
var/obj/item/clothing/glasses/regular/R = new glasses_type(user.loc)
user.put_in_hands(R)
var/obj/item/clothing/glasses/hud/security/S = new /obj/item/clothing/glasses/hud/security(user.loc)
user.put_in_hands(S)