Files
Paradise/code/modules/clothing/head/hardhat.dm
T
warriorstar-orionandGitHub ea38c69633 Support 28 additional hats for corgis. (#15669)
- /obj/item/clothing/head/HoS
- /obj/item/clothing/head/HoS/beret
- /obj/item/clothing/head/beret/sec
- /obj/item/clothing/head/bowlerhat
- /obj/item/clothing/head/caphat/parade
- /obj/item/clothing/head/hardhat/dblue
- /obj/item/clothing/head/hardhat/orange
- /obj/item/clothing/head/hardhat/red
- /obj/item/clothing/head/helmet/roman
- /obj/item/clothing/head/justice_wig
- /obj/item/clothing/head/soft/black
- /obj/item/clothing/head/soft/blue
- /obj/item/clothing/head/soft/green
- /obj/item/clothing/head/soft/grey
- /obj/item/clothing/head/soft/mime
- /obj/item/clothing/head/soft/purple
- /obj/item/clothing/head/soft/rainbow
- /obj/item/clothing/head/soft/red
- /obj/item/clothing/head/soft/sec
- /obj/item/clothing/head/soft/yellow
- /obj/item/clothing/head/surgery/black
- /obj/item/clothing/head/surgery/blue
- /obj/item/clothing/head/surgery/green
- /obj/item/clothing/head/surgery/purple
- /obj/item/clothing/head/wizard/black
- /obj/item/clothing/head/wizard/magus
- /obj/item/clothing/head/wizard/marisa
- /obj/item/reagent_containers/glass/bucket
2021-04-05 17:44:51 +01:00

102 lines
3.2 KiB
Plaintext

/obj/item/clothing/head/hardhat
name = "hard hat"
desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight."
icon_state = "hardhat0_yellow"
item_state = "hardhat0_yellow"
var/brightness_on = 4 //luminosity when on
var/on = FALSE
item_color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite)
armor = list("melee" = 15, "bullet" = 5, "laser" = 20, "energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50)
flags_inv = 0
actions_types = list(/datum/action/item_action/toggle_helmet_light)
resistance_flags = FIRE_PROOF
dog_fashion = /datum/dog_fashion/head/hardhat
sprite_sheets = list(
"Grey" = 'icons/mob/species/grey/head.dmi'
)
/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()
..()
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
set_light(brightness_on)
/obj/item/clothing/head/hardhat/proc/turn_off(mob/user)
set_light(0)
/obj/item/clothing/head/hardhat/extinguish_light(mob/living/user)
if(on)
on = FALSE
turn_off(user)
update_icon()
visible_message("<span class='danger'>[src]'s light fades and turns off.</span>")
/obj/item/clothing/head/hardhat/orange
icon_state = "hardhat0_orange"
item_state = "hardhat0_orange"
item_color = "orange"
/obj/item/clothing/head/hardhat/red
name = "firefighter helmet"
icon_state = "hardhat0_red"
item_state = "hardhat0_red"
item_color = "red"
flags = STOPSPRESSUREDMAGE
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/white
icon_state = "hardhat0_white"
item_state = "hardhat0_white"
item_color = "white"
flags = STOPSPRESSUREDMAGE
heat_protection = HEAD
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
cold_protection = HEAD
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
dog_fashion = /datum/dog_fashion/head/hardhat
/obj/item/clothing/head/hardhat/dblue
icon_state = "hardhat0_dblue"
item_state = "hardhat0_dblue"
item_color = "dblue"
/obj/item/clothing/head/hardhat/atmos
name = "atmospheric technician's firefighting helmet"
desc = "A firefighter's helmet, able to keep the user cool in any situation."
icon_state = "hardhat0_atmos"
item_state = "hardhat0_atmos"
item_color = "atmos"
flags = STOPSPRESSUREDMAGE
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
heat_protection = HEAD
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
cold_protection = HEAD
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
dog_fashion = null
sprite_sheets = list(
"Grey" = 'icons/mob/species/grey/helmet.dmi'
)