tgui usr to ui.user

This commit is contained in:
Kashargul
2024-11-13 00:49:17 +01:00
parent 49d89c0059
commit 32c9f971bc
120 changed files with 1037 additions and 1061 deletions
+3 -3
View File
@@ -130,7 +130,7 @@
data["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1)
return data
/datum/tgui_input_text/tgui_act(action, list/params)
/datum/tgui_input_text/tgui_act(action, list/params, datum/tgui/ui)
. = ..()
if (.)
return
@@ -138,9 +138,9 @@
if("submit")
if(max_length)
if(length(params["entry"]) > max_length)
CRASH("[usr] typed a text string longer than the max length")
CRASH("[ui.user] typed a text string longer than the max length")
if(encode && (length(html_encode(params["entry"])) > max_length))
to_chat(usr, span_notice("Your message was clipped due to special character usage."))
to_chat(ui.user, span_notice("Your message was clipped due to special character usage."))
set_entry(params["entry"])
closed = TRUE
SStgui.close_uis(src)