refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+51 -51
View File
@@ -47,15 +47,15 @@
/datum/surgery_step/generic/cut_open/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='filter_notice'>[user] starts the incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='filter_notice'>You start the incision on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] starts the incision on [target]'s [affected.name] with \the [tool]."), \
span_filter_notice("You start the incision on [target]'s [affected.name] with \the [tool]."))
target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!", 40)
..()
/datum/surgery_step/generic/cut_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] has made an incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have made an incision on [target]'s [affected.name] with \the [tool].</span>",)
user.visible_message(span_notice("[user] has made an incision on [target]'s [affected.name] with \the [tool]."), \
span_notice("You have made an incision on [target]'s [affected.name] with \the [tool]."),)
affected.open = 1
if(istype(target) && target.should_have_organ(O_HEART))
@@ -65,8 +65,8 @@
/datum/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='danger'>[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</span>")
user.visible_message(span_danger("[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!"), \
span_danger("Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!"))
affected.createwound(CUT, 10)
///////////////////////////////////////////////////////////////
@@ -94,8 +94,8 @@
/datum/surgery_step/generic/cut_with_laser/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='filter_notice'>[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='filter_notice'>You start the bloodless incision on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool]."), \
span_filter_notice("You start the bloodless incision on [target]'s [affected.name] with \the [tool]."))
target.custom_pain("You feel a horrible, searing pain in your [affected.name]!", 50)
..()
@@ -113,19 +113,19 @@
clamp_chance = 95
if(clamp_chance)
affected.organ_clamp()
user.visible_message("<span class='notice'>[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have made a bloodless incision on [target]'s [affected.name] with \the [tool].</span>",)
user.visible_message(span_notice("[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool]."), \
span_notice("You have made a bloodless incision on [target]'s [affected.name] with \the [tool]."),)
else
user.visible_message("<span class='notice'>[user] has made an incision on [target]'s [affected.name] with \the [tool], but blood is still escaping from the wound.</span>", \
"<span class='notice'>You have made an incision on [target]'s [affected.name] with \the [tool], but blood is still coming from the wound..</span>",)
user.visible_message(span_notice("[user] has made an incision on [target]'s [affected.name] with \the [tool], but blood is still escaping from the wound."), \
span_notice("You have made an incision on [target]'s [affected.name] with \the [tool], but blood is still coming from the wound.."),)
//Could be cleaner ...
spread_germs_to_organ(affected, user)
/datum/surgery_step/generic/cut_with_laser/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='danger'>[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</span>")
user.visible_message(span_danger("[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!"))
affected.createwound(CUT, 7.5)
affected.createwound(BURN, 12.5)
@@ -152,15 +152,15 @@
/datum/surgery_step/generic/incision_manager/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='filter_notice'>[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].</span>", \
"<span class='filter_notice'>You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool]."), \
span_filter_notice("You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool]."))
target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!", 50)
..()
/datum/surgery_step/generic/incision_manager/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</span>",)
user.visible_message(span_notice("[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool]."), \
span_notice("You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool]."),)
affected.open = 1
if(istype(target) && target.should_have_organ(O_HEART))
@@ -172,8 +172,8 @@
/datum/surgery_step/generic/incision_manager/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='danger'>[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</span>")
user.visible_message(span_danger("[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!"))
affected.createwound(CUT, 20)
affected.createwound(BURN, 15)
@@ -199,22 +199,22 @@
/datum/surgery_step/generic/clamp_bleeders/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='filter_notice'>[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].</span>", \
"<span class='filter_notice'>You start clamping bleeders in [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool]."), \
span_filter_notice("You start clamping bleeders in [target]'s [affected.name] with \the [tool]."))
target.custom_pain("The pain in your [affected.name] is maddening!", 40)
..()
/datum/surgery_step/generic/clamp_bleeders/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_notice("[user] clamps bleeders in [target]'s [affected.name] with \the [tool]."), \
span_notice("You clamp bleeders in [target]'s [affected.name] with \the [tool]."))
affected.organ_clamp()
spread_germs_to_organ(affected, user)
/datum/surgery_step/generic/clamp_bleeders/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='danger'>[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</span>",)
user.visible_message(span_danger("[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!"),)
affected.createwound(CUT, 10)
///////////////////////////////////////////////////////////////
@@ -248,33 +248,33 @@
if (target_zone == BP_GROIN)
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
user.visible_message("<span class='filter_notice'>[msg]</span>", "<span class='filter_notice'>[self_msg]</span>")
user.visible_message(span_filter_notice("[msg]"), span_filter_notice("[self_msg]"))
target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40)
..()
/datum/surgery_step/generic/retract_skin/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<span class='notice'>[user] keeps the incision open on [target]'s [affected.name] with \the [tool].</span>"
var/self_msg = "<span class='notice'>You keep the incision open on [target]'s [affected.name] with \the [tool].</span>"
var/msg = span_notice("[user] keeps the incision open on [target]'s [affected.name] with \the [tool].")
var/self_msg = span_notice("You keep the incision open on [target]'s [affected.name] with \the [tool].")
if (target_zone == BP_TORSO)
msg = "<span class='notice'>[user] keeps the ribcage open on [target]'s torso with \the [tool].</span>"
self_msg = "<span class='notice'>You keep the ribcage open on [target]'s torso with \the [tool].</span>"
msg = span_notice("[user] keeps the ribcage open on [target]'s torso with \the [tool].")
self_msg = span_notice("You keep the ribcage open on [target]'s torso with \the [tool].")
if (target_zone == BP_GROIN)
msg = "<span class='notice'>[user] keeps the incision open on [target]'s lower abdomen with \the [tool].</span>"
self_msg = "<span class='notice'>You keep the incision open on [target]'s lower abdomen with \the [tool].</span>"
msg = span_notice("[user] keeps the incision open on [target]'s lower abdomen with \the [tool].")
self_msg = span_notice("You keep the incision open on [target]'s lower abdomen with \the [tool].")
user.visible_message(msg, self_msg)
affected.open = 2
/datum/surgery_step/generic/retract_skin/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<span class='danger'>[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</span>"
var/self_msg = "<span class='danger'>Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</span>"
var/msg = span_danger("[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!")
var/self_msg = span_danger("Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!")
if (target_zone == BP_TORSO)
msg = "<span class='danger'>[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!</span>"
self_msg = "<span class='danger'>Your hand slips, damaging several organs in [target]'s torso with \the [tool]!</span>"
msg = span_danger("[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!")
self_msg = span_danger("Your hand slips, damaging several organs in [target]'s torso with \the [tool]!")
if (target_zone == BP_GROIN)
msg = "<span class='danger'>[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</span>"
self_msg = "<span class='danger'>Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</span>"
msg = span_danger("[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!")
self_msg = span_danger("Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!")
user.visible_message(msg, self_msg)
target.apply_damage(12, BRUTE, affected, sharp = TRUE)
@@ -301,23 +301,23 @@
/datum/surgery_step/generic/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='filter_notice'>[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].</span>" , \
"<span class='filter_notice'>You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]."))
target.custom_pain("Your [affected.name] is being burned!", 40)
..()
/datum/surgery_step/generic/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You cauterize the incision on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_notice("[user] cauterizes the incision on [target]'s [affected.name] with \the [tool]."), \
span_notice("You cauterize the incision on [target]'s [affected.name] with \the [tool]."))
affected.open = 0
affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING
/datum/surgery_step/generic/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='danger'>[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</span>")
user.visible_message(span_danger("[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(3, BURN, affected)
///////////////////////////////////////////////////////////////
@@ -347,20 +347,20 @@
/datum/surgery_step/generic/amputate/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='filter_notice'>[user] is beginning to amputate [target]'s [affected.name] with \the [tool].</span>" , \
"<span class='filter_notice'>You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] is beginning to amputate [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool]."))
target.custom_pain("Your [affected.amputation_point] is being ripped apart!", 100)
..()
/datum/surgery_step/generic/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</span>", \
"<span class='notice'>You amputate [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_notice("[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool]."), \
span_notice("You amputate [target]'s [affected.name] with \the [tool]."))
affected.droplimb(1,DROPLIMB_EDGE)
/datum/surgery_step/generic/amputate/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='danger'>[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</span>")
user.visible_message(span_danger("[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!"))
affected.createwound(CUT, 30)
affected.fracture()