From 8d39fb9dce8f5468397f599a4cc0692a09ca2610 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 22 Nov 2017 17:40:25 -0500 Subject: [PATCH] merges https://github.com/tgstation/tgstation/pull/32678 --- .../clothing/glasses/engine_goggles.dm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index e3a99fdb9a..b2b869edae 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -8,7 +8,8 @@ /obj/item/clothing/glasses/meson/engine name = "engineering scanner goggles" desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, and the Radiation Scanner mode let's you see objects contaminated by radiation." - icon_state = "trayson" + icon_state = "trayson-meson" + item_state = "trayson-meson" actions_types = list(/datum/action/item_action/toggle_mode) origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3" @@ -117,14 +118,22 @@ flick_overlay(pic, list(user.client), 8) /obj/item/clothing/glasses/meson/engine/update_icon() - icon_state = "[initial(icon_state)]-[mode]" - if(istype(loc, /mob/living/carbon/human/)) - var/mob/living/carbon/human/user = loc - if(user.glasses == src) + icon_state = "trayson-[mode]" + update_mob() + +/obj/item/clothing/glasses/meson/engine/proc/update_mob() + item_state = icon_state + if(isliving(loc)) + var/mob/living/user = loc + if(user.get_item_by_slot(slot_glasses) == src) user.update_inv_glasses() + else + user.update_inv_hands() /obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves name = "optical t-ray scanner" + icon_state = "trayson-t-ray" + item_state = "trayson-t-ray" desc = "Used by engineering staff to see underfloor objects such as cables and pipes." origin_tech = "materials=3;magnets=2;engineering=2"