fixes a tgui input gc issue (#25160)

This commit is contained in:
GDN
2024-04-19 18:07:48 +00:00
committed by GitHub
parent 66bbc90b12
commit a31b7d4db2
5 changed files with 17 additions and 6 deletions
+1 -2
View File
@@ -282,8 +282,7 @@
return
amount = clamp(round(num_input), 1, MULTIPLE_CRATE_MAX)
var/timeout = world.time + (60 SECONDS) // If you dont type the reason within a minute, theres bigger problems here
var/reason = tgui_input_text(user, "Reason", "Why do you require this item?", encode = FALSE, timeout = timeout)
var/reason = tgui_input_text(user, "Reason", "Why do you require this item?", encode = FALSE, timeout = 60 SECONDS)
if(!reason || (!is_public && !is_authorized(user)) || ..())
return
reason = sanitize(copytext_char(reason, 1, 75)) // very long reasons are bad