mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
refactors most spans
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && (I.damage > 0 || I.status == ORGAN_DEAD))
|
||||
if(!(I.robotic >= ORGAN_ROBOT))
|
||||
user.visible_message("<span class='filter_notice'>[user] starts treating damage to [target]'s [I.name] with [tool_name].</span>", \
|
||||
"<span class='filter_notice'>You start treating damage to [target]'s [I.name] with [tool_name].</span>" )
|
||||
user.visible_message(span_filter_notice("[user] starts treating damage to [target]'s [I.name] with [tool_name]."), \
|
||||
span_filter_notice("You start treating damage to [target]'s [I.name] with [tool_name].") )
|
||||
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
@@ -78,10 +78,10 @@
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && (I.damage > 0 || I.status == ORGAN_DEAD))
|
||||
if(!(I.robotic >= ORGAN_ROBOT))
|
||||
user.visible_message("<span class='notice'>[user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
|
||||
"<span class='notice'>You treat damage to [target]'s [I.name] with [tool_name].</span>" )
|
||||
user.visible_message(span_notice("[user] treats damage to [target]'s [I.name] with [tool_name]."), \
|
||||
span_notice("You treat damage to [target]'s [I.name] with [tool_name].") )
|
||||
if(I.organ_tag == O_BRAIN && I.status == ORGAN_DEAD && target.can_defib == 0) //Let people know they still got more work to get the brain back into working order.
|
||||
to_chat(user, "<span class='warning'>You fix their [I] but the neurological structure is still heavily damaged and in need of repair.</span>")
|
||||
to_chat(user, span_warning("You fix their [I] but the neurological structure is still heavily damaged and in need of repair."))
|
||||
I.damage = 0
|
||||
I.status = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
@@ -94,8 +94,8 @@
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
user.visible_message(span_warning("[user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!"))
|
||||
var/dam_amt = 2
|
||||
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
@@ -162,8 +162,8 @@
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= ORGAN_ROBOT)
|
||||
user.visible_message("<span class='notice'>[user] repairs [target]'s [I.name] with [tool].</span>", \
|
||||
"<span class='notice'>You repair [target]'s [I.name] with [tool].</span>" )
|
||||
user.visible_message(span_notice("[user] repairs [target]'s [I.name] with [tool]."), \
|
||||
span_notice("You repair [target]'s [I.name] with [tool].") )
|
||||
I.damage = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
target.sdisabilities &= ~BLIND
|
||||
@@ -173,8 +173,8 @@
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
user.visible_message(span_warning("[user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!"))
|
||||
|
||||
target.adjustBruteLoss(5)
|
||||
|
||||
@@ -233,14 +233,14 @@
|
||||
/datum/surgery_step/internal/detatch_organ/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 separate [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
|
||||
"<span class='filter_notice'>You start to separate [target]'s [target.op_stage.current_organ] with \the [tool].</span>" )
|
||||
user.visible_message(span_filter_notice("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start to separate [target]'s [target.op_stage.current_organ] with \the [tool].") )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/detatch_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have separated [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
user.visible_message(span_notice("[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool].") , \
|
||||
span_notice("You have separated [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
@@ -248,8 +248,8 @@
|
||||
|
||||
/datum/surgery_step/internal/detatch_organ/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='warning'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>")
|
||||
user.visible_message(span_warning("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"))
|
||||
affected.createwound(CUT, rand(30,50), 1)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
@@ -297,27 +297,27 @@
|
||||
|
||||
var/organ_to_remove = tgui_input_list(user, "Which organ do you want to remove?", "Organ Choice", removable_organs)
|
||||
if(!organ_to_remove) //They chose cancel!
|
||||
to_chat(user, "<span class='notice'>You decide against preparing any organs for removal.</span>")
|
||||
user.visible_message("<span class='filter_notice'>[user] starts pulling \the [tool] from [target]'s [affected].</span>", \
|
||||
"<span class='filter_notice'>You start pulling \the [tool] from [target]'s [affected].</span>")
|
||||
to_chat(user, span_notice("You decide against preparing any organs for removal."))
|
||||
user.visible_message(span_filter_notice("[user] starts pulling \the [tool] from [target]'s [affected]."), \
|
||||
span_filter_notice("You start pulling \the [tool] from [target]'s [affected]."))
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
|
||||
user.visible_message("<span class='filter_notice'>[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
|
||||
"<span class='filter_notice'>You start removing [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
user.visible_message(span_filter_notice("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start removing [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/remove_organ/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)
|
||||
if(!target.op_stage.current_organ) //They chose to remove their tool instead.
|
||||
user.visible_message("<span class='notice'>[user] has removed \the [tool] from [target]'s [affected].</span>", \
|
||||
"<span class='notice'>You have removed \the [tool] from [target]'s [affected].</span>")
|
||||
user.visible_message(span_notice("[user] has removed \the [tool] from [target]'s [affected]."), \
|
||||
span_notice("You have removed \the [tool] from [target]'s [affected]."))
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
user.visible_message("<span class='notice'>[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have removed [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
user.visible_message(span_notice("[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_notice("You have removed [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(O && istype(O))
|
||||
O.removed(user)
|
||||
@@ -325,8 +325,8 @@
|
||||
|
||||
/datum/surgery_step/internal/remove_organ/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='warning'>[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
|
||||
user.visible_message(span_warning("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, damaging [target]'s [affected.name] with \the [tool]!"))
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
@@ -356,11 +356,11 @@
|
||||
return 0
|
||||
|
||||
if((affected.robotic >= ORGAN_ROBOT) && !(O.robotic >= ORGAN_ROBOT))
|
||||
to_chat(user, "<span class='danger'>You cannot install a naked organ into a robotic body.</span>")
|
||||
to_chat(user, span_danger("You cannot install a naked organ into a robotic body."))
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(!target.species)
|
||||
to_chat(user, "<span class='danger'>You have no idea what species this person is. Report this on the bug tracker.</span>")
|
||||
to_chat(user, span_danger("You have no idea what species this person is. Report this on the bug tracker."))
|
||||
return SURGERY_FAILURE
|
||||
|
||||
var/o_is = (O.gender == PLURAL) ? "are" : "is"
|
||||
@@ -368,43 +368,43 @@
|
||||
var/o_do = (O.gender == PLURAL) ? "don't" : "doesn't"
|
||||
|
||||
if(O.damage > (O.max_damage * 0.75))
|
||||
to_chat(user, "<span class='warning'>\The [O.organ_tag] [o_is] in no state to be transplanted.</span>")
|
||||
to_chat(user, span_warning("\The [O.organ_tag] [o_is] in no state to be transplanted."))
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(!target.internal_organs_by_name[O.organ_tag])
|
||||
organ_missing = 1
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [target] already has [o_a][O.organ_tag].</span>")
|
||||
to_chat(user, span_warning("\The [target] already has [o_a][O.organ_tag]."))
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(O && affected.organ_tag == O.parent_organ)
|
||||
organ_compatible = 1
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [O.organ_tag] [o_do] normally go in \the [affected.name].</span>")
|
||||
to_chat(user, span_warning("\The [O.organ_tag] [o_do] normally go in \the [affected.name]."))
|
||||
return SURGERY_FAILURE
|
||||
|
||||
return ..() && organ_missing && organ_compatible
|
||||
|
||||
/datum/surgery_step/internal/replace_organ/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 transplanting \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='filter_notice'>You start transplanting \the [tool] into [target]'s [affected.name].</span>")
|
||||
user.visible_message(span_filter_notice("[user] starts transplanting \the [tool] into [target]'s [affected.name]."), \
|
||||
span_filter_notice("You start transplanting \the [tool] into [target]'s [affected.name]."))
|
||||
target.custom_pain("Someone's rooting around in your [affected.name]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/replace_organ/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 transplanted \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You have transplanted \the [tool] into [target]'s [affected.name].</span>")
|
||||
user.visible_message(span_notice("[user] has transplanted \the [tool] into [target]'s [affected.name]."), \
|
||||
span_notice("You have transplanted \the [tool] into [target]'s [affected.name]."))
|
||||
var/obj/item/organ/O = tool
|
||||
if(istype(O))
|
||||
user.remove_from_mob(O)
|
||||
O.replaced(target,affected)
|
||||
|
||||
/datum/surgery_step/internal/replace_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging \the [tool]!</span>")
|
||||
user.visible_message(span_warning("[user]'s hand slips, damaging \the [tool]!"), \
|
||||
span_warning("Your hand slips, damaging \the [tool]!"))
|
||||
var/obj/item/organ/I = tool
|
||||
if(istype(I))
|
||||
I.take_damage(rand(3,5),0)
|
||||
@@ -446,14 +446,14 @@
|
||||
return ..()
|
||||
|
||||
/datum/surgery_step/internal/attach_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='filter_notice'>[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
|
||||
"<span class='filter_notice'>You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
user.visible_message(span_filter_notice("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/attach_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
user.visible_message(span_notice("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].") , \
|
||||
span_notice("You have reattached [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
@@ -461,6 +461,6 @@
|
||||
|
||||
/datum/surgery_step/internal/attach_organ/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='warning'>[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>")
|
||||
user.visible_message(span_warning("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"))
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
Reference in New Issue
Block a user