mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 12:56:10 +01:00
d438053ddd
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
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
/obj/item/clothing/ears/earmuffs
|
|
name = "earmuffs"
|
|
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
|
icon = 'icons/obj/clothing/ears/earmuffs.dmi'
|
|
icon_state = "earmuffs"
|
|
item_state = "earmuffs"
|
|
item_flags = ITEM_FLAG_SOUND_PROTECTION
|
|
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
|
contained_sprite = TRUE
|
|
|
|
/obj/item/clothing/accessory/ear_warmers
|
|
name = "ear warmers"
|
|
desc = "A pair of fuzzy ear warmers, incase that's the only place you're worried about getting frost bite."
|
|
icon = 'icons/obj/clothing/ears/earmuffs.dmi'
|
|
icon_state = "ear_warmers"
|
|
item_state = "ear_warmers"
|
|
contained_sprite = TRUE
|
|
build_from_parts = TRUE
|
|
worn_overlay = "over"
|
|
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
|
slot = ACCESSORY_SLOT_HEAD
|
|
|
|
/obj/item/clothing/accessory/ear_warmers/attack_hand(mob/user)
|
|
if(ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
if(H.l_ear != src && H.r_ear != src)
|
|
return ..()
|
|
|
|
if(slot_flags & SLOT_TWOEARS)
|
|
var/obj/item/clothing/ears/OE = (H.l_ear == src ? H.r_ear : H.l_ear)
|
|
qdel(OE)
|
|
|
|
..()
|
|
|
|
/obj/item/clothing/accessory/ear_warmers/update_clothing_icon()
|
|
if (ismob(src.loc))
|
|
var/mob/M = src.loc
|
|
M.update_inv_l_ear()
|
|
M.update_inv_r_ear()
|