Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/_globalvars/lists/ambience.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(space_ambience,list(
'sound/ambience/ambispace4.ogg',
'sound/ambience/ambispace5.ogg',
'sound/ambience/ambispace6.ogg',
'sound/ambience/title2.ogg',
'sound/music/lobby_music/title2.ogg',
))

GLOBAL_LIST_INIT(maint_ambience,list(
Expand Down
47 changes: 25 additions & 22 deletions code/_onclick/hud/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,6 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/lobby_music)
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
plane = SPLASHSCREEN_PLANE
screen_loc = "LEFT+0.25,TOP-0.25"
/// World time when the current song started playing for this player
var/start_time
/// World time when the current song will stop playing for this player
var/end_time

/atom/movable/screen/lobby_music/New(loc, datum/hud/our_hud, ...)
src.hud = our_hud
Expand All @@ -631,27 +627,34 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/lobby_music)
if(hud?.mymob?.client?.prefs?.read_preference(/datum/preference/numeric/volume/sound_lobby_volume) <= 0)
alpha = 0 // we still need to init it incase they turn it back on

#define MUSIC_MAPTEXT(for_step) "[SStitle.music_maptext]<br>[MAPTEXT("\u25B6 [time2text(max(10, world.time + for_step - start_time), "mm:ss", NO_TIMEZONE)] / [time2text(max(100, SSticker.login_length), "mm:ss", 0)]")]"

/atom/movable/screen/lobby_music/proc/start_tracking()
// cancel active animations
animate(src)
alpha = 255
start_time = world.time
end_time = start_time + SSticker.login_length
START_PROCESSING(SSlobby_music_player, src)
update_maptext()

/atom/movable/screen/lobby_music/process(seconds_per_tick)
update_maptext()
if(world.time >= end_time)
animate(src, alpha = 0, time = 5 SECONDS)
return PROCESS_KILL

var/start_time = world.time
var/end_time = start_time + SSticker.login_length

// adds an animation step every 1 second
// (we use animates here so world init won't slow it down.)
// a 1 second buffer is added to the end time, just in case we run into weird rounding issues
// (start time = 1231, end time = 1300 would mean we skip the last 0.9 seconds of the song, as the last step would be 9.)
for(var/i in 0 to (end_time - start_time + 1 SECONDS) step (1 SECONDS))
if(i + start_time > end_time)
break // we didn't need that 1 second buffer after all

animate(src,
time = 1 SECONDS,
maptext = MUSIC_MAPTEXT(i),
alpha = 255,
flags = ANIMATION_CONTINUE,
)
// cap off the animation with a text fade
animate(src, time = 5 SECONDS, alpha = 0, flags = ANIMATION_CONTINUE)

/atom/movable/screen/lobby_music/proc/cancel_tracking()
STOP_PROCESSING(SSlobby_music_player, src)
// interrupt any active antimations and then fade out the text
animate(src, alpha = 0, time = 1 SECONDS)

/atom/movable/screen/lobby_music/proc/update_maptext()
maptext = "[SStitle.music_maptext]<br>[MAPTEXT("\u25B6 [time2text(max(10, min(world.time - start_time, SSticker.login_length)), "mm:ss", NO_TIMEZONE)] / [time2text(max(100, SSticker.login_length), "mm:ss", 0)]s")]"

/atom/movable/screen/lobby_music/Destroy()
STOP_PROCESSING(SSlobby_music_player, src)
return ..()
#undef MUSIC_MAPTEXT
26 changes: 21 additions & 5 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,27 @@ SUBSYSTEM_DEF(ticker)
return

login_music = new_music
login_length = rustg_sound_length(new_music) || 1500 // default to 2.5 minutes if we can't get the length
var/list/music_file_components = splittext(new_music, "/")
var/music_file_name = length(music_file_components) && music_file_components[length(music_file_components)] || new_music
var/list/music_name_components = splittext(music_file_name, "+")
var/music_name = length(music_name_components) && music_name_components[length(music_name_components)] || music_file_name

var/music_name
// consult track datums for information
for(var/datum/track/preset/existing_track as anything in subtypesof(/datum/track/preset))
if(new_music != "[existing_track::song_path]")
continue
music_name = existing_track::song_name
login_length = existing_track::song_length
break

// if no track is found: get sound length programatically
if(!login_length)
login_length = rustg_sound_length(new_music) || (2.5 MINUTES) // default to 2.5 minutes if we can't get the length

// if no track is found: get the name from the file path
if(!music_name)
var/list/music_file_components = splittext(new_music, "/")
var/music_file_name = length(music_file_components) && music_file_components[length(music_file_components)] || new_music
var/list/music_name_components = splittext(music_file_name, "+")
music_name = length(music_name_components) && music_name_components[length(music_name_components)] || music_file_name

SStitle.update_music_text(music_name)

