mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-21 04:07:52 +01:00
[MIRROR] Time: Stamped (#7001)
Co-authored-by: Casey <a.roaming.shadow@gmail.com> Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
co-authored by
Casey
Raeschen
parent
86fed82d17
commit
fee6e944d3
@@ -16,6 +16,7 @@
|
||||
S["tgui_input_mode"] >> pref.tgui_input_mode
|
||||
S["tgui_large_buttons"] >> pref.tgui_large_buttons
|
||||
S["tgui_swapped_buttons"] >> pref.tgui_swapped_buttons
|
||||
S["chat_timestamp"] >> pref.chat_timestamp
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ui/save_preferences(var/savefile/S)
|
||||
S["UI_style"] << pref.UI_style
|
||||
@@ -31,6 +32,7 @@
|
||||
S["tgui_input_mode"] << pref.tgui_input_mode
|
||||
S["tgui_large_buttons"] << pref.tgui_large_buttons
|
||||
S["tgui_swapped_buttons"] << pref.tgui_swapped_buttons
|
||||
S["chat_timestamp"] << pref.chat_timestamp
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ui/sanitize_preferences()
|
||||
pref.UI_style = sanitize_inlist(pref.UI_style, all_ui_styles, initial(pref.UI_style))
|
||||
@@ -46,6 +48,7 @@
|
||||
pref.tgui_input_mode = sanitize_integer(pref.tgui_input_mode, 0, 1, initial(pref.tgui_input_mode))
|
||||
pref.tgui_large_buttons = sanitize_integer(pref.tgui_large_buttons, 0, 1, initial(pref.tgui_large_buttons))
|
||||
pref.tgui_swapped_buttons = sanitize_integer(pref.tgui_swapped_buttons, 0, 1, initial(pref.tgui_swapped_buttons))
|
||||
pref.chat_timestamp = sanitize_integer(pref.chat_timestamp, 0, 1, initial(pref.chat_timestamp))
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ui/content(var/mob/user)
|
||||
. = "<b>UI Style:</b> <a href='?src=\ref[src];select_style=1'><b>[pref.UI_style]</b></a><br>"
|
||||
@@ -61,6 +64,7 @@
|
||||
. += "<b>TGUI Input Framework:</b> <a href='?src=\ref[src];tgui_input_mode=1'><b>[(pref.tgui_input_mode) ? "Enabled" : "Disabled (default)"]</b></a><br>"
|
||||
. += "<b>TGUI Large Buttons:</b> <a href='?src=\ref[src];tgui_large_buttons=1'><b>[(pref.tgui_large_buttons) ? "Enabled (default)" : "Disabled"]</b></a><br>"
|
||||
. += "<b>TGUI Swapped Buttons:</b> <a href='?src=\ref[src];tgui_swapped_buttons=1'><b>[(pref.tgui_swapped_buttons) ? "Enabled" : "Disabled (default)"]</b></a><br>"
|
||||
. += "<b>Chat Timestamps:</b> <a href='?src=\ref[src];chat_timestamps=1'><b>[(pref.chat_timestamp) ? "Enabled" : "Disabled (default)"]</b></a><br>"
|
||||
if(can_select_ooc_color(user))
|
||||
. += "<b>OOC Color:</b>"
|
||||
if(pref.ooccolor == initial(pref.ooccolor))
|
||||
@@ -142,6 +146,10 @@
|
||||
pref.tgui_swapped_buttons = !pref.tgui_swapped_buttons
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["chat_timestamps"])
|
||||
pref.chat_timestamp = !pref.chat_timestamp
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset"])
|
||||
switch(href_list["reset"])
|
||||
if("ui")
|
||||
|
||||
@@ -31,6 +31,7 @@ var/list/preferences_datums = list()
|
||||
var/tgui_input_mode = FALSE // All the Input Boxes (Text,Number,List,Alert)
|
||||
var/tgui_large_buttons = TRUE
|
||||
var/tgui_swapped_buttons = FALSE
|
||||
var/chat_timestamp = FALSE
|
||||
|
||||
//character preferences
|
||||
var/real_name //our character's name
|
||||
|
||||
@@ -379,6 +379,16 @@
|
||||
You will have to reload VChat and/or reconnect to the server for these changes to take place. \
|
||||
VChat message persistence is not guaranteed if you change this again before the start of the next round.")
|
||||
|
||||
/client/verb/toggle_chat_timestamps()
|
||||
set name = "Toggle Chat Timestamps"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles whether or not messages in chat will display timestamps. Enabling this will not add timestamps to messages that have already been sent."
|
||||
|
||||
prefs.chat_timestamp = !prefs.chat_timestamp //There is no preference datum for tgui input lock, nor for any TGUI prefs.
|
||||
SScharacter_setup.queue_preferences_save(prefs)
|
||||
|
||||
to_chat(src, span_notice("You have toggled chat timestamps: [prefs.chat_timestamp ? "ON" : "OFF"]."))
|
||||
|
||||
/client/verb/toggle_status_indicators()
|
||||
set name = "Toggle Status Indicators"
|
||||
set category = "Preferences"
|
||||
|
||||
Reference in New Issue
Block a user