replaces BANG_PROTECT_2 with a component, also kills OMNITONGUE_2 and flags_2

This commit is contained in:
vuonojenmustaturska
2018-05-02 21:13:41 +03:00
committed by CitadelStationBot
parent e42cce26da
commit 0958d35b26
27 changed files with 890 additions and 41 deletions
+53
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
@@ -44,3 +45,55 @@
H.update_inv_neck()
H.update_inv_head()
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
=======
//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"
item_state = "earmuffs"
strip_delay = 15
equip_delay_other = 25
resistance_flags = FLAMMABLE
/obj/item/clothing/ears/earmuffs/ComponentInitialize()
. = ..()
AddComponent(/datum/component/earhealing)
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
/obj/item/clothing/ears/headphones
name = "headphones"
desc = "Unce unce unce unce. Boop!"
icon = 'icons/obj/clothing/accessories.dmi'
icon_state = "headphones"
item_state = "headphones"
slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want!
actions_types = list(/datum/action/item_action/toggle_headphones)
var/headphones_on = FALSE
/obj/item/clothing/ears/headphones/Initialize()
. = ..()
update_icon()
/obj/item/clothing/ears/headphones/update_icon()
icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]"
item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]"
/obj/item/clothing/ears/headphones/proc/toggle(owner)
headphones_on = !headphones_on
update_icon()
var/mob/living/carbon/human/H = owner
if(istype(H))
H.update_inv_ears()
H.update_inv_neck()
H.update_inv_head()
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
>>>>>>> fd4c753... replaces BANG_PROTECT_2 with a component, also kills OMNITONGUE_2 and flags_2 (#37597)
+7 -3
View File
@@ -13,10 +13,13 @@
resistance_flags = NONE
flags_cover = HEADCOVERSEYES
flags_inv = HIDEHAIR
flags_2 = BANG_PROTECT_2
dog_fashion = /datum/dog_fashion/head/helmet
/obj/item/clothing/head/helmet/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_HEAD))
/obj/item/clothing/head/helmet/sec
can_flashlight = 1
@@ -203,11 +206,12 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
dog_fashion = null
// old knight helmets do not offer protection against loud noises
flags_2 = NONE
/obj/item/clothing/head/helmet/knight/Initialize(mapload)
. = ..()
var/datum/component = GetComponent(/datum/component/wearertargeting/earprotection)
qdel(component)
/obj/item/clothing/head/helmet/knight/blue
icon_state = "knight_blue"