diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 8da8bab272..fef1bcd25d 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -68,7 +68,7 @@ names += componentsubtypes names += "---Elements---" names += sortTim(subtypesof(/datum/element), /proc/cmp_typepaths_asc) - var/result = tgui_input_text(usr, "Choose a component/element to add:", "Add Component/Element", names) + var/result = tgui_input_list(usr, "Choose a component/element to add:", "Add Component/Element", names) if(!usr || !result || result == "---Components---" || result == "---Elements---") return if(QDELETED(src)) diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm index a2550c6afe..de4032f966 100644 --- a/code/modules/admin/verbs/custom_event.dm +++ b/code/modules/admin/verbs/custom_event.dm @@ -7,7 +7,7 @@ to_chat(src, "Only administrators may use this command.") return - var/input = sanitize(tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE), MAX_PAPER_MESSAGE_LEN, extra = 0) + var/input = sanitize(tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE), MAX_PAPER_MESSAGE_LEN, extra = 0) if(!input || input == "") custom_event_msg = null log_admin("[usr.key] has cleared the custom event text.") diff --git a/code/modules/client/preference_setup/antagonism/01_basic.dm b/code/modules/client/preference_setup/antagonism/01_basic.dm index feeff7172d..56f05795a3 100644 --- a/code/modules/client/preference_setup/antagonism/01_basic.dm +++ b/code/modules/client/preference_setup/antagonism/01_basic.dm @@ -44,11 +44,11 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None") return TOPIC_REFRESH if(href_list["exploitable_record"]) - var/exploitmsg = sanitize(tgui_input_text(user,"Set exploitable information about you here.","Exploitable Information", html_decode(pref.exploit_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0) + var/exploitmsg = sanitize(tgui_input_text(user,"Set exploitable information about you here.","Exploitable Information", html_decode(pref.exploit_record), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH, extra = 0) if(!isnull(exploitmsg) && !jobban_isbanned(user, "Records") && CanUseTopic(user)) pref.exploit_record = exploitmsg return TOPIC_REFRESH - + if(href_list["antagfaction"]) var/choice = tgui_input_list(user, "Please choose an antagonistic faction to work for.", "Character Preference", antag_faction_choices + list("None","Other"), pref.antag_faction) if(!choice || !CanUseTopic(user)) @@ -60,7 +60,7 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None") else pref.antag_faction = choice return TOPIC_REFRESH - + if(href_list["antagvis"]) var/choice = tgui_input_list(user, "Please choose an antagonistic visibility level.", "Character Preference", antag_visiblity_choices, pref.antag_vis) if(!choice || !CanUseTopic(user)) diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm index af884bf2d3..d63ae107cd 100644 --- a/code/modules/instruments/songs/editor.dm +++ b/code/modules/instruments/songs/editor.dm @@ -130,7 +130,7 @@ else if(href_list["import"]) var/t = "" do - t = html_encode(tgui_input_text(usr, "Please paste the entire song, formatted:", text("[]", name), t, multiline = TRUE)) + t = html_encode(tgui_input_text(usr, "Please paste the entire song, formatted:", text("[]", name), t, multiline = TRUE, prevent_enter = TRUE)) if(!in_range(parent, usr)) return diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm index 4dc8c04caa..706031ce78 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm @@ -30,7 +30,7 @@ set desc = "Set your description." set category = "Abilities" var/newdesc - newdesc = sanitizeSafe(tgui_input_text(src,"Set your description. Max 4096 chars.", "Description set",""), MAX_MESSAGE_LEN) + newdesc = sanitizeSafe(tgui_input_text(src,"Set your description. Max 4096 chars.", "Description set","", prevent_enter = TRUE), MAX_MESSAGE_LEN) if(newdesc) desc = newdesc diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 17fd005f9a..eca92bcc2d 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -63,7 +63,7 @@ var/oldtext = html_decode(F.stored_data) oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) if(!newtext) return @@ -151,7 +151,7 @@ data["error"] = error if(!computer || !HDD) data["error"] = "I/O ERROR: Unable to access hard drive." - + data["filedata"] = null data["filename"] = null data["files"] = list() diff --git a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm index 1acc0e7157..bb8020e9d9 100644 --- a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm +++ b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm @@ -166,7 +166,7 @@ var/oldtext = html_decode(loaded_data) oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) if(!newtext) return loaded_data = newtext @@ -229,4 +229,4 @@ data["filedata"] = pencode2html(loaded_data) data["filename"] = "UNNAMED" - return data \ No newline at end of file + return data diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 21b1c20aec..d92e646660 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -128,7 +128,7 @@ var/new_flavor = tgui_input_text(nif.human, "Type what the prey sees after being 'caught'. This will be \ printed after an intro ending with: \"Around you, you see...\" to the prey. If you already \ have prey, this will be printed to them after \"Your surroundings change to...\". Limit 2048 char.", \ - "VR Environment", html_decode(inside_flavor), MAX_MESSAGE_LEN*2, TRUE) + "VR Environment", html_decode(inside_flavor), MAX_MESSAGE_LEN*2, TRUE, prevent_enter = TRUE) new_flavor = sanitize(new_flavor, MAX_MESSAGE_LEN*2) inside_flavor = new_flavor nif.notify("Updating VR environment...") @@ -503,7 +503,7 @@ set name = "NMe" set desc = "Emote into your NIF's Soulcatcher." set category = "IC" - + src.nme_act(message) /mob/proc/nme_act(message as text|null) diff --git a/code/modules/tgui/modules/admin/player_notes.dm b/code/modules/tgui/modules/admin/player_notes.dm index ce4f123bc4..678758d7d3 100644 --- a/code/modules/tgui/modules/admin/player_notes.dm +++ b/code/modules/tgui/modules/admin/player_notes.dm @@ -191,7 +191,7 @@ if (!istype(src,/datum/admins)) to_chat(usr, "Error: you are not an admin!") return - var/filter = tgui_input_text(usr, "Filter string (case-insensitive regex)", "Player notes filter") + var/filter = input(usr, "Filter string (case-insensitive regex)", "Player notes filter") PlayerNotesPageLegacy(1, filter) /datum/admins/proc/PlayerNotesPageLegacy(page, filter) @@ -298,7 +298,7 @@ if(href_list["add_player_info_legacy"]) var/key = href_list["add_player_info_legacy"] - var/add = sanitize(tgui_input_text(usr, "Add Player Info (Legacy)")) + var/add = sanitize(input(usr, "Add Player Info (Legacy)")) if(!add) return notes_add(key,add,usr) diff --git a/code/modules/tgui/modules/ntos-only/email.dm b/code/modules/tgui/modules/ntos-only/email.dm index af10b738ef..45317a9aee 100644 --- a/code/modules/tgui/modules/ntos-only/email.dm +++ b/code/modules/tgui/modules/ntos-only/email.dm @@ -231,10 +231,10 @@ /datum/tgui_module/email_client/tgui_act(action, params) if(..()) return TRUE - + var/mob/living/user = usr check_for_new_messages(1) // Any actual interaction (button pressing) is considered as acknowledging received message, for the purpose of notification icons. - + switch(action) if("login") log_in() @@ -279,7 +279,7 @@ var/oldtext = html_decode(msg_body) oldtext = replacetext(oldtext, "\[editorbr\]", "\n") - var/newtext = sanitize(replacetext(tgui_input_text(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext, 20000, TRUE), "\n", "\[editorbr\]"), 20000) + var/newtext = sanitize(replacetext(tgui_input_text(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext, 20000, TRUE, prevent_enter = TRUE), "\n", "\[editorbr\]"), 20000) if(newtext) msg_body = newtext return 1 @@ -473,4 +473,4 @@ if("remove_attachment") msg_attachment = null - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 759fe3046f..6e6db992c8 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -140,13 +140,19 @@ var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or 1% to 600% in dormitories). (DO NOT ABUSE)" var/default = size_multiplier * 100 - var/new_size = tgui_input_number(usr, nagmessage, "Pick a Size", default) + var/new_size = tgui_input_number(usr, nagmessage, "Pick a Size", default, 600, 1) if(size_range_check(new_size)) resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE) +<<<<<<< HEAD if(temporary_form) //CHOMPEdit - resizing both our forms var/mob/living/L = temporary_form L.resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE) //CHOMPEDIT - I don't need to be informed every time a prommie changes sizes +======= + // I'm not entirely convinced that `src ? ADMIN_JMP(src) : "null"` here does anything + // but just in case it does, I'm leaving the null-src checking + log_admin("[key_name(src)] used the resize command in-game to be [new_size]% size. [src ? ADMIN_JMP(src) : "null"]") +>>>>>>> c94decbc74... Merge pull request #13194 from ItsSelis/tgui-inputfix /* //Add the set_size() proc to usable verbs. By commenting this out, we can leave the proc and hand it to species that need it.