autocorrect toggle

This commit is contained in:
QuoteFox
2021-02-07 02:57:51 +00:00
parent 9e2480fc95
commit 3d761e4b5f
4 changed files with 12 additions and 1 deletions
+4
View File
@@ -46,6 +46,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/buttons_locked = FALSE
var/hotkeys = FALSE
var/chat_on_map = TRUE
var/autocorrect = TRUE
var/radiosounds = TRUE
var/max_chat_length = CHAT_MESSAGE_MAX_LENGTH
var/see_chat_non_mob = TRUE
@@ -921,6 +922,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Chat Bubbles message char limit:</b> <a href='?_src_=prefs;preference=max_chat_length;task=input'>[max_chat_length]</a><br>"
dat += "<b>Chat Bubbles for non-mobs:</b> <a href='?_src_=prefs;preference=see_chat_non_mob'>[see_chat_non_mob ? "Enabled" : "Disabled"]</a><br>"
dat += "<br>"
dat += "<b>Autocorrect:</b> <a href='?_src_=prefs;preference=autocorrect'>[(autocorrect) ? "On" : "Off"]</a><br>"
dat += "<b>Radio Sounds:</b> <a href='?_src_=prefs;preference=radiosounds'>[radiosounds ? "Enabled" : "Disabled"]</a><br>"
dat += "<br>"
dat += "<b>Action Buttons:</b> <a href='?_src_=prefs;preference=action_buttons'>[(buttons_locked) ? "Locked In Place" : "Unlocked"]</a><br>"
@@ -2480,6 +2482,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
buttons_locked = !buttons_locked
if("chat_on_map")
chat_on_map = !chat_on_map
if("autocorrect")
autocorrect = !autocorrect
if("radiosounds")
radiosounds = !radiosounds
if("see_chat_non_mob")
@@ -108,6 +108,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["uses_glasses_colour"]>> uses_glasses_colour
S["clientfps"] >> clientfps
S["chat_on_map"] >> chat_on_map
S["autocorrect"] >> autocorrect
S["radiosounds"] >> radiosounds
S["max_chat_length"] >> max_chat_length
S["see_chat_non_mob"] >> see_chat_non_mob
@@ -146,6 +147,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
UI_style = sanitize_inlist(UI_style, GLOB.available_ui_styles, GLOB.available_ui_styles[1])
hotkeys = sanitize_integer(hotkeys, 0, 1, initial(hotkeys))
autocorrect = sanitize_integer(autocorrect, 0, 1, initial(autocorrect))
chat_on_map = sanitize_integer(chat_on_map, 0, 1, initial(chat_on_map))
radiosounds = sanitize_integer(radiosounds, 0, 1, initial(radiosounds))
max_chat_length = sanitize_integer(max_chat_length, 1, CHAT_MESSAGE_MAX_LENGTH, initial(max_chat_length))