diff --git a/code/datums/action.dm b/code/datums/action.dm index fd33ef79b5..77aa729eb1 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -245,6 +245,14 @@ /datum/action/item_action/toggle_helmet_light name = "Toggle Helmet Light" +/datum/action/item_action/toggle_welding_screen + name = "Toggle Welding Screen" + +/datum/action/item_action/toggle_welding_screen/Trigger() + var/obj/item/clothing/head/hardhat/weldhat/H = target + if(istype(H)) + H.toggle_welding_screen(owner) + /datum/action/item_action/toggle_headphones name = "Toggle Headphones" desc = "UNTZ UNTZ UNTZ" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index a7adafdad4..f173ac0662 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -10,7 +10,7 @@ new /obj/item/clothing/under/rank/chief_engineer(src) new /obj/item/clothing/under/rank/chief_engineer/skirt(src) new /obj/item/clothing/head/hardhat/white(src) - new /obj/item/clothing/head/welding(src) + new /obj/item/clothing/head/hardhat/weldhat/white(src) new /obj/item/clothing/gloves/color/yellow(src) new /obj/item/clothing/shoes/sneakers/brown(src) new /obj/item/tank/jetpack/suit(src) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 54f0ebea45..d72e4ba1d7 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -17,19 +17,26 @@ dog_fashion = /datum/dog_fashion/head -/obj/item/clothing/head/hardhat/attack_self(mob/user) - on = !on - icon_state = "hardhat[on]_[item_color]" - item_state = "hardhat[on]_[item_color]" - user.update_inv_head() //so our mob-overlays update +/obj/item/clothing/head/hardhat/attack_self(mob/living/user) + toggle_helmet_light(user) +/obj/item/clothing/head/hardhat/proc/toggle_helmet_light(mob/living/user) + on = !on if(on) turn_on(user) else turn_off(user) + update_icon() + +/obj/item/clothing/head/hardhat/update_icon() + icon_state = "hardhat[on]_[item_color]" + item_state = "hardhat[on]_[item_color]" + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + H.update_inv_head() for(var/X in actions) var/datum/action/A = X - A.UpdateButtonIcon() + A.UpdateButtonIcon(force = TRUE) /obj/item/clothing/head/hardhat/proc/turn_on(mob/user) set_light(brightness_on, power_on) @@ -86,3 +93,68 @@ cold_protection = HEAD min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT mutantrace_variation = MUTANTRACE_VARIATION + +/obj/item/clothing/head/hardhat/weldhat + name = "welding hard hat" + desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight AND welding shield! The bulb seems a little smaller though." + brightness_on = 3 //Needs a little bit of tradeoff + dog_fashion = null + actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_welding_screen) + flash_protect = 2 + tint = 2 + flags_inv = HIDEEYES | HIDEFACE + flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH + visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT + visor_flags_inv = HIDEEYES | HIDEFACE + visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH + +/obj/item/clothing/head/hardhat/weldhat/Initialize() + . = ..() + update_icon() + +/obj/item/clothing/head/hardhat/weldhat/attack_self(mob/living/user) + toggle_helmet_light(user) + +/obj/item/clothing/head/hardhat/weldhat/AltClick(mob/user) + if(user.canUseTopic(src, BE_CLOSE)) + toggle_welding_screen(user) + +/obj/item/clothing/head/hardhat/weldhat/proc/toggle_welding_screen(mob/living/user) + if(weldingvisortoggle(user)) + playsound(src, 'sound/mecha/mechmove03.ogg', 50, TRUE) //Visors don't just come from nothing + update_icon() + +/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands) + . = ..() + if(!isinhands) + . += mutable_appearance('icons/mob/head.dmi', "weldhelmet") + if(!up) + . += mutable_appearance('icons/mob/head.dmi', "weldvisor") + +/obj/item/clothing/head/hardhat/weldhat/update_icon() + cut_overlays() + if(!up) + add_overlay("weldvisor") + ..() + +/obj/item/clothing/head/hardhat/weldhat/orange + icon_state = "hardhat0_orange" + item_state = "hardhat0_orange" + item_color = "orange" + +/obj/item/clothing/head/hardhat/weldhat/white + desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight AND welding shield!" //This bulb is not smaller + icon_state = "hardhat0_white" + item_state = "hardhat0_white" + brightness_on = 4 //Boss always takes the best stuff + item_color = "white" + clothing_flags = STOPSPRESSUREDAMAGE + heat_protection = HEAD + max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT + cold_protection = HEAD + min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT + +/obj/item/clothing/head/hardhat/weldhat/dblue + icon_state = "hardhat0_dblue" + item_state = "hardhat0_dblue" + item_color = "dblue" \ No newline at end of file diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index fbc7713f25..e64435accc 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -63,7 +63,7 @@ product_ads = "Guaranteed to protect your feet from industrial accidents!;Afraid of radiation? Then wear yellow!" vend_reply = "Thank you for using the EngiDrobe!" products = list(/obj/item/clothing/accessory/pocketprotector = 5, - /obj/item/storage/backpack/duffelbag/engineering = 2, + /obj/item/storage/backpack/duffelbag/engineering = 3, /obj/item/storage/backpack/industrial = 3, /obj/item/storage/backpack/satchel/eng = 3, /obj/item/clothing/suit/hooded/wintercoat/engineering = 3, @@ -71,7 +71,8 @@ /obj/item/clothing/under/rank/engineer/skirt = 5, /obj/item/clothing/suit/hazardvest = 5, /obj/item/clothing/shoes/workboots = 5, - /obj/item/clothing/head/hardhat = 5) + /obj/item/clothing/head/hardhat = 5, + /obj/item/clothing/head/hardhat/weldhat = 3) refill_canister = /obj/item/vending_refill/wardrobe/engi_wardrobe /obj/item/vending_refill/wardrobe/engi_wardrobe @@ -87,7 +88,8 @@ /obj/item/storage/backpack/duffelbag/engineering = 3, /obj/item/storage/backpack/satchel/eng = 3, /obj/item/storage/backpack/industrial = 3, - /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos = 5, + /obj/item/clothing/head/hardhat/weldhat/dblue = 3, + /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos = 3, /obj/item/clothing/under/rank/atmospheric_technician = 5, /obj/item/clothing/under/rank/atmospheric_technician/skirt = 5, /obj/item/clothing/shoes/sneakers/black = 5) diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 3d8f26a82e..1c477e968f 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 6fb50da207..aa2129f686 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