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 02:07:25 +00:00
committed by GitHub
co-authored by Burzah
parent 4add53d6c1
commit 2e4089dc15
28 changed files with 368 additions and 209 deletions
+27 -13
View File
@@ -90,7 +90,8 @@
user.visible_message(
"[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool].",
"You start patching the damaged vein in [target]'s [affected.name] with \the [tool]."
"You start patching the damaged vein in [target]'s [affected.name] with \the [tool].",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.custom_pain("The pain in your [affected.name] is unbearable!")
return ..()
@@ -100,7 +101,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"<span class='notice'> [user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].</span>",
"<span class='notice'> You have patched the damaged vein in [target]'s [affected.name] with \the [tool].</span>"
"<span class='notice'> You have patched the damaged vein in [target]'s [affected.name] with \the [tool].</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.fix_internal_bleeding()
@@ -114,7 +116,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"<span class='warning'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>",
"<span class='warning'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>"
"<span class='warning'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.receive_damage(5, 0)
@@ -139,7 +142,8 @@
user.visible_message(
"[user] starts to treat the scorched tissue in [target]'s [affected.name] with [tool].",
"You start to treat the scorched tissue in [target]'s [affected.name] with [tool]."
"You start to treat the scorched tissue in [target]'s [affected.name] with [tool].",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.custom_pain("Your [affected.name] flares with agony as its burn is touched!")
@@ -156,7 +160,8 @@
user.visible_message(
"<span class='notice'>[user] finishes treating affected tissue in [target]'s [affected.name].</span>",
"<span class='notice'>You finish treating affected tissue in [target]'s [affected.name] with [tool].</span>"
"<span class='notice'>You finish treating affected tissue in [target]'s [affected.name] with [tool].</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
return SURGERY_STEP_CONTINUE
@@ -169,7 +174,8 @@
user.visible_message(
"<span class='warning'>[user]'s hand slips, applying [tool] in the wrong place on [target]'s [affected.name]!</span>",
"<span class='warning'>Your hand slips, applying [tool] in the wrong place on [target]'s [affected.name]!</span>"
"<span class='warning'>Your hand slips, applying [tool] in the wrong place on [target]'s [affected.name]!</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
return SURGERY_STEP_RETRY
@@ -191,7 +197,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].",
"You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]."
"You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.custom_pain("The pain in [affected.name] is unbearable!")
return ..()
@@ -200,7 +207,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"<span class='notice'> [user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</span>",
"<span class='notice'> You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</span>"
"<span class='notice'> You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.open = ORGAN_ORGANIC_OPEN
@@ -210,7 +218,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"<span class='warning'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with [tool]!</span>",
"<span class='warning'>Your hand slips, slicing an artery inside [target]'s [affected.name] with [tool]!</span>"
"<span class='warning'>Your hand slips, slicing an artery inside [target]'s [affected.name] with [tool]!</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.receive_damage(20)
@@ -240,7 +249,9 @@
if(!container.reagents.has_reagent("mitocholide"))
user.visible_message(
"[user] looks at \the [tool] and ponders.",
"You are not sure if \the [tool] contains the mitocholide necessary to treat the necrosis.")
"You are not sure if \the [tool] contains the mitocholide necessary to treat the necrosis.",
chat_message_type = MESSAGE_TYPE_COMBAT
)
return FALSE
/datum/surgery_step/treat_necrosis/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -253,7 +264,8 @@
user.visible_message(
"[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].",
"You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]."
"You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].",
chat_message_type = MESSAGE_TYPE_COMBAT
)
affected.custom_pain("Something in your [affected.name] is causing you a lot of pain!")
return ..()
@@ -279,7 +291,8 @@
user.visible_message(
"<span class='notice'> [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]</span>",
"<span class='notice'> You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].</span>"
"<span class='notice'> You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
return SURGERY_STEP_CONTINUE
@@ -297,7 +310,8 @@
user.visible_message(
"<span class='warning'>[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</span>",
"<span class='warning'>Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</span>"
"<span class='warning'>Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</span>",
chat_message_type = MESSAGE_TYPE_COMBAT
)
//no damage or anything, just wastes medicine