Reworks anon dchat mode into full anon mode (#18282)

* Reworks anon dchat mode

* Update code/modules/client/preference/preferences_toggles.dm
This commit is contained in:
AffectedArc07
2022-07-14 16:52:49 +01:00
committed by GitHub
parent 490de764de
commit 0c0b201668
16 changed files with 97 additions and 33 deletions
+1 -1
View File
@@ -162,7 +162,7 @@
/client/proc/get_display_key()
var/fakekey = src?.holder?.fakekey
var/fakekey = holder?.fakekey
return fakekey ? fakekey : key
/client/proc/is_content_unlocked()
@@ -999,8 +999,8 @@
if("ghost_pda")
toggles ^= PREFTOGGLE_CHAT_GHOSTPDA
if("ghost_anonsay")
toggles2 ^= PREFTOGGLE_2_ANONDCHAT
if("anonmode")
toggles2 ^= PREFTOGGLE_2_ANON
if("save")
save_preferences(user)
@@ -373,12 +373,12 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "<b>Attack Animations:</b> <a href='?_src_=prefs;preference=ghost_att_anim'>[(toggles2 & PREFTOGGLE_2_ITEMATTACK) ? "Yes" : "No"]</a><br>"
if(unlock_content)
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'><b>[(toggles & PREFTOGGLE_MEMBER_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
dat += "<b>CKEY Anonymity:</b> <a href='?_src_=prefs;preference=anonmode'><b>[toggles2 & PREFTOGGLE_2_ANON ? "Anonymous" : "Not Anonymous"]</b></a><br>"
dat += "<b>Colourblind Mode:</b> <a href='?_src_=prefs;preference=cbmode'>[colourblind_mode]</a><br>"
dat += "<b>Custom UI settings:</b><br>"
dat += " - <b>Alpha (transparency):</b> <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
dat += " - <b>Color:</b> <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <span style='border: 1px solid #161616; background-color: [UI_style_color];'>&nbsp;&nbsp;&nbsp;</span><br>"
dat += " - <b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
dat += "<b>Deadchat Anonymity:</b> <a href='?_src_=prefs;preference=ghost_anonsay'><b>[toggles2 & PREFTOGGLE_2_ANONDCHAT ? "Anonymous" : "Not Anonymous"]</b></a><br>"
if(user.client.donator_level > 0)
dat += "<b>Donator Publicity:</b> <a href='?_src_=prefs;preference=donor_public'><b>[(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
dat += "<b>Fancy TGUI:</b> <a href='?_src_=prefs;preference=tgui'>[(toggles2 & PREFTOGGLE_2_FANCYUI) ? "Yes" : "No"]</a><br>"
@@ -341,3 +341,11 @@
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.")
/mob/verb/toggle_anonmode()
set name = "Toggle Anonymous Mode"
set category = "Preferences"
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).</span>")
client.prefs.save_preferences(src)