Files
Aurora.3/code/modules/client/preferences_ambience.dm
skull132 7dacaa28dd SQL Saving - Rewrite + Implenetation (#350)
Rewrite's Mahzel's SQL character and preference saving.
Introduces easy config switching between the new and old system, with no troubles at all.

Also introduces better logging for DBQuery/proc/parseArguments(), should something go wrong. And classes SQL query errors as full on error snow, as opposed to debug data.
2016-05-30 23:39:07 +03:00

54 lines
2.1 KiB
Plaintext

/var/global/asfx_togs = list(
// /client/proc/Toggle_asfx,
// /client/proc/Toggle_footsteps,
/client/proc/Toggle_asfx_vote
)
/client/verb/asf_toggle()
set name = "Open ASFX Tab"
set category = "Preferences"
set desc = "Open the ambiance sound effects toggle tab"
verbs ^= asfx_togs
return
/client/verb/Toggle_asfx() //Allgnew ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
set name = "Hear/Silence Ambience"
// set category = "SoundFx Prefs"
set category = "Preferences"
set desc = "Toggles hearing ambient sound effects"
prefs.asfx_togs ^= ASFX_AMBIENCE
prefs.handle_preferences_save(src)
if(prefs.asfx_togs & ASFX_AMBIENCE)
src << "You will now hear ambient sounds."
else
src << "<font color='red'>You will no longer hear ambient sounds.</font>"
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
feedback_add_details("admin_verb","TSFXAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Toggle_footsteps()
set name = "Hear/Silence Footsteps"
set category = "SoundFx Prefs"
set desc = "Toggles hearing footstep sound effects"
prefs.asfx_togs ^= ASFX_FOOTSTEPS
prefs.handle_preferences_save(src)
if(prefs.asfx_togs & ASFX_FOOTSTEPS)
src << "You will now hear footstep sounds."
else
src << "<font color='red'>You will no longer hear footstep sounds.</font>"
feedback_add_details("admin_verb","TSFXFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Toggle_asfx_vote()
set name = "Hear/Silence Vote Alarm"
set category = "SoundFx Prefs"
set desc = "Toggles hearing of the vote alarm"
prefs.asfx_togs ^= ASFX_VOTE
prefs.handle_preferences_save(src)
if(prefs.asfx_togs & ASFX_VOTE)
src << "You will now hear the vote alarm."
else
src << "<font color='red'>You will no longer hear the vote alarm.</font>"
feedback_add_details("admin_verb","TSFXFV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!