diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 579f56f981..24c08649bf 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -66,6 +66,39 @@ item_state = "sunglasses" darkness_view = -1 +/obj/item/clothing/glasses/welding + name = "welding goggles" + desc = "Protects the eyes from welders, approved by the mad scientist association." + icon_state = "welding-g" + item_state = "welding-g" + icon_action_button = "action_welding_g" + var/up = 0 + +/obj/item/clothing/glasses/welding/attack_self() + toggle() + + +/obj/item/clothing/glasses/welding/verb/toggle() + set category = "Object" + set name = "Adjust welding goggles" + set src in usr + + if(usr.canmove && !usr.stat && !usr.restrained()) + if(src.up) + src.up = !src.up + src.flags |= GLASSESCOVERSEYES + flags_inv |= HIDEEYES + icon_state = initial(icon_state) + usr << "You flip the [src] down to protect your eyes." + else + src.up = !src.up + src.flags &= ~HEADCOVERSEYES + flags_inv &= ~HIDEEYES + icon_state = "[initial(icon_state)]up" + usr << "You push the [src] up out of your face." + + usr.update_inv_glasses() + /obj/item/clothing/glasses/sunglasses/blindfold name = "blindfold" desc = "Covers the eyes, preventing sight." diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index dbbb9c2925..96d6ad8705 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -24,29 +24,29 @@ flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE icon_action_button = "action_welding" - attack_self() - toggle() +/obj/item/clothing/head/welding/attack_self() + toggle() - verb/toggle() - set category = "Object" - set name = "Adjust welding mask" - set src in usr +/obj/item/clothing/head/welding/verb/toggle() + set category = "Object" + set name = "Adjust welding mask" + set src in usr - if(usr.canmove && !usr.stat && !usr.restrained()) - if(src.up) - src.up = !src.up - src.flags |= HEADCOVERSEYES | HEADCOVERSMOUTH - flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE - icon_state = "welding" - usr << "You flip the mask down to protect your eyes." - else - src.up = !src.up - src.flags &= ~HEADCOVERSEYES | HEADCOVERSMOUTH - flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) - icon_state = "weldingup" - usr << "You push the mask up out of your face." - usr.update_inv_head() //so our mob-overlays update + if(usr.canmove && !usr.stat && !usr.restrained()) + if(src.up) + src.up = !src.up + src.flags |= HEADCOVERSEYES | HEADCOVERSMOUTH + flags_inv |= HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE + icon_state = initial(icon_state) + usr << "You flip the [src] down to protect your eyes." + else + src.up = !src.up + src.flags &= ~HEADCOVERSEYES | HEADCOVERSMOUTH + flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) + icon_state = "[initial(icon_state)]up" + usr << "You push the [src] up out of your face." + usr.update_inv_head() //so our mob-overlays update /* diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d3fb48e41d..5de9e1bbd8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -621,10 +621,14 @@ number += 2 if(istype(src.head, /obj/item/clothing/head/helmet/space)) number += 2 - if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses)) - number += 1 if(istype(src.glasses, /obj/item/clothing/glasses/thermal)) number -= 1 + if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses)) + number += 1 + if(istype(src.glasses, /obj/item/clothing/glasses/welding)) + var/obj/item/clothing/glasses/welding/W = src.glasses + if(!W.up) + number += 2 return number diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d92055c7c9..97d379b335 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1164,10 +1164,18 @@ if(eye_blurry) client.screen += global_hud.blurry if(druggy) client.screen += global_hud.druggy + var/masked = 0 + if( istype(head, /obj/item/clothing/head/welding) ) var/obj/item/clothing/head/welding/O = head if(!O.up && tinted_weldhelh) client.screen += global_hud.darkMask + masked = 1 + + if(!masked && istype(glasses, /obj/item/clothing/glasses/welding) ) + var/obj/item/clothing/glasses/welding/O = glasses + if(!O.up && tinted_weldhelh) + client.screen += global_hud.darkMask if(eye_stat > 20) if(eye_stat > 30) client.screen += global_hud.darkMask diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 0cd95fb984..fe044b4a52 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -36,6 +36,8 @@ switch(owner.icon_action_button) if("action_hardhat", "action_welding") usr.update_inv_head() + if("action_welding_g") + usr.update_inv_glasses() if("action_jetpack") usr.update_inv_back() diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index b03f28930c..6ca6ae2630 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index 89160c6208..18da4b7bf4 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index 6826a19b69..74b5eed3a2 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/mob/screen1_action.dmi b/icons/mob/screen1_action.dmi index 57c59510f9..298908871d 100644 Binary files a/icons/mob/screen1_action.dmi and b/icons/mob/screen1_action.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index 2295faab15..7fd69c4b71 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