adds var/client/parent to /datum/preferences

allows users to change client fps with a preference
This commit is contained in:
uraniummeltdown
2018-01-24 20:44:10 +05:00
parent bf89cffbb3
commit 5b53582f0e
5 changed files with 19 additions and 4 deletions

View File

@@ -16,7 +16,8 @@
lastchangelog,
windowflashing,
ghost_anonsay,
exp
exp,
clientfps
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
)
@@ -46,6 +47,7 @@
windowflashing = text2num(query.item[14])
ghost_anonsay = text2num(query.item[15])
exp = query.item[16]
clientfps = query.item[17]
//Sanitize
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
@@ -63,6 +65,7 @@
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))
clientfps = sanitize_integer(clientfps, 0, 1000, initial(clientfps))
return 1
/datum/preferences/proc/save_preferences(client/C)
@@ -89,7 +92,8 @@
show_ghostitem_attack='[show_ghostitem_attack]',
lastchangelog='[lastchangelog]',
windowflashing='[windowflashing]',
ghost_anonsay='[ghost_anonsay]'
ghost_anonsay='[ghost_anonsay]',
clientfps='[clientfps]'
WHERE ckey='[C.ckey]'"}
)