Files
Batrachophreno 7d058fc613 Jukebox TGUI update, Earphones autoplay, sound keys refactor (#21630)
V2 of [previous music playing
PR](https://github.com/Aurorastation/Aurora.3/pull/21466). TLDR no
longer uses the connect_range component for implementation because it
turned out a bit too inflexible for overlapping music players.

Removes a NanoUI template for the [TGUI
update](https://github.com/Aurorastation/Aurora.3/pull/21046).

New changelog:
  - refactor: "Ported Jukebox's NanoUI interface to TGUI."
- refactor: "Ported Jukebox audio playing functionality to a component."
- refactor: "Sound keys refactored from singletons to datums, along with
larger breakout of sound.dm to allow for easier SFX updates in future."
  - code_imp: "Expanded track datums to include track lengths."
- code_imp: "Reorganized music file folders for more intuitive access."
  - rscadd: "Earphone status feedback text now includes track length."
  - rscadd: "Added autoplay functionality to earphones."
- bugfix: "Fixed earphones' 'Previous Song' verb not sending you to the
end of the playlist when used while the first track is selected."
- bugfix: "Fixed gain adjustment for 'Konyang-1' (-23 dB -> standard
-9.8 dB)."
- bugfix: "Fixed y-offset of audioconsole-running overlay animation to
line up with the actual screen."

---------

Co-authored-by: VMSolidus <evilexecutive@gmail.com>
2026-01-22 16:54:40 +00:00

204 lines
6.3 KiB
Plaintext

/obj/item/clothing/suit/storage
var/obj/item/storage/internal/pockets
/obj/item/clothing/suit/storage/Initialize()
. = ..()
pockets = new/obj/item/storage/internal(src)
pockets.storage_slots = 2 //two slots
pockets.max_w_class = WEIGHT_CLASS_SMALL //fit only pocket sized items
pockets.max_storage_space = 4
/obj/item/clothing/suit/storage/Destroy()
qdel(pockets)
pockets = null
return ..()
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
if (pockets.handle_attack_hand(user))
..(user)
/obj/item/clothing/suit/storage/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
if (pockets.handle_mousedrop(user, over))
..()
/obj/item/clothing/suit/storage/handle_middle_mouse_click(mob/user)
if(Adjacent(user))
pockets.open(user)
return TRUE
return FALSE
/obj/item/clothing/suit/storage/attackby(obj/item/attacking_item, mob/user)
..()
if(istype(attacking_item, /obj/item/clothing/accessory))
return
pockets.attackby(attacking_item, user)
/obj/item/clothing/suit/storage/emp_act(severity)
. = ..()
pockets.emp_act(severity)
/obj/item/clothing/suit/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
pockets.hear_talk(M, msg, verb, speaking)
..()
//Jackets with buttons
/obj/item/clothing/suit/storage/toggle
var/opened = FALSE
/obj/item/clothing/suit/storage/toggle/verb/toggle()
set name = "Toggle Coat Buttons"
set category = "Object.Equipped"
set src in usr
if(use_check_and_message(usr))
return 0
toggle_open()
/obj/item/clothing/suit/storage/toggle/proc/toggle_open()
opened = !opened
to_chat(usr, SPAN_NOTICE("You [opened ? "unbutton" : "button up"] \the [src]."))
playsound(src, SFX_RUSTLE, EQUIP_SOUND_VOLUME, TRUE)
icon_state = "[initial(icon_state)][opened ? "_open" : ""]"
item_state = icon_state
update_icon()
update_clothing_icon()
/obj/item/clothing/suit/storage/toggle/Initialize()
. = ..()
if(opened) // for stuff that's supposed to spawn opened, like labcoats.
icon_state = "[initial(icon_state)][opened ? "_open" : ""]"
item_state = icon_state
/obj/item/clothing/suit/storage/vest/hos/Initialize()
. = ..()
pockets = new/obj/item/storage/internal(src)
pockets.storage_slots = 4
pockets.max_w_class = WEIGHT_CLASS_SMALL
pockets.max_storage_space = 8
/obj/item/clothing/suit/storage/vest
var/icon_badge
var/icon_nobadge
/obj/item/clothing/suit/storage/vest/verb/toggle()
set name ="Adjust Badge"
set category = "Object.Equipped"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(icon_state == icon_badge)
icon_state = icon_nobadge
to_chat(usr, "You conceal \the [src]'s badge.")
else if(icon_state == icon_nobadge)
icon_state = icon_badge
to_chat(usr, "You reveal \the [src]'s badge.")
else
to_chat(usr, "\The [src] does not have a vest badge.")
return
update_clothing_icon()
// Greatcoats
/obj/item/clothing/suit/storage/toggle/greatcoat
name = "black greatcoat"
desc = "A black greatcoat. It looks warmer, if a bit heavier, than most other clothing."
icon = 'icons/obj/item/clothing/suit/storage/toggle/greatcoat.dmi'
icon_state = "greatcoat"
item_state = "greatcoat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
armor = list(
BIO = ARMOR_BIO_MINOR
)
siemens_coefficient = 0.8
protects_against_weather = TRUE
contained_sprite = TRUE
/obj/item/clothing/suit/storage/toggle/greatcoat/brown
name = "brown greatcoat"
desc = "A brown greatcoat. It looks warmer, if a bit heavier, than most other clothing."
icon_state = "greatcoat_bwn"
item_state = "greatcoat_bwn"
// Corporate Jackets
/obj/item/clothing/suit/storage/toggle/corp
icon = 'icons/obj/item/clothing/suit/storage/toggle/corp_dep_jackets.dmi'
contained_sprite = TRUE
/obj/item/clothing/suit/storage/toggle/corp/idris
name = "idris corporate jacket"
desc = "A cozy jacket in Idris' colors, for those who need more merchandise in their life."
icon_state = "idris_corp_jacket"
item_state = "idris_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/idris/alt
icon_state = "idris_corp_jacket_alt"
item_state = "idris_corp_jacket_alt"
/obj/item/clothing/suit/storage/toggle/corp/zavod
name = "zavodskoi corporate jacket"
desc = "A cozy jacket in Zavodskoi's colors, professional and intimidating."
icon_state = "zavod_corp_jacket"
item_state = "zavod_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/zavod/alt
icon_state = "zavod_corp_jacket_alt"
item_state = "zavod_corp_jacket_alt"
/obj/item/clothing/suit/storage/toggle/corp/pmc
name = "pmcg corporate jacket"
desc = "A cozy jacket in PMCG's colors, made out of military grade material."
icon_state = "pmc_corp_jacket"
item_state = "pmc_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/pmc/alt
icon_state = "epmc_corp_jacket"
item_state = "epmc_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/heph
name = "hephaestus corporate jacket"
desc = "A cozy jacket in Hepheastus' colors, as heavy duty as they come."
icon_state = "heph_corp_jacket"
item_state = "heph_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/nt
name = "nanotrasen corporate jacket"
desc = "A cozy jacket in NanoTrasen's colors, perfect if you live for a phoron company."
icon_state = "nt_corp_jacket"
item_state = "nt_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/zeng
name = "zeng-hu corporate jacket"
desc = "A cozy jacket in Zeng-Hu's colors, optional augmentations not included."
icon_state = "zeng_corp_jacket"
item_state = "zeng_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/zeng/alt
icon_state = "zeng_corp_jacket_alt"
item_state = "zeng_corp_jacket_alt"
/obj/item/clothing/suit/storage/toggle/corp/orion
name = "orion corporate jacket"
desc = "A cozy jacket in Orion's colors, perfect for hauling freight day and night."
icon_state = "orion_corp_jacket"
item_state = "orion_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/orion/alt
icon_state = "orion_corp_jacket_alt"
item_state = "orion_corp_jacket_alt"
/obj/item/clothing/suit/storage/toggle/corp/scc
name = "scc corporate jacket"
desc = "A cozy jacket in the SCC's colors, the finest jacket of them all."
icon_state = "scc_corp_jacket"
item_state = "scc_corp_jacket"
/obj/item/clothing/suit/storage/toggle/corp/scc/alt
icon_state = "scc_corp_jacket_alt"
item_state = "scc_corp_jacket_alt"