Moved a lot of preference related toggles to the Preferences verb tab.

You can now modify specialrole candidacy mid-round and it will save changes to your savefile.
Added a BE_NINJA flag. Doesn't do anything yet. If somebody wants to implement it, go for it.
Moved prefrences stuff from new_player to the folder /code/modules/client/
Renamed toggles so they appear in a nice order.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5146 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-11-21 08:06:44 +00:00
parent 28db1ef2f7
commit 1aaf44e076
13 changed files with 158 additions and 137 deletions

View File

@@ -75,17 +75,7 @@
src << S
client/verb/Toggle_Soundscape() //All new 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 category = "Special Verbs"
set name = "Toggle Ambience"
prefs.toggles ^= SOUND_AMBIENCE
prefs.save_preferences()
if(prefs.toggles & SOUND_AMBIENCE)
src << "You will now hear ambient sounds."
else
src << "You will no longer hear ambient sounds."
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
return
/client/proc/playtitlemusic()
if(!ticker || !ticker.login_music) return
if(prefs.toggles & SOUND_LOBBY)
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS

View File

@@ -1,10 +1,3 @@
/client/verb/listen_ooc()
set name = "Un/Mute OOC"
set category = "OOC"
prefs.toggles ^= CHAT_OOC
prefs.save_preferences()
src << "You will [(prefs.toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel."
/client/verb/ooc(msg as text)
set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite
set category = "OOC"

View File

@@ -1,34 +0,0 @@
/client/verb/togglemidis()
set category = "Special Verbs"
set name = "Toggle Midis"
set desc = "This will prevent further admin midis from playing, as well as cut off the current one."
prefs.toggles ^= SOUND_MIDI
prefs.save_preferences()
if(prefs.toggles & SOUND_MIDI)
src << "You will now hear any sounds uploaded by admins."
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
break_sound.priority = 250
src << break_sound //breaks the client's sound output on channel 777
else
src << "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled."
/client/verb/toggletitlemusic()
set category = "Special Verbs"
set name = "Toggle Pregame Music"
set desc = "Stops the pregame lobby music from playing."
prefs.toggles ^= SOUND_LOBBY
prefs.save_preferences()
if(prefs.toggles & SOUND_LOBBY)
src << "You will now hear music in the game lobby."
if(istype(mob, /mob/new_player))
playtitlemusic()
else
src << "You will no longer hear music in the game lobby."
if(istype(mob, /mob/new_player))
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz
/client/proc/playtitlemusic()
if(!ticker || !ticker.login_music) return
if(prefs.toggles & SOUND_LOBBY)
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS

View File

@@ -241,6 +241,32 @@ var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finis
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_PRAYER|CHAT_RADIO)
#define BE_TRAITOR 1
#define BE_OPERATIVE 2
#define BE_CHANGELING 4
#define BE_WIZARD 8
#define BE_MALF 16
#define BE_REV 32
#define BE_ALIEN 64
#define BE_PAI 128
#define BE_CULTIST 256
#define BE_MONKEY 512
#define BE_NINJA 1024
var/list/be_special_flags = list(
"Traitor" = BE_TRAITOR,
"Operative" = BE_OPERATIVE,
"Changeling" = BE_CHANGELING,
"Wizard" = BE_WIZARD,
"Malf AI" = BE_MALF,
"Revolutionary" = BE_REV,
"Xenomorph" = BE_ALIEN,
"pAI" = BE_PAI,
"Cultist" = BE_CULTIST,
"Monkey" = BE_MONKEY,
"Ninja" = BE_NINJA
)
//Database connections
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
var/DBConnection/dbcon = new() //Feedback database (New database)

View File

@@ -681,24 +681,6 @@ var/global/floorIsLava = 0
world.Reboot()
/client/proc/deadchat()
set category = "Admin"
set desc="Toggles Deadchat Visibility"
set name="Deadchat Visibility"
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"
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)
set category = "Admin"
set name = "Unprison"

View File

