mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
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:
@@ -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];'> </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)
|
||||
|
||||
@@ -179,6 +179,7 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache)
|
||||
if(!istype(back_to))
|
||||
back_to = error_source
|
||||
var/html = buildHeader(back_to, linear)
|
||||
html += "<div class='bad'><b>Be sure to censor out ckeys when copying runtimes!</b></div><br>"
|
||||
html += "<div class='runtime'>[html_encode(name)]<br>[desc]</div>"
|
||||
if(srcRef)
|
||||
html += "<br>src: <a href='?_src_=vars;Vars=[srcUID]'>VV</a>"
|
||||
|
||||
@@ -653,15 +653,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
..()
|
||||
//END TELEPORT HREF CODE
|
||||
|
||||
/mob/dead/observer/verb/toggle_anonsay()
|
||||
set name = "Toggle Anonymous Dead-chat"
|
||||
set category = "Ghost"
|
||||
set desc = "Toggles showing your key in dead chat."
|
||||
client.prefs.toggles2 ^= PREFTOGGLE_2_ANONDCHAT
|
||||
to_chat(src, "As a ghost, your key will [(client.prefs.toggles2 & PREFTOGGLE_2_ANONDCHAT) ? "no longer" : "now"] be shown when you speak in dead chat.</span>")
|
||||
client.prefs.save_preferences(src)
|
||||
|
||||
/mob/dead/observer/verb/toggle_ghostsee()
|
||||
set name = "Toggle Ghost Vision"
|
||||
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
|
||||
|
||||
@@ -531,11 +531,12 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
|
||||
var/mob/dead/observer/DM
|
||||
if(istype(subject, /mob/dead/observer))
|
||||
DM = subject
|
||||
if(check_rights(R_ADMIN|R_MOD,0,M)) // What admins see
|
||||
lname = "[keyname][(DM && DM.client && DM.client.prefs.toggles2 & PREFTOGGLE_2_ANONDCHAT) ? "*" : (DM ? "" : "^")] ([name])"
|
||||
if(check_rights(R_ADMIN|R_MOD, FALSE, M)) // What admins see
|
||||
lname = "[keyname][(DM?.client.prefs.toggles2 & PREFTOGGLE_2_ANON) ? (@"[ANON]") : (DM ? "" : "^")] ([name])"
|
||||
//lname = "[keyname][(DM?.client.prefs.toggles2 & PREFTOGGLE_2_ANON) ? TRUE : (DM ? "" : "^")] ([name])"
|
||||
else
|
||||
if(DM && DM.client && DM.client.prefs.toggles2 & PREFTOGGLE_2_ANONDCHAT) // If the person is actually observer they have the option to be anonymous
|
||||
lname = "Ghost of [name]"
|
||||
if(DM?.client.prefs.toggles2 & PREFTOGGLE_2_ANON) // If the person is actually observer they have the option to be anonymous
|
||||
lname = "<i>Anon</i> ([name])"
|
||||
else if(DM) // Non-anons
|
||||
lname = "[keyname] ([name])"
|
||||
else // Everyone else (dead people who didn't ghost yet, etc.)
|
||||
|
||||
Reference in New Issue
Block a user