mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-09 16:33:50 +00:00
* Refactors a common pattern, clothing traits (#56233) A common pattern is clothing that gives a certain trait when equipped in the correct slot, for example, mesons making you immune to supermatter madness, or the bartender's beer goggles giving them the ability to "booze slide". Now, instead of implementing essentially the same logic on equip and dropped, it is now supported at the clothing level with the `clothing_traits` lazylist. * Refactors a common pattern, clothing traits Co-authored-by: coiax <yellowbounder@gmail.com>
25 lines
710 B
Plaintext
25 lines
710 B
Plaintext
|
|
//Ears: currently only used for headsets and earmuffs
|
|
/obj/item/clothing/ears
|
|
name = "ears"
|
|
w_class = WEIGHT_CLASS_TINY
|
|
throwforce = 0
|
|
slot_flags = ITEM_SLOT_EARS
|
|
resistance_flags = NONE
|
|
|
|
/obj/item/clothing/ears/earmuffs
|
|
name = "earmuffs"
|
|
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
|
icon_state = "earmuffs"
|
|
inhand_icon_state = "earmuffs"
|
|
clothing_traits = list(TRAIT_DEAF)
|
|
strip_delay = 15
|
|
equip_delay_other = 25
|
|
resistance_flags = FLAMMABLE
|
|
custom_price = PAYCHECK_HARD * 1.5
|
|
|
|
/obj/item/clothing/ears/earmuffs/ComponentInitialize()
|
|
. = ..()
|
|
AddElement(/datum/element/earhealing)
|
|
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|