Added a preference toggle for hearing musical instruments

This commit is contained in:
MrPerson
2015-03-22 01:54:30 -07:00
parent fa7a89b25b
commit 2fa6457130
4 changed files with 19 additions and 2 deletions
+2 -1
View File
@@ -7,8 +7,9 @@
#define MEMBER_PUBLIC 16
#define INTENT_STYLE 32
#define MIDROUND_ANTAG 64
#define SOUND_INSTRUMENTS 128
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG)
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS)
//Chat toggles
#define CHAT_OOC 1
+2
View File
@@ -59,6 +59,8 @@
// and play
var/turf/source = get_turf(instrumentObj)
for(var/mob/M in get_hearers_in_view(15, source))
if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
continue
M.playsound_local(source, soundfile, 100, falloff = 5)
/datum/song/proc/updateDialog(mob/user as mob)
@@ -157,6 +157,19 @@
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
// This needs a toggle because you people are awful and spammed terrible music
/client/verb/toggle_instruments()
set name = "Hear/Silence Instruments"
set category = "Preferences"
set desc = "Toggles hearing musical instruments like the violin and piano"
prefs.toggles ^= SOUND_INSTRUMENTS
prefs.save_preferences()
if(prefs.toggles & SOUND_INSTRUMENTS)
src << "You will now hear people playing musical instruments."
else
src << "You will no longer hear musical instruments."
feedback_add_details("admin_verb","TInstru") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//be special
/client/verb/toggle_be_special(role in be_special_flags)
set name = "Toggle SpecialRole Candidacy"
+2 -1
View File
@@ -1,2 +1,3 @@
author: MrPerson
changes: []
changes:
- rscadd: "Added a preference toggle for hearing instruments play as suggested by PKPenguin321."