Files
Polaris/code/datums/audio/_audio.dm
Cerebulon 474a8c43cf Decl Music and Ported Music + Licenses (#8221)
* Decl music + ported music

* Bugfixes and not

* unit test

* debug shit + some fixes

* More Changes

* Removes some unused/extra songs in case it was a file size issue

* Nuke crash-prone songs

* Add cynosure defines

* It Just Works Now + Finished Headphone code/sprites

* requested tweaks/debug removal

* recheck dme
2022-03-12 19:45:36 -08:00

25 lines
776 B
Plaintext

/decl/music_track
var/artist
var/title
var/album
var/decl/license/license
var/song
var/url // Remember to include http:// or https:// or BYOND will be sad
var/volume = 70
/decl/music_track/Initialize()
. = ..()
license = GET_DECL(license)
/decl/music_track/proc/play_to(var/listener)
to_chat(listener, "<span class='good'>Now Playing:</span>")
to_chat(listener, "<span class='good'>[title][artist ? " by [artist]" : ""][album ? " ([album])" : ""]</span>")
if(url)
to_chat(listener, url)
to_chat(listener, "<span class='good'>License: <a href='[license.url]'>[license.name]</a></span>")
listener << sound(song, repeat = 1, wait = 0, volume = volume, channel = 1)
// No VV editing anything about music tracks
/decl/music_track/VV_static()
return ..() + vars