Files
CHOMPStation2/code/modules/surgery/generic.dm
Cameron653 e158fcd3cc Macro Replacements. (#3574)
* A preface to my madness

Travis failed one of my PR's because I copied old code
that used /red /blue /green.

Because of this, I am going to find and replace every
instance of it that I find.

Also this is a test commit to make sure I'm comitting
to the correct branch.

* /blue /green /red replacements

Dear god.

A slow and painful death from acid is more fun than this.

I wouldn't wish this torture on my worst enemy.
And this is only the beginning

* Replace part 2.

Time to fix the human error.

* Fixes mismatches

* Sets macro count to 220

One above the current number of macros in the code.

* Fixes last of the mismatches.

* Removes spaces, replaces \black

Removes spaces
Replaces \black in a few areas where seen
Replaces \bold with <B> </B> where seen

* Updating macro count again

* More fixes!

* Issues fixed! For real this time!

I swear!

* Fixing all the merge conflict files.
2017-07-19 12:47:23 -05:00

313 lines
16 KiB
Plaintext

//Procedures in this file: Gneric surgery steps
//////////////////////////////////////////////////////////////////
// COMMON STEPS //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/generic/
can_infect = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (isslime(target))
return 0
if (target_zone == O_EYES) //there are specific steps for eye surgery
return 0
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected == null)
return 0
if (affected.is_stump())
return 0
if (affected.robotic >= ORGAN_ROBOT)
return 0
return 1
/datum/surgery_step/generic/cut_with_laser
allowed_tools = list(
/obj/item/weapon/surgical/scalpel/laser3 = 95, \
/obj/item/weapon/surgical/scalpel/laser2 = 85, \
/obj/item/weapon/surgical/scalpel/laser1 = 75, \
/obj/item/weapon/melee/energy/sword = 5
)
priority = 2
req_open = 0
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 0 && target_zone != O_MOUTH
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("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \
"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)
..()
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("<font color='blue'>[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>",)
//Could be cleaner ...
affected.open = 1
affected.createwound(CUT, 1)
affected.clamp()
spread_germs_to_organ(affected, user)
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("<font color='red'>[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>")
affected.createwound(CUT, 7.5)
affected.createwound(BURN, 12.5)
/datum/surgery_step/generic/incision_manager
allowed_tools = list(
/obj/item/weapon/surgical/scalpel/manager = 100
)
priority = 2
req_open = 0
min_duration = 80
max_duration = 120
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 0 && target_zone != O_MOUTH
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("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \
"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)
..()
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("<font color='blue'>[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>",)
affected.open = 1
if(istype(target) && target.should_have_organ(O_HEART))
affected.status |= ORGAN_BLEEDING
affected.createwound(CUT, 1)
affected.clamp()
affected.open = 2
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("<font color='red'>[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>")
affected.createwound(CUT, 20)
affected.createwound(BURN, 15)
/datum/surgery_step/generic/cut_open
allowed_tools = list(
/obj/item/weapon/surgical/scalpel = 100, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
req_open = 0
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 0 && target_zone != O_MOUTH
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("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \
"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)
..()
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("<font color='blue'>[user] has made an incision on [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have made an incision on [target]'s [affected.name] with \the [tool].</font>",)
affected.open = 1
if(istype(target) && target.should_have_organ(O_HEART))
affected.status |= ORGAN_BLEEDING
affected.createwound(CUT, 1)
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("<font color='red'>[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>", \
"<font color='red'>Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>")
affected.createwound(CUT, 10)
/datum/surgery_step/generic/clamp_bleeders
allowed_tools = list(
/obj/item/weapon/surgical/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 20
)
min_duration = 40
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open && (affected.status & ORGAN_BLEEDING)
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("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \
"You start clamping bleeders in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in your [affected.name] is maddening!", 40)
..()
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("<font color='blue'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</font>")
affected.clamp()
spread_germs_to_organ(affected, user)
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("<font color='red'>[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>",)
affected.createwound(CUT, 10)
/datum/surgery_step/generic/retract_skin
allowed_tools = list(
/obj/item/weapon/surgical/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/material/kitchen/utensil/fork = 50
)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 1 //&& !(affected.status & ORGAN_BLEEDING)
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)
var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]."
var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]."
if (target_zone == BP_TORSO)
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
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(msg, self_msg)
target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40)
..()
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 = "<font color='blue'>[user] keeps the incision open on [target]'s [affected.name] with \the [tool].</font>"
var/self_msg = "<font color='blue'>You keep the incision open on [target]'s [affected.name] with \the [tool].</font>"
if (target_zone == BP_TORSO)
msg = "<font color='blue'>[user] keeps the ribcage open on [target]'s torso with \the [tool].</font>"
self_msg = "<font color='blue'>You keep the ribcage open on [target]'s torso with \the [tool].</font>"
if (target_zone == BP_GROIN)
msg = "<font color='blue'>[user] keeps the incision open on [target]'s lower abdomen with \the [tool].</font>"
self_msg = "<font color='blue'>You keep the incision open on [target]'s lower abdomen with \the [tool].</font>"
user.visible_message(msg, self_msg)
affected.open = 2
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 = "<font color='red'>[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
var/self_msg = "<font color='red'>Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
if (target_zone == BP_TORSO)
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
if (target_zone == BP_GROIN)
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
user.visible_message(msg, self_msg)
target.apply_damage(12, BRUTE, affected, sharp=1)
/datum/surgery_step/generic/cauterize
allowed_tools = list(
/obj/item/weapon/surgical/cautery = 100, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open && target_zone != O_MOUTH
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("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \
"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)
..()
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("<font color='blue'>[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You cauterize the incision on [target]'s [affected.name] with \the [tool].</font>")
affected.open = 0
affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING
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("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>")
target.apply_damage(3, BURN, affected)
/datum/surgery_step/generic/amputate
allowed_tools = list(
/obj/item/weapon/surgical/circular_saw = 100, \
/obj/item/weapon/material/hatchet = 75
)
req_open = 0
min_duration = 110
max_duration = 160
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (target_zone == O_EYES) //there are specific steps for eye surgery
return 0
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected == null)
return 0
return !affected.cannot_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("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \
"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)
..()
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("<font color='blue'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</font>", \
"<font color='blue'>You amputate [target]'s [affected.name] with \the [tool].</font>")
affected.droplimb(1,DROPLIMB_EDGE)
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("<font color='red'>[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</font>")
affected.createwound(CUT, 30)
affected.fracture()