Added more options

This commit is contained in:
joep van der velden
2019-12-23 17:38:18 +01:00
parent d54c3c19dd
commit 81476df826
9 changed files with 49 additions and 34 deletions
+17 -3
View File
@@ -93,7 +93,8 @@ 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
var/AFK_WATCH_warn_minutes = 0 // Number of minutes after which the player gets warned
var/AFK_WATCH_cryo_minutes = 0 // Number of minutes after (after the warning) which the player gets cryod
//ghostly preferences
var/ghost_anonsay = 0
@@ -442,7 +443,8 @@ 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>AFK Cryoing:</b> <a href='?_src_=prefs;preference=afk_watch'>[(AFK_WATCH_warn_minutes) ? "On ([AFK_WATCH_warn_minutes], [AFK_WATCH_cryo_minutes])" : "Off"]</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)
@@ -2000,7 +2002,19 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
windowflashing = !windowflashing
if("afk_watch")
afk_watch = !afk_watch
var/afk_new = input(user, "Select a new amount of minutes after which you get warned for being AFK, between 0 and 10 (0 will deactivate)", UI_style_alpha) as num
if(afk_new == 0)
// deactivate the system
AFK_WATCH_warn_minutes = 0
AFK_WATCH_cryo_minutes = 0
else
if(!afk_new | !(afk_new <= 10 && afk_new >= 1)) return
AFK_WATCH_warn_minutes = afk_new
afk_new = input(user, "Select a new amount of minutes after which you get cryod for being AFK, between 1 and 5", UI_style_alpha) as num
if(!afk_new | !(afk_new <= 5 && afk_new >= 1))
AFK_WATCH_cryo_minutes = AFK_WATCH_cryo_minutes ? AFK_WATCH_cryo_minutes : 2 // Return to prior value or default to 2
else
AFK_WATCH_cryo_minutes = afk_new
if("UIcolor")
var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!", UI_style_color) as color|null
@@ -20,7 +20,8 @@
clientfps,
atklog,
fuid,
afk_watch,
AFK_WATCH_warn_minutes,
AFK_WATCH_cryo_minutes,
parallax
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
@@ -54,8 +55,9 @@
clientfps = text2num(query.item[17])
atklog = text2num(query.item[18])
fuid = text2num(query.item[19])
afk_watch = text2num(query.item[20])
parallax = text2num(query.item[21])
AFK_WATCH_warn_minutes = text2num(query.item[20])
AFK_WATCH_cryo_minutes = text2num(query.item[21])
parallax = text2num(query.item[22])
//Sanitize
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
@@ -76,7 +78,8 @@
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))
AFK_WATCH_warn_minutes = sanitize_integer(AFK_WATCH_warn_minutes, 0, 10, initial(AFK_WATCH_warn_minutes))
AFK_WATCH_cryo_minutes = sanitize_integer(AFK_WATCH_cryo_minutes, 0, 5, initial(AFK_WATCH_cryo_minutes))
parallax = sanitize_integer(parallax, 0, 16, initial(parallax))
return 1
@@ -108,7 +111,8 @@
ghost_anonsay='[ghost_anonsay]',
clientfps='[clientfps]',
atklog='[atklog]',
afk_watch='[afk_watch]',
AFK_WATCH_warn_minutes='[AFK_WATCH_warn_minutes]',
AFK_WATCH_cryo_minutes='[AFK_WATCH_cryo_minutes]',
parallax='[parallax]'
WHERE ckey='[C.ckey]'"}
)