From 69d6a8df2110f1b7d7fdec9306f3e84ed8c36aa8 Mon Sep 17 00:00:00 2001
From: GDN <96800819+GDNgit@users.noreply.github.com>
Date: Wed, 24 Apr 2024 16:21:11 -0500
Subject: [PATCH] Overhauls player facing verb UI (#24060)
* Preference verb overhaul
* this too
* Update code/__DEFINES/preferences_defines.dm
* Update code/modules/client/preference/preferences.dm
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
* fixes + better html
* removes unused define
---------
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
---
code/__DEFINES/preferences_defines.dm | 18 +-
code/__HELPERS/global_lists.dm | 5 +
.../lists/preference_toggle_lists.dm | 8 +
code/_onclick/hud/human_hud.dm | 13 -
.../sections/general_configuration.dm | 1 -
.../subsystem/non_firing/SSchangelog.dm | 2 +-
code/datums/action.dm | 2 +-
code/datums/spell.dm | 2 -
code/datums/spell_cooldown/spell_charges.dm | 2 +-
code/datums/spell_cooldown/spell_cooldown.dm | 2 +-
code/datums/spells/bloodcrawl.dm | 1 -
code/datums/spells/mime.dm | 4 -
code/game/dna/mutations/disabilities.dm | 1 -
code/game/dna/mutations/mutation_powers.dm | 6 -
.../demons/shadow_demon/shadow_demon.dm | 2 -
.../demons/slaughter_demon/slaughter.dm | 1 -
.../pulsedemon/pulsedemon_abilities.dm | 1 -
.../miniantags/revenant/revenant_abilities.dm | 4 -
code/game/jobs/job_exp.dm | 12 -
code/game/verbs/ooc.dm | 55 --
code/modules/admin/admin_verbs.dm | 107 +--
code/modules/admin/verbs/custom_event.dm | 14 +-
.../vampire_powers/gargantua_powers.dm | 1 -
.../vampire_powers/hemomancer_powers.dm | 1 -
.../vampire/vampire_powers/vampire_powers.dm | 1 -
.../client/preference/link_processing.dm | 6 +-
code/modules/client/preference/preferences.dm | 43 +
.../client/preference/preferences_toggles.dm | 829 +++++++++++-------
.../preference/preferences_volume_mixer.dm | 2 +-
code/modules/client/view.dm | 22 -
.../mob/living/simple_animal/simple_animal.dm | 1 -
code/modules/mob/mob.dm | 108 +--
code/modules/mob/typing_indicator.dm | 16 -
config/example/config.toml | 2 -
paradise.dme | 1 +
35 files changed, 594 insertions(+), 702 deletions(-)
create mode 100644 code/_globalvars/lists/preference_toggle_lists.dm
diff --git a/code/__DEFINES/preferences_defines.dm b/code/__DEFINES/preferences_defines.dm
index 61d0ef1652d..162df1bb973 100644
--- a/code/__DEFINES/preferences_defines.dm
+++ b/code/__DEFINES/preferences_defines.dm
@@ -17,7 +17,7 @@
#define PREFTOGGLE_CHAT_DEAD (1<<1)
#define PREFTOGGLE_CHAT_GHOSTEARS (1<<2)
#define PREFTOGGLE_CHAT_GHOSTSIGHT (1<<3)
-#define PREFTOGGLE_CHAT_PRAYER (1<<4)
+#define PREFTOGGLE_CHAT_PRAYER (1<<4) // Defunct
#define PREFTOGGLE_CHAT_RADIO (1<<5)
// #define PREFTOGGLE_AZERTY (1<<6) // obsolete
#define PREFTOGGLE_CHAT_DEBUGLOGS (1<<7)
@@ -81,6 +81,21 @@
#error toggles_2 bitflag over 16777215. Please make an issue report and postpone the feature you are working on.
#endif
+// This is a list index. Required to start at 1 instead of 0 so it's properly placed in the list
+#define PREFTOGGLE_CATEGORY_GENERAL 1
+#define PREFTOGGLE_CATEGORY_LIVING 2
+#define PREFTOGGLE_CATEGORY_GHOST 3
+#define PREFTOGGLE_CATEGORY_ADMIN 4
+
+// Preftoggle type defines
+/// Special toggles, stuff that just overrides set_toggles entirely
+#define PREFTOGGLE_SPECIAL 0
+/// Interacts with the sound bitflag
+#define PREFTOGGLE_SOUND 1
+/// Interacts with the toggles bitflag
+#define PREFTOGGLE_TOGGLE1 2
+/// Interacts with the toggles2 bitflag
+#define PREFTOGGLE_TOGGLE2 3
// Admin attack logs filter system, see /proc/add_attack_logs and /proc/msg_admin_attack
@@ -133,6 +148,7 @@
#define TAB_ANTAG 2
#define TAB_GEAR 3
#define TAB_KEYS 4
+#define TAB_TOGGLES 5
// Colourblind modes
#define COLOURBLIND_MODE_NONE "None"
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 97c9fe44971..174ecddda53 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -139,6 +139,11 @@
if(initial(D.name))
GLOB.keybindings += new path()
+ for(var/path in subtypesof(/datum/preference_toggle))
+ var/datum/preference_toggle/pref_toggle = path
+ if(initial(pref_toggle.name))
+ GLOB.preference_toggles += new path()
+
for(var/path in subtypesof(/datum/objective))
var/datum/objective/O = path
if(isnull(initial(O.name)))
diff --git a/code/_globalvars/lists/preference_toggle_lists.dm b/code/_globalvars/lists/preference_toggle_lists.dm
new file mode 100644
index 00000000000..bc708159501
--- /dev/null
+++ b/code/_globalvars/lists/preference_toggle_lists.dm
@@ -0,0 +1,8 @@
+GLOBAL_LIST_EMPTY(preference_toggles)
+
+GLOBAL_LIST_INIT(preference_toggle_groups, list(
+ "General Preferences" = PREFTOGGLE_CATEGORY_GENERAL,
+ "In-Round Preferences" = PREFTOGGLE_CATEGORY_LIVING,
+ "Ghost Preferences" = PREFTOGGLE_CATEGORY_GHOST,
+ "Admin Preferences" = PREFTOGGLE_CATEGORY_ADMIN,
+))
diff --git a/code/_onclick/hud/human_hud.dm b/code/_onclick/hud/human_hud.dm
index 4a036cf6e85..43ab2c14b69 100644
--- a/code/_onclick/hud/human_hud.dm
+++ b/code/_onclick/hud/human_hud.dm
@@ -483,16 +483,3 @@
H.r_hand.screen_loc = null
if(H.l_hand)
H.l_hand.screen_loc = null
-
-
-/mob/living/carbon/human/verb/toggle_hotkey_verbs()
- set category = "OOC"
- set name = "Toggle Hotkey Buttons"
- set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
-
- if(hud_used.hotkey_ui_hidden)
- client.screen += hud_used.hotkeybuttons
- hud_used.hotkey_ui_hidden = FALSE
- else
- client.screen -= hud_used.hotkeybuttons
- hud_used.hotkey_ui_hidden = TRUE
diff --git a/code/controllers/configuration/sections/general_configuration.dm b/code/controllers/configuration/sections/general_configuration.dm
index 35477712f33..923bc2f4e61 100644
--- a/code/controllers/configuration/sections/general_configuration.dm
+++ b/code/controllers/configuration/sections/general_configuration.dm
@@ -93,7 +93,6 @@
CONFIG_LOAD_BOOL(guest_ban, data["guest_ban"])
CONFIG_LOAD_BOOL(allow_antag_hud, data["allow_antag_hud"])
CONFIG_LOAD_BOOL(restrict_antag_hud_rejoin, data["restrict_antag_hud_rejoin"])
- CONFIG_LOAD_BOOL(respawn_enabled, data["respawn_enabled"])
CONFIG_LOAD_BOOL(enabled_cid_randomiser_buster, data["enable_cid_randomiser_buster"])
CONFIG_LOAD_BOOL(forbid_singulo_possession, data["prevent_admin_singlo_possession"])
CONFIG_LOAD_BOOL(popup_admin_pm, data["popup_admin_pm"])
diff --git a/code/controllers/subsystem/non_firing/SSchangelog.dm b/code/controllers/subsystem/non_firing/SSchangelog.dm
index acfe7484f9d..53830ebce02 100644
--- a/code/controllers/subsystem/non_firing/SSchangelog.dm
+++ b/code/controllers/subsystem/non_firing/SSchangelog.dm
@@ -97,7 +97,7 @@ SUBSYSTEM_DEF(changelog)
/client/verb/changes()
set name = "Changelog"
set desc = "View the changelog."
- set category = "OOC"
+ set category = null
// Just invoke the actual CL thing
SSchangelog.OpenChangelog(src)
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 511865a1c61..eb6a1a19005 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -699,7 +699,7 @@
// Make a holder for the charge text
var/image/count_down_holder = image('icons/effects/effects.dmi', icon_state = "nothing")
count_down_holder.plane = FLOAT_PLANE + 1.1
- var/text = S.cooldown_handler.statpanel_info()
+ var/text = S.cooldown_handler.cooldown_info()
count_down_holder.maptext = "
[text]
"
button.add_overlay(count_down_holder)
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index cc6a40a91ad..5d5aaba3c1a 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -65,8 +65,6 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
/datum/spell
var/name = "Spell" // Only rename this if the spell you're making is not abstract
var/desc = "A wizard spell"
- var/panel = "Spells"//What panel the proc holder needs to go on.
-
var/school = "evocation" //not relevant at now, but may be important later if there are changes to how spells work. the ones I used for now will probably be changed... maybe spell presets? lacking flexibility but with some other benefit?
///recharge time in deciseconds
var/base_cooldown = 10 SECONDS
diff --git a/code/datums/spell_cooldown/spell_charges.dm b/code/datums/spell_cooldown/spell_charges.dm
index 577da557060..47803609ab2 100644
--- a/code/datums/spell_cooldown/spell_charges.dm
+++ b/code/datums/spell_cooldown/spell_charges.dm
@@ -49,7 +49,7 @@
..()
charge_time = world.time
-/datum/spell_cooldown/charges/statpanel_info()
+/datum/spell_cooldown/charges/cooldown_info()
var/charge_string = charge_duration != 0 ? round(min(1, (charge_duration - (charge_time - world.time)) / charge_duration), 0.01) * 100 : 100 // need this for possible 0 charge duration
var/recharge_string = recharge_duration != 0 ? round(min(1, (recharge_duration - (recharge_time - world.time)) / recharge_duration), 0.01) * 100 : 100
return "[charge_string != 100 ? "[charge_string]%\n" : ""][recharge_string != 100 ? "[recharge_string]%\n" : ""][current_charges]/[max_charges]"
diff --git a/code/datums/spell_cooldown/spell_cooldown.dm b/code/datums/spell_cooldown/spell_cooldown.dm
index 14936e893ac..9ac6dbf4520 100644
--- a/code/datums/spell_cooldown/spell_cooldown.dm
+++ b/code/datums/spell_cooldown/spell_cooldown.dm
@@ -64,5 +64,5 @@
/datum/spell_cooldown/proc/revert_cast()
recharge_time = world.time
-/datum/spell_cooldown/proc/statpanel_info()
+/datum/spell_cooldown/proc/cooldown_info()
return "[round(get_availability_percentage(), 0.01) * 100]%"
diff --git a/code/datums/spells/bloodcrawl.dm b/code/datums/spells/bloodcrawl.dm
index b54ca987de3..e5c99fac868 100644
--- a/code/datums/spells/bloodcrawl.dm
+++ b/code/datums/spells/bloodcrawl.dm
@@ -8,7 +8,6 @@
overlay = null
action_icon_state = "bloodcrawl"
action_background_icon_state = "bg_demon"
- panel = "Demon"
var/allowed_type = /obj/effect/decal/cleanable
var/phased = FALSE
diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm
index 9fe9431dc8d..5f483b4edf8 100644
--- a/code/datums/spells/mime.dm
+++ b/code/datums/spells/mime.dm
@@ -2,7 +2,6 @@
name = "Invisible Wall"
desc = "The mime's performance transmutates into physical reality."
school = "mime"
- panel = "Mime"
summon_type = list(/obj/structure/forcefield/mime)
invocation_type = "emote"
invocation_emote_self = "You form a wall in front of yourself."
@@ -32,7 +31,6 @@
name = "Speech"
desc = "Make or break a vow of silence."
school = "mime"
- panel = "Mime"
clothes_req = FALSE
base_cooldown = 5 MINUTES
human_req = TRUE
@@ -66,7 +64,6 @@
name = "Invisible Greater Wall"
desc = "Form an invisible three tile wide blockade."
school = "mime"
- panel = "Mime"
wall_type = /obj/effect/forcefield/mime/advanced
invocation_type = "emote"
invocation_emote_self = "You form a blockade in front of yourself."
@@ -91,7 +88,6 @@
name = "Finger Gun"
desc = "Shoot lethal, silencing bullets out of your fingers! 3 bullets available per cast. Use your fingers to holster them manually."
school = "mime"
- panel = "Mime"
clothes_req = FALSE
base_cooldown = 30 SECONDS
human_req = TRUE
diff --git a/code/game/dna/mutations/disabilities.dm b/code/game/dna/mutations/disabilities.dm
index c0140fcb7ca..610a513ab93 100644
--- a/code/game/dna/mutations/disabilities.dm
+++ b/code/game/dna/mutations/disabilities.dm
@@ -490,7 +490,6 @@
/datum/spell/immolate
name = "Incendiary Mitochondria"
desc = "The subject becomes able to convert excess cellular energy into thermal energy."
- panel = "Abilities"
base_cooldown = 600
diff --git a/code/game/dna/mutations/mutation_powers.dm b/code/game/dna/mutations/mutation_powers.dm
index 463b3275786..0c974c59d64 100644
--- a/code/game/dna/mutations/mutation_powers.dm
+++ b/code/game/dna/mutations/mutation_powers.dm
@@ -277,7 +277,6 @@
/datum/spell/cryokinesis
name = "Cryokinesis"
desc = "Drops the bodytemperature of another person."
- panel = "Abilities"
base_cooldown = 1200
@@ -348,7 +347,6 @@
/datum/spell/eat
name = "Eat"
desc = "Eat just about anything!"
- panel = "Abilities"
base_cooldown = 300
@@ -471,8 +469,6 @@
/datum/spell/leap
name = "Jump"
desc = "Leap great distances!"
- panel = "Abilities"
-
base_cooldown = 60
clothes_req = FALSE
@@ -564,7 +560,6 @@
/datum/spell/polymorph
name = "Polymorph"
desc = "Mimic the appearance of others!"
- panel = "Abilities"
base_cooldown = 1800
clothes_req = FALSE
@@ -726,7 +721,6 @@
/datum/spell/morph
name = "Morph"
desc = "Mimic the appearance of your choice!"
- panel = "Abilities"
base_cooldown = 1800
clothes_req = FALSE
diff --git a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm
index 5dc9a30ce30..7edd0bf893e 100644
--- a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm
+++ b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm
@@ -187,8 +187,6 @@
action_background_icon_state = "shadow_demon_bg"
action_icon_state = "shadow_grapple"
- panel = "Demon"
-
sound = null
invocation_type = "none"
invocation = null
diff --git a/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm b/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm
index 3812df84a3a..d2595c8634f 100644
--- a/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm
+++ b/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter.dm
@@ -111,7 +111,6 @@
overlay = null
action_icon_state = "bloodcrawl"
action_background_icon_state = "bg_cult"
- panel = "Demon"
/datum/spell/sense_victims/create_new_targeting()
return new /datum/spell_targeting/alive_mob_list
diff --git a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm
index 8bb7f2a626c..b7df938982a 100644
--- a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm
+++ b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm
@@ -9,7 +9,6 @@
#define PD_UPGRADE_MAX_CHARGE "Capacity"
/datum/spell/pulse_demon
- panel = "Pulse Demon"
school = "pulse demon"
clothes_req = FALSE
action_background_icon_state = "bg_pulsedemon"
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
index 0913180f2ef..d1962001d88 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
@@ -110,7 +110,6 @@
//Toggle night vision: lets the revenant toggle its night vision
/datum/spell/night_vision/revenant
base_cooldown = 0
- panel = "Revenant Abilities"
message = "You toggle your night vision."
action_icon_state = "r_nightvision"
action_background_icon_state = "bg_revenant"
@@ -119,7 +118,6 @@
/datum/spell/revenant_transmit
name = "Transmit"
desc = "Telepathically transmits a message to the target."
- panel = "Revenant Abilities"
base_cooldown = 0
clothes_req = FALSE
action_icon_state = "r_transmit"
@@ -145,7 +143,6 @@
name = "Spell"
clothes_req = FALSE
action_background_icon_state = "bg_revenant"
- panel = "Revenant Abilities (Locked)"
/// How long it reveals the revenant in deciseconds
var/reveal = 8 SECONDS
/// How long it stuns the revenant in deciseconds
@@ -192,7 +189,6 @@
return FALSE
name = "[initial(name)] ([cast_amount]E)"
to_chat(user, "You have unlocked [initial(name)]!")
- panel = "Revenant Abilities"
locked = FALSE
cooldown_handler.revert_cast()
return FALSE
diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm
index d60339f08e6..79a7af64eac 100644
--- a/code/game/jobs/job_exp.dm
+++ b/code/game/jobs/job_exp.dm
@@ -32,18 +32,6 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
ROLE_ABDUCTOR = 20,
))
-// Client Verbs
-
-/client/verb/cmd_check_own_playtime()
- set category = "Special Verbs"
- set name = "Check my playtime"
-
- if(!GLOB.configuration.jobs.enable_exp_tracking)
- to_chat(src, "Playtime tracking is not enabled.")
- return
-
- to_chat(src, "Your [EXP_TYPE_CREW] playtime is [get_exp_type(EXP_TYPE_CREW)].")
-
// Admin Verbs
/client/proc/cmd_mentor_check_player_exp() //Allows admins to determine who the newer players are.
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index 043e2d7b690..fe2374e5940 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -106,61 +106,6 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
if(GLOB.configuration.general.auto_disable_ooc && GLOB.ooc_enabled != on)
toggle_ooc()
-/client/proc/set_ooc(newColor as color)
- set name = "Set Player OOC Colour"
- set desc = "Modifies the default player OOC color."
- set category = "Server"
-
- if(!check_rights(R_SERVER)) return
-
- GLOB.normal_ooc_colour = newColor
- message_admins("[key_name_admin(usr)] has set the default player OOC color to [newColor]")
- log_admin("[key_name(usr)] has set the default player OOC color to [newColor]")
-
-
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Player OOC")
-
-/client/proc/reset_ooc()
- set name = "Reset Player OOC Color"
- set desc = "Returns the default player OOC color to default."
- set category = "Server"
-
- if(!check_rights(R_SERVER)) return
-
- GLOB.normal_ooc_colour = DEFAULT_PLAYER_OOC_COLOUR
- message_admins("[key_name_admin(usr)] has reset the default player OOC color")
- log_admin("[key_name(usr)] has reset the default player OOC color")
-
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Reset Player OOC")
-
-/client/proc/colorooc()
- set name = "Set Your OOC Color"
- set desc = "Allows you to pick a custom OOC color."
- set category = "Preferences"
-
- if(!check_rights(R_ADMIN)) return
-
- var/new_ooccolor = input(src, "Please select your OOC color.", "OOC color", prefs.ooccolor) as color|null
- if(new_ooccolor)
- prefs.ooccolor = new_ooccolor
- prefs.save_preferences(src)
- to_chat(usr, "Your OOC color has been set to [new_ooccolor].")
-
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Own OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/proc/resetcolorooc()
- set name = "Reset Your OOC Color"
- set desc = "Returns your OOC color to default."
- set category = "Preferences"
-
- if(!check_rights(R_ADMIN)) return
-
- prefs.ooccolor = initial(prefs.ooccolor)
- prefs.save_preferences(src)
- to_chat(usr, "Your OOC color has been reset.")
-
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Reset Own OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/client/verb/looc(msg = "" as text)
set name = "LOOC"
set desc = "Local OOC, seen only by those in view."
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 49d8b4f0817..0b9abc3abf3 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -2,8 +2,6 @@
GLOBAL_LIST_INIT(admin_verbs_default, list(
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
/client/proc/hide_verbs, /*hides all our adminverbs*/
- /client/proc/toggleadminhelpsound,
- /client/proc/togglementorhelpsound,
/client/proc/cmd_mentor_check_new_players,
/client/proc/cmd_mentor_check_player_exp /* shows players by playtime */
))
@@ -13,8 +11,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
/datum/admins/proc/announce, /*priority announce something to all clients.*/
- /client/proc/colorooc, /*allows us to set a custom colour for everything we say in ooc*/
- /client/proc/resetcolorooc, /*allows us to set a reset our ooc color*/
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
/client/proc/toggle_view_range, /*changes how far we can see*/
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
@@ -35,8 +31,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
- /client/proc/toggleprayers, /*toggles prayers on/off*/
- /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*/
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
@@ -49,9 +43,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/cmd_mentor_say,
/datum/admins/proc/show_player_notes,
/client/proc/free_slot, /*frees slot for chosen job*/
- /client/proc/toggleattacklogs,
- /client/proc/toggleadminlogs,
- /client/proc/toggledebuglogs,
/client/proc/update_mob_sprite,
/client/proc/man_up,
/client/proc/global_man_up,
@@ -140,8 +131,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
/client/proc/view_asays,
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
- /client/proc/set_ooc,
- /client/proc/reset_ooc,
/client/proc/set_next_map,
/client/proc/manage_queue,
/client/proc/add_queue_server_bypass
@@ -155,7 +144,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/cmd_debug_del_sing,
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
- /client/proc/toggledebuglogs,
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_del_log_simple,
/client/proc/check_bomb_impacts,
@@ -181,8 +169,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/debug_timers,
/client/proc/force_verb_bypass,
/client/proc/show_gc_queues,
- /client/proc/debug_global_variables,
- /client/proc/toggle_mctabs
+ /client/proc/debug_global_variables
))
GLOBAL_LIST_INIT(admin_verbs_possess, list(
/proc/possess,
@@ -215,7 +202,6 @@ GLOBAL_LIST_INIT(admin_verbs_mentor, list(
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/
/client/proc/openMentorTicketUI,
- /client/proc/toggleMentorTicketLogs,
/client/proc/cmd_mentor_say /* mentor say*/
// cmd_mentor_say is added/removed by the toggle_mentor_chat verb
))
@@ -226,9 +212,7 @@ GLOBAL_LIST_INIT(admin_verbs_proccall, list(
))
GLOBAL_LIST_INIT(admin_verbs_ticket, list(
/client/proc/openAdminTicketUI,
- /client/proc/toggleticketlogs,
/client/proc/openMentorTicketUI,
- /client/proc/toggleMentorTicketLogs,
/client/proc/resolveAllAdminTickets,
/client/proc/resolveAllMentorTickets
))
@@ -246,15 +230,13 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list(
/client/proc/view_runtimes,
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_del_log_simple,
- /client/proc/toggledebuglogs,
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
/client/proc/ss_breakdown,
/client/proc/show_gc_queues,
/client/proc/debug_global_variables,
/client/proc/visualise_active_turfs,
/client/proc/debug_timers,
- /client/proc/timer_log,
- /client/proc/toggle_mctabs
+ /client/proc/timer_log
))
/client/proc/add_admin_verbs()
@@ -880,91 +862,6 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list(
log_admin("[key_name(usr)] has freed a job slot for [job].")
message_admins("[key_name_admin(usr)] has freed a job slot for [job].")
-/client/proc/toggleattacklogs()
- set name = "Attack Log Messages"
- set category = "Preferences.Toggle"
-
- if(!check_rights(R_ADMIN))
- return
-
- if(prefs.atklog == ATKLOG_ALL)
- prefs.atklog = ATKLOG_ALMOSTALL
- to_chat(usr, "Your attack logs preference is now: show ALMOST ALL attack logs (notable exceptions: NPCs attacking other NPCs, vampire bites, equipping/stripping, people pushing each other over)")
- else if(prefs.atklog == ATKLOG_ALMOSTALL)
- prefs.atklog = ATKLOG_MOST
- to_chat(usr, "Your attack logs preference is now: show MOST attack logs (like ALMOST ALL, except that it also hides player v. NPC combat, and certain areas like lavaland syndie base and thunderdome)")
- else if(prefs.atklog == ATKLOG_MOST)
- prefs.atklog = ATKLOG_FEW
- to_chat(usr, "Your attack logs preference is now: show FEW attack logs (only the most important stuff: attacks on SSDs, use of explosives, messing with the engine, gibbing, AI wiping, forcefeeding, acid sprays, and organ extraction)")
- else if(prefs.atklog == ATKLOG_FEW)
- prefs.atklog = ATKLOG_NONE
- to_chat(usr, "Your attack logs preference is now: show NO attack logs")
- else if(prefs.atklog == ATKLOG_NONE)
- prefs.atklog = ATKLOG_ALL
- to_chat(usr, "Your attack logs preference is now: show ALL attack logs")
- else
- prefs.atklog = ATKLOG_ALL
- to_chat(usr, "Your attack logs preference is now: show ALL attack logs (your preference was set to an invalid value, it has been reset)")
-
- prefs.save_preferences(src)
-
-
-/client/proc/toggleadminlogs()
- set name = "Admin Log Messages"
- set category = "Preferences.Toggle"
-
- if(!check_rights(R_ADMIN))
- return
-
- prefs.toggles ^= PREFTOGGLE_CHAT_NO_ADMINLOGS
- prefs.save_preferences(src)
- if(prefs.toggles & PREFTOGGLE_CHAT_NO_ADMINLOGS)
- to_chat(usr, "You now won't get admin log messages.")
- else
- to_chat(usr, "You now will get admin log messages.")
-
-/client/proc/toggleMentorTicketLogs()
- set name = "Mentor Ticket Messages"
- set category = "Preferences.Toggle"
-
- if(!check_rights(R_MENTOR|R_ADMIN))
- return
-
- prefs.toggles ^= PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS
- prefs.save_preferences(src)
- if(prefs.toggles & PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS)
- to_chat(usr, "You now won't get mentor ticket messages.")
- else
- to_chat(usr, "You now will get mentor ticket messages.")
-
-/client/proc/toggleticketlogs()
- set name = "Admin Ticket Messgaes"
- set category = "Preferences.Toggle"
-
- if(!check_rights(R_ADMIN))
- return
-
- prefs.toggles ^= PREFTOGGLE_CHAT_NO_TICKETLOGS
- prefs.save_preferences(src)
- if(prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS)
- to_chat(usr, "You now won't get admin ticket messages.")
- else
- to_chat(usr, "You now will get admin ticket messages.")
-
-/client/proc/toggledebuglogs()
- set name = "Debug Log Messages"
- set category = "Preferences.Toggle"
-
- if(!check_rights(R_VIEWRUNTIMES | R_DEBUG))
- return
-
- prefs.toggles ^= PREFTOGGLE_CHAT_DEBUGLOGS
- prefs.save_preferences(src)
- if(prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS)
- to_chat(usr, "You now will get debug log messages")
- else
- to_chat(usr, "You now won't get debug log messages")
-
/client/proc/man_up(mob/T as mob in GLOB.player_list)
set name = "\[Admin\] Man Up"
set desc = "Tells mob to man up and deal with it."
diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm
index 1284f9e0faf..e68cb983273 100644
--- a/code/modules/admin/verbs/custom_event.dm
+++ b/code/modules/admin/verbs/custom_event.dm
@@ -28,12 +28,14 @@
set category = "OOC"
set name = "Custom Event Info"
+ var/list/custom_event_information = list()
if(!GLOB.custom_event_msg || GLOB.custom_event_msg == "")
- to_chat(src, "There currently is no known custom event taking place.")
- to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.")
+ custom_event_information += "There currently is no known custom event taking place."
+ custom_event_information += "Keep in mind: it is possible that an admin has not properly set this."
+ to_chat(src, chat_box_regular(custom_event_information.Join("
")))
return
- to_chat(src, "Custom Event
")
- to_chat(src, "A custom event is taking place. OOC Info:
")
- to_chat(src, "[html_encode(GLOB.custom_event_msg)]")
- to_chat(src, "
")
+ custom_event_information += "Custom Event
"
+ custom_event_information += "A custom event is taking place. OOC Info:
"
+ custom_event_information += "[html_encode(GLOB.custom_event_msg)]"
+ to_chat(src, chat_box_regular(custom_event_information.Join("
")))
diff --git a/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm b/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm
index d69d28fe36a..641894c0eab 100644
--- a/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm
@@ -117,7 +117,6 @@
action_icon_state = "demonic_grasp"
- panel = "Vampire"
school = "vampire"
action_background_icon_state = "bg_vampire"
sound = null
diff --git a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm
index f086ac67f57..220ba634df7 100644
--- a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm
@@ -250,7 +250,6 @@
gain_desc = "You have gained the ability to shift into a pool of blood, allowing you to evade pursuers with great mobility."
jaunt_duration = 3 SECONDS
clothes_req = FALSE
- panel = "Vampire"
school = "vampire"
action_background_icon_state = "bg_vampire"
action_icon_state = "blood_pool"
diff --git a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
index ecf21d68ed4..f2b54d4c856 100644
--- a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
@@ -13,7 +13,6 @@
return TRUE
/datum/spell/vampire
- panel = "Vampire"
school = "vampire"
action_background_icon_state = "bg_vampire"
human_req = TRUE
diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm
index 76c8ac966f1..7ed56e99759 100644
--- a/code/modules/client/preference/link_processing.dm
+++ b/code/modules/client/preference/link_processing.dm
@@ -1265,6 +1265,10 @@
init_keybindings(keybindings_overrides)
save_preferences(user) //Ideally we want to save people's keybinds when they enter them
+ if("preference_toggles")
+ if(href_list["toggle"])
+ var/datum/preference_toggle/toggle = locateUID(href_list["toggle"])
+ toggle.set_toggles(user.client)
ShowChoices(user)
- return 1
+ return TRUE
diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm
index ad75383205c..bb2816be556 100644
--- a/code/modules/client/preference/preferences.dm
+++ b/code/modules/client/preference/preferences.dm
@@ -167,6 +167,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "Antagonists"
dat += "Loadout"
dat += "Key Bindings"
+ dat += "General Preferences"
dat += ""
dat += "
"
@@ -476,6 +477,12 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
else
var/is_special = (i in src.be_special)
dat += "Be [capitalize(i)]:[(is_special) ? "Yes" : "No"]
"
+
+ dat += "Total Playtime:
"
+ if(!GLOB.configuration.jobs.enable_exp_tracking)
+ dat += "Playtime tracking is not enabled."
+ else
+ dat += "Your [EXP_TYPE_CREW] playtime is [user.client.get_exp_type(EXP_TYPE_CREW)]
"
dat += ""
if(TAB_GEAR)
@@ -587,6 +594,42 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += ""
+ if(TAB_TOGGLES)
+ dat += "Preference Toggles: "
+
+ dat += "
"
+
+ // Lookup lists to make our life easier
+ var/static/list/pref_toggles_by_category
+ if(!pref_toggles_by_category)
+ pref_toggles_by_category = list()
+ for(var/datum/preference_toggle/toggle as anything in GLOB.preference_toggles)
+ pref_toggles_by_category["[toggle.preftoggle_category]"] += list(toggle)
+
+ for(var/category in GLOB.preference_toggle_groups)
+ dat += "
|
"
+ dat += "[category] |
"
+ for(var/datum/preference_toggle/toggle as anything in pref_toggles_by_category["[GLOB.preference_toggle_groups[category]]"])
+ dat += ""
+ dat += "| [toggle.name] | "
+ dat += "[toggle.description] | "
+ if(toggle.preftoggle_category == PREFTOGGLE_CATEGORY_ADMIN)
+ if(!check_rights(toggle.rights_required, 0, (user)))
+ dat += "Admin Restricted. | "
+ dat += "
"
+ continue
+ switch(toggle.preftoggle_toggle)
+ if(PREFTOGGLE_SPECIAL)
+ dat += "Adjust | "
+ if(PREFTOGGLE_TOGGLE1)
+ dat += "[(toggles & toggle.preftoggle_bitflag) ? "Enabled" : "Disabled"] | "
+ if(PREFTOGGLE_TOGGLE2)
+ dat += "[(toggles2 & toggle.preftoggle_bitflag) ? "Enabled" : "Disabled"] | "
+ if(PREFTOGGLE_SOUND)
+ dat += "[(sound & toggle.preftoggle_bitflag) ? "Enabled" : "Disabled"] | "
+ dat += ""
+ dat += "
|
"
+
dat += "
"
if(!IsGuestKey(user.key))
diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm
index ecae3e50c1c..31cfd405f5c 100644
--- a/code/modules/client/preference/preferences_toggles.dm
+++ b/code/modules/client/preference/preferences_toggles.dm
@@ -1,361 +1,528 @@
-//toggles
-/client/verb/toggle_ghost_ears()
- set name = "GhostEars"
- set category = "Preferences.Show/Hide"
- set desc = "Toggle Between seeing all mob speech, and only speech of nearby mobs"
- prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTEARS
- to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
- prefs.save_preferences(src)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle GhostEars") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/toggle_ghost_sight()
- set name = "GhostSight"
- set category = "Preferences.Show/Hide"
- set desc = "Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
- prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTSIGHT
- to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
- prefs.save_preferences(src)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle GhostSight") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/toggle_ghost_radio()
- set name = "GhostRadio"
- set category = "Preferences.Show/Hide"
- set desc = "Toggle between hearing all radio chatter, or only from nearby speakers"
- prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTRADIO
- to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"].")
- prefs.save_preferences(src)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle GhostRadio")
-
-/client/proc/toggle_hear_radio()
- set name = "RadioChatter"
- set category = "Preferences.Show/Hide"
- set desc = "Toggle seeing radiochatter from radios and speakers"
- if(!check_rights(R_ADMIN))
- return
- prefs.toggles ^= PREFTOGGLE_CHAT_RADIO
- prefs.save_preferences(src)
- to_chat(usr, "You will [(prefs.toggles & PREFTOGGLE_CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle RadioChatter") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/toggle_ai_voice_annoucements()
- set name = "AI Voice Announcements"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggle hearing AI annoucements in voice form or in text form"
- prefs.sound ^= SOUND_AI_VOICE
- prefs.save_preferences(src)
- to_chat(usr, "[(prefs.sound & SOUND_AI_VOICE) ? "You will now hear AI announcements." : "AI annoucements will now be converted to text."] ")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle AI Voice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/proc/toggleadminhelpsound()
- set name = "Admin Bwoinks"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggle hearing a notification when admin PMs are received"
- if(!check_rights(R_ADMIN))
- return
- prefs.sound ^= SOUND_ADMINHELP
- prefs.save_preferences(src)
- to_chat(usr, "You will [(prefs.sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Admin Bwoinks") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/proc/togglementorhelpsound()
- set name = "Mentorhelp Bwoinks"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggle hearing a notification when mentorhelps are received"
- if(!check_rights(R_ADMIN|R_MENTOR))
- return
- prefs.sound ^= SOUND_MENTORHELP
- prefs.save_preferences(src)
- to_chat(usr, "You will [(prefs.sound & SOUND_MENTORHELP) ? "now" : "no longer"] hear a sound when mentorhelps arrive.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Mentor Bwoinks") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/deadchat() // Deadchat toggle is usable by anyone.
- set name = "Deadchat"
- set category = "Preferences.Show/Hide"
- set desc ="Toggles seeing deadchat"
- prefs.toggles ^= PREFTOGGLE_CHAT_DEAD
- prefs.save_preferences(src)
-
- if(src.holder)
- to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
- else
- to_chat(src, "As a ghost, you will [(prefs.toggles & PREFTOGGLE_CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
-
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Deadchat") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/proc/toggleprayers()
- set name = "Prayers"
- set category = "Preferences.Show/Hide"
- set desc = "Toggles seeing prayers"
- prefs.toggles ^= PREFTOGGLE_CHAT_PRAYER
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Prayers") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/toggleprayernotify()
- set name = "Prayer Notification Sound"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing when prayers are made"
- prefs.sound ^= SOUND_PRAYERNOTIFY
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.sound & SOUND_PRAYERNOTIFY) ? "now" : "no longer"] hear when prayers are made.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Prayer Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/togglescoreboard()
- set name = "End Round Scoreboard"
- set category = "Preferences.Show/Hide"
- set desc = "Toggles displaying end of round scoreboard"
- prefs.toggles ^= PREFTOGGLE_DISABLE_SCOREBOARD
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Scoreboard") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/toggletitlemusic()
- set name = "LobbyMusic"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing the GameLobby music"
- prefs.sound ^= SOUND_LOBBY
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_LOBBY)
- to_chat(src, "You will now hear music in the game lobby.")
- if(isnewplayer(usr))
- usr.client.playtitlemusic()
- else
- to_chat(src, "You will no longer hear music in the game lobby.")
- usr.stop_sound_channel(CHANNEL_LOBBYMUSIC)
-
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Lobby Music") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/togglemidis()
- set name = "Midis"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing sounds uploaded by admins"
- prefs.sound ^= SOUND_MIDI
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_MIDI)
- to_chat(src, "You will now hear any sounds uploaded by admins.")
- else
- usr.stop_sound_channel(CHANNEL_ADMIN)
-
- to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle MIDIs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/listen_ooc()
- set name = "OOC (Out of Character)"
- set category = "Preferences.Show/Hide"
- set desc = "Toggles seeing OutOfCharacter chat"
- prefs.toggles ^= PREFTOGGLE_CHAT_OOC
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-
-/client/verb/listen_looc()
- set name = "LOOC (Local Out of Character)"
- set category = "Preferences.Show/Hide"
- set desc = "Toggles seeing Local OutOfCharacter chat"
- prefs.toggles ^= PREFTOGGLE_CHAT_LOOC
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle LOOC") //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 = "Ambience"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing ambient sound effects"
- prefs.sound ^= SOUND_AMBIENCE
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_AMBIENCE)
- to_chat(src, "You will now hear ambient sounds.")
- else
- to_chat(src, "You will no longer hear ambient sounds.")
- usr.stop_sound_channel(CHANNEL_AMBIENCE)
- update_ambience_pref()
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Ambience") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/Toggle_Parallax_Dark() //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 = "Parallax in darkness"
- set category = "Preferences.Show/Hide"
- set desc = "If enabled, drawing parallax if you see in dark instead of black tiles."
- prefs.toggles2 ^= PREFTOGGLE_2_PARALLAX_IN_DARKNESS
- prefs.save_preferences(src)
- if(prefs.toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS)
- to_chat(src, "You will now see parallax in dark with nightvisions.")
- else
- to_chat(src, "You will no longer see parallax in dark with nightvisions.")
- usr.hud_used?.update_parallax_pref()
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Parallax Darkness") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/Toggle_Buzz() //No more headaches because headphones bump up shipambience.ogg to insanity levels.
- set name = "White Noise"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing ambient white noise"
- prefs.sound ^= SOUND_BUZZ
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_BUZZ)
- to_chat(src, "You will now hear ambient white noise.")
- else
- to_chat(src, "You will no longer hear ambient white noise.")
- usr.stop_sound_channel(CHANNEL_BUZZ)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Whitenoise") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-
-/client/verb/Toggle_Heartbeat() //to toggle off heartbeat sounds, in case they get too annoying
- set name = "Heartbeat"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing heart beating sound effects"
- prefs.sound ^= SOUND_HEARTBEAT
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_HEARTBEAT)
- to_chat(src, "You will now hear heartbeat sounds.")
- else
- to_chat(src, "You will no longer hear heartbeat sounds.")
- usr.stop_sound_channel(CHANNEL_HEARTBEAT)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Hearbeat") //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 = "Instruments"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing musical instruments like the violin and piano"
- prefs.sound ^= SOUND_INSTRUMENTS
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_INSTRUMENTS)
- to_chat(src, "You will now hear people playing musical instruments.")
- else
- to_chat(src, "You will no longer hear musical instruments.")
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Instruments") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/client/verb/toggle_input()
- set name = "TGUI Input"
- set category = "Preferences.Toggle"
- set desc = "Switches inputs between the TGUI and the standard one"
- prefs.toggles2 ^= PREFTOGGLE_2_DISABLE_TGUI_INPUT
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_DISABLE_TGUI_INPUT) ? "no longer" : "now"] use TGUI Inputs.")
-
-/client/verb/Toggle_disco() //to toggle off the disco machine locally, in case it gets too annoying
- set name = "Dance Machine"
- set category = "Preferences.Hear/Silence"
- set desc = "Toggles hearing and dancing to the radiant dance machine"
- prefs.sound ^= SOUND_DISCO
- prefs.save_preferences(src)
- if(prefs.sound & SOUND_DISCO)
- to_chat(src, "You will now hear and dance to the radiant dance machine.")
- else
- to_chat(src, "You will no longer hear or dance to the radiant dance machine.")
- usr.stop_sound_channel(CHANNEL_JUKEBOX)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Dance Machine") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/client/verb/setup_character()
set name = "Game Preferences"
- set category = "Preferences"
- set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
+ set category = "Special Verbs"
prefs.current_tab = 1
prefs.ShowChoices(usr)
-/client/verb/toggle_ghost_pda()
- set name = "GhostPDA"
- set category = "Preferences.Show/Hide"
- set desc = "Toggle seeing PDA messages as an observer."
- prefs.toggles ^= PREFTOGGLE_CHAT_GHOSTPDA
- to_chat(src, "As a ghost, you will now [(prefs.toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "see all PDA messages" : "no longer see PDA messages"].")
- prefs.save_preferences(src)
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Ghost PDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+// Preference toggles
+/datum/preference_toggle
+ /// Name of the preference toggle. Don't set this if you don't want it to appear in game
+ var/name
+ /// Bitflag this datum will set to
+ var/preftoggle_bitflag
+ /// Category of the toggle
+ var/preftoggle_category
+ /// What toggles to set this to?
+ var/preftoggle_toggle
+ /// Description of what the pref setting does
+ var/description
+ /// Message to display when this toggle is enabled
+ var/enable_message
+ /// Message to display when this toggle is disabled
+ var/disable_message
+ /// Message for the blackbox, legacy verbs so we can't just use the name
+ var/blackbox_message
+ /// Rights required to be able to use this pref option
+ var/rights_required
+
+/datum/preference_toggle/proc/set_toggles(client/user)
+ var/datum/preferences/our_prefs = user.prefs
+ switch(preftoggle_toggle)
+ if(PREFTOGGLE_SPECIAL)
+ CRASH("[src] did not have it's set_toggles overriden even though it was a special toggle, please use the special_toggle path!")
+ if(PREFTOGGLE_TOGGLE1)
+ our_prefs.toggles ^= preftoggle_bitflag
+ to_chat(user, "[(our_prefs.toggles & preftoggle_bitflag) ? enable_message : disable_message]")
+ if(PREFTOGGLE_TOGGLE2)
+ our_prefs.toggles2 ^= preftoggle_bitflag
+ to_chat(user, "[(our_prefs.toggles2 & preftoggle_bitflag) ? enable_message : disable_message]")
+ if(PREFTOGGLE_SOUND)
+ our_prefs.sound ^= preftoggle_bitflag
+ to_chat(user, "[(our_prefs.sound & preftoggle_bitflag) ? enable_message : disable_message]")
+
+ SSblackbox.record_feedback("tally", "toggle_verbs", 1, blackbox_message)
+ our_prefs.save_preferences(user)
+
+/datum/preference_toggle/toggle_ghost_ears
+ name = "Toggle Hearing All Speech as a Ghost"
+ description = "Toggle Between seeing all mob speech, and only speech of nearby mobs"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_GHOSTEARS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GHOST
+ enable_message = "As a ghost, you will now only see speech from nearby mobs."
+ disable_message = "As a ghost, you will now see all speech in the world."
+ blackbox_message = "Toggle GhostEars"
+
+/datum/preference_toggle/toggle_ghost_sight
+ name = "Toggle Ghost Emote Viewing"
+ description = "Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_GHOSTSIGHT
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GHOST
+ enable_message = "As a ghost, you will now only see speech from nearby mobs."
+ disable_message = "As a ghost, you will now see all emotes in the world."
+ blackbox_message = "Toggle GhostSight"
+
+/datum/preference_toggle/toggle_ghost_radio
+ name = "Toggle Ghost Radio"
+ description = "Toggle between hearing all radio chatter, or only from nearby speakers"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_GHOSTRADIO
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GHOST
+ enable_message = "As a ghost, you will now only hear from nearby speakers."
+ disable_message = "As a ghost, you will now hear all radio chat in the world."
+ blackbox_message = "Toggle GhostRadio"
+
+/datum/preference_toggle/toggle_admin_radio
+ name = "Admin Radio"
+ description = "Toggle seeing radiochatter from radios and speakers"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_RADIO
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_ADMIN
+ enable_message = "You will no longer see radio chatter from radios or speakers."
+ disable_message = "You will now see radio chatter from radios or speakers."
+ blackbox_message = "Toggle RadioChatter"
+
+/datum/preference_toggle/toggle_ai_voice_annoucements
+ name = "AI Voice Announcements"
+ description = "Toggle hearing AI annoucements in voice form or in text form"
+ preftoggle_bitflag = SOUND_AI_VOICE
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear AI announcements."
+ disable_message = "You will now hear AI announcements."
+ blackbox_message = "Toggle AI Voice"
+
+/datum/preference_toggle/toggle_admin_pm_sound
+ name = "Admin PM sound"
+ description = "Toggle hearing a notification when admin PMs are received"
+ preftoggle_bitflag = SOUND_ADMINHELP
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_ADMIN
+ enable_message = "You will now hear a sound when adminhelp is sent."
+ disable_message = "You will no longer hear a sound when adminhelp is sent."
+ blackbox_message = "Toggle Admin Bwoinks"
+
+/datum/preference_toggle/toggle_mentor_pm_sound
+ name = "Mentor PM sound"
+ description = "Toggle hearing a notification when mentor PMs are received"
+ preftoggle_bitflag = SOUND_MENTORHELP
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_MENTOR
+ enable_message = "You will now hear a sound when mentorhelp is sent."
+ disable_message = "You will no longer hear a sound when mentorhelp is sent."
+ blackbox_message = "Toggle Mentor Bwoinks"
+
+/datum/preference_toggle/toggle_deadchat_visibility
+ name = "Toggle Deadchat visibility"
+ description = "Toggles Dchat's visibility"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_DEAD
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now see deadchat."
+ disable_message = "You will no longer see deadchat."
+ blackbox_message = "Toggle Deadchat"
+
+/datum/preference_toggle/end_of_round_scoreboard
+ name = "Toggle the End of Round Scoreboard"
+ description = "Prevents you from seeing the end of round scoreboard"
+ preftoggle_bitflag = PREFTOGGLE_DISABLE_SCOREBOARD
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now see the end of round scoreboard."
+ disable_message = "You will no longer see see the end of round scoreboard."
+ blackbox_message = "Toggle Scoreboard"
+
+/datum/preference_toggle/title_music
+ name = "Toggle Lobby Music"
+ description = "Toggles hearing the GameLobby music"
+ preftoggle_bitflag = SOUND_LOBBY
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear music in the game lobby."
+ disable_message = "You will no longer hear music in the game lobby."
+ blackbox_message = "Toggle Lobby Music"
+
+/datum/preference_toggle/title_music/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.sound & SOUND_LOBBY)
+ if(isnewplayer(usr))
+ user.playtitlemusic()
+ else
+ usr.stop_sound_channel(CHANNEL_LOBBYMUSIC)
+
+/datum/preference_toggle/toggle_admin_midis
+ name = "Toggle Admin Midis"
+ description = "Toggles hearing sounds uploaded by admins"
+ preftoggle_bitflag = SOUND_MIDI
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear any sounds uploaded by admins."
+ disable_message = "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled."
+ blackbox_message = "Toggle MIDIs"
+
+/datum/preference_toggle/toggle_admin_midis/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.sound & ~SOUND_LOBBY)
+ usr.stop_sound_channel(CHANNEL_ADMIN)
+
+/datum/preference_toggle/toggle_ooc
+ name = "Toggle OOC chat"
+ description = "Toggles seeing OutOfCharacter chat"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_OOC
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now see the OOC channel."
+ disable_message = "You will no longer see the OOC channel."
+ blackbox_message = "Toggle OOC"
+
+/datum/preference_toggle/toggle_looc
+ name = "Toggle LOOC chat"
+ description = "Toggles seeing Local OutOfCharacter chat"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_LOOC
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now see the LOOC channel."
+ disable_message = "You will no longer see the LOOC channel."
+ blackbox_message = "Toggle LOOC"
+
+/datum/preference_toggle/toggle_ambience
+ name = "Toggle Ambient sounds"
+ description = "Toggles hearing ambient sound effects"
+ preftoggle_bitflag = SOUND_AMBIENCE
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You now hear ambient sounds."
+ disable_message = "Ambience is now silenced."
+ blackbox_message = "Toggle Ambience"
+
+/datum/preference_toggle/toggle_ambience/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.sound & ~SOUND_AMBIENCE)
+ usr.stop_sound_channel(CHANNEL_AMBIENCE)
+ user.update_ambience_pref()
+
+/datum/preference_toggle/toggle_parallax_in_darkness
+ name = "Toggle Parallax in darkness"
+ description = "Toggles seeing space tiles instead of blank tiles"
+ preftoggle_bitflag = PREFTOGGLE_2_PARALLAX_IN_DARKNESS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now see parallax in dark with nightvision."
+ disable_message = "You will no longer see parallax in dark with nightvision."
+ blackbox_message = "Toggle Parallax Darkness"
+
+/datum/preference_toggle/toggle_parallax_in_darkness/set_toggles(client/user)
+ . = ..()
+ usr.hud_used?.update_parallax_pref()
+
+/datum/preference_toggle/toggle_white_noise
+ name = "Toggle White Noise"
+ description = "Toggles hearing White Noise"
+ preftoggle_bitflag = SOUND_BUZZ
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear ambient white noise."
+ disable_message = "You will no longer hear ambient white noise."
+ blackbox_message = "Toggle Whitenoise"
+
+/datum/preference_toggle/toggle_white_noise/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.sound & ~SOUND_BUZZ)
+ usr.stop_sound_channel(CHANNEL_BUZZ)
+
+/datum/preference_toggle/toggle_heartbeat_noise
+ name = "Toggle Heartbeat noise"
+ description = "Toggles hearing heartbeat sounds"
+ preftoggle_bitflag = SOUND_HEARTBEAT
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear heartbeat sounds."
+ disable_message = "You will no longer hear heartbeat sounds."
+ blackbox_message = "Toggle Hearbeat"
+
+/datum/preference_toggle/toggle_heartbeat_noise/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.sound & ~SOUND_HEARTBEAT)
+ usr.stop_sound_channel(CHANNEL_HEARTBEAT)
+
+/datum/preference_toggle/toggle_instruments
+ name = "Toggle Instruments"
+ description = "Toggles hearing musical instruments like the violin and piano"
+ preftoggle_bitflag = SOUND_INSTRUMENTS
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear people playing musical instruments."
+ disable_message = "You will no longer hear musical instruments."
+ blackbox_message = "Toggle Instruments"
+
+/datum/preference_toggle/toggle_disco
+ name = "Toggle Disco Machine Music"
+ description = "Toggles hearing musical instruments like the violin and piano"
+ preftoggle_bitflag = SOUND_DISCO
+ preftoggle_toggle = PREFTOGGLE_SOUND
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now hear and dance to the radiant dance machine."
+ disable_message = "You will no longer hear or dance to the radiant dance machine."
+ blackbox_message = "Toggle Dance Machine"
+
+/datum/preference_toggle/toggle_disco/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.sound & ~SOUND_DISCO)
+ usr.stop_sound_channel(CHANNEL_JUKEBOX)
+
+/datum/preference_toggle/toggle_ghost_pda
+ name = "Toggle Ghost PDA messages"
+ description = "Toggle seeing PDA messages as an observer"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_GHOSTPDA
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_GHOST
+ enable_message = "As a ghost, you will now see all PDA messages."
+ disable_message = "As a ghost, you will no longer see PDA messages."
+ blackbox_message = "Toggle Ghost PDA"
/client/verb/silence_current_midi()
set name = "Silence Current Midi"
- set category = "Preferences"
+ set category = "Special Verbs"
set desc = "Silence the current admin midi playing"
usr.stop_sound_channel(CHANNEL_ADMIN)
to_chat(src, "The current admin midi has been silenced")
+/datum/preference_toggle/toggle_runechat
+ name = "Toggle Runechat"
+ description = "Toggle seeing Runechat messages"
+ preftoggle_bitflag = PREFTOGGLE_2_RUNECHAT
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now see runechat."
+ disable_message = "You will no longer see runechat."
+ blackbox_message = "Toggle Runechat"
-/client/verb/toggle_runechat()
- set name = "Runechat"
- set category = "Preferences.Toggle"
- set desc = "Toggle runechat messages"
- prefs.toggles2 ^= PREFTOGGLE_2_RUNECHAT
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_RUNECHAT) ? "now see" : "no longer see"] floating chat messages.")
+/datum/preference_toggle/toggle_runechat
+ name = "Toggle Ghost Death Notifications"
+ description = "Toggle a notification when a player dies"
+ preftoggle_bitflag = PREFTOGGLE_2_DEATHMESSAGE
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GHOST
+ enable_message = "You will now see a notification in deadchat when a player dies."
+ disable_message = "You will no longer see a notification in deadchat when a player dies."
+ blackbox_message = "Toggle Death Notifications"
-/client/verb/toggle_death_messages()
- set name = "Death Notifications"
- set category = "Preferences.Toggle"
- set desc = "Toggle player death notifications"
- prefs.toggles2 ^= PREFTOGGLE_2_DEATHMESSAGE
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_DEATHMESSAGE) ? "now" : "no longer"] see a notification in deadchat when a player dies.")
+/datum/preference_toggle/toggle_reverb
+ name = "Toggle Reverb"
+ description = "Toggles Reverb on specific sounds"
+ preftoggle_bitflag = PREFTOGGLE_2_REVERB_DISABLE
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now get reverb on some in game sounds."
+ disable_message = "You will no longer get reverb on some in game sounds."
+ blackbox_message = "Toggle reverb"
-/client/verb/toggle_reverb()
- set name = "Reverb"
- set category = "Preferences.Toggle"
- set desc = "Toggle ingame reverb effects"
- prefs.toggles2 ^= PREFTOGGLE_2_REVERB_DISABLE
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_REVERB_DISABLE) ? "no longer" : "now"] get reverb on ingame sounds.")
+/datum/preference_toggle/toggle_white_runechat
+ name = "Toggle Runechat Colour Forcing"
+ description = "Forces your runechat color to white"
+ preftoggle_bitflag = PREFTOGGLE_2_FORCE_WHITE_RUNECHAT
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "Your runechat messages are forced to be white."
+ disable_message = "Your runechat messages are no longer forced to be white."
+ blackbox_message = "Toggle runechat color"
-/client/verb/toggle_forced_white_runechat()
- set name = "Runechat Colour Forcing"
- set category = "Preferences.Toggle"
- set desc = "Toggles forcing your runechat colour to white"
- prefs.toggles2 ^= PREFTOGGLE_2_FORCE_WHITE_RUNECHAT
- prefs.save_preferences(src)
- to_chat(src, "Your runechats will [(prefs.toggles2 & PREFTOGGLE_2_FORCE_WHITE_RUNECHAT) ? "now" : "no longer"] be forced to be white.")
+/datum/preference_toggle/toggle_simple_stat_panel
+ name = "Toggle item outlines"
+ description = "Toggles seeing item outlines on hover"
+ preftoggle_bitflag = PREFTOGGLE_2_SEE_ITEM_OUTLINES
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_LIVING
+ enable_message = "You no longer see item outlines when hovering over an item with your mouse."
+ disable_message = "You now see item outlines when hovering over an item with your mouse."
+ blackbox_message = "Toggle item outlines"
-/client/verb/toggle_item_outlines()
- set name = "Item Outlines"
- set category = "Preferences.Toggle"
- set desc = "Toggles seeing item outlines on hover."
- prefs.toggles2 ^= PREFTOGGLE_2_SEE_ITEM_OUTLINES
- prefs.save_preferences(src)
- to_chat(usr, "You will [(prefs.toggles2 & PREFTOGGLE_2_SEE_ITEM_OUTLINES) ? "now" : "no longer"] see item outlines on hover.")
+/datum/preference_toggle/toggle_item_tooltips
+ name = "Toggle item tooltips"
+ description = "Toggles textboxes with the item descriptions after hovering on them in your inventory"
+ preftoggle_bitflag = PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_LIVING
+ enable_message = "You no longer see item tooltips."
+ disable_message = "You now see item tooltips."
+ blackbox_message = "Toggle item tooltips"
-/client/verb/toggle_item_tooltips()
- set name = "Hover-over Item Tooltips"
- set category = "Preferences.Toggle"
- set desc = "Toggles textboxes with the item descriptions after hovering on them in your inventory."
- prefs.toggles2 ^= PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_HIDE_ITEM_TOOLTIPS) ? "no longer" : "now"] see item tooltips when you hover over items on your HUD.")
+/datum/preference_toggle/toggle_anonmode
+ name = "Toggle Anonymous Mode"
+ description = "Toggles showing your key in various parts of the game (deadchat, end round, etc)"
+ preftoggle_bitflag = PREFTOGGLE_2_ANON
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "Your key will no longer be shown in certain events (end round reports, deadchat, etc)."
+ disable_message = "Your key will now will be shown in certain events (end round reports, deadchat, etc)."
+ blackbox_message = "Toggle Anon mode"
-/mob/verb/toggle_anonmode()
- set name = "Anonymous Mode"
- set category = "Preferences.Toggle"
- set desc = "Toggles showing your key in various parts of the game (deadchat, end round, etc)."
- client.prefs.toggles2 ^= PREFTOGGLE_2_ANON
- to_chat(src, "Your key will [(client.prefs.toggles2 & PREFTOGGLE_2_ANON) ? "no longer" : "now"] be shown in certain events (end round reports, deadchat, etc).")
- client.prefs.save_preferences(src)
+/datum/preference_toggle/toggle_disco_dance
+ name = "Toggle Disco Machine Dancing"
+ description = "Toggles automatic dancing from the radiant dance machine"
+ preftoggle_bitflag = PREFTOGGLE_2_DANCE_DISCO
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_LIVING
+ enable_message = "You will now dance to the radiant dance machine."
+ disable_message = "You will no longer dance to the radiant dance machine."
+ blackbox_message = "Toggle disco machine dancing"
-/client/verb/toggle_dance()
- set name = "Disco Machine Dancing"
- set category = "Preferences.Toggle"
- set desc = "Toggles automatic dancing from the radiant dance machine"
- prefs.toggles2 ^= PREFTOGGLE_2_DANCE_DISCO
- prefs.save_preferences(src)
- to_chat(usr, "You will [(prefs.toggles2 & PREFTOGGLE_2_DANCE_DISCO) ? "now" : "no longer"] dance to the radiant dance machine.")
+/datum/preference_toggle/toggle_typing_indicator
+ name = "Toggle Typing Indicator"
+ description = "Hides the typing indicator"
+ preftoggle_bitflag = PREFTOGGLE_SHOW_TYPING
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_LIVING
+ enable_message = "You will no longer display a typing indicator."
+ disable_message = "You will now display a typing indicator."
+ blackbox_message = "Toggle Typing Indicator (Speech)"
-/client/verb/manage_adminsound_mutes()
- set name = "Manage Admin Sound Mutes"
- set category = "Preferences"
- set desc = "Manage admins that you wont hear played audio from"
+/datum/preference_toggle/toggle_typing_indicator/set_toggles(client/user)
+ . = ..()
+ if(user.prefs.toggles & PREFTOGGLE_SHOW_TYPING)
+ if(istype(usr))
+ usr.set_typing_indicator(FALSE)
+ usr.set_thinking_indicator(FALSE)
- if(!length(prefs.admin_sound_ckey_ignore))
+/datum/preference_toggle/toggle_tgui_input_lists
+ name = "Toggle TGUI Input"
+ description = "Switches input lists between the TGUI and the standard one"
+ preftoggle_bitflag = PREFTOGGLE_2_DISABLE_TGUI_INPUT
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ enable_message = "You will now use TGUI Input."
+ disable_message = "You will no longer use TGUI Input."
+ blackbox_message = "Toggle TGUI Input"
+
+/datum/preference_toggle/toggle_admin_logs
+ name = "Toggle Admin Log Messages"
+ description = "Disables admin log messages"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_NO_ADMINLOGS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_ADMIN
+ enable_message = "Admin logs disabled."
+ disable_message = "Admin logs re-enabled."
+ blackbox_message = "Admin logs toggled"
+
+/datum/preference_toggle/toggle_mhelp_notification
+ name = "Toggle Mentor Ticket Messages"
+ description = "Disables mentor ticket notifications"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_NO_MENTORTICKETLOGS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_MENTOR | R_ADMIN
+ enable_message = "You now won't get mentor ticket messages."
+ disable_message = "You now will get mentor ticket messages."
+ blackbox_message = "Mentor ticket notification toggled"
+
+/datum/preference_toggle/toggle_ahelp_notification
+ name = "Toggle Admin Ticket Messages"
+ description = "Disables admin ticket notifications"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_NO_TICKETLOGS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_ADMIN
+ enable_message = "You now won't get admin ticket messages."
+ disable_message = "You now will get admin ticket messages."
+ blackbox_message = "Admin ticket notification toggled"
+
+/datum/preference_toggle/toggle_debug_logs
+ name = "Toggle Debug Log Messages"
+ description = "Disables debug notifications (Runtimes, ghost role notifications, weird checks that weren't removed)"
+ preftoggle_bitflag = PREFTOGGLE_CHAT_DEBUGLOGS
+ preftoggle_toggle = PREFTOGGLE_TOGGLE1
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_VIEWRUNTIMES | R_DEBUG
+ enable_message = "You now won't get debug logs."
+ disable_message = "You now will get debug logs."
+ blackbox_message = "Debug logs toggled"
+
+/datum/preference_toggle/toggle_mctabs
+ name = "Toggle MC tab"
+ description = "Toggles MC tab visibility"
+ preftoggle_bitflag = PREFTOGGLE_2_MC_TAB
+ preftoggle_toggle = PREFTOGGLE_TOGGLE2
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_VIEWRUNTIMES | R_DEBUG
+ enable_message = "You'll now see subsystem information in the verb panel."
+ disable_message = "You'll no longer see subsystem information in the verb panel."
+ blackbox_message = "MC tabs toggled"
+
+/datum/preference_toggle/special_toggle
+ preftoggle_toggle = PREFTOGGLE_SPECIAL
+
+/datum/preference_toggle/special_toggle/set_toggles(client/user)
+ SSblackbox.record_feedback("tally", "toggle_verbs", 1, blackbox_message)
+ user.prefs.save_preferences(user)
+
+/datum/preference_toggle/special_toggle/toggle_adminsound_mutes
+ name = "Manage Admin Sound Mutes"
+ description = "Manage admins that you wont hear played audio from"
+ preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
+ blackbox_message = "MC tabs toggled"
+
+/datum/preference_toggle/special_toggle/toggle_adminsound_mutes/set_toggles(client/user)
+ if(!length(user.prefs.admin_sound_ckey_ignore))
to_chat(usr, "You have no admins with muted sounds.")
return
- var/choice = input(usr, "Select an admin to unmute sounds from.", "Pick an admin") as null|anything in prefs.admin_sound_ckey_ignore
+ var/choice = input(usr, "Select an admin to unmute sounds from.", "Pick an admin") as null|anything in user.prefs.admin_sound_ckey_ignore
if(!choice)
return
- prefs.admin_sound_ckey_ignore -= choice
+ user.prefs.admin_sound_ckey_ignore -= choice
to_chat(usr, "You will now hear sounds from [choice] again.")
- prefs.save_preferences(src)
+ return ..()
-/client/proc/toggle_mctabs()
- set name = "MC Tab"
- set category = "Preferences.Show/Hide"
- set desc = "Shows or hides the MC tab."
- prefs.toggles2 ^= PREFTOGGLE_2_MC_TAB
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_MC_TAB) ? "now" : "no longer"] see the MC tab on the top right.")
+/datum/preference_toggle/special_toggle/set_ooc_color
+ name = "Set Your OOC Color"
+ description = "Pick a custom OOC color"
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_ADMIN
+ blackbox_message = "Set Own OOC"
+
+/datum/preference_toggle/special_toggle/set_ooc_color/set_toggles(client/user)
+ var/new_ooccolor = input(usr, "Please select your OOC color.", "OOC color", user.prefs.ooccolor) as color|null
+ if(new_ooccolor)
+ user.prefs.ooccolor = new_ooccolor
+ to_chat(usr, "Your OOC color has been set to [new_ooccolor].")
+ else
+ user.prefs.ooccolor = initial(user.prefs.ooccolor)
+ to_chat(usr, "Your OOC color has been reset.")
+ return ..()
+
+/datum/preference_toggle/special_toggle/set_attack_logs
+ name = "Change Attack Log settings"
+ description = "Changes what attack logs you see, ranges from all attacklogs to no attacklogs"
+ preftoggle_category = PREFTOGGLE_CATEGORY_ADMIN
+ rights_required = R_ADMIN
+ blackbox_message = "changed attack log settings"
+
+/datum/preference_toggle/special_toggle/set_attack_logs/set_toggles(client/user)
+ var/static/list/attack_log_settings = list("All attack logs" = ATKLOG_ALL, "Almost all attack logs" = ATKLOG_ALMOSTALL, "Most attack logs" = ATKLOG_MOST, "Few attack logs" = ATKLOG_FEW, "No attack logs" = ATKLOG_NONE)
+ var/input = input(usr, "Please select your Attack Log settings.") as null|anything in attack_log_settings
+ if(!input)
+ return
+ var/attack_log_type = attack_log_settings[input]
+ switch(attack_log_type)
+ if(ATKLOG_ALL)
+ user.prefs.atklog = ATKLOG_ALL
+ to_chat(usr, "Your attack logs preference is now: show ALL attack logs")
+ if(ATKLOG_ALMOSTALL)
+ user.prefs.atklog = ATKLOG_ALMOSTALL
+ to_chat(usr, "Your attack logs preference is now: show ALMOST ALL attack logs (notable exceptions: NPCs attacking other NPCs, vampire bites, equipping/stripping, people pushing each other over)")
+ if(ATKLOG_MOST)
+ user.prefs.atklog = ATKLOG_MOST
+ to_chat(usr, "Your attack logs preference is now: show MOST attack logs (like ALMOST ALL, except that it also hides player v. NPC combat, and certain areas like lavaland syndie base and thunderdome)")
+ if(ATKLOG_FEW)
+ user.prefs.atklog = ATKLOG_FEW
+ to_chat(usr, "Your attack logs preference is now: show FEW attack logs (only the most important stuff: attacks on SSDs, use of explosives, messing with the engine, gibbing, AI wiping, forcefeeding, acid sprays, and organ extraction)")
+ if(ATKLOG_NONE)
+ user.prefs.atklog = ATKLOG_NONE
+ to_chat(usr, "Your attack logs preference is now: show NO attack logs")
+ return ..()
diff --git a/code/modules/client/preference/preferences_volume_mixer.dm b/code/modules/client/preference/preferences_volume_mixer.dm
index c9e84373153..61f3e134f65 100644
--- a/code/modules/client/preference/preferences_volume_mixer.dm
+++ b/code/modules/client/preference/preferences_volume_mixer.dm
@@ -88,7 +88,7 @@
/client/verb/volume_mixer()
set name = "Open Volume Mixer"
- set category = "Preferences"
+ set category = null
set hidden = TRUE
var/datum/ui_module/volume_mixer/VM = new()
diff --git a/code/modules/client/view.dm b/code/modules/client/view.dm
index 7832ba0419f..18966f49678 100644
--- a/code/modules/client/view.dm
+++ b/code/modules/client/view.dm
@@ -4,9 +4,6 @@
* Also includes
*/
-/* Defines */
-#define CUSTOM_VIEWRANGES list(1, 2, 3, 4, 5, 6, "RESET")
-
/client/proc/AddViewMod(id, size)
var/datum/viewmod/V = new /datum/viewmod(id, size)
ViewMods[V.id] = V
@@ -69,22 +66,3 @@
/* Client verbs */
/proc/viewNum_to_text(view)
return "[(view * 2) + 1]x[(view * 2) + 1]"
-
-/client/verb/set_view_range()
- set name = "Set View Range"
- set category = "Preferences"
-
- var/view_range = tgui_input_list(src.mob, "Select a view range", "Set View Range", CUSTOM_VIEWRANGES, "RESET")
-
- if(!view_range)
- return
-
- RemoveViewMod("custom")
- if(view_range == "RESET")
- to_chat(src, "View range reset.")
- return
-
- to_chat(src, "View range set to [viewNum_to_text(view_range)]")
- AddViewMod("custom", view_range)
-
-#undef CUSTOM_VIEWRANGES
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index f2ff761520e..ed9505e5c13 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -152,7 +152,6 @@
real_name = name
if(!loc)
stack_trace("Simple animal being instantiated in nullspace")
- remove_verb(src, /mob/verb/observe)
if(can_hide)
var/datum/action/innate/hide/hide = new()
hide.Grant(src)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 666f0c49309..cee530c1850 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -769,112 +769,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
else
return "[copytext_preserve_html(msg, 1, 37)]... More..."
-// Nobody in their right mind will have this enabled on the production server, uncomment if you want this for some reason
-/*
-/mob/verb/abandon_mob()
- set name = "Respawn"
- set category = "OOC"
-
- if(!GLOB.configuration.general.respawn_enabled)
- to_chat(usr, "Respawning is disabled.")
- return
-
- if(stat != DEAD || !SSticker)
- to_chat(usr, "You must be dead to use this!")
- return
-
- log_game("[key_name(usr)] has respawned.")
-
- to_chat(usr, "Make sure to play a different character, and please roleplay correctly!")
-
- if(!client)
- log_game("[key_name(usr)] respawn failed due to disconnect.")
- return
- client.screen.Cut()
- client.screen += client.void
-
- if(!client)
- log_game("[key_name(usr)] respawn failed due to disconnect.")
- return
-
- var/mob/new_player/M = new /mob/new_player()
- if(!client)
- log_game("[key_name(usr)] respawn failed due to disconnect.")
- qdel(M)
- return
-
- M.key = key
- return
-
-*/
-/mob/verb/observe()
- set name = "Observe"
- set category = "OOC"
- var/is_admin = 0
-
- if(client.holder && (client.holder.rights & R_ADMIN))
- is_admin = 1
- else if(stat != DEAD || isnewplayer(src))
- to_chat(usr, "You must be observing to use this!")
- return
-
- if(is_admin && stat == DEAD)
- is_admin = 0
-
- var/list/names = list()
- var/list/namecounts = list()
- var/list/creatures = list()
-
- for(var/obj/O in GLOB.poi_list)
- if(!O.loc)
- continue
- if(istype(O, /obj/item/disk/nuclear))
- var/name = "Nuclear Disk"
- if(names.Find(name))
- namecounts[name]++
- name = "[name] ([namecounts[name]])"
- else
- names.Add(name)
- namecounts[name] = 1
- creatures[name] = O
-
- if(istype(O, /obj/singularity))
- var/name = "Singularity"
- if(names.Find(name))
- namecounts[name]++
- name = "[name] ([namecounts[name]])"
- else
- names.Add(name)
- namecounts[name] = 1
- creatures[name] = O
-
-
- for(var/mob/M in sortAtom(GLOB.mob_list))
- var/name = M.name
- if(names.Find(name))
- namecounts[name]++
- name = "[name] ([namecounts[name]])"
- else
- names.Add(name)
- namecounts[name] = 1
-
- creatures[name] = M
-
-
- client.perspective = EYE_PERSPECTIVE
-
- var/eye_name = null
-
- var/ok = "[is_admin ? "Admin Observe" : "Observe"]"
- eye_name = tgui_input_list(usr, "Please, select a player!", ok, creatures)
-
- if(!eye_name)
- return
-
- var/mob/mob_eye = creatures[eye_name]
-
- if(client && mob_eye)
- client.eye = mob_eye
+/mob/proc/is_dead()
+ return stat == DEAD
/mob/verb/cancel_camera()
set name = "Cancel Camera View"
diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm
index dc361ba9e2d..02df559452d 100644
--- a/code/modules/mob/typing_indicator.dm
+++ b/code/modules/mob/typing_indicator.dm
@@ -92,19 +92,3 @@ GLOBAL_LIST_EMPTY(thinking_indicator)
set_typing_indicator(FALSE)
if(message)
me_verb(message)
-
-/client/verb/typing_indicator()
- set name = "Typing Indicator"
- set category = "Preferences.Show/Hide"
- set desc = "Toggles showing a typing/thought indicator when you have TGUIsay open."
- prefs.toggles ^= PREFTOGGLE_SHOW_TYPING
- prefs.save_preferences(src)
- to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_SHOW_TYPING) ? "no longer" : "now"] display a typing/thought indicator when you have TGUIsay open.")
-
- // Clear out any existing typing indicator.
- if(prefs.toggles & PREFTOGGLE_SHOW_TYPING)
- if(istype(mob))
- mob.set_typing_indicator(FALSE)
- mob.set_thinking_indicator(FALSE)
-
- SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Typing Indicator (Speech)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/config/example/config.toml b/config/example/config.toml
index fedba7ae4a3..c1d747f02fa 100644
--- a/config/example/config.toml
+++ b/config/example/config.toml
@@ -283,8 +283,6 @@ guest_ban = true
allow_antag_hud = true
# Forbid players from rejoining if they use antag hud
restrict_antag_hud_rejoin = true
-# Do we want to allow player respawns?
-respawn_enabled = false
# Enable/disable the buster for the CID randomiser DLL
enable_cid_randomiser_buster = false
# Prevent admins from possessing the singularity
diff --git a/paradise.dme b/paradise.dme
index bdac76b5105..be76cb94d91 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -197,6 +197,7 @@
#include "code\_globalvars\lists\mob_lists.dm"
#include "code\_globalvars\lists\names.dm"
#include "code\_globalvars\lists\objects.dm"
+#include "code\_globalvars\lists\preference_toggle_lists.dm"
#include "code\_globalvars\lists\reagents_lists.dm"
#include "code\_globalvars\lists\typecache.dm"
#include "code\_onclick\adjacent.dm"