mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
attempt to add pref option
This commit is contained in:
@@ -93,6 +93,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/show_ghostitem_attack = TRUE
|
||||
var/UI_style_color = "#ffffff"
|
||||
var/UI_style_alpha = 255
|
||||
var/windowflashing = TRUE
|
||||
|
||||
|
||||
//character preferences
|
||||
@@ -418,6 +419,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<h2>General Settings</h2>"
|
||||
dat += "<b>Fancy NanoUI:</b> <a href='?_src_=prefs;preference=nanoui'>[(nanoui_fancy) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Ghost-Item Attack Animation:</b> <a href='?_src_=prefs;preference=ghost_att_anim'>[(show_ghostitem_attack) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Window Flashing:</b> <a href='?_src_=prefs;preference=winflash'>[(windowflashing) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Custom UI settings:</b><br>"
|
||||
dat += " - <b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
|
||||
dat += " - <b>Color:</b> <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <table style='display:inline;' bgcolor='[UI_style_color]'<tr><td>__</td></tr></table><br>"
|
||||
@@ -1935,6 +1937,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("ghost_att_anim")
|
||||
show_ghostitem_attack = !show_ghostitem_attack
|
||||
|
||||
if("winflash")
|
||||
windowflashing = !windowflashing
|
||||
|
||||
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
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
nanoui_fancy,
|
||||
show_ghostitem_attack,
|
||||
lastchangelog,
|
||||
exp
|
||||
exp,
|
||||
windowflashing
|
||||
FROM [format_table_name("player")]
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
@@ -42,6 +43,7 @@
|
||||
show_ghostitem_attack = text2num(query.item[12])
|
||||
lastchangelog = query.item[13]
|
||||
exp = query.item[14]
|
||||
windowflashing = text2num(query.item[15])
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
@@ -57,6 +59,7 @@
|
||||
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))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_preferences(client/C)
|
||||
|
||||
Reference in New Issue
Block a user