@@ -530,16 +530,6 @@ var/list/admin_verbs_hideable = list(
togglebuildmode(src.mob)
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggleadminhelpsound()
set name = "Toggle Adminhelp Sound"
set category = "Admin"
if(!holder) return
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
set category = "Special Verbs"
set name = "oSay"
@@ -574,15 +564,6 @@ 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_radio()
set name = "Toggle Hear Radio"
set category = "Admin"
if(!holder) return
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()
set name = "De-admin self"
set category = "Admin"

View File

@@ -20,18 +20,6 @@ var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "M
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Babydoll", "Baby-Blue", "Green", "Pink", "Kinky", "None")
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel")
var/const/BE_TRAITOR =(1<<0)
var/const/BE_OPERATIVE =(1<<1)
var/const/BE_CHANGELING=(1<<2)
var/const/BE_WIZARD =(1<<3)
var/const/BE_MALF =(1<<4)
var/const/BE_REV =(1<<5)
var/const/BE_ALIEN =(1<<6)
var/const/BE_PAI =(1<<7)
var/const/BE_CULTIST =(1<<8)
var/const/BE_MONKEY =(1<<9)
var/const/MAX_SAVE_SLOTS = 3

View File

@@ -0,0 +1,121 @@
//toggles
/client/verb/toggle_ghost_ears()
set name = "Show/Hide GhostEars"
set category = "Preferences"
set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs"
prefs.toggles ^= CHAT_GHOSTEARS
src << "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"]."
prefs.save_preferences()
feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_ghost_sight()
set name = "Show/Hide GhostSight"
set category = "Preferences"
set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
prefs.toggles ^= CHAT_GHOSTSIGHT
src << "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"]."
prefs.save_preferences()
feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_hear_radio()
set name = "Show/Hide RadioChatter"
set category = "Preferences"
set desc = "Toggle seeing radiochatter from nearby radios and speakers"
if(!holder) return
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/toggleadminhelpsound()
set name = "Hear/Silence Adminhelps"
set category = "Preferences"
set desc = "Toggle hearing a notification when admin PMs are recieved"
if(!holder) return
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/deadchat()
set name = "Show/Hide Deadchat"
set category = "Preferences"
set desc ="Toggles seeing deadchat"
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 name = "Show/Hide Prayers"
set category = "Preferences"
set desc = "Toggles seeing prayers"
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!
/client/verb/toggletitlemusic()
set name = "Hear/Silence LobbyMusic"
set category = "Preferences"
set desc = "Toggles hearing the GameLobby music"
prefs.toggles ^= SOUND_LOBBY
prefs.save_preferences()
if(prefs.toggles & SOUND_LOBBY)
src << "You will now hear music in the game lobby."
if(istype(mob, /mob/new_player))
playtitlemusic()
else
src << "You will no longer hear music in the game lobby."
if(istype(mob, /mob/new_player))
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/togglemidis()
set name = "Hear/Silence Midis"
set category = "Preferences"
set desc = "Toggles hearing sounds uploaded by admins"
prefs.toggles ^= SOUND_MIDI
prefs.save_preferences()
if(prefs.toggles & SOUND_MIDI)
src << "You will now hear any sounds uploaded by admins."
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
break_sound.priority = 250
src << break_sound //breaks the client's sound output on channel 777
else
src << "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled."
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/listen_ooc()
set name = "Show/Hide OOC"
set category = "Preferences"
set desc = "Toggles seeing OutOfCharacter chat"
prefs.toggles ^= CHAT_OOC
prefs.save_preferences()
src << "You will [(prefs.toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel."
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/Toggle_Soundscape() //All new 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 = "Preferences"
set desc = "Toggles hearing ambient sound effects"
prefs.toggles ^= SOUND_AMBIENCE
prefs.save_preferences()
if(prefs.toggles & SOUND_AMBIENCE)
src << "You will now hear ambient sounds."
else
src << "You will no longer hear ambient sounds."
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","TAmbi") //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"
set category = "Preferences"
set desc = "Toggles which special roles you would like to be a candidate for, during events."
var/role_flag = be_special_flags[role]
if(!role_flag) return
prefs.be_special ^= role_flag
prefs.save_preferences()
src << "You will [(prefs.be_special & role_flag) ? "now" : "no longer"] be considered for [role] events (where possible)."

View File

@@ -230,21 +230,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//Maybe in the future we can add more <i>spooky</i> code here!
return
*/
/mob/dead/observer/verb/toggle_alien_candidate()
set name = "Toggle Be Alien Candidate"
set category = "Ghost"
set desc = "Determines whether you will or will not be an alien candidate when someone bursts."
if(client)
client.prefs.be_special ^= BE_ALIEN
src << "You are now [(client.prefs.be_special & BE_ALIEN) ? "included in" : "excluded from"] alien candidate lists until end of round."
/mob/dead/observer/verb/toggle_pai_candidate()
set name = "Toggle Be pAI Candidate"
set category = "Ghost"
set desc = "Receive a pop-up request when a pAI device requests a new personality. (toggle)"
if(client)
client.prefs.be_special ^= BE_PAI
src << "You will [(client.prefs.be_special & BE_PAI) ? "now" : "no longer" ] recieve pAI recruitment pop-ups."
/mob/dead/observer/memory()
set hidden = 1

View File

@@ -402,22 +402,6 @@ var/list/slot_equipment_priority = list( \
prefs.save_preferences()
winset(src, "rpane.changelog", "background-color=none;font-style=;")
/client/verb/toggle_ghost_ears()
set name = "Ghost ears"
set category = "OOC"
set desc = "Hear talks from everywhere"
prefs.toggles ^= CHAT_GHOSTEARS
src << "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"]."
prefs.save_preferences()
/client/verb/toggle_ghost_sight()
set name = "Ghost sight"
set category = "OOC"
set desc = "Hear emotes from everywhere"
prefs.toggles ^= CHAT_GHOSTSIGHT
src << "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"]."
prefs.save_preferences()
/mob/verb/observe()
set name = "Observe"
set category = "OOC"