mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Merge pull request #6293 from KasparoVy/deadchat-anon-pref
Makes Deadchat Anonymity Persistent as a Preference
This commit is contained in:
@@ -95,6 +95,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/UI_style_alpha = 255
|
||||
var/windowflashing = TRUE
|
||||
|
||||
//ghostly preferences
|
||||
var/ghost_anonsay = 0
|
||||
|
||||
//character preferences
|
||||
var/real_name //our character's name
|
||||
@@ -446,6 +448,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||
dat += "<b>Ghost radio:</b> <a href='?_src_=prefs;preference=ghost_radio'><b>[(toggles & CHAT_GHOSTRADIO) ? "Nearest Speakers" : "All Chatter"]</b></a><br>"
|
||||
dat += "<b>Deadchat anonymity:</b> <a href='?_src_=prefs;preference=ghost_anonsay'><b>[ghost_anonsay ? "Anonymous" : "Not Anonymous"]</b></a><br>"
|
||||
|
||||
dat += "</td><td width='300px' height='300px' valign='top'>"
|
||||
dat += "<h2>Special Role Settings</h2>"
|
||||
@@ -1997,6 +2000,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("ghost_radio")
|
||||
toggles ^= CHAT_GHOSTRADIO
|
||||
|
||||
if("ghost_anonsay")
|
||||
ghost_anonsay = !ghost_anonsay
|
||||
|
||||
if("save")
|
||||
save_preferences(user)
|
||||
save_character(user)
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
nanoui_fancy,
|
||||
show_ghostitem_attack,
|
||||
lastchangelog,
|
||||
exp,
|
||||
windowflashing
|
||||
windowflashing,
|
||||
ghost_anonsay,
|
||||
exp
|
||||
FROM [format_table_name("player")]
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
@@ -42,8 +43,9 @@
|
||||
nanoui_fancy = text2num(query.item[11])
|
||||
show_ghostitem_attack = text2num(query.item[12])
|
||||
lastchangelog = query.item[13]
|
||||
exp = query.item[14]
|
||||
windowflashing = text2num(query.item[15])
|
||||
windowflashing = text2num(query.item[14])
|
||||
ghost_anonsay = text2num(query.item[15])
|
||||
exp = query.item[16]
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
@@ -58,8 +60,9 @@
|
||||
nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy))
|
||||
show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
exp = sanitize_text(exp, initial(exp))
|
||||
windowflashing = sanitize_integer(windowflashing, 0, 1, initial(windowflashing))
|
||||
ghost_anonsay = sanitize_integer(ghost_anonsay, 0, 1, initial(ghost_anonsay))
|
||||
exp = sanitize_text(exp, initial(exp))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_preferences(client/C)
|
||||
@@ -85,7 +88,8 @@
|
||||
nanoui_fancy='[nanoui_fancy]',
|
||||
show_ghostitem_attack='[show_ghostitem_attack]',
|
||||
lastchangelog='[lastchangelog]',
|
||||
windowflashing='[windowflashing]'
|
||||
windowflashing='[windowflashing]',
|
||||
ghost_anonsay='[ghost_anonsay]'
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user