This commit is contained in:
Aurorablade
2016-01-06 23:43:12 -05:00
parent 948adea83b
commit 2623f75e0d
11 changed files with 576 additions and 490 deletions
+89 -77
View File
@@ -2,19 +2,19 @@
//////////////////////////////////////////////////////////////////
// BONE SURGERY //
//////////////////////////////////////////////////////////////////
///Surgery Datums
/datum/surgery/bone_repair
name = "bone repair"
steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
possible_locs = list("chest","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin")
/datum/surgery/bone_repair/skull
name = "bone repair"
steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone, /datum/surgery_step/mend_skull,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone, /datum/surgery_step/mend_skull,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
possible_locs = list("head")
//surgery steps
/datum/surgery_step/glue_bone
allowed_tools = list(
/obj/item/weapon/bonegel = 100, \
@@ -26,28 +26,31 @@
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
/datum/surgery_step/glue_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.open == 2 && affected.stage == 0
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)
if (affected.stage == 0)
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool]." , \
"You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].")
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1)
..()
/datum/surgery_step/glue_bone/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)
if (affected.stage == 0)
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool]." , \
"You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].")
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
/datum/surgery_step/glue_bone/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("\blue [user] applies some [tool] to [target]'s bone in [affected.name]", \
"\blue You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].")
affected.stage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return 1
/datum/surgery_step/glue_bone/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("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
return 0
/datum/surgery_step/set_bone
allowed_tools = list(
@@ -58,33 +61,36 @@
min_duration = 60
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.limb_name != "head" && affected.open == 2 && affected.stage == 1
/datum/surgery_step/set_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.limb_name != "head" && affected.open == 2 && affected.stage == 1
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 set the bone in [target]'s [affected.name] in place with \the [tool]." , \
"You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].")
target.custom_pain("The pain in your [affected.name] is going to make you pass out!",1)
..()
/datum/surgery_step/set_bone/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 set the bone in [target]'s [affected.name] in place with \the [tool]." , \
"You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].")
target.custom_pain("The pain in your [affected.name] is going to make you pass out!",1)
..()
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 (affected.status & ORGAN_BROKEN)
user.visible_message("\blue [user] sets the bone in [target]'s [affected.name] in place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.name] in place with \the [tool].")
affected.stage = 2
else
user.visible_message("\blue [user] sets the bone in [target]'s [affected.name]\red in the WRONG place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.name]\red in the WRONG place with \the [tool].")
affected.fracture()
/datum/surgery_step/set_bone/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 (affected.status & ORGAN_BROKEN)
user.visible_message("\blue [user] sets the bone in [target]'s [affected.name] in place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.name] in place with \the [tool].")
affected.stage = 2
return 1
else
user.visible_message("\blue [user] sets the bone in [target]'s [affected.name]\red in the WRONG place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.name]\red in the WRONG place with \the [tool].")
affected.fracture()
return 0
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("\red [user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \
"\red Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!")
affected.createwound(BRUISE, 5)
/datum/surgery_step/set_bone/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("\red [user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \
"\red Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!")
affected.createwound(BRUISE, 5)
return 0
/datum/surgery_step/mend_skull
allowed_tools = list(
@@ -95,28 +101,31 @@
min_duration = 60
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.limb_name == "head" && affected.open == 2 && affected.stage == 1
/datum/surgery_step/mend_skull/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.limb_name == "head" && affected.open == 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \
"You are beginning piece together [target]'s skull with \the [tool].")
..()
/datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \
"You are beginning piece together [target]'s skull with \the [tool].")
..()
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("\blue [user] sets [target]'s skull with \the [tool]." , \
"\blue You set [target]'s skull with \the [tool].")
affected.stage = 2
/datum/surgery_step/mend_skull/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("\blue [user] sets [target]'s skull with \the [tool]." , \
"\blue You set [target]'s skull with \the [tool].")
affected.stage = 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("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
"\red Your hand slips, damaging [target]'s face with \the [tool]!")
var/obj/item/organ/external/head/h = affected
h.createwound(BRUISE, 10)
h.disfigured = 1
return 1
/datum/surgery_step/mend_skull/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("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
"\red Your hand slips, damaging [target]'s face with \the [tool]!")
var/obj/item/organ/external/head/h = affected
h.createwound(BRUISE, 10)
h.disfigured = 1
return 0
/datum/surgery_step/finish_bone
allowed_tools = list(
@@ -129,26 +138,29 @@
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.open == 2 && affected.stage == 2
/datum/surgery_step/finish_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.open == 2 && affected.stage == 2
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 finish mending the damaged bones in [target]'s [affected.name] with \the [tool].", \
"You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].")
..()
/datum/surgery_step/finish_bone/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 finish mending the damaged bones in [target]'s [affected.name] with \the [tool].", \
"You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].")
..()
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("\blue [user] has mended the damaged bones in [target]'s [affected.name] with \the [tool]." , \
"\blue You have mended the damaged bones in [target]'s [affected.name] with \the [tool]." )
affected.status &= ~ORGAN_BROKEN
affected.status &= ~ORGAN_SPLINTED
affected.stage = 0
affected.perma_injury = 0
/datum/surgery_step/finish_bone/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("\blue [user] has mended the damaged bones in [target]'s [affected.name] with \the [tool]." , \
"\blue You have mended the damaged bones in [target]'s [affected.name] with \the [tool]." )
affected.status &= ~ORGAN_BROKEN
affected.status &= ~ORGAN_SPLINTED
affected.stage = 0
affected.perma_injury = 0
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("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
return 1
/datum/surgery_step/finish_bone/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("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
return 0
+133 -123
View File
@@ -6,13 +6,14 @@
priority = 2
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return 0
/datum/surgery_step/open_encased/can_use(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)
return affected && !(affected.status & ORGAN_ROBOT) && affected.encased && affected.open >= 2
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && !(affected.status & ORGAN_ROBOT) && affected.encased && affected.open >= 2
/datum/surgery_step/open_encased/saw
@@ -25,44 +26,47 @@
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 2
/datum/surgery_step/open_encased/saw/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 2
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/saw/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \
"You begin to cut through [target]'s [affected.encased] with \the [tool].")
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \
"You begin to cut through [target]'s [affected.encased] with \the [tool].")
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/saw/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has cut [target]'s [affected.encased] open with \the [tool].", \
"\blue You have cut [target]'s [affected.encased] open with \the [tool].")
affected.open = 2.5
user.visible_message("\blue [user] has cut [target]'s [affected.encased] open with \the [tool].", \
"\blue You have cut [target]'s [affected.encased] open with \the [tool].")
affected.open = 2.5
return 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!" )
user.visible_message("\red [user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!" )
affected.createwound(CUT, 20)
affected.fracture()
affected.createwound(CUT, 20)
affected.fracture()
return 0
/datum/surgery_step/open_encased/retract
@@ -74,52 +78,56 @@
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 2.5
/datum/surgery_step/open_encased/retract/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 2.5
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/retract/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]."
var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]."
var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/retract/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] forces open [target]'s [affected.encased] with \the [tool]."
var/self_msg = "\blue You force open [target]'s [affected.encased] with \the [tool]."
user.visible_message(msg, self_msg)
var/msg = "\blue [user] forces open [target]'s [affected.encased] with \the [tool]."
var/self_msg = "\blue You force open [target]'s [affected.encased] with \the [tool]."
user.visible_message(msg, self_msg)
affected.open = 3
affected.open = 3
// Whoops!
if(prob(10))
affected.fracture()
// Whoops!
if(prob(10) && !isrobot(user))
affected.fracture()//WTF WHY?!
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return 1
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
/datum/surgery_step/open_encased/retract/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/msg = "\red [user]'s hand slips, cracking [target]'s [affected.encased]!"
var/self_msg = "\red Your hand slips, cracking [target]'s [affected.encased]!"
user.visible_message(msg, self_msg)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
affected.createwound(BRUISE, 20)
affected.fracture()
var/msg = "\red [user]'s hand slips, cracking [target]'s [affected.encased]!"
var/self_msg = "\red Your hand slips, cracking [target]'s [affected.encased]!"
user.visible_message(msg, self_msg)
affected.createwound(BRUISE, 20)
affected.fracture()
return 0
/datum/surgery_step/open_encased/close
allowed_tools = list(
@@ -130,53 +138,53 @@
min_duration = 20
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/close/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 3
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 3
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/close/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/close/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] bends [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "\blue You bend [target]'s [affected.encased] back into place with \the [tool]."
user.visible_message(msg, self_msg)
var/msg = "\blue [user] bends [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "\blue You bend [target]'s [affected.encased] back into place with \the [tool]."
user.visible_message(msg, self_msg)
affected.open = 2.5
affected.open = 2.5
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return 1
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
/datum/surgery_step/open_encased/close/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/msg = "\red [user]'s hand slips, bending [target]'s [affected.encased] the wrong way!"
var/self_msg = "\red Your hand slips, bending [target]'s [affected.encased] the wrong way!"
user.visible_message(msg, self_msg)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
affected.createwound(BRUISE, 20)
affected.fracture()
var/msg = "\red [user]'s hand slips, bending [target]'s [affected.encased] the wrong way!"
var/self_msg = "\red Your hand slips, bending [target]'s [affected.encased] the wrong way!"
user.visible_message(msg, self_msg)
/*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE.
user.visible_message("\red A rib pierces the lung!")
target.rupture_lung()*/
affected.createwound(BRUISE, 20)
affected.fracture()
return 0
/datum/surgery_step/open_encased/mend
allowed_tools = list(
@@ -187,33 +195,35 @@
min_duration = 20
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 2.5
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && affected.open == 2.5
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/mend/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]."
var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]."
var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/open_encased/mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] applied \the [tool] to [target]'s [affected.encased]."
var/self_msg = "\blue You applied \the [tool] to [target]'s [affected.encased]."
user.visible_message(msg, self_msg)
var/msg = "\blue [user] applied \the [tool] to [target]'s [affected.encased]."
var/self_msg = "\blue You applied \the [tool] to [target]'s [affected.encased]."
user.visible_message(msg, self_msg)
affected.open = 2
affected.open = 2
return 1
+38 -25
View File
@@ -10,13 +10,14 @@
/datum/surgery_step/face
priority = 2
can_infect = 0
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 || (affected.status & ORGAN_ROBOT))
return 0
return target_zone == "mouth"
/datum/surgery_step/face/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 || (affected.status & ORGAN_ROBOT))
return 0
return target_zone == "mouth"
/datum/surgery_step/generic/cut_face
allowed_tools = list(
@@ -28,26 +29,30 @@
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return ..() //&& target_zone == "mouth" && target.op_stage.face == 0//I NEED TO REPLACE THE OPSTAGE SHIT!
/datum/surgery_step/generic/cut_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return ..() && target_zone == "mouth" //&& target.op_stage.face == 0//I NEED TO REPLACE THE OPSTAGE SHIT!
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/generic/cut_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \
"You start to cut open [target]'s face and neck with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("\blue [user] has cut open [target]'s face and neck with \the [tool]." , \
"\blue You have cut open [target]'s face and neck with \the [tool].",)
//target.op_stage.face = 1//DID I MENTION I NEED TO REPLACE THE OPSTAGE SHIT!
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return 1
/datum/surgery_step/generic/cut_face/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("\red [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s throat wth \the [tool]!" )
affected.createwound(CUT, 60)
target.losebreath += 4
return 0
/datum/surgery_step/face/mend_vocal
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
@@ -58,23 +63,25 @@
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/mend_vocal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return ..()// && target.op_stage.face == 1 //NO REALLY NED TO REPLACE, MAYBE WITH FUCKING istype(S.get_surgery_step(), /datum/surgery_step/cut_face)) OR SOMETHING
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/mend_vocal/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \
"You start mending [target]'s vocal cords with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("\blue [user] mends [target]'s vocal cords with \the [tool].", \
"\blue You mend [target]'s vocal cords with \the [tool].")
//target.op_stage.face = 2//I NEED TO REPLACE THE OPSTAGE SHIT!
return 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("\red [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \
"\red Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!")
target.losebreath += 4
return 0
/datum/surgery_step/face/fix_face
allowed_tools = list(
@@ -85,24 +92,26 @@
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/fix_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return ..() //&& target.op_stage.face == 2//I NEED TO REPLACE THE OPSTAGE SHIT!
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/fix_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \
"You start pulling skin on [target]'s face back in place with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("\blue [user] pulls skin on [target]'s face back in place with \the [tool].", \
"\blue You pull skin on [target]'s face back in place with \the [tool].")
//target.op_stage.face = 3//I NEED TO REPLACE THE OPSTAGE SHIT!
return 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/fix_face/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("\red [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \
"\red Your hand slips, tearing skin on [target]'s face with \the [tool]!")
target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1)
return 0
/datum/surgery_step/face/cauterize
allowed_tools = list(
@@ -115,15 +124,15 @@
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return ..()// && target.op_stage.face > 0//I NEED TO REPLACE THE OPSTAGE SHIT!
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/cauterize/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \
"You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/face/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("\blue [user] cauterizes the incision on [target]'s face and neck with \the [tool].", \
"\blue You cauterize the incision on [target]'s face and neck with \the [tool].")
@@ -136,8 +145,12 @@
target.regenerate_icons()
//target.op_stage.face = 0//I NEED TO REPLACE THE OPSTAGE SHIT!
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return 1
/datum/surgery_step/face/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("\red [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s face with \the [tool]!")
target.apply_damage(4, BURN, affected)
target.apply_damage(4, BURN, affected)
return 0
+42 -28
View File
@@ -56,6 +56,7 @@
affected.createwound(CUT, 1)
affected.clamp()
spread_germs_to_organ(affected, user)
return 1
/datum/surgery_step/generic/cut_with_laser/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)
@@ -63,6 +64,7 @@
"\red 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)
return 0
/datum/surgery_step/generic/incision_manager
allowed_tools = list(
@@ -97,12 +99,16 @@
affected.clamp()
affected.open = 2
return 1
/datum/surgery_step/generic/incision_manager/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("\red [user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!", \
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!", \
"\red 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)
affected.createwound(CUT, 20)
affected.createwound(BURN, 15)
return 2
/datum/surgery_step/generic/cut_open
allowed_tools = list(
@@ -115,8 +121,6 @@
max_duration = 110
/datum/surgery_step/generic/cut_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!ishuman(target) || !isalien(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 0 && target_zone != "mouth"
@@ -128,20 +132,22 @@
..()
/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("\blue [user] has made an incision on [target]'s [affected.name] with \the [tool].", \
"\blue You have made an incision on [target]'s [affected.name] with \the [tool].",)
affected.open = 1
affected.status |= ORGAN_BLEEDING
affected.createwound(CUT, 1)
//if (target_zone == "head")
// target.brain_op_stage = 1
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has made an incision on [target]'s [affected.name] with \the [tool].", \
"\blue You have made an incision on [target]'s [affected.name] with \the [tool].",)
affected.open = 1
affected.status |= ORGAN_BLEEDING
affected.createwound(CUT, 1)
//if (target_zone == "head")
// target.brain_op_stage = 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("\red [user]'s hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!")
affected.createwound(CUT, 10)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.name] in a wrong spot with \the [tool]!")
affected.createwound(CUT, 10)
return 0
/datum/surgery_step/generic/clamp_bleeders
allowed_tools = list(
@@ -167,17 +173,19 @@
..()
/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("\blue [user] clamps bleeders in [target]'s [affected.name] with \the [tool].", \
"\blue You clamp bleeders in [target]'s [affected.name] with \the [tool].")
affected.clamp()
spread_germs_to_organ(affected, user)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.name] with \the [tool].", \
"\blue You clamp bleeders in [target]'s [affected.name] with \the [tool].")
affected.clamp()
spread_germs_to_organ(affected, user)
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("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!",)
affected.createwound(CUT, 10)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!",)
affected.createwound(CUT, 10)
return 0
/datum/surgery_step/generic/retract_skin
allowed_tools = list(
@@ -219,6 +227,7 @@
self_msg = "\blue 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)
@@ -232,6 +241,7 @@
self_msg = "\red 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
allowed_tools = list(
@@ -262,12 +272,14 @@
affected.open = 0
affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING
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("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!")
target.apply_damage(3, BURN, affected)
return 0
/datum/surgery_step/generic/amputate
@@ -305,10 +317,12 @@
user.visible_message("\blue [user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \
"\blue You amputate [target]'s [affected.name] with \the [tool].")
affected.droplimb(1,DROPLIMB_EDGE)
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("\red [user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 30)
affected.fracture()
affected.fracture()
return 0
+2 -13
View File
@@ -4,10 +4,8 @@
var/mob/living/carbon/human/H
var/obj/item/organ/external/affecting
var/selected_zone = user.zone_sel.selecting
world << "line 8"
if(istype(M, /mob/living/carbon/human))
H = M
world <<"line 10"
affecting = H.get_organ(check_zone(selected_zone))
if(can_operate(H)) //if they're prone or a slime
@@ -17,37 +15,26 @@
for(var/datum/surgery/S in M.surgeries)
if(S.location == selected_zone)
current_surgery = S
world << "[S]"
if(!current_surgery)
var/list/all_surgeries = surgeries_list.Copy()
var/list/available_surgeries = list()
world << "line 24"
for(var/datum/surgery/S in all_surgeries)
if(!S.possible_locs.Find(selected_zone))
world << "line 29"
world << "[selected_zone]"
continue
if(affecting && S.requires_organic_bodypart && affecting.status == ORGAN_ROBOT)
world << "line 30"
continue
if(!S.can_start(user, M))
world << "line 31"
continue
for(var/path in S.allowed_species)
world << "[path]"
world << "[M]"
if(istype(M, path))
world << "line 32"
world << "[path]"
available_surgeries[S.name] = S
break
var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries
if(P && user && user.Adjacent(M) && (I in user))
world << "line 40"
var/datum/surgery/S = available_surgeries[P]
var/datum/surgery/procedure = new S.type
if(procedure)
@@ -89,5 +76,7 @@ proc/get_location_modifier(mob/M)
else
return 0.5
//just until i update maps....
/obj/item/organ/brain/New()
new /obj/item/organ/internal/brain(src.loc)
+14
View File
@@ -73,6 +73,8 @@
user.visible_message("\blue [user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \
"\blue You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." )
return 1
/datum/surgery_step/cavity/close_space
priority = 2
allowed_tools = list(
@@ -102,6 +104,9 @@
user.visible_message("\blue [user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].", \
"\blue You mend [target]'s [get_cavity(affected)] cavity walls with \the [tool]." )
return 1
/datum/surgery_step/cavity/place_item
priority = 0
allowed_tools = list(/obj/item = 100)
@@ -129,6 +134,7 @@
if(istype(tool, /obj/item/weapon/disk/nuclear))
user << "Central command would kill you if you implanted the disk into someone."
return 0//fail
else
user.visible_message("\blue [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
@@ -143,6 +149,8 @@
tool.loc = target
affected.cavity = 0
return 1
//////////////////////////////////////////////////////////////////
// IMPLANT/ITEM REMOVAL SURGERY //
//////////////////////////////////////////////////////////////////
@@ -208,9 +216,12 @@
var/obj/item/weapon/implant/imp = obj
imp.imp_in = null
imp.implanted = 0
return 1
else
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.name].", \
"\blue There's something inside [target]'s [affected.name], but you just missed it this time." )
return -1 //or maybe 0....
else if (affected.hidden)
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.name]s with \the [tool]." )
@@ -220,10 +231,12 @@
affected.hidden.blood_DNA[target.dna.unique_enzymes] = target.dna.b_type
affected.hidden.update_icon()
affected.hidden = null
return 1
else
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.", \
"\blue You could not find anything inside [target]'s [affected.name]." )
return -1
/datum/surgery_step/cavity/implant_removal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
..()
@@ -237,4 +250,5 @@
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
imp.activate()
return 0
+75 -74
View File
@@ -3,6 +3,7 @@
// LIMB SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/limb/
priority = 3 // Must be higher than /datum/surgery_step/internal
can_infect = 0
@@ -21,27 +22,27 @@
min_duration = 50
max_duration = 70
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("[user] starts attaching [E.name] to [target]'s [E.amputation_point].", \
"You start attaching [E.name] to [target]'s [E.amputation_point].")
/datum/surgery_step/limb/attach/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("[user] starts attaching [E.name] to [target]'s [E.amputation_point].", \
"You start attaching [E.name] to [target]'s [E.amputation_point].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='notice'>[user] has attached [target]'s [E.name] to the [E.amputation_point].</span>", \
"<span class='notice'>You have attached [target]'s [E.name] to the [E.amputation_point].</span>")
user.unEquip(E)
E.replaced(target)
E.forceMove(target)
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
/datum/surgery_step/limb/attach/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='notice'>[user] has attached [target]'s [E.name] to the [E.amputation_point].</span>", \
"<span class='notice'>You have attached [target]'s [E.name] to the [E.amputation_point].</span>")
user.unEquip(E)
E.replaced(target)
E.forceMove(target)
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
"<span class='alert'>Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/attach/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
"<span class='alert'>Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/connect
allowed_tools = list(
@@ -54,32 +55,32 @@
min_duration = 100
max_duration = 120
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
return E && !E.is_stump() && (E.status & ORGAN_DESTROYED)
/datum/surgery_step/limb/connect/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
return E && !E.is_stump() && (E.status & ORGAN_DESTROYED)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
user.visible_message("[user] starts connecting tendons and muscles in [target]'s [E.amputation_point] with [tool].", \
"You start connecting tendons and muscle in [target]'s [E.amputation_point].")
/datum/surgery_step/limb/connect/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
user.visible_message("[user] starts connecting tendons and muscles in [target]'s [E.amputation_point] with [tool].", \
"You start connecting tendons and muscle in [target]'s [E.amputation_point].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] has connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>", \
"<span class='notice'>You have connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>")
E.status &= ~ORGAN_DESTROYED
if(E.children)
for(var/obj/item/organ/external/C in E.children)
C.status &= ~ORGAN_DESTROYED
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
/datum/surgery_step/limb/connect/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] has connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>", \
"<span class='notice'>You have connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>")
E.status &= ~ORGAN_DESTROYED
if(E.children)
for(var/obj/item/organ/external/C in E.children)
C.status &= ~ORGAN_DESTROYED
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
"<span class='alert'>Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
"<span class='alert'>Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/mechanize
allowed_tools = list(/obj/item/robot_parts = 100)
@@ -87,43 +88,43 @@
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
return isnull(target.get_organ(target_zone))
/datum/surgery_step/limb/connect/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
return isnull(target.get_organ(target_zone))
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
/datum/surgery_step/limb/connect/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching \the [tool] to [target].", \
"You start attaching \the [tool] to [target].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool
user.visible_message("<span class='notice'>[user] has attached \the [tool] to [target].</span>", \
"<span class='notice'>You have attached \the [tool] to [target].</span>")
/datum/surgery_step/limb/connect/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool
user.visible_message("<span class='notice'>[user] has attached \the [tool] to [target].</span>", \
"<span class='notice'>You have attached \the [tool] to [target].</span>")
if(L.part)
for(var/part_name in L.part)
if(!isnull(target.get_organ(part_name)))
continue
var/list/organ_data = target.species.has_limbs["[part_name]"]
if(!organ_data)
continue
var/new_limb_type = organ_data["path"]
var/obj/item/organ/external/new_limb = new new_limb_type(target)
new_limb.robotize(L.model_info)
if(L.sabotaged)
new_limb.sabotaged = 1
if(L.part)
for(var/part_name in L.part)
if(!isnull(target.get_organ(part_name)))
continue
var/list/organ_data = target.species.has_limbs["[part_name]"]
if(!organ_data)
continue
var/new_limb_type = organ_data["path"]
var/obj/item/organ/external/new_limb = new new_limb_type(target)
new_limb.robotize(L.model_info)
if(L.sabotaged)
new_limb.sabotaged = 1
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
qdel(tool)
qdel(tool)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s flesh!</span>", \
"<span class='alert'>Your hand slips, damaging [target]'s flesh!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<span class='alert'>[user]'s hand slips, damaging [target]'s flesh!</span>", \
"<span class='alert'>Your hand slips, damaging [target]'s flesh!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
+43 -34
View File
@@ -70,6 +70,8 @@
ticker.mode.remove_thrall(target.mind,0)
new /obj/item/organ/internal/shadowtumor(get_turf(target))
return 1
/datum/surgery_step/internal/dethrall/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/braincase = target.named_organ_parent("brain")
if(prob(50))
@@ -77,8 +79,11 @@
"<span class='warning'><b>You fumble and tear out [target]'s tumor!</span>")
target.adjustBrainLoss(110) // This is so you can't just defib'n go
ticker.mode.remove_thrall(target.mind,1)
return 0
else
user.visible_message("<span class='warning'>[user]'s hand slips and fumbles! Luckily, they didn't damage anything!</span>")
return 0
//////////////////////////////////////////////////////////////////
// ALIEN EMBRYO SURGERY //
@@ -88,7 +93,7 @@
possible_locs = list("chest")
/datum/surgery_step/internal/remove_embryo
/datum/surgery_step/internal/remove_embryo//might can just do this in organ mainpulation..but this is TARGETED for..
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
@@ -99,51 +104,55 @@
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/embryo = 0
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
embryo = 1
//break
/datum/surgery_step/internal/remove_embryo/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/embryo = 0
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
embryo = 1
//break
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && embryo && affected.open_enough_for_surgery() && target_zone == "chest"
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected && embryo && affected.open_enough_for_surgery() && target_zone == "chest"
begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/internal/remove_embryo/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
"You rip the larva out of [target]'s ribcage!")
/datum/surgery_step/internal/remove_embryo/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
"You rip the larva out of [target]'s ribcage!")
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
user << "<span class='notice'>You found an unknown alien organism in [target]'s chest!</span>"
if(prob(10))
A.AttemptGrow()
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
user << "<span class='notice'>You found an unknown alien organism in [target]'s chest!</span>"
if(prob(10))
A.AttemptGrow()
A.remove(target)
A.loc = get_turf(target)
A.remove(target)
A.loc = get_turf(target)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
return 1
if (!hasorgans(target))
return
/datum/surgery_step/internal/remove_embryo/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
if(prob(50))
A.AttemptGrow(0)
user.visible_message("<span class='warning'>[user] accidentally pokes the xenomorph in [target]!</span>", "<span class='warning'>You accidentally poke the xenomorph in [target]!</span>")
else
target.adjustOxyLoss(30)
user.visible_message("<span class='warning'>[user] accidentally pokes [target] in the lungs!</span>", "<span class='warning'>You accidentally poke [target] in the lungs!</span>")
if (!hasorgans(target))
return
var/obj/item/organ/internal/body_egg/alien_embryo/A = target.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
if(prob(50))
A.AttemptGrow(0)
user.visible_message("<span class='warning'>[user] accidentally pokes the xenomorph in [target]!</span>", "<span class='warning'>You accidentally poke the xenomorph in [target]!</span>")
else
target.adjustOxyLoss(30)
user.visible_message("<span class='warning'>[user] accidentally pokes [target] in the lungs!</span>", "<span class='warning'>You accidentally poke [target] in the lungs!</span>")
return 0
/datum/surgery_step/internal/manipulate_organs
@@ -192,7 +201,7 @@
current_type = "extract"
var/list/organs = target.get_organs_zone(target_zone)
if(!organs.len)
user << "<span class='notice'>There is no removeable organs in [target]'s [parse_zone(target_zone)]!</span>"
user << "<span class='notice'>There are no removeable organs in [target]'s [parse_zone(target_zone)]!</span>"
return -1
else
for(var/obj/item/organ/internal/O in organs)
+107 -95
View File
@@ -16,39 +16,45 @@
min_duration = 70
max_duration = 90
can_use(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)
if(!affected) return 0
/datum/surgery_step/fix_vein/can_use(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)
if(!affected) return 0
var/internal_bleeding = 0
for(var/datum/wound/W in affected.wounds) if(W.internal)
internal_bleeding = 1
break
var/internal_bleeding = 0
for(var/datum/wound/W in affected.wounds) if(W.internal)
internal_bleeding = 1
break
return affected.open == 2 && internal_bleeding
return affected.open == 2 && internal_bleeding
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 patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \
"You start patching the damaged vein in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.name] is unbearable!",1)
..()
/datum/surgery_step/fix_vein/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 patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \
"You start patching the damaged vein in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.name] is unbearable!",1)
..()
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("\blue [user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].", \
"\blue You have patched the damaged vein in [target]'s [affected.name] with \the [tool].")
/datum/surgery_step/fix_vein/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("\blue [user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].", \
"\blue You have patched the damaged vein in [target]'s [affected.name] with \the [tool].")
for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W
affected.update_damages()
if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W
affected.update_damages()
if (ishuman(user) && prob(40))
var/mob/living/carbon/human/U = user
U.bloody_hands(target, 0)
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("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
affected.take_damage(5, 0)
return 1
/datum/surgery_step/fix_vein/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("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
affected.take_damage(5, 0)
return 0
/datum/surgery_step/fix_dead_tissue //Debridement
priority = 2
@@ -64,35 +70,39 @@
min_duration = 110
max_duration = 160
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if(!hasorgans(target))
return 0
/datum/surgery_step/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if(!hasorgans(target))
return 0
if (target_zone == "mouth" || target_zone == "eyes")
return 0
if (target_zone == "mouth" || target_zone == "eyes")
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 2 && (affected.status & ORGAN_DEAD)
return affected && affected.open == 2 && (affected.status & ORGAN_DEAD)
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 cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \
"You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.name] is unbearable!",1)
..()
/datum/surgery_step/fix_dead_tissue/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 cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \
"You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.name] is unbearable!",1)
..()
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("\blue [user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].", \
"\blue You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].")
affected.open = 3
/datum/surgery_step/fix_dead_tissue/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("\blue [user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].", \
"\blue You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].")
affected.open = 3
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("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20, 1)
return 1
/datum/surgery_step/fix_dead_tissue/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("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20, 1)
return 0
/datum/surgery_step/treat_necrosis
priority = 2
@@ -110,60 +120,62 @@
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return 0
/datum/surgery_step/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return 0
var/obj/item/weapon/reagent_containers/container = tool
if(!container.reagents.has_reagent("mitocholide"))
return 0
var/obj/item/weapon/reagent_containers/container = tool
if(!container.reagents.has_reagent("mitocholide"))
return 0
if(!hasorgans(target))
return 0
if(!hasorgans(target))
return 0
if (target_zone == "mouth" || target_zone == "eyes")
return 0
if (target_zone == "mouth" || target_zone == "eyes")
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == 3 && (affected.status & ORGAN_DEAD)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == 3 && (affected.status & ORGAN_DEAD)
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 applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \
"You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1)
..()
/datum/surgery_step/fix_dead_tissue/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 applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \
"You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1)
..()
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)
/datum/surgery_step/fix_dead_tissue/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)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return
if (!istype(tool, /obj/item/weapon/reagent_containers))
return
var/obj/item/weapon/reagent_containers/container = tool
var/obj/item/weapon/reagent_containers/container = tool
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
if (trans > 0)
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
if(container.reagents.has_reagent("mitocholide"))
affected.status &= ~ORGAN_DEAD
user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", \
"\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].")
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)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return
var/obj/item/weapon/reagent_containers/container = tool
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
if (trans > 0)
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!" , \
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!")
if(container.reagents.has_reagent("mitocholide"))
affected.status &= ~ORGAN_DEAD
//no damage or anything, just wastes medicine
user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", \
"\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].")
return 1
/datum/surgery_step/fix_dead_tissue/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)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return
var/obj/item/weapon/reagent_containers/container = tool
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!" , \
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!")
//no damage or anything, just wastes medicine
+5 -1
View File
@@ -8,12 +8,16 @@
steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/robotics/external/repair_brute,/datum/surgery_step/robotics/external/repair_burn,/datum/surgery_step/robotics/external/close_hatch)
possible_locs = list("chest","head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin")
requires_organic_bodypart = 0
allowed_species = list(/mob/living/carbon/human/machine)
disallowed_species = list(/mob/living/carbon/human)
/datum/surgery/cybernetic_repair
name = "Cybernetic Mainpulation"
name = "Internal Cybernetic Mainpulation"
steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/robotics/manipulate_robotic_organs)
possible_locs = list("chest","head","groin")
requires_organic_bodypart = 0
allowed_species = list(/mob/living/carbon/human/machine)
disallowed_species = list(/mob/living/carbon/human)
//to do, moar surgerys or condense down ala mainpulate organs.
+28 -20
View File
@@ -24,21 +24,24 @@
min_duration = 30
max_duration = 50
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 0
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
"You start cutting through [target]'s flesh with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts through [target]'s flesh with \the [tool].", \
"\blue You cut through [target]'s flesh with \the [tool], revealing its silky innards.")
target.core_removal_stage = 1
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return 1
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
return 0
/datum/surgery_step/slime/cut_innards
allowed_tools = list(
@@ -50,21 +53,23 @@
min_duration = 30
max_duration = 50
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 1
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
"You start cutting [target]'s silky innards apart with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores.", \
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores.")
target.core_removal_stage = 2
return 1
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
return 0
/datum/surgery_step/slime/saw_core
allowed_tools = list(
@@ -75,23 +80,26 @@
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && (istype(target) && target.core_removal_stage == 2 && target.cores > 0) //This is being passed a human as target, unsure why.
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
/datum/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
"You start cutting out one of [target]'s cores with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "[target.colour] baby slime dead-nocore"
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "[target.colour] baby slime dead-nocore"
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return 1
/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, causing \him to miss the core!", \
"\red Your hand slips, causing you to miss the core!")
"\red Your hand slips, causing you to miss the core!")
return 0