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
+73 -73
View File
@@ -50,20 +50,20 @@
/datum/surgery_step/robotics/unscrew_hatch/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 unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='filter_notice'>You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool]."), \
span_filter_notice("You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool]."))
..()
/datum/surgery_step/robotics/unscrew_hatch/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 opened the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>",)
user.visible_message(span_notice("[user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool]."), \
span_notice("You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool]."),)
affected.open = 1
/datum/surgery_step/robotics/unscrew_hatch/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 [tool.name] slips, failing to unscrew [target]'s [affected.name].</span>", \
"<span class='warning'>Your [tool] slips, failing to unscrew [target]'s [affected.name].</span>")
user.visible_message(span_warning("[user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name]."), \
span_warning("Your [tool] slips, failing to unscrew [target]'s [affected.name]."))
///////////////////////////////////////////////////////////////
// Open Hatch Surgery
@@ -88,20 +88,20 @@
/datum/surgery_step/robotics/open_hatch/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 pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>",
"<span class='filter_notice'>You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool]."),
span_filter_notice("You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool]."))
..()
/datum/surgery_step/robotics/open_hatch/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] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You open the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_notice("[user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool]."), \
span_notice("You open the maintenance hatch on [target]'s [affected.name] with \the [tool]."))
affected.open = 3
/datum/surgery_step/robotics/open_hatch/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 [tool.name] slips, failing to open the hatch on [target]'s [affected.name].</span>",
"<span class='warning'>Your [tool] slips, failing to open the hatch on [target]'s [affected.name].</span>")
user.visible_message(span_warning("[user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name]."),
span_warning("Your [tool] slips, failing to open the hatch on [target]'s [affected.name]."))
///////////////////////////////////////////////////////////////
// Close Hatch Surgery
@@ -126,21 +126,21 @@
/datum/surgery_step/robotics/close_hatch/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] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool].</span>" , \
"<span class='filter_notice'>You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool]."))
..()
/datum/surgery_step/robotics/close_hatch/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] closes and secures the hatch on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You close and secure the hatch on [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_notice("[user] closes and secures the hatch on [target]'s [affected.name] with \the [tool]."), \
span_notice("You close and secure the hatch on [target]'s [affected.name] with \the [tool]."))
affected.open = 0
affected.germ_level = 0
/datum/surgery_step/robotics/close_hatch/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 [tool.name] slips, failing to close the hatch on [target]'s [affected.name].</span>",
"<span class='warning'>Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].</span>")
user.visible_message(span_warning("[user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name]."),
span_warning("Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name]."))
///////////////////////////////////////////////////////////////
// Brute Repair Surgery
@@ -167,21 +167,21 @@
/datum/surgery_step/robotics/repair_brute/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] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool].</span>" , \
"<span class='filter_notice'>You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].</span>")
user.visible_message(span_filter_notice("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool].") , \
span_filter_notice("You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool]."))
..()
/datum/surgery_step/robotics/repair_brute/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] finishes patching damage to [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You finish patching damage to [target]'s [affected.name] with \the [tool].</span>")
user.visible_message(span_notice("[user] finishes patching damage to [target]'s [affected.name] with \the [tool]."), \
span_notice("You finish patching damage to [target]'s [affected.name] with \the [tool]."))
affected.heal_damage(rand(30,50),0,1,1)
affected.disfigured = 0
/datum/surgery_step/robotics/repair_brute/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 [tool.name] slips, damaging the internal structure of [target]'s [affected.name].</span>",
"<span class='warning'>Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].</span>")
user.visible_message(span_warning("[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name]."),
span_warning("Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name]."))
target.apply_damage(rand(5,10), BURN, affected)
///////////////////////////////////////////////////////////////
@@ -203,11 +203,11 @@
if(istype(tool, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = tool
if(affected.burn_dam == 0)
to_chat(user, "<span class='notice'>There are no burnt wires here!</span>")
to_chat(user, span_notice("There are no burnt wires here!"))
return SURGERY_FAILURE
else
if(!C.can_use(5))
to_chat(user, "<span class='danger'>You need at least five cable pieces to repair this part.</span>") //usage amount made more consistent with regular cable repair
to_chat(user, span_danger("You need at least five cable pieces to repair this part.")) //usage amount made more consistent with regular cable repair
return SURGERY_FAILURE
else
C.use(5)
@@ -216,21 +216,21 @@
/datum/surgery_step/robotics/repair_burn/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] begins to splice new cabling into [target]'s [affected.name].</span>" , \
"<span class='filter_notice'>You begin to splice new cabling into [target]'s [affected.name].</span>")
user.visible_message(span_filter_notice("[user] begins to splice new cabling into [target]'s [affected.name].") , \
span_filter_notice("You begin to splice new cabling into [target]'s [affected.name]."))
..()
/datum/surgery_step/robotics/repair_burn/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] finishes splicing cable into [target]'s [affected.name].</span>", \
"<span class='notice'>You finishes splicing new cable into [target]'s [affected.name].</span>")
user.visible_message(span_notice("[user] finishes splicing cable into [target]'s [affected.name]."), \
span_notice("You finishes splicing new cable into [target]'s [affected.name]."))
affected.heal_damage(0,rand(30,50),1,1)
affected.disfigured = 0
/datum/surgery_step/robotics/repair_burn/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] causes a short circuit in [target]'s [affected.name]!</span>",
"<span class='warning'>You cause a short circuit in [target]'s [affected.name]!</span>")
user.visible_message(span_warning("[user] causes a short circuit in [target]'s [affected.name]!"),
span_warning("You cause a short circuit in [target]'s [affected.name]!"))
target.apply_damage(rand(5,10), BURN, affected)
///////////////////////////////////////////////////////////////
@@ -269,8 +269,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='filter_notice'>[user] starts mending the damage to [target]'s [I.name]'s mechanisms.</span>", \
"<span class='filter_notice'>You start mending the damage to [target]'s [I.name]'s mechanisms.</span>" )
user.visible_message(span_filter_notice("[user] starts mending the damage to [target]'s [I.name]'s mechanisms."), \
span_filter_notice("You start mending the damage to [target]'s [I.name]'s mechanisms.") )
target.custom_pain("The pain in your [affected.name] is living hell!",1)
..()
@@ -283,8 +283,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
@@ -294,8 +294,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.adjustToxLoss(5)
affected.createwound(CUT, 5)
@@ -345,17 +345,17 @@
var/organ_to_remove = tgui_input_list(user, "Which organ do you want to prepare for removal?", "Organ Choice", attached_organs)
if(!organ_to_remove) //They chose cancel!
to_chat(user, "<span class='notice'>You decide against preparing any organs for removal.</span>")
to_chat(user, span_notice("You decide against preparing any organs for removal."))
return
target.op_stage.current_organ = organ_to_remove
user.visible_message("<span class='filter_notice'>[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
"<span class='filter_notice'>You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool].</span>" )
user.visible_message(span_filter_notice("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool]."), \
span_filter_notice("You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool].") )
..()
/datum/surgery_step/robotics/detatch_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'>[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
"<span class='notice'>You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
user.visible_message(span_notice("[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool].") , \
span_notice("You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool]."))
var/obj/item/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
if(I && istype(I))
@@ -363,8 +363,8 @@
target.op_stage.current_organ = null
/datum/surgery_step/robotics/detatch_organ_robotic/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, disconnecting \the [tool].</span>", \
"<span class='warning'>Your hand slips, disconnecting \the [tool].</span>")
user.visible_message(span_warning("[user]'s hand slips, disconnecting \the [tool]."), \
span_warning("Your hand slips, disconnecting \the [tool]."))
///////////////////////////////////////////////////////////////
// Robot Organ Attaching Surgery
@@ -405,19 +405,19 @@
var/organ_to_replace = tgui_input_list(user, "Which organ do you want to reattach?", "Organ Choice", attachable_organs)
if(!organ_to_replace) //They chose cancel!
to_chat(user, "<span class='notice'>You decide against reattaching any organs.</span>")
to_chat(user, span_notice("You decide against reattaching any organs."))
return
target.op_stage.current_organ = organ_to_replace
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]."))
..()
/datum/surgery_step/robotics/attach_organ_robotic/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))
@@ -425,8 +425,8 @@
target.op_stage.current_organ = null
/datum/surgery_step/robotics/attach_organ_robotic/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, disconnecting \the [tool].</span>", \
"<span class='warning'>Your hand slips, disconnecting \the [tool].</span>")
user.visible_message(span_warning("[user]'s hand slips, disconnecting \the [tool]."), \
span_warning("Your hand slips, disconnecting \the [tool]."))
///////////////////////////////////////////////////////////////
// MMI Insertion Surgery
@@ -455,34 +455,34 @@
/* VOREStation Edit - Don't worry about it. We can put these in regardless, because resleeving might make it useful after.
if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD)
to_chat(user, "<span class='danger'>That brain is not usable.</span>")
to_chat(user, span_danger("That brain is not usable."))
return SURGERY_FAILURE
*/
if(!(affected.robotic >= ORGAN_ROBOT))
to_chat(user, "<span class='danger'>You cannot install a computer brain into a meat skull.</span>")
to_chat(user, span_danger("You cannot install a computer brain into a meat skull."))
return SURGERY_FAILURE
if(!target.should_have_organ("brain"))
to_chat(user, "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>")
to_chat(user, span_danger("You're pretty sure [target.species.name_plural] don't normally have a brain."))
return SURGERY_FAILURE
if(!isnull(target.internal_organs["brain"]))
to_chat(user, "<span class='danger'>Your subject already has a brain.</span>")
to_chat(user, span_danger("Your subject already has a brain."))
return SURGERY_FAILURE
return 1
/datum/surgery_step/robotics/install_mmi/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 installing \the [tool] into [target]'s [affected.name].</span>", \
"<span class='filter_notice'>You start installing \the [tool] into [target]'s [affected.name].</span>")
user.visible_message(span_filter_notice("[user] starts installing \the [tool] into [target]'s [affected.name]."), \
span_filter_notice("You start installing \the [tool] into [target]'s [affected.name]."))
..()
/datum/surgery_step/robotics/install_mmi/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 installed \the [tool] into [target]'s [affected.name].</span>", \
"<span class='notice'>You have installed \the [tool] into [target]'s [affected.name].</span>")
user.visible_message(span_notice("[user] has installed \the [tool] into [target]'s [affected.name]."), \
span_notice("You have installed \the [tool] into [target]'s [affected.name]."))
var/obj/item/mmi/M = tool
// VOREstation edit begin - Select the proper mmi holder subtype based on the brain inserted
@@ -522,8 +522,8 @@
target.real_name = target.name
/datum/surgery_step/robotics/install_mmi/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.</span>", \
"<span class='warning'>Your hand slips.</span>")
user.visible_message(span_warning("[user]'s hand slips."), \
span_warning("Your hand slips."))
/*
* Install a Diona Nymph into a Nymph Mech
@@ -552,37 +552,37 @@
return 0
if(!N.held_mob.client || N.held_mob.stat >= DEAD)
to_chat(user, "<span class='danger'>That nymph is not viable.</span>")
to_chat(user, span_danger("That nymph is not viable."))
return SURGERY_FAILURE
if(!(affected.robotic >= ORGAN_ROBOT))
to_chat(user, "<span class='danger'>You cannot install a nymph into a meat puppet.</span>")
to_chat(user, span_danger("You cannot install a nymph into a meat puppet."))
return SURGERY_FAILURE
if(!(affected.model != "Skrellian Exoskeleton"))
to_chat(user, "<span class='dangerou'>You're fairly certain a nymph can't pilot a normal robot.</span>")
to_chat(user, span_danger("You're fairly certain a nymph can't pilot a normal robot."))
return SURGERY_FAILURE
if(!target.should_have_organ("brain"))
to_chat(user, "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>")
to_chat(user, span_danger("You're pretty sure [target.species.name_plural] don't normally have a brain."))
return SURGERY_FAILURE
if(!isnull(target.internal_organs["brain"]))
to_chat(user, "<span class='danger'>Your subject already has a cephalon.</span>")
to_chat(user, span_danger("Your subject already has a cephalon."))
return SURGERY_FAILURE
return 1
/datum/surgery_step/robotics/install_nymph/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 setting \the [tool] into [target]'s [affected.name].</span>", \
"<span class='filter_notice'>You start setting \the [tool] into [target]'s [affected.name].</span>")
user.visible_message(span_filter_notice("[user] starts setting \the [tool] into [target]'s [affected.name]."), \
span_filter_notice("You start setting \the [tool] into [target]'s [affected.name]."))
..()
/datum/surgery_step/robotics/install_nymph/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 installed \the [tool] into [target]'s [affected.name].</span>", \
"<span class='notice'>You have installed \the [tool] into [target]'s [affected.name].</span>")
user.visible_message(span_notice("[user] has installed \the [tool] into [target]'s [affected.name]."), \
span_notice("You have installed \the [tool] into [target]'s [affected.name]."))
var/obj/item/holder/diona/N = tool
var/obj/item/organ/internal/brain/cephalon/cephalon = new(target, 1)
@@ -616,5 +616,5 @@
target.real_name = target.name
/datum/surgery_step/robotics/install_nymph/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.</span>", \
"<span class='warning'>Your hand slips.</span>")
user.visible_message(span_warning("[user]'s hand slips."), \
span_warning("Your hand slips."))