Various TG Chat message sorting fixes (#25229)

* Fixes unsorted emotes, announcements, votes, surgery, prayers, ahelp responses

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
S34N
2024-04-29 03:07:25 +01:00
committed by GitHub
parent 4add53d6c1
commit 2e4089dc15
28 changed files with 368 additions and 209 deletions
+17 -4
View File
@@ -16,7 +16,11 @@
time = 6.4 SECONDS
/datum/surgery_step/reshape_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to alter [target]'s appearance.", "<span class='notice'>You begin to alter [target]'s appearance...</span>")
user.visible_message(
"[user] begins to alter [target]'s appearance.",
"<span class='notice'>You begin to alter [target]'s appearance...</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
return ..()
/datum/surgery_step/reshape_face/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -24,7 +28,11 @@
var/species_names = target.dna.species.name
if(head.status & ORGAN_DISFIGURED)
head.status &= ~ORGAN_DISFIGURED
user.visible_message("[user] successfully restores [target]'s appearance!", "<span class='notice'>You successfully restore [target]'s appearance.</span>")
user.visible_message(
"[user] successfully restores [target]'s appearance!",
"<span class='notice'>You successfully restore [target]'s appearance.</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
else
var/list/names = list()
var/list_size = 10
@@ -74,7 +82,11 @@
var/oldname = target.real_name
target.real_name = chosen_name
var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name
user.visible_message("[user] alters [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname]!", "<span class='notice'>You alter [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname].</span>")
user.visible_message(
"[user] alters [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname]!",
"<span class='notice'>You alter [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname].</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
target.sec_hud_set_ID()
return SURGERY_STEP_CONTINUE
@@ -83,7 +95,8 @@
var/obj/item/organ/external/head/head = target.get_organ(target_zone)
user.visible_message(
"<span class='warning'> [user]'s hand slips, tearing skin on [target]'s face with [tool]!</span>",
"<span class='warning'> Your hand slips, tearing skin on [target]'s face with [tool]!</span>"
"<span class='warning'> Your hand slips, tearing skin on [target]'s face with [tool]!</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
target.apply_damage(10, BRUTE, head, sharp = TRUE)
return SURGERY_STEP_RETRY