From a17ad68508b99cfca766078f0488d0f0abcd233e Mon Sep 17 00:00:00 2001 From: Lucy Date: Thu, 28 Nov 2024 22:28:46 -0500 Subject: [PATCH] Fix double-encode in AI shuttle call reasons (#88245) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## About The Pull Request This fixes double html encoding with AI shuttle calls, due to `tgui_input_text` being called without setting `encode = FALSE` - `SSshuttle.requestEvac` expects unencoded text. I added documentation to `SSshuttle.requestEvac`, including clarifying that it expects non-html-encoded text. ## Why It's Good For The Game &​#​39;​ is annoying ## Changelog :cl: fix: Fixed double-encoded messages with AI shuttle call reasons. /:cl: --- code/controllers/subsystem/shuttle.dm | 7 +++++++ code/modules/mob/living/silicon/ai/ai.dm | 1 + 2 files changed, 8 insertions(+) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 0ad0a785892..4f573ee2f22 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -356,6 +356,13 @@ SUBSYSTEM_DEF(shuttle) return TRUE +/** + * Calls the emergency shuttle. + * + * Arguments: + * * user - The mob that called the shuttle. + * * call_reason - The reason the shuttle was called, which should be non-html-encoded text. + */ /datum/controller/subsystem/shuttle/proc/requestEvac(mob/user, call_reason) if (!check_backup_emergency_shuttle()) return diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 46cfb5980a2..e2a898b3526 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -350,6 +350,7 @@ "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call", max_length = MAX_MESSAGE_LEN, + encode = FALSE, ) if(incapacitated)