From b316c880bfaad998e0286580aca873a5dd30c908 Mon Sep 17 00:00:00 2001 From: Regen Date: Sun, 24 Apr 2022 19:42:50 +0200 Subject: [PATCH] Removes ability to change flavor text while you are unconscious. (#17656) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removes ability to change flavor text while you are unconscious. Fixes #17651 Also cleans up the (previously useless) check to see if the user of the verb is changing the flavor text of its own source Shoutout to my bois in coderchat for the help 🆑 Regens fix: You can no longer change flavor text while you are unconscious or dead /🆑 * Apply suggestions from code review Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> --- code/modules/mob/mob.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index cae11b583df..c30604dbb36 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -727,10 +727,18 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ /mob/proc/update_flavor_text() set src in usr if(usr != src) - to_chat(usr, "No.") + to_chat(usr, "You can't change the flavor text of this mob") + return + if(stat) + to_chat(usr, "You have to be conscious to change your flavor text") + return + var/msg = input(usr,"Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance.","Flavor Text",html_decode(flavor_text)) as message|null if(msg != null) + if(stat) + to_chat(usr, "You have to be conscious to change your flavor text") + return msg = copytext(msg, 1, MAX_MESSAGE_LEN) msg = html_encode(msg)