Removes ability to change flavor text while you are unconscious. (#17656)

* 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>
This commit is contained in:
Regen
2022-04-24 18:42:50 +01:00
committed by GitHub
co-authored by AffectedArc07
parent 5e7ec8ea7f
commit b316c880bf
+9 -1
View File
@@ -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, "<span class='notice'>You can't change the flavor text of this mob</span>")
return
if(stat)
to_chat(usr, "<span class='notice'>You have to be conscious to change your flavor text</span>")
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, "<span class='notice'>You have to be conscious to change your flavor text</span>")
return
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = html_encode(msg)