diff --git a/code/modules/client/preference_setup/loadout/loadout_ears.dm b/code/modules/client/preference_setup/loadout/loadout_ears.dm index d2ee03de19c..7b35ac1b105 100644 --- a/code/modules/client/preference_setup/loadout/loadout_ears.dm +++ b/code/modules/client/preference_setup/loadout/loadout_ears.dm @@ -10,20 +10,18 @@ slot = null /datum/gear/ears/double/headphones - display_name = "headphones" - path = /obj/item/clothing/ears/earmuffs/headphones + display_name = "headphone selection" + description = "A selection of headphones." + path = /obj/item/clothing/ears/earmuffs/earphones/headphones + flags = GEAR_HAS_COLOR_SELECTION -/datum/gear/ears/double/earphones - display_name = "earphones selection" - description = "A selection of earphones." - path = /obj/item/clothing/ears/earmuffs/headphones/earphones - -/datum/gear/ears/double/earphones/New() +/datum/gear/ears/double/headphones/New() ..() - var/list/earphones = list() - earphones["earphones"] = /obj/item/clothing/ears/earmuffs/headphones/earphones - earphones["blue earphones"] = /obj/item/clothing/ears/earmuffs/headphones/earphones/blue - gear_tweaks += new /datum/gear_tweak/path(earphones) + var/list/headphones = list() + headphones["headphones"] = /obj/item/clothing/ears/earmuffs/earphones/headphones + headphones["earphones"] = /obj/item/clothing/ears/earmuffs/earphones + headphones["earbuds"] = /obj/item/clothing/ears/earmuffs/earphones/earbuds + gear_tweaks += new /datum/gear_tweak/path(headphones) /datum/gear/ears/earrings display_name = "earring selection" @@ -52,4 +50,3 @@ hearingaids["hearing aid, white"] = /obj/item/device/hearing_aid/white hearingaids["hearing aid, skrellian"] = /obj/item/device/hearing_aid/skrell gear_tweaks += new /datum/gear_tweak/path(hearingaids) - diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index a7be1b7283a..6035bc881c2 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -350,6 +350,8 @@ desc = O.desc icon = O.icon icon_state = O.icon_state + color = O.color + overlays = O.overlays set_dir(O.dir) /obj/item/clothing/ears/offear/attack_hand(mob/living/carbon/human/H) diff --git a/code/modules/clothing/ears/earmuffs.dm b/code/modules/clothing/ears/earmuffs.dm index b092251897b..484625cbc66 100644 --- a/code/modules/clothing/ears/earmuffs.dm +++ b/code/modules/clothing/ears/earmuffs.dm @@ -1,23 +1,26 @@ /obj/item/clothing/ears/earmuffs name = "earmuffs" desc = "Protects your hearing from loud noises, and quiet ones as well." - icon = 'icons/obj/clothing/ears.dmi' + icon = 'icons/obj/clothing/ears/earmuffs.dmi' icon_state = "earmuffs" item_state = "earmuffs" item_flags = SOUNDPROTECTION slot_flags = SLOT_EARS | SLOT_TWOEARS + contained_sprite = TRUE + var/on = FALSE -/obj/item/clothing/ears/earmuffs/headphones - name = "headphones" - desc = "Unce unce unce unce." - var/headphones_on = 0 - icon_state = "headphones" - item_state = "headphones" +/obj/item/clothing/ears/earmuffs/earphones + name = "earphones" + desc = "A pair of wired earphones. Good luck trying to find a headphone jack." + desc_fluff = "Has a tendency to snag itself on whatever furniture it can find at the most inopportune of times." + icon_state = "earphones" + item_state = "earphones" + build_from_parts = TRUE -/obj/item/clothing/ears/earmuffs/headphones/attack_self(mob/user) +/obj/item/clothing/ears/earmuffs/earphones/attack_self(mob/user) togglemusic() -/obj/item/clothing/ears/earmuffs/headphones/verb/togglemusic() +/obj/item/clothing/ears/earmuffs/earphones/verb/togglemusic() set name = "Toggle Headphone Music" set category = "Object" set src in usr @@ -26,23 +29,33 @@ if(use_check_and_message(usr)) return - if(headphones_on) - icon_state = initial(icon_state) - headphones_on = 0 + playsound(src, /decl/sound_category/button_sound, 10) + if(on) + cut_overlays() + worn_overlay = null to_chat(usr, SPAN_NOTICE("You turn the music off.")) else - icon_state = "[initial(icon_state)]_on" - headphones_on = 1 + worn_overlay = "music" // this is rather annoying but prevents the music notes on getting colored to_chat(usr, SPAN_NOTICE("You turn the music on.")) + on = !on + update_icon() update_clothing_icon() -/obj/item/clothing/ears/earmuffs/headphones/earphones - name = "earphones" - icon_state = "earphones" - item_state = "earphones" +/obj/item/clothing/ears/earmuffs/earphones/headphones + name = "headphones" + desc = "A pair of headphones. Cushioned and sound-cancelling." + desc_fluff = "Unce unce unce unce." + icon_state = "headphones" + item_state = "headphones" -/obj/item/clothing/ears/earmuffs/headphones/earphones/blue - name = "blue earphones" - icon_state = "earphones_blue" - item_state = "earphones_blue" +/obj/item/clothing/ears/earmuffs/earphones/headphones/update_icon() + ..() + add_overlay(overlay_image(icon, "[icon_state]_overlay", flags=RESET_COLOR)) + +/obj/item/clothing/ears/earmuffs/earphones/earbuds + name = "earbuds" + desc = "A pair of wireless earbuds. Don't lose them." + desc_fluff = "Oh god, he can't hear us! He's got earbuds on!" + icon_state = "earbuds" + item_state = "earbuds" diff --git a/html/changelogs/wezzy_earbud-tweaks.yml b/html/changelogs/wezzy_earbud-tweaks.yml new file mode 100644 index 00000000000..3e8357237e2 --- /dev/null +++ b/html/changelogs/wezzy_earbud-tweaks.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds earbuds. Also makes earphones and headphones colorable. Credit to Armolitskiy#4866 for Earmuff sprites." diff --git a/icons/mob/l_ear.dmi b/icons/mob/l_ear.dmi index b8d3171996c..d7c01be0ea1 100644 Binary files a/icons/mob/l_ear.dmi and b/icons/mob/l_ear.dmi differ diff --git a/icons/mob/r_ear.dmi b/icons/mob/r_ear.dmi index cfe4201a358..919cccc60b8 100644 Binary files a/icons/mob/r_ear.dmi and b/icons/mob/r_ear.dmi differ diff --git a/icons/obj/clothing/ears.dmi b/icons/obj/clothing/ears.dmi index 0c6b6734582..19de69af1d5 100644 Binary files a/icons/obj/clothing/ears.dmi and b/icons/obj/clothing/ears.dmi differ diff --git a/icons/obj/clothing/ears/earmuffs.dmi b/icons/obj/clothing/ears/earmuffs.dmi new file mode 100644 index 00000000000..72530e2ac0f Binary files /dev/null and b/icons/obj/clothing/ears/earmuffs.dmi differ