-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
linnpap
committed
Jan 13, 2023
1 parent
d1f9685
commit 2a0a6ee
Showing
13 changed files
with
109 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Throw any music you want into either /sounds/ or /secret_sounds/. If it's in /sounds/, it'll be able to be listened to with headphones and an unhacked jukebox. | ||
Anything in /secret_sounds/ can only be heard of a hacked jukebox. | ||
|
||
IMPORTANT: Make sure filenames DO NOT have any '.' outside of a file extension, otherwise the song title will be fucked up. |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/datum/track | ||
var/title | ||
var/path | ||
|
||
/datum/track/New(_title, _path) | ||
title = _title | ||
path = _path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/proc/setup_music_tracks(var/list/tracks) | ||
. = list() | ||
var/list/possible_tracks = flist("config/jukebox_music/sounds/") | ||
|
||
var/list/byond_sound_formats = list( | ||
"mid" = TRUE, | ||
"midi" = TRUE, | ||
"mod" = TRUE, | ||
"it" = TRUE, | ||
"s3m" = TRUE, | ||
"xm" = TRUE, | ||
"oxm" = TRUE, | ||
"wav" = TRUE, | ||
"ogg" = TRUE, | ||
"raw" = TRUE, | ||
"wma" = TRUE, | ||
"aiff" = TRUE, | ||
) | ||
|
||
for(var/songs in possible_tracks) | ||
var/list/split_name = splittext(songs,".") | ||
if(split_name.len >= 2) | ||
var/ext = lowertext(split_name[split_name.len]) //pick the real extension, no 'honk.ogg.exe' nonsense here | ||
if(byond_sound_formats[ext]) | ||
. += new/datum/track(split_name[1], "config/jukebox_music/sounds/[songs]") //if a song is named some shit like "Awesome.FuckingSong.ogg", the title is only gonna be "Awesome" | ||
|
||
/proc/setup_secret_music_tracks(var/list/tracks) | ||
. = list() | ||
var/list/possible_tracks = flist("config/jukebox_music/secret_sounds/") | ||
|
||
var/list/byond_sound_formats = list( | ||
"mid" = TRUE, | ||
"midi" = TRUE, | ||
"mod" = TRUE, | ||
"it" = TRUE, | ||
"s3m" = TRUE, | ||
"xm" = TRUE, | ||
"oxm" = TRUE, | ||
"wav" = TRUE, | ||
"ogg" = TRUE, | ||
"raw" = TRUE, | ||
"wma" = TRUE, | ||
"aiff" = TRUE, | ||
) | ||
|
||
for(var/songs in possible_tracks) | ||
var/list/split_name = splittext(songs,".") | ||
if(split_name.len >= 2) | ||
var/ext = lowertext(split_name[split_name.len]) //pick the real extension, no 'honk.ogg.exe' nonsense here | ||
if(byond_sound_formats[ext]) | ||
. += new/datum/track(split_name[1], "config/jukebox_music/secret_sounds/[songs]") //if a song is named some shit like "Awesome.FuckingSong.ogg", the title is only gonna be "Awesome" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters