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>
This commit is contained in:
Batrachophreno
2026-01-22 16:54:40 +00:00
committed by GitHub
co-authored by VMSolidus
parent 4bc8527606
commit 7d058fc613
316 changed files with 6462 additions and 5993 deletions
+2 -2
View File
@@ -136,7 +136,7 @@ LINEN BINS
if (do_after(user, 25, src))
if(user.loc != loc)
user.do_attack_animation(src)
playsound(get_turf(loc), /singleton/sound_category/rustle_sound, 15, 1, -5)
playsound(get_turf(loc), SFX_RUSTLE, 15, 1, -5)
var/folds = fold
user.visible_message(SPAN_NOTICE("\The [user] [folds ? "unfolds" : "folds"] \the [src]."),
SPAN_NOTICE("You [fold ? "unfold" : "fold"] \the [src]."))
@@ -170,7 +170,7 @@ LINEN BINS
if (do_after(user, 6, src))
if(user.loc != loc)
user.do_attack_animation(src)
playsound(get_turf(loc), /singleton/sound_category/rustle_sound, 15, 1, -5)
playsound(get_turf(loc), SFX_RUSTLE, 15, 1, -5)
var/rolls = roll
user.visible_message(SPAN_NOTICE("\The [user] [rolls ? "unrolls" : "rolls"] \the [src]."),
SPAN_NOTICE("You [roll ? "unroll" : "roll"] \the [src]."))
@@ -64,7 +64,7 @@
desc += " It appears to be broken."
AddOverlays("[icon_door_overlay]sparking")
CUT_OVERLAY_IN("[icon_door_overlay]sparking", 6)
playsound(loc, /singleton/sound_category/spark_sound, 60, 1)
playsound(loc, SFX_SPARKS, 60, 1)
broken = TRUE
locked = FALSE
update_icon()
@@ -70,7 +70,7 @@
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [blade]!", "You hear metal being sliced and sparks flying."))
blade.spark_system.queue()
playsound(loc, 'sound/weapons/blade.ogg', 50, 1)
playsound(loc, /singleton/sound_category/spark_sound, 50, 1)
playsound(loc, SFX_SPARKS, 50, 1)
else
to_chat(user, SPAN_WARNING("Access denied"))
return
+1 -1
View File
@@ -53,7 +53,7 @@
density = FALSE
destroyed = TRUE
new /obj/item/material/shard(loc)
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1)
playsound(src, SFX_BREAK_GLASS, 70, 1)
update_icon()
/obj/structure/displaycase/update_icon()
@@ -42,7 +42,7 @@
shattered = TRUE
unlocked = TRUE
open = TRUE
playsound(user, /singleton/sound_category/glass_break_sound, 100, 1)
playsound(user, SFX_BREAK_GLASS, 100, 1)
update_icon()
/obj/structure/fireaxecabinet/update_icon()
@@ -92,7 +92,7 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
user.visible_message("[SPAN_BOLD("[user]")] [panel_open ? "closes" : "opens"] \the [src]!", SPAN_NOTICE("You [panel_open ? "close" : "open"] \the [src]!"))
panel_open = !panel_open
update_icon()
playsound(get_turf(src), panel_open ? /singleton/sound_category/hatch_open : /singleton/sound_category/hatch_close, 30, TRUE)
playsound(get_turf(src), panel_open ? SFX_HATCH_OPEN : SFX_HATCH_CLOSE, 30, TRUE)
return
if(panel_open)
for(var/tool_type in panel_tools)
@@ -221,13 +221,13 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
playsound(get_turf(target), finish_sound, 30, TRUE)
/singleton/engineer_maintenance_tool/steam_pipe
finish_sound = /singleton/sound_category/steam_pipe
finish_sound = SFX_STEAM_PIPE
/singleton/engineer_maintenance_tool/electrical_hum
finish_sound = /singleton/sound_category/electrical_hum
finish_sound = SFX_ELECTRICAL_HUM
/singleton/engineer_maintenance_tool/electrical_spark
finish_sound = /singleton/sound_category/electrical_spark
finish_sound = SFX_ELECTRICAL_SPARK
/singleton/engineer_maintenance_tool/electrical_spark/perform_action(mob/user, obj/item/tool, obj/structure/engineer_maintenance/target)
. = ..()
+3 -3
View File
@@ -20,7 +20,7 @@
/obj/structure/grille,
/turf/unsimulated/mineral/asteroid
)
footstep_sound = /singleton/sound_category/catwalk_footstep
footstep_sound = SFX_FOOTSTEP_CATWALK
/obj/structure/lattice/assembly_hints(mob/user, distance, is_adjacent)
. += ..()
@@ -250,7 +250,7 @@
icon_state = "tatami"
return_amount = null
smoothing_flags = null
footstep_sound = /singleton/sound_category/carpet_footstep
footstep_sound = SFX_FOOTSTEP_CARPET
/obj/structure/lattice/catwalk/indoor/planks
name = "flooring plank"
@@ -259,7 +259,7 @@
icon_state = "plank"
return_amount = null
smoothing_flags = null
footstep_sound = /singleton/sound_category/wood_footstep
footstep_sound = SFX_FOOTSTEP_WOOD
/obj/structure/lattice/catwalk/indoor/planks/opaque
icon_state = "plank_dark"
+1 -1
View File
@@ -48,7 +48,7 @@
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1)
playsound(src, SFX_BREAK_GLASS, 70, 1)
desc = "Oh no, seven years of bad luck!"
var/obj/effect/reflection/reflection = ref.resolve()
+1 -1
View File
@@ -418,7 +418,7 @@
var/empty_amount = RG.reagents.trans_to(src, RG.amount_per_transfer_from_this)
var/max_reagents = RG.reagents.maximum_volume
user.visible_message("<b>[user]</b> empties [empty_amount == max_reagents ? "all of \the [RG]" : "some of \the [RG]"] into \a [src].")
playsound(src.loc, /singleton/sound_category/generic_pour_sound, 10, 1)
playsound(src.loc, SFX_POUR, 10, 1)
return
// Filling/empying Syringes
+9 -9
View File
@@ -81,15 +81,15 @@
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
if(message)
visible_message(SPAN_DANGER("[src] looks like it's about to shatter!"))
playsound(loc, /singleton/sound_category/glasscrack_sound, 100, 1)
playsound(loc, SFX_GLASS_CRACK, 100, 1)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
if(message)
visible_message(SPAN_WARNING("[src] looks seriously damaged!"))
playsound(loc, /singleton/sound_category/glasscrack_sound, 100, 1)
playsound(loc, SFX_GLASS_CRACK, 100, 1)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
if(message)
visible_message(SPAN_WARNING("Cracks begin to appear in [src]!"))
playsound(loc, /singleton/sound_category/glasscrack_sound, 100, 1)
playsound(loc, SFX_GLASS_CRACK, 100, 1)
return
/obj/structure/window/proc/apply_silicate(var/amount)
@@ -110,7 +110,7 @@
AddOverlays(img)
/obj/structure/window/proc/shatter(var/display_message = 1)
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1)
playsound(src, SFX_BREAK_GLASS, 70, 1)
if(display_message)
visible_message(SPAN_WARNING("\The [src] shatters!"))
if(dir == SOUTHWEST)
@@ -195,7 +195,7 @@
if(ismob(hitting_atom))
if(isliving(hitting_atom))
var/mob/living/M = hitting_atom
M.turf_collision(src, throwingdatum.speed, /singleton/sound_category/glasscrack_sound)
M.turf_collision(src, throwingdatum.speed, SFX_GLASS_CRACK)
return
else
visible_message(SPAN_DANGER("\The [src] was hit by \the [hitting_atom]."))
@@ -746,7 +746,7 @@
return
/obj/structure/window/full/shatter(var/display_message = 1)
playsound(src, /singleton/sound_category/glass_break_sound, 70, 1)
playsound(src, SFX_BREAK_GLASS, 70, 1)
if(display_message)
visible_message(SPAN_WARNING("\The [src] shatters!"))
if(reinf)
@@ -772,13 +772,13 @@
playsound(loc, 'sound/effects/glass_hit.ogg', 100, 1)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message(SPAN_DANGER("[src] looks like it's about to shatter!"))
playsound(loc, /singleton/sound_category/glasscrack_sound, 100, 1)
playsound(loc, SFX_GLASS_CRACK, 100, 1)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message(SPAN_WARNING("[src] looks seriously damaged!"))
playsound(loc, /singleton/sound_category/glasscrack_sound, 100, 1)
playsound(loc, SFX_GLASS_CRACK, 100, 1)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message(SPAN_WARNING("Cracks begin to appear in [src]!"))
playsound(loc, /singleton/sound_category/glasscrack_sound, 100, 1)
playsound(loc, SFX_GLASS_CRACK, 100, 1)
return
/obj/structure/window/full/dismantle_window()