From 7d42f23d7d56b8e1c4f1bf28750c1d2fc025c80e Mon Sep 17 00:00:00 2001 From: Archie Date: Wed, 23 Jun 2021 02:26:33 -0300 Subject: [PATCH] Can't round. --- code/controllers/subsystem/jukeboxes.dm | 2 +- config/jukebox_music/README.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/jukeboxes.dm b/code/controllers/subsystem/jukeboxes.dm index 751dc801..d2777843 100644 --- a/code/controllers/subsystem/jukeboxes.dm +++ b/code/controllers/subsystem/jukeboxes.dm @@ -72,7 +72,7 @@ SUBSYSTEM_DEF(jukeboxes) 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 = round(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_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 c87be071..b984ccae 100644 --- a/config/jukebox_music/README.txt +++ b/config/jukebox_music/README.txt @@ -12,4 +12,6 @@ Every sound you add must have a unique name. Avoid using the plus sign "+" and t 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 and had a BPM value of 120 would need the file name SS13+180+120.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 + +A final note: BPM divided by 6 must NEVER result in a decimal value. If a song has a BPM that results in a decimal when divided by 6, it will outright not work. \ No newline at end of file