//Procedures in this file: Gneric surgery steps ////////////////////////////////////////////////////////////////// // COMMON STEPS // ////////////////////////////////////////////////////////////////// /datum/surgery_step/generic/ can_infect = 1 /datum/surgery_step/generic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) if(!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected == null) return 0 if(affected.is_robotic()) return 0 return 1 /datum/surgery_step/generic/cut_open name = "make incision" allowed_tools = list( /obj/item/scalpel = 100, \ /obj/item/kitchen/knife = 90, \ /obj/item/shard = 60, \ /obj/item/scissors = 12, \ /obj/item/twohanded/chainsaw = 1, \ /obj/item/claymore = 6, \ /obj/item/melee/energy/ = 6, \ /obj/item/pen/edagger = 6, \ ) time = 16 /datum/surgery_step/generic/cut_open/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) 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]!") ..() /datum/surgery_step/generic/cut_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user] has made an incision on [target]'s [affected.name] with \the [tool].", \ " You have made an incision on [target]'s [affected.name] with \the [tool].",) affected.open = 1 return 1 /datum/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user]'s hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!", \ " Your hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!") affected.receive_damage(10) return 0 /datum/surgery_step/generic/clamp_bleeders name = "clamp bleeders" allowed_tools = list( /obj/item/scalpel/laser = 100, \ /obj/item/hemostat = 100, \ /obj/item/stack/cable_coil = 90, \ /obj/item/assembly/mousetrap = 25 ) time = 24 /datum/surgery_step/generic/clamp_bleeders/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) 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!") ..() /datum/surgery_step/generic/clamp_bleeders/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user] clamps bleeders in [target]'s [affected.name] with \the [tool].", \ " You clamp bleeders in [target]'s [affected.name] with \the [tool].") spread_germs_to_organ(affected, user, tool) return 1 /datum/surgery_step/generic/clamp_bleeders/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!", \ " Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!",) affected.receive_damage(10) return 0 /datum/surgery_step/generic/retract_skin name = "retract skin" allowed_tools = list( /obj/item/scalpel/laser/manager = 100, \ /obj/item/retractor = 100, \ /obj/item/crowbar = 90, \ /obj/item/kitchen/utensil/fork = 60 ) time = 24 /datum/surgery_step/generic/retract_skin/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) 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 == "chest") 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 == "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!") ..() /datum/surgery_step/generic/retract_skin/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = " [user] keeps the incision open on [target]'s [affected.name] with \the [tool]." var/self_msg = " You keep the incision open on [target]'s [affected.name] with \the [tool]." if(target_zone == "chest") msg = " [user] keeps the ribcage open on [target]'s torso with \the [tool]." self_msg = " You keep the ribcage open on [target]'s torso with \the [tool]." if(target_zone == "groin") msg = " [user] keeps the incision open on [target]'s lower abdomen with \the [tool]." self_msg = " You keep the incision open on [target]'s lower abdomen with \the [tool]." user.visible_message(msg, self_msg) affected.open = 2 return 1 /datum/surgery_step/generic/retract_skin/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = " [user]'s hand slips, tearing the edges of incision on [target]'s [affected.name] with \the [tool]!" var/self_msg = " Your hand slips, tearing the edges of incision on [target]'s [affected.name] with \the [tool]!" if(target_zone == "chest") msg = " [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!" self_msg = " Your hand slips, damaging several organs [target]'s torso with \the [tool]!" if(target_zone == "groin") msg = " [user]'s hand slips, damaging several organs [target]'s lower abdomen with \the [tool]" self_msg = " Your hand slips, damaging several organs [target]'s lower abdomen with \the [tool]!" user.visible_message(msg, self_msg) target.apply_damage(12, BRUTE, affected, sharp = 1) return 0 /datum/surgery_step/generic/cauterize name = "cauterize incision" allowed_tools = list( /obj/item/scalpel/laser = 100, \ /obj/item/cautery = 100, \ /obj/item/clothing/mask/cigarette = 90, \ /obj/item/lighter = 60, \ /obj/item/weldingtool = 30 ) time = 24 /datum/surgery_step/generic/cauterize/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) 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!") ..() /datum/surgery_step/generic/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user] cauterizes the incision on [target]'s [affected.name] with \the [tool].", \ " You cauterize the incision on [target]'s [affected.name] with \the [tool].") affected.open = 0 affected.germ_level = 0 return 1 /datum/surgery_step/generic/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!", \ " Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!") target.apply_damage(3, BURN, affected) return 0 //drill bone /datum/surgery_step/generic/drill name = "drill bone" allowed_tools = list(/obj/item/surgicaldrill = 100, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, /obj/item/screwdriver = 20) time = 30 /datum/surgery_step/generic/drill/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) user.visible_message("[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].", "You begin to drill into the bone in [target]'s [parse_zone(target_zone)]...") ..() /datum/surgery_step/generic/drill/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) user.visible_message("[user] drills into [target]'s [parse_zone(target_zone)]!", "You drill into [target]'s [parse_zone(target_zone)].") return 1 /datum/surgery_step/generic/amputate name = "amputate limb" allowed_tools = list( /obj/item/circular_saw = 100, \ /obj/item/melee/energy/sword/cyborg/saw = 100, \ /obj/item/hatchet = 90, \ /obj/item/melee/arm_blade = 75 ) time = 100 /datum/surgery_step/generic/amputate/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) if(target_zone == "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 /datum/surgery_step/generic/amputate/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) 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!") ..() /datum/surgery_step/generic/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \ " You amputate [target]'s [affected.name] with \the [tool].") add_attack_logs(user, target, "Surgically removed [affected.name]. INTENT: [uppertext(user.a_intent)]")//log it var/atom/movable/thing = affected.droplimb(1,DROPLIMB_SHARP) if(istype(thing,/obj/item)) user.put_in_hands(thing) return 1 /datum/surgery_step/generic/amputate/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message(" [user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!", \ " Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!") affected.receive_damage(30) affected.fracture() return 0