#undef ROUND_START_MUSIC_LIST
Expand Down
60 changes: 51 additions & 9 deletions code/datums/components/jukebox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -401,33 +401,75 @@
/// Used to determine time between effects when played
var/song_beat = 0

// Default track supplied for testing and also because it's a banger
// Default track supplied for testing. And also because title3 is a banger
/datum/track/default
song_path = 'sound/ambience/title3.ogg'
song_name = "Tintin on the Moon"
song_length = 3 MINUTES + 52 SECONDS
song_beat = 1 SECONDS
song_path = /datum/track/preset/title_three::song_path
song_name = /datum/track/preset/title_three::song_name
song_length = /datum/track/preset/title_three::song_length
song_beat = /datum/track/preset/title_three::song_beat

/datum/track/preset/title_zero
song_path = 'sound/ambience/title0.ogg'
song_path = 'sound/music/lobby_music/title0.ogg'
song_name = "Endless Space"
song_length = 3 MINUTES + 33 SECONDS
song_beat = 2 SECONDS

/datum/track/preset/title_one
song_path = 'sound/ambience/title1.mod'
song_path = 'sound/music/lobby_music/title1.mod'
song_name = "Flip Flap"
song_length = 2 MINUTES + 31 SECONDS
song_beat = 1 SECONDS

/datum/track/preset/title_two
song_path = 'sound/ambience/title2.ogg'
song_path = 'sound/music/lobby_music/title2.ogg'
song_name = "Robocop"
song_length = 1 MINUTES + 58 SECONDS
song_beat = 4 SECONDS

/datum/track/preset/title_three
song_path = 'sound/ambience/title3.ogg'
song_path = 'sound/music/lobby_music/title3.ogg'
song_name = "Tintin on the Moon"
song_length = 3 MINUTES + 52 SECONDS
song_beat = 1 SECONDS

/datum/track/preset/monument
song_path = 'sound/music/lobby_music/monument.ogg'
song_name = "Monument"
song_length = 5 MINUTES + 24 SECONDS
song_beat = 1 SECONDS

/datum/track/preset/rimward_cruise
song_path = 'sound/music/lobby_music/rimward_cruise.ogg'
song_name = "Rimward Cruise"
song_length = 3 MINUTES + 52 SECONDS // somehow the same length as title3
song_beat = 1 SECONDS

/datum/track/preset/traitor
song_path = 'sound/music/lobby_music/traitor.ogg'
song_name = "Absconditus"
song_length = 5 MINUTES + 30 SECONDS
song_beat = 2 SECONDS

/datum/track/preset/pwmur
song_path = 'sound/music/lobby_music/pwmur.ogg'
song_name = "Plasma Will Make Us Rich" // cheeky rename from Phoron
song_length = 2 MINUTES + 14 SECONDS
song_beat = 1 SECONDS

/datum/track/preset/moonshine
song_path = 'sound/music/lobby_music/moonshine.ogg'
song_name = "Moonshine"
song_length = 3 MINUTES + 37 SECONDS
song_beat = 1 SECONDS

/datum/track/preset/burning
song_path = 'sound/music/lobby_music/burning.ogg'
song_name = "Burning"
song_length = 2 MINUTES + 32 SECONDS
song_beat = 1 SECONDS

/datum/track/preset/daydream
song_path = 'sound/music/lobby_music/daydream.ogg'
song_name = "Daydream"
song_length = 2 MINUTES + 38 SECONDS
song_beat = 1 SECONDS
2 changes: 1 addition & 1 deletion code/game/area/areas/ruins/lavaland.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/area/ruin/powered/clownplanet
name = "\improper Clown Biodome"
ambientsounds = list('sound/ambience/clown.ogg')
ambientsounds = list('sound/music/lobby_music/clown.ogg')

/area/ruin/unpowered/gaia
name = "\improper Patch of Eden"
Expand Down
2 changes: 1 addition & 1 deletion code/game/area/areas/ruins/space.dm
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
// The planet of the clowns
/area/ruin/space/has_grav/powered/clownplanet
name = "\improper Clown Planet"
ambientsounds = list('sound/ambience/clown.ogg')
ambientsounds = list('sound/music/lobby_music/clown.ogg')

//DERELICT SULACO
/area/ruin/space/has_grav/derelictsulaco
Expand Down
2 changes: 1 addition & 1 deletion code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
set waitfor = FALSE
UNTIL(SSticker.login_music) //wait for SSticker init to set the login music

var/volume = prefs.read_preference(/datum/preference/numeric/volume/sound_lobby_volume) * volume_multiplier
var/volume = prefs.read_preference(/datum/preference/numeric/volume/sound_lobby_volume) * 0.5 * volume_multiplier
if(volume > 0 && !CONFIG_GET(flag/disallow_title_music))
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = volume, channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS
for(var/atom/movable/screen/lobby_music/text in mob.hud_used?.static_inventory)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
maximum = 100

/datum/preference/numeric/volume/create_default_value()
return maximum
return maximum / 2

/// Controls ambience volume
/datum/preference/numeric/volume/sound_ambience_volume
Expand Down
2 changes: 1 addition & 1 deletion code/modules/holiday/holidays.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
/datum/holiday/april_fools/celebrate()
. = ..()
SSjob.set_overflow_role(/datum/job/clown)
SSticker.set_lobby_music('sound/ambience/clown.ogg', TRUE) // NON-MODULE CHANGE
SSticker.set_lobby_music('sound/music/lobby_music/clown.ogg', TRUE) // NON-MODULE CHANGE
for(var/i in GLOB.new_player_list)
var/mob/dead/new_player/P = i
if(P.client)
Expand Down
4 changes: 0 additions & 4 deletions sound/ambience/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ ambidet2.ogg is Night on the Docks, Piano by Kevin Macleod. It has been licensed
It has been cropped for use ingame, and also fades in.
aurora_caelus.ogg is Music for Manatees, by Kevin Macleod. It has been licensed under CC-BY 3.0 license.
It has been cropped for use ingame, and also fades out.
title0.ogg is Endless Space by Solus. It has been licensed under CC-BY 3.0 license. Source file downloaded from https://www.newgrounds.com/audio/listen/74946
title1.mod is Flip-Flap created by Jakub "AceMan" Szeląg and taken from http://aminet.net/package/mods/xceed/Flipflap
title2.ogg is Robocop Theme (gameboy) remixed by Eric Schumacker
title3.ogg is Tintin On The Moon remixed by Cuboos https://tgstation13.org/phpBB/viewtopic.php?f=10&t=2157 (assumed CC under allowing it to be submitted to the github, see thread)

VoidsEmbrace.ogg is Chopin - Waltz in C Sharp Minor (Op. 64 No. 2). It is in public domain.

Expand Down
Binary file added sound/music/lobby_music/burning.ogg
Binary file not shown.
File renamed without changes.
Binary file added sound/music/lobby_music/daydream.ogg
Binary file not shown.
23 changes: 23 additions & 0 deletions sound/music/lobby_music/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title0.ogg is Endless Space by Solus. It has been licensed under CC-BY 3.0 license. Source file downloaded from https://www.newgrounds.com/audio/listen/74946

title1.mod is Flip-Flap created by Jakub "AceMan" Szeląg and taken from http://aminet.net/package/mods/xceed/Flipflap

title2.ogg is Robocop Theme (gameboy) remixed by Eric Schumacker

title3.ogg is Tintin On The Moon remixed by Cuboos https://tgstation13.org/phpBB/viewtopic.php?f=10&t=2157 (assumed CC under allowing it to be submitted to the github, see thread)

traitor.ogg is Absconditus by Zhay Tee, licensed by CC-BY NC SA 3.0: https://bandcamp.zhaytee.net/track/absconditus

clown.ogg attribution unknown

monument.ogg is Monument by Six Umbrellas, licensed by CC-BY SA 4.0: https://sixumbrellas.bandcamp.com/album/the-psychedelic-and

rimward_cruise.ogg is Rimward Cruise by Mikazu, licensed by CC-BY SA 3.0: https://soundcloud.com/mikazu-1/baystation-12-rimward-cruise

pwmur.ogg is Phoron Will Make Us Rich by Sunbeamstress, licensed by CC-BY NC SA 3.0: https://soundcloud.com/sunbeamstress/phoron-will-make-us-rich

moonshine.ogg is Moonshine by mcbalaam, licensed licensed by CC-BY: (originally from the /tg/ discord)

daydream.ogg attribution unknown

burning.ogg attribution unknown
Binary file added sound/music/lobby_music/monument.ogg
Binary file not shown.
Binary file added sound/music/lobby_music/moonshine.ogg
Binary file not shown.
Binary file added sound/music/lobby_music/pwmur.ogg
Binary file not shown.
Binary file added sound/music/lobby_music/rimward_cruise.ogg
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added sound/music/lobby_music/traitor.ogg
Binary file not shown.
15 changes: 10 additions & 5 deletions strings/round_start_sounds.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
sound/ambience/title0.ogg
sound/ambience/title1.mod
sound/ambience/title2.ogg
sound/ambience/title3.ogg
sound/ambience/clown.ogg
sound/music/lobby_music/burning.ogg
sound/music/lobby_music/daydream.ogg
sound/music/lobby_music/monument.ogg
sound/music/lobby_music/pwmur.ogg
sound/music/lobby_music/rimward_cruise.ogg
sound/music/lobby_music/title0.ogg
sound/music/lobby_music/title1.mod
sound/music/lobby_music/title2.ogg
sound/music/lobby_music/title3.ogg
sound/music/lobby_music/traitor.ogg
Loading