Ports Welding Hard Hats from /tg/

Changelog:
modules/clothing/head/Hardhat.dm:
-Added Welder Hard Hats & various colours
--They function as a combi hard hat & welder mask, but have a slightly dimmer head lamp
modules/clothing/vending/wardrobes.dm
-Added 3 Welder Hard Hats to the Engi-drobe and Atmos-drobe
-Equalized some values between the two (3 atmos winter coats now instead of 5, and 3 engineering dufflebags instead of 2)
game/objects/structures/crates_lockers/closets/secure/engineering.dm
-Replaced the welding mask in the CE's locker with a white WHH (This one has brighter buld in it! Same brightness as a regular hard hat)
datums/action.dm
- Added the item_action to lower the WHH's face shield
icons/mob/head.dmi
-Added weldervisor + welderhat, which are used by the WHH's
-Recoloured hardhat0/1_dblue to be in atmos colours as I've never seen it on the station before and this way is actually used
icons/mob/obj/hats.dmi
-Added weldervisor, again, used by the WHH's
-Repositioned the hardhat sprites up several pixels so they don't clip and look weird with the weldervisor
-Recoloured hardhat0/1_dblue to be in atmos colours as I've never seen it on the station before and this way is actually used
This commit is contained in:
BonniePandora
2019-11-04 02:29:56 +00:00
parent 4e8c8ad335
commit 5efed32095
6 changed files with 92 additions and 10 deletions
+78 -6
View File
@@ -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"
+5 -3
View File
@@ -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)