Merge remote-tracking branch 'upstream/master' into resource_urls

This commit is contained in:
Couls
2019-08-04 21:13:42 -04:00
47 changed files with 274 additions and 42 deletions
@@ -93,6 +93,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/clientfps = 0
var/atklog = ATKLOG_ALL
var/fuid // forum userid
var/afk_watch = FALSE // If the player wants to be kept track of by the AFK system
//ghostly preferences
var/ghost_anonsay = 0
@@ -439,6 +440,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<h2>General Settings</h2>"
if(user.client.holder)
dat += "<b>Adminhelp sound:</b> <a href='?_src_=prefs;preference=hear_adminhelps'><b>[(sound & SOUND_ADMINHELP)?"On":"Off"]</b></a><br>"
dat += "<b>AFK Cryoing:</b> <a href='?_src_=prefs;preference=afk_watch'>[(afk_watch) ? "Yes" : "No"]</a><br>"
dat += "<b>Ambient Occlusion:</b> <a href='?_src_=prefs;preference=ambientocclusion'><b>[toggles & AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]</b></a><br>"
dat += "<b>Attack Animations:</b> <a href='?_src_=prefs;preference=ghost_att_anim'>[(show_ghostitem_attack) ? "Yes" : "No"]</a><br>"
if(unlock_content)
@@ -1977,6 +1979,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if("winflash")
windowflashing = !windowflashing
if("afk_watch")
afk_watch = !afk_watch
if("UIcolor")
var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!", UI_style_color) as color|null
if(!UI_style_color_new) return
@@ -19,7 +19,8 @@
exp,
clientfps,
atklog,
fuid
fuid,
afk_watch
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
)
@@ -52,6 +53,7 @@
clientfps = text2num(query.item[17])
atklog = text2num(query.item[18])
fuid = text2num(query.item[19])
afk_watch = text2num(query.item[20])
//Sanitize
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
@@ -72,6 +74,7 @@
clientfps = sanitize_integer(clientfps, 0, 1000, initial(clientfps))
atklog = sanitize_integer(atklog, 0, 100, initial(atklog))
fuid = sanitize_integer(fuid, 0, 10000000, initial(fuid))
afk_watch = sanitize_integer(afk_watch, 0, 1, initial(afk_watch))
return 1
/datum/preferences/proc/save_preferences(client/C)
@@ -90,7 +93,7 @@
UI_style_alpha='[UI_style_alpha]',
be_role='[sanitizeSQL(list2params(be_special))]',
default_slot='[default_slot]',
toggles='[num2text(toggles, 7)]',
toggles='[num2text(toggles, Ceiling(log(10, (TOGGLES_TOTAL))))]',
atklog='[atklog]',
sound='[sound]',
randomslot='[randomslot]',
@@ -101,7 +104,8 @@
windowflashing='[windowflashing]',
ghost_anonsay='[ghost_anonsay]',
clientfps='[clientfps]',
atklog='[atklog]'
atklog='[atklog]',
afk_watch='[afk_watch]'
WHERE ckey='[C.ckey]'"}
)