Earphone Soundplayers (#20964)

Adds soundplayer functionality to earphones, headphones and earbuds.
They can now play music, loaded via music cartridges with preset
playlists.

Heavily based off CMSS13's Walkmans and our Audioconsoles.

Current Features:

- All earphones have a cartridge slot. Cartridges can be inserted by
clicking an earphone, and removed via an eject_music_cartridge() verb.
- Inserting a cartridge will load a playlist containing /datum/tracks,
where track names and sound files are loaded.
- Shift+Clicking or will Start/Stop a playlist, creating or deleting an
active sound_player token.
- Alt+Clicking with Pause/Unpause the current track, preserving an
active sound_player token.
- Attack_self will eject the music cartridge. Ejecting a music cartridge
also terminates the sound_player token.
- Volume controllable via verb.

Missing features i am too weak to figure out:

- There is no auto—next song, and a user must manually use next_song()
or previous_song() verbs to iterate through a playlist.
- Part and parcel with no auto-next: Tracks automatically loop due to
using the PlayLoopingSound() proc. Ideally, tracks should not loop.
-  There is no accomodation for user-uploaded sound files.
- There are no UI implementations of earphone controls, which could be
more user friendly.

Music Cartridge CoderIcons:
<img width="430" height="106" alt="aaa"
src="https://github.com/user-attachments/assets/5c15d5f4-b2e1-4ece-8076-2e93a5853168"
/>

### Asset Licenses
The following assets that **have not** been created by myself are
included in this PR:

| Path | Original Author | License |
| --- | --- | --- |
| sound/music/regional/venus/all_night.ogg | Rollergirl
(https://rollergirl.bandcamp.com/album/rollergirl) | CC BY-NC-SA 3.0 |
| sound/music/regional/venus/billy_ocean.ogg | Rollergirl
(https://rollergirl.bandcamp.com/album/rollergirl) | CC BY-NC-SA 3.0 |
| sound/music/regional/venus/artificially_sweetened.ogg | Stevia Sphere
(https://steviasphere.bandcamp.com/album/artificially-sweetened-single)
| CC BY 3.0 |
|sound/music/regional/venus/real_love.ogg | Stevia Sphere
(https://steviasphere.bandcamp.com/album/artificially-sweetened-single)
| CC BY 3.0 |
| sound/music/regional/venus/dance.ogg | ウナチャンUNACHAN
(https://unachan.bandcamp.com/track/dance) | CC BY 3.0 |
| sound/music/regional/venus/love_sensation.ogg | ウナチャンUNACHAN and
bedroomtheft (https://unachan.bandcamp.com/track/love-sensation) | CC BY
3.0 |
| sound/music/regional/venus/funky_girl.ogg | B~mO9000
(https://bmo9000.bandcamp.com/album/v-i-n-t-a-g-e) | CC BY-NC-SA 3.0 |
| sound/music/regional/venus/break_the_system.ogg |
(https://bmo9000.bandcamp.com/album/wanted-in-80s [Download Only]) | CC
CC BY-SA 3.0 |
| sound/music/regional/xanu/xanu_rock_3.ogg | Swara Sutra
(https://swarasutra.bandcamp.com/album/indulgence) | CC BY-SA 3.0 |

All sound files compressed to 20K sample rate. No
transformations/remixing
This commit is contained in:
smellie
2025-07-22 11:08:40 +01:00
committed by GitHub
parent ff5927c692
commit d438053ddd
28 changed files with 2986 additions and 2554 deletions
@@ -14,20 +14,6 @@
path = /obj/item/clothing/accessory/ear_warmers
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
/datum/gear/ears/double/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/headphones/New()
..()
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"
description = "A selection of eye-catching earrings."
@@ -179,3 +179,34 @@
/datum/gear/utility/buddy_tag/New()
..()
gear_tweaks += new /datum/gear_tweak/buddy_tag_config()
/datum/gear/utility/earphones
display_name = "earphones selection"
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
path = /obj/item/clothing/ears/earphones
cost = 1
/datum/gear/utility/earphones/New()
..()
var/list/earphones = list()
earphones["headphones"] = /obj/item/clothing/ears/earphones/headphones
earphones["earphones"] = /obj/item/clothing/ears/earphones
earphones["earbuds"] = /obj/item/clothing/ears/earphones/earbuds
gear_tweaks += new /datum/gear_tweak/path(earphones)
/datum/gear/utility/earphones_music_cartridge
display_name = "earphones music cartridge selection"
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION
path = /obj/item/music_cartridge/audioconsole
cost = 1
/datum/gear/utility/earphones_music_cartridge/New()
..()
var/list/music_cartridges = list()
music_cartridges["Konyang Vibes 2463"] = /obj/item/music_cartridge/konyang_retrowave
music_cartridges["Top of the Charts 66 (Venusian Hits)"] = /obj/item/music_cartridge/venus_funkydisco
music_cartridges["SCC Welcome Package"] = /obj/item/music_cartridge/audioconsole
music_cartridges["Spacer Classics Vol. 1"] = /obj/item/music_cartridge/
music_cartridges["Indulgence EP (X-Rock)"] = /obj/item/music_cartridge/xanu_rock
music_cartridges["Electro-Swing of Adhomai"] = /obj/item/music_cartridge/adhomai_swing
gear_tweaks += new /datum/gear_tweak/path(music_cartridges)