diff --git a/code/datums/action.dm b/code/datums/action.dm index fbb3e16797..11b80017ea 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -207,6 +207,15 @@ /datum/action/item_action/toggle_helmet_light name = "Toggle Helmet Light" +/datum/action/item_action/toggle_headphones + name = "Toggle Headphones" + desc = "UNTZ UNTZ UNTZ" + +/datum/action/item_action/toggle_headphones/Trigger() + var/obj/item/clothing/ears/headphones/H = target + if(istype(H)) + H.toggle(owner) + /datum/action/item_action/toggle_unfriendly_fire name = "Toggle Friendly Fire \[ON\]" desc = "Toggles if the club's blasts cause friendly fire." diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index ff5fc048fa..f373fb8ed7 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1051,7 +1051,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/clothing/mask/joy = 1, /obj/item/clothing/head/cueball = 1, /obj/item/clothing/under/scratch = 1, - /obj/item/clothing/under/sailor = 1) + /obj/item/clothing/under/sailor = 1, + /obj/item/clothing/ears/headphones = 2) contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 2,/obj/item/clothing/glasses/sunglasses/garb = 2, /obj/item/clothing/glasses/sunglasses/blindfold = 1, /obj/item/clothing/mask/muzzle = 2) premium = list(/obj/item/clothing/suit/pirate/captain = 2, /obj/item/clothing/head/pirate/captain = 2, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/weapon/shield/riot/roman = 1, /obj/item/weapon/skub = 1) refill_canister = /obj/item/weapon/vending_refill/autodrobe @@ -1175,7 +1176,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/clothing/head/beanie=1, /obj/item/clothing/head/beanie/black=1, /obj/item/clothing/head/beanie/red=1, /obj/item/clothing/head/beanie/green=1, /obj/item/clothing/head/beanie/darkblue=1, /obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1, /obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1, - /obj/item/clothing/suit/jacket/letterman_red=1) + /obj/item/clothing/suit/jacket/letterman_red=1, + /obj/item/clothing/ears/headphones = 10) contraband = list(/obj/item/clothing/under/syndicate/tacticool=1,/obj/item/clothing/mask/balaclava=1,/obj/item/clothing/head/ushanka=1,/obj/item/clothing/under/soviet=1,/obj/item/weapon/storage/belt/fannypack/black=2,/obj/item/clothing/suit/jacket/letterman_syndie=1,/obj/item/clothing/under/jabroni=1, /obj/item/clothing/suit/vapeshirt=1, /obj/item/clothing/under/geisha=1) premium = list(/obj/item/clothing/under/suit_jacket/checkered=1,/obj/item/clothing/head/mailman=1,/obj/item/clothing/under/rank/mailman=1,/obj/item/clothing/suit/jacket/leather=1,/obj/item/clothing/suit/jacket/leather/overcoat=1,/obj/item/clothing/under/pants/mustangjeans=1,/obj/item/clothing/neck/necklace/dope=3,/obj/item/clothing/suit/jacket/letterman_nanotrasen=1) refill_canister = /obj/item/weapon/vending_refill/clothing diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 91f9fa006d..44dcbf0d52 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -182,29 +182,6 @@ damaged_clothes = 0 cut_overlay(damaged_clothes_icons[index], TRUE) - -//Ears: currently only used for headsets and earmuffs -/obj/item/clothing/ears - name = "ears" - w_class = WEIGHT_CLASS_TINY - throwforce = 0 - slot_flags = SLOT_EARS - resistance_flags = 0 - -/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/Initialize(mapload) - ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) - SET_SECONDARY_FLAG(src, HEALS_EARS) - //Glasses /obj/item/clothing/glasses name = "glasses" diff --git a/code/modules/clothing/ears/ears.dm b/code/modules/clothing/ears/ears.dm new file mode 100644 index 0000000000..906bde2a87 --- /dev/null +++ b/code/modules/clothing/ears/ears.dm @@ -0,0 +1,50 @@ + +//Ears: currently only used for headsets and earmuffs +/obj/item/clothing/ears + name = "ears" + w_class = WEIGHT_CLASS_TINY + throwforce = 0 + slot_flags = SLOT_EARS + resistance_flags = 0 + +/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/Initialize(mapload) + . = ..() + SET_SECONDARY_FLAG(src, BANG_PROTECT) + SET_SECONDARY_FLAG(src, HEALS_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 = SLOT_EARS | SLOT_HEAD | 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, "You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]") diff --git a/icons/mob/ears.dmi b/icons/mob/ears.dmi index 0a5154c396..fdaf319457 100644 Binary files a/icons/mob/ears.dmi and b/icons/mob/ears.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 09f665a04e..217f8c3a0a 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/inhands/clothing_lefthand.dmi b/icons/mob/inhands/clothing_lefthand.dmi index 36be4c58f0..7db63c0fe0 100644 Binary files a/icons/mob/inhands/clothing_lefthand.dmi and b/icons/mob/inhands/clothing_lefthand.dmi differ diff --git a/icons/mob/inhands/clothing_righthand.dmi b/icons/mob/inhands/clothing_righthand.dmi index 9900cb3f53..5f744923b6 100644 Binary files a/icons/mob/inhands/clothing_righthand.dmi and b/icons/mob/inhands/clothing_righthand.dmi differ diff --git a/icons/mob/neck.dmi b/icons/mob/neck.dmi index 782628f1a4..59635b8c7d 100644 Binary files a/icons/mob/neck.dmi and b/icons/mob/neck.dmi differ diff --git a/icons/obj/clothing/accessories.dmi b/icons/obj/clothing/accessories.dmi index 16b8a69b37..ac45986e5b 100644 Binary files a/icons/obj/clothing/accessories.dmi and b/icons/obj/clothing/accessories.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 3fe775f30b..f13c9b464f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1186,6 +1186,7 @@ #include "code\modules\client\verbs\who.dm" #include "code\modules\clothing\chameleon.dm" #include "code\modules\clothing\clothing.dm" +#include "code\modules\clothing\ears\ears.dm" #include "code\modules\clothing\glasses\engine_goggles.dm" #include "code\modules\clothing\glasses\glasses.dm" #include "code\modules\clothing\glasses\hud.dm"