diff --git a/code/__DEFINES/preferences_defines.dm b/code/__DEFINES/preferences_defines.dm index 6da88d17509..8272092d330 100644 --- a/code/__DEFINES/preferences_defines.dm +++ b/code/__DEFINES/preferences_defines.dm @@ -63,8 +63,9 @@ #define PREFTOGGLE_2_DANCE_DISCO (1<<16) // 65536 #define PREFTOGGLE_2_MOD_ACTIVATION_METHOD (1<<17) // 131072 #define PREFTOGGLE_2_PARALLAX_IN_DARKNESS (1<<18) // 262144 +#define PREFTOGGLE_2_DISABLE_TGUI_LISTS (1<<19) // 524288 -#define TOGGLES_2_TOTAL 524287 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. +#define TOGGLES_2_TOTAL 1048575 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. #define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO|PREFTOGGLE_2_MOD_ACTIVATION_METHOD) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index 29463a75ca1..d903e57d20a 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -941,6 +941,9 @@ if("tgui") toggles2 ^= PREFTOGGLE_2_FANCYUI + if("input_lists") + toggles2 ^= PREFTOGGLE_2_DISABLE_TGUI_LISTS + if("ghost_att_anim") toggles2 ^= PREFTOGGLE_2_ITEMATTACK diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index ad5bc0753ca..ee6866635bf 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -408,6 +408,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(user.client.donator_level > 0) dat += "Donator Publicity: [(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]
" dat += "Fancy TGUI: [(toggles2 & PREFTOGGLE_2_FANCYUI) ? "Yes" : "No"]
" + dat += "Input Lists: [(toggles2 & PREFTOGGLE_2_DISABLE_TGUI_LISTS) ? "Default" : "TGUI"]
" dat += "FPS: [clientfps]
" dat += "Ghost Ears: [(toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" dat += "Ghost Radio: [(toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
" diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 688b5e7becb..c252a2d8d1f 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -226,6 +226,14 @@ to_chat(src, "You will no longer hear musical instruments.") SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Instruments") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/verb/toggle_input() + set name = "Toggle TGUI Input Lists" + set category = "Preferences" + set desc = "Switches input lists between the TGUI and the standard one" + prefs.toggles2 ^= PREFTOGGLE_2_DISABLE_TGUI_LISTS + prefs.save_preferences(src) + to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_DISABLE_TGUI_LISTS) ? "no longer" : "now"] use TGUI Input Lists.") + /client/verb/Toggle_disco() //to toggle off the disco machine locally, in case it gets too annoying set name = "Hear/Silence Dance Machine" set category = "Preferences" diff --git a/code/modules/tgui/modules/tgui_input_list.dm b/code/modules/tgui/modules/tgui_input_list.dm index f9ede158930..b9b34fffc9b 100644 --- a/code/modules/tgui/modules/tgui_input_list.dm +++ b/code/modules/tgui/modules/tgui_input_list.dm @@ -19,6 +19,11 @@ return var/client/client = user user = client.mob + + /// Client does NOT have tgui_input on: Returns regular input + if(user.client?.prefs?.toggles2 & PREFTOGGLE_2_DISABLE_TGUI_LISTS) + return input(user, message, title) as null|anything in buttons + var/datum/tgui_list_input/input = new(user, message, title, buttons, timeout) input.ui_interact(user) input.wait()