Merged listen_ooc, seeprayers, STFU_ghosts, STFU_radio, deadchat, sound_adminhelp, ghostears, ghostsight, canplaysound, midis, no_ambi and lobby_music into client.prefs.toggles as bitflags.

Toggling these preferences in-game will update your savefile. Meaning that your preferences will persist between rounds.

Added some savefile_version updating stuff. It's pretty crude. If you're changing any of the savefile stuff just ask and I can change it/help.

Removed some unused client vars

Ghosts no longer hear ambience. Simplified ambience code.

Simplified lobby music code. It will no longer cause a massive queue of events (which would eventually balloon in memory use)

Moved ooccolor and sound_adminhelp back to prefs. It's easier and allowed me to remove the setupclient() stuff completely.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5143 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-11-21 05:58:04 +00:00
parent ba4e25b97d
commit 2e68af07c1
26 changed files with 202 additions and 254 deletions
+6 -12
View File
@@ -685,24 +685,18 @@ var/global/floorIsLava = 0
set category = "Admin"
set desc="Toggles Deadchat Visibility"
set name="Deadchat Visibility"
if(deadchat == 0)
deadchat = 1
usr << "Deadchat turned on"
else
deadchat = 0
usr << "Deadchat turned off"
prefs.toggles ^= CHAT_DEAD
prefs.save_preferences()
src << "You will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat."
feedback_add_details("admin_verb","TDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggleprayers()
set category = "Admin"
set desc="Toggles Prayer Visibility"
set name="Prayer Visibility"
if(seeprayers == 0)
seeprayers = 1
usr << "Prayer visibility turned on"
else
seeprayers = 0
usr << "Prayer visibility turned off"
prefs.toggles ^= CHAT_PRAYER
prefs.save_preferences()
src << "You will [(prefs.toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat."
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/unprison(var/mob/M in mob_list)
+11 -22
View File
@@ -16,7 +16,6 @@ var/list/admin_verbs_default = list(
/client/proc/deadchat, /*toggles deadchat on/off*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
/client/proc/toggleprayers, /*toggles prayers on/off*/
/client/proc/toggle_hear_deadcast, /*toggles whether we hear deadchat*/
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
/client/proc/secrets
@@ -140,7 +139,6 @@ var/list/admin_verbs_hideable = list(
/client/proc/deadmin_self,
/client/proc/deadchat,
/client/proc/toggleprayers,
/client/proc/toggle_hear_deadcast,
/client/proc/toggle_hear_radio,
/datum/admins/proc/show_traitor_panel,
/datum/admins/proc/toggleenter,
@@ -396,9 +394,11 @@ var/list/admin_verbs_hideable = list(
/client/proc/colorooc()
set category = "Fun"
set name = "OOC Text Color"
if(holder)
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
if(new_ooccolor) holder.ooccolor = new_ooccolor
if(!holder) return
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
if(new_ooccolor)
prefs.ooccolor = new_ooccolor
prefs.save_preferences()
feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -535,11 +535,9 @@ var/list/admin_verbs_hideable = list(
set name = "Toggle Adminhelp Sound"
set category = "Admin"
if(!holder) return
holder.sound_adminhelp = !holder.sound_adminhelp
if(holder.sound_adminhelp)
usr << "You will now hear a sound when adminhelps arrive"
else
usr << "You will no longer hear a sound when adminhelps arrive"
prefs.toggles ^= SOUND_ADMINHELP
prefs.save_preferences()
usr << "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive"
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/object_talk(var/msg as text) // -- TLE
@@ -576,22 +574,13 @@ var/list/admin_verbs_hideable = list(
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
feedback_add_details("admin_verb","TNCP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_hear_deadcast()
set name = "Toggle Hear Deadcast"
set category = "Admin"
if(!holder) return
STFU_ghosts = !STFU_ghosts
usr << "You will now [STFU_ghosts ? "not hear" : "hear"] ghosts"
feedback_add_details("admin_verb","THDC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_hear_radio()
set name = "Toggle Hear Radio"
set category = "Admin"
if(!holder) return
STFU_radio = !STFU_radio
usr << "You will now [STFU_radio ? "not hear" : "hear"] radio chatter from nearby radios or speakers"
prefs.toggles ^= CHAT_RADIO
prefs.save_preferences()
usr << "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers"
feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/deadmin_self()
-4
View File
@@ -3,12 +3,8 @@ var/list/admin_datums = list()
/datum/admins
var/rank = "Temporary Admin"
var/client/owner = null
var/rights = 0
var/fakekey = null
var/ooccolor = "#b82e00"
var/sound_adminhelp = 0 //If set to 1 this will play a sound when adminhelps are received.
var/datum/marked_datum
+1 -1
View File
@@ -88,7 +88,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
for(var/client/X in admins)
if(X.is_afk())
admin_number_afk++
if(X.holder.sound_adminhelp)
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
X << msg
+1 -1
View File
@@ -73,7 +73,7 @@
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
//play the recieving admin the adminhelp sound (if they have them enabled)
if(C.holder.sound_adminhelp)
if(C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
else
+1 -1
View File
@@ -25,7 +25,7 @@
for (var/mob/M in player_list)
if (istype(M, /mob/new_player))
continue
if (M.stat == 2 || (M.client && M.client.holder && M.client.deadchat)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
M.show_message(rendered, 2)
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -9,7 +9,7 @@
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in player_list)
if(M.client.midis)
if(M.client.prefs.toggles & SOUND_MIDI)
M << uploaded_sound
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -16,7 +16,7 @@
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
for(var/client/C in admins)
if(C.seeprayers)
if(C.prefs.toggles & CHAT_PRAYER)
C << msg
usr << "Your prayers have been received by the gods."