diff --git a/code/controllers/subsystem/jukeboxes.dm b/code/controllers/subsystem/jukeboxes.dm index 2c24262a..5f360758 100644 --- a/code/controllers/subsystem/jukeboxes.dm +++ b/code/controllers/subsystem/jukeboxes.dm @@ -65,14 +65,25 @@ SUBSYSTEM_DEF(jukeboxes) /datum/controller/subsystem/jukeboxes/Initialize() var/list/tracks = flist("config/jukebox_music/sounds/") + var/list/fallbacktracks = flist("config/jukebox_music/fallback/") var/songID = 1 - for(var/S in tracks) + for(var/S in tracks) // Tracks that will not be in the repo, aka, localhost tracks. var/datum/track/T = new() T.song_path = file("config/jukebox_music/sounds/[S]") var/list/L = splittext(S,"+") T.song_name = L[1] - T.song_length = text2num(L[2]) - T.song_beat = text2num(L[3]) + T.song_length = text2num(L[2])*10 //We multiply it by ten because the system requires it in deciseconds + T.song_beat = (text2num(L[3])/6) //We divide it by six because it requires the Beats per seconds value, but in deciseconds. (Result/60) * 10) + T.song_associated_id = songID + songs |= T + songID++ + for(var/S in fallbacktracks) // Tracks that will always be in the repo. + var/datum/track/T = new() + T.song_path = file("config/jukebox_music/fallback/[S]") + var/list/L = splittext(S,"+") + T.song_name = L[1] + T.song_length = text2num(L[2])*10 //We multiply it by ten because the system requires it in deciseconds + T.song_beat = (text2num(L[3])/6) //We divide it by six because it requires the Beats per seconds value, but in deciseconds. (Result/60) * 10) T.song_associated_id = songID songs |= T songID++ diff --git a/config/jukebox_music/README.txt b/config/jukebox_music/README.txt index ea0e5443..c87be071 100644 --- a/config/jukebox_music/README.txt +++ b/config/jukebox_music/README.txt @@ -10,6 +10,6 @@ Naming Conventions: Every sound you add must have a unique name. Avoid using the plus sign "+" and the period "." in names, as these are used internally to classify sounds. -Sound names must be in the format of [song name]+[length in deciseconds]+[beat in deciseconds].ogg +Sound names must be in the format of [song name]+[length in seconds]+[beats per minute].ogg -A three minute song title "SS13" that lasted 3 minutes would have a file name SS13+1800+5.ogg \ No newline at end of file +A three minute song title "SS13" that lasted 3 minutes and had a BPM value of 120 would need the file name SS13+180+120.ogg \ No newline at end of file diff --git a/config/jukebox_music/fallback/Goodbye_Moonmen+192+120.ogg b/config/jukebox_music/fallback/Goodbye_Moonmen+192+120.ogg new file mode 100644 index 00000000..ec6665d3 Binary files /dev/null and b/config/jukebox_music/fallback/Goodbye_Moonmen+192+120.ogg differ diff --git a/modular_citadel/code/modules/cargo/packs.dm b/modular_citadel/code/modules/cargo/packs.dm index 6d39a51a..c94be246 100644 --- a/modular_citadel/code/modules/cargo/packs.dm +++ b/modular_citadel/code/modules/cargo/packs.dm @@ -26,3 +26,10 @@ cost = 35000 contains = list(/obj/machinery/jukebox) crate_name = "Jukebox" + +/datum/supply_pack/misc/discojukebox + name = "Disco Jukebox" + desc = "For the party within you. Needs engineering access or above." + cost = 60000 + contains = list(/obj/machinery/jukebox/disco) + crate_name = "disco jukebox"