-Makes the lobby music a config option, as per Erro's feature request.

Closes Issue 816

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4486 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
sieve32@gmail.com
2012-08-18 02:02:45 +00:00
parent e45aec98e7
commit 03e199e30a
3 changed files with 16 additions and 1 deletions

View File

@@ -11,7 +11,7 @@
mind.active = 1
mind.current = src
spawn() Playmusic() // git some tunes up in heeyaa~
//spawn() Playmusic() // git some tunes up in heeyaa~
var/starting_loc = pick(newplayer_start)
if(!starting_loc) starting_loc = locate(1,1,1)
@@ -48,6 +48,8 @@
preferences.savefile_save(src)
handle_privacy_poll()
new_player_panel()
if(preferences.lobby_music)
Playmusic()
//PDA Resource Initialisation =======================================================>
/*
Quick note: local dream daemon instances don't seem to cache images right. Might be

View File

@@ -106,6 +106,7 @@ datum/preferences
var/metadata = ""
var/sound_adminhelp = 0
var/lobby_music = 1//Whether or not to play the lobby music(Defaults yes)
@@ -168,6 +169,7 @@ datum/preferences
dat += "<br>"
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preference=ui\"><b>[UI_style]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preference=hear_midis\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
dat += "<b>Play lobby music:</b> <a href=\"byond://?src=\ref[user];preference=lobby_music\"><b>[lobby_music == 1 ? "Yes" : "No"]</b></a><br>"
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preference=ghost_ears\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
dat += "<b>Ghost sight:</b> <a href=\"byond://?src=\ref[user];preference=ghost_sight\"><b>[ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
@@ -631,6 +633,13 @@ datum/preferences
if("hear_midis")
midis = !midis
if("lobby_music")
lobby_music = !lobby_music
if(lobby_music)
user << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1)
else
user << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
if("ghost_ears")
ghost_ears = !ghost_ears

View File

@@ -83,6 +83,7 @@ datum/preferences/proc/savefile_save(mob/user)
F["sound_adminhelp"] << src.sound_adminhelp
F["default_slot"] << src.default_slot
F["slotname"] << src.slot_name
F["lobby_music"] << src.lobby_music
return 1
@@ -179,6 +180,9 @@ datum/preferences/proc/savefile_load(mob/user)
if(isnull(default_slot))
default_slot = 1
F["slotname"] >> src.slot_name
F["lobby_music"] >> src.lobby_music
if(isnull(lobby_music))
lobby_music = 1
if(isnull(metadata))
metadata = ""