Makes it a preference

This commit is contained in:
Aronai Sieyes
2020-04-17 17:43:07 -04:00
parent de41cd1fd1
commit f7609c6aff
4 changed files with 24 additions and 4 deletions

View File

@@ -104,6 +104,12 @@ var/list/_client_preferences_by_type
key = "EMOTE_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
/datum/client_preference/whisubtle_vis
description = "Whi/Subtles Ghost Visible"
key = "WHISUBTLE_VIS"
enabled_description = "Visible"
disabled_description = "Hidden"
enabled_by_default = FALSE
//VOREStation Add End
/datum/client_preference/weather_sounds
description ="Weather sounds"

View File

@@ -1,5 +1,4 @@
//TFF 5/8/19 - minor refactoring of this thing from 09_misc.dm to call this for preferences.
datum/preferences
/datum/preferences
var/show_in_directory = 1 //Show in Character Directory
var/sensorpref = 5 //Set character's suit sensor level
@@ -54,3 +53,18 @@ datum/preferences
SScharacter_setup.queue_preferences_save(prefs)
feedback_add_details("admin_verb","TEmoteNoise") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_ghost_quiets()
set name = "Whisper/Subtle Vis"
set category = "Preferences"
set desc = "Toggle ghosts viewing your subtles/whispers."
var/pref_path = /datum/client_preference/whisubtle_vis
toggle_preference(pref_path)
to_chat(src, "Ghosts will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear subtles/whispers made by you.")
SScharacter_setup.queue_preferences_save(prefs)
feedback_add_details("admin_verb","TWhisubtleVis") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -364,7 +364,7 @@ proc/get_radio_key_from_channel(var/channel)
if(M && src) //If we still exist, when the spawn processes
//VOREStation Add - Ghosts don't hear whispers
if(whispering && isobserver(M) && !M.client?.holder)
if(whispering && !is_preference_enabled(/datum/client_preference/whisubtle_vis) && isobserver(M) && !M.client?.holder)
M.show_message("<span class='game say'><span class='name'>[src.name]</span> [w_not_heard].</span>", 2)
return
//VOREStation Add End

View File

@@ -51,7 +51,7 @@
for(var/vismob in vis_mobs)
var/mob/M = vismob
if(isobserver(M) && !M.client?.holder)
if(isobserver(M) && !is_preference_enabled(/datum/client_preference/whisubtle_vis) && !M.client?.holder)
spawn(0)
M.show_message(undisplayed_message, 2)
else