mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Redoes the whole surgery PR
This commit is contained in:
@@ -1267,7 +1267,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/total = new
|
||||
for(var/obj/item/organ/external/E in organs)
|
||||
if(E.open)
|
||||
var/image/I = image("icon"='icons/mob/surgery.dmi', "icon_state"="[E.name][round(E.open)]", "layer"=-SURGERY_LEVEL)
|
||||
var/image/I = image("icon"='icons/mob/surgery.dmi', "icon_state"="[E.icon_name][round(E.open)]", "layer"=-SURGERY_LEVEL)
|
||||
total.overlays += I
|
||||
overlays_standing[SURGERY_LEVEL] = total
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
// BONE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Bone Glue Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/glue_bone
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/bonegel = 100, \
|
||||
@@ -14,30 +18,34 @@
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
||||
/datum/surgery_step/glue_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && (affected.robotic < 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("<font color='blue'>[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
|
||||
"<font color='blue'>You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
|
||||
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
||||
..()
|
||||
/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("<font color='blue'>[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
|
||||
"<font color='blue'>You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
|
||||
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] applies some [tool] to [target]'s bone in [affected.name]</font>", \
|
||||
"<font color='blue'>You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].</font>")
|
||||
affected.stage = 1
|
||||
/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("<font color='blue'>[user] applies some [tool] to [target]'s bone in [affected.name]</font>", \
|
||||
"<font color='blue'>You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].</font>")
|
||||
affected.stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
|
||||
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
|
||||
/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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
|
||||
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Bone Setting Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/set_bone
|
||||
allowed_tools = list(
|
||||
@@ -48,35 +56,39 @@
|
||||
min_duration = 60
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.organ_tag != BP_HEAD && !(affected.robotic >= ORGAN_ROBOT) && 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)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.organ_tag != BP_HEAD && !(affected.robotic >= ORGAN_ROBOT) && 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("<font color='blue'>[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</font>" , \
|
||||
"<font color='blue'>You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</font>")
|
||||
target.custom_pain("The pain in your [affected.name] is going to make you pass out!", 50)
|
||||
..()
|
||||
/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("<font color='blue'>[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</font>" , \
|
||||
"<font color='blue'>You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</font>")
|
||||
target.custom_pain("The pain in your [affected.name] is going to make you pass out!", 50)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected.status & ORGAN_BROKEN)
|
||||
user.visible_message("<font color='blue'>[user] sets the bone in [target]'s [affected.name] in place with \the [tool].</font>", \
|
||||
"<font color='blue'>You set the bone in [target]'s [affected.name] in place with \the [tool].</font>")
|
||||
affected.stage = 2
|
||||
else
|
||||
user.visible_message("[user] sets the bone in [target]'s [affected.name]<font color='red'> in the WRONG place with \the [tool].</font>", \
|
||||
"You set the bone in [target]'s [affected.name]<font color='red'> in the WRONG place with \the [tool].</font>")
|
||||
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("<font color='blue'>[user] sets the bone in [target]'s [affected.name] in place with \the [tool].</font>", \
|
||||
"<font color='blue'>You set the bone in [target]'s [affected.name] in place with \the [tool].</font>")
|
||||
affected.stage = 2
|
||||
else
|
||||
user.visible_message("[user] sets the bone in [target]'s [affected.name]<font color='red'> in the WRONG place with \the [tool].</font>", \
|
||||
"You set the bone in [target]'s [affected.name]<font color='red'> in the WRONG place with \the [tool].</font>")
|
||||
affected.fracture()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
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("<font color='red'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(BRUISE, 5)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Skull Mending Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/mend_skull
|
||||
allowed_tools = list(
|
||||
@@ -87,30 +99,34 @@
|
||||
min_duration = 60
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.organ_tag == BP_HEAD && (affected.robotic < ORGAN_ROBOT) && 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)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.organ_tag == BP_HEAD && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] is beginning to piece together [target]'s skull with \the [tool].</font>" , \
|
||||
"<font color='blue'>You are beginning to piece together [target]'s skull with \the [tool].</font>")
|
||||
..()
|
||||
/datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] is beginning to piece together [target]'s skull with \the [tool].</font>" , \
|
||||
"<font color='blue'>You are beginning to piece together [target]'s skull with \the [tool].</font>")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] sets [target]'s skull with \the [tool].</font>" , \
|
||||
"<font color='blue'>You set [target]'s skull with \the [tool].</font>")
|
||||
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("<font color='blue'>[user] sets [target]'s skull with \the [tool].</font>" , \
|
||||
"<font color='blue'>You set [target]'s skull with \the [tool].</font>")
|
||||
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("<font color='red'>[user]'s hand slips, damaging [target]'s face with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, damaging [target]'s face with \the [tool]!</font>")
|
||||
var/obj/item/organ/external/head/h = affected
|
||||
h.createwound(BRUISE, 10)
|
||||
h.disfigured = 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("<font color='red'>[user]'s hand slips, damaging [target]'s face with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, damaging [target]'s face with \the [tool]!</font>")
|
||||
var/obj/item/organ/external/head/h = affected
|
||||
h.createwound(BRUISE, 10)
|
||||
h.disfigured = 1
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Bone Fixing Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/finish_bone
|
||||
allowed_tools = list(
|
||||
@@ -123,31 +139,33 @@
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open >= 2 && !(affected.robotic >= ORGAN_ROBOT) && affected.stage == 2
|
||||
/datum/surgery_step/finish_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open >= 2 && !(affected.robotic >= ORGAN_ROBOT) && 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("<font color='blue'>[user] starts to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
|
||||
..()
|
||||
/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("<font color='blue'>[user] starts to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has mended the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
|
||||
"<font color='blue'>You have mended the damaged bones in [target]'s [affected.name] with \the [tool].</font>" )
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.stage = 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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
|
||||
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
|
||||
/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("<font color='blue'>[user] has mended the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
|
||||
"<font color='blue'>You have mended the damaged bones in [target]'s [affected.name] with \the [tool].</font>" )
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.stage = 0
|
||||
|
||||
/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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
|
||||
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Bone Clamp Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/clamp_bone
|
||||
allowed_tools = list(
|
||||
@@ -159,28 +177,28 @@
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
||||
/datum/surgery_step/clamp_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && (affected.robotic < 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("<font color='blue'>[user] starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
|
||||
"<font color='blue'>You starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
|
||||
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
||||
..()
|
||||
/datum/surgery_step/clamp_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("<font color='blue'>[user] starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
|
||||
"<font color='blue'>You starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
|
||||
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] sets the bone in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You sets [target]'s bone in [affected.name] with \the [tool].</font>")
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
/datum/surgery_step/clamp_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("<font color='blue'>[user] sets the bone in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You sets [target]'s bone in [affected.name] with \the [tool].</font>")
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(BRUISE, 5)
|
||||
/datum/surgery_step/clamp_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("<font color='red'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(BRUISE, 5)
|
||||
@@ -6,14 +6,17 @@
|
||||
priority = 2
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
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)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && !(affected.robotic >= ORGAN_ROBOT) && affected.encased && affected.open >= 2
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && !(affected.robotic >= ORGAN_ROBOT) && affected.encased && affected.open >= 2
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Rib Sawing Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/open_encased/saw
|
||||
allowed_tools = list(
|
||||
@@ -24,45 +27,45 @@
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/open_encased/saw/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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]!", 60)
|
||||
..()
|
||||
|
||||
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]!", 60)
|
||||
..()
|
||||
/datum/surgery_step/open_encased/saw/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] has cut [target]'s [affected.encased] open with \the [tool].</font>", \
|
||||
"<font color='blue'>You have cut [target]'s [affected.encased] open with \the [tool].</font>")
|
||||
affected.open = 2.5
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("<font color='blue'>[user] has cut [target]'s [affected.encased] open with \the [tool].</font>", \
|
||||
"<font color='blue'>You have cut [target]'s [affected.encased] open with \the [tool].</font>")
|
||||
affected.open = 2.5
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!</font>" )
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!</font>" )
|
||||
|
||||
affected.createwound(CUT, 20)
|
||||
affected.fracture()
|
||||
affected.createwound(CUT, 20)
|
||||
affected.fracture()
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Rib Opening Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/open_encased/retract
|
||||
allowed_tools = list(
|
||||
@@ -73,53 +76,53 @@
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2.5
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/open_encased/retract/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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]!", 40)
|
||||
..()
|
||||
|
||||
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]!", 40)
|
||||
..()
|
||||
/datum/surgery_step/open_encased/retract/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "<font color='blue'>[user] forces open [target]'s [affected.encased] with \the [tool].</font>"
|
||||
var/self_msg = "<font color='blue'>You force open [target]'s [affected.encased] with \the [tool].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
affected.open = 3
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "<font color='blue'>[user] forces open [target]'s [affected.encased] with \the [tool].</font>"
|
||||
var/self_msg = "<font color='blue'>You force open [target]'s [affected.encased] with \the [tool].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.open = 3
|
||||
|
||||
// Whoops!
|
||||
if(prob(10))
|
||||
affected.fracture()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "<font color='red'>[user]'s hand slips, cracking [target]'s [affected.encased]!</font>"
|
||||
var/self_msg = "<font color='red'>Your hand slips, cracking [target]'s [affected.encased]!</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.createwound(BRUISE, 20)
|
||||
// Whoops!
|
||||
if(prob(10))
|
||||
affected.fracture()
|
||||
|
||||
/datum/surgery_step/open_encased/retract/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "<font color='red'>[user]'s hand slips, cracking [target]'s [affected.encased]!</font>"
|
||||
var/self_msg = "<font color='red'>Your hand slips, cracking [target]'s [affected.encased]!</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Rib Closing Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/open_encased/close
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/retractor = 100, \
|
||||
@@ -129,53 +132,53 @@
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/open_encased/close/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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
|
||||
/datum/surgery_step/open_encased/close/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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]!", 100)
|
||||
..()
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/open_encased/close/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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]!", 100)
|
||||
..()
|
||||
var/msg = "<font color='blue'>[user] bends [target]'s [affected.encased] back into place with \the [tool].</font>"
|
||||
var/self_msg = "<font color='blue'>You bend [target]'s [affected.encased] back into place with \the [tool].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
affected.open = 2.5
|
||||
|
||||
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)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "<font color='blue'>[user] bends [target]'s [affected.encased] back into place with \the [tool].</font>"
|
||||
var/self_msg = "<font color='blue'>You bend [target]'s [affected.encased] back into place with \the [tool].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
var/msg = "<font color='red'>[user]'s hand slips, bending [target]'s [affected.encased] the wrong way!</font>"
|
||||
var/self_msg = "<font color='red'>Your hand slips, bending [target]'s [affected.encased] the wrong way!</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.open = 2.5
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE.
|
||||
user.visible_message("<font color='red'> A rib pierces the lung!</font>")
|
||||
target.rupture_lung()*/
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "<font color='red'>[user]'s hand slips, bending [target]'s [affected.encased] the wrong way!</font>"
|
||||
var/self_msg = "<font color='red'>Your hand slips, bending [target]'s [affected.encased] the wrong way!</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
/*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE.
|
||||
user.visible_message("<font color='red'> A rib pierces the lung!</font>")
|
||||
target.rupture_lung()*/
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Rib Mending Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/open_encased/mend
|
||||
allowed_tools = list(
|
||||
@@ -186,33 +189,30 @@
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/open_encased/mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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
|
||||
/datum/surgery_step/open_encased/mend/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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]!", 100)
|
||||
..()
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/open_encased/mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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]!", 100)
|
||||
..()
|
||||
var/msg = "<font color='blue'>[user] applied \the [tool] to [target]'s [affected.encased].</font>"
|
||||
var/self_msg = "<font color='blue'>You applied \the [tool] to [target]'s [affected.encased].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "<font color='blue'>[user] applied \the [tool] to [target]'s [affected.encased].</font>"
|
||||
var/self_msg = "<font color='blue'>You applied \the [tool] to [target]'s [affected.encased].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.open = 2
|
||||
affected.open = 2
|
||||
@@ -7,13 +7,18 @@
|
||||
priority = 2
|
||||
req_open = 0
|
||||
can_infect = 0
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (!affected || (affected.robotic >= ORGAN_ROBOT))
|
||||
return 0
|
||||
return target_zone == O_MOUTH
|
||||
|
||||
/datum/surgery_step/face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (!affected || (affected.robotic >= ORGAN_ROBOT))
|
||||
return 0
|
||||
return target_zone == O_MOUTH
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Face Opening Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/cut_face
|
||||
allowed_tools = list(
|
||||
@@ -25,25 +30,29 @@
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target_zone == O_MOUTH && target.op_stage.face == 0
|
||||
/datum/surgery_step/generic/cut_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target_zone == O_MOUTH && target.op_stage.face == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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].")
|
||||
..()
|
||||
/datum/surgery_step/generic/cut_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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)
|
||||
user.visible_message("<font color='blue'>[user] has cut open [target]'s face and neck with \the [tool].</font>" , \
|
||||
"<font color='blue'> You have cut open[target]'s face and neck with \the [tool].</font>",)
|
||||
target.op_stage.face = 1
|
||||
/datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] has cut open [target]'s face and neck with \the [tool].</font>" , \
|
||||
"<font color='blue'> You have cut open[target]'s face and neck with \the [tool].</font>",)
|
||||
target.op_stage.face = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, slicing [target]'s throat wth \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, slicing [target]'s throat wth \the [tool]!</font>" )
|
||||
affected.createwound(CUT, 60)
|
||||
target.AdjustLosebreath(10)
|
||||
/datum/surgery_step/generic/cut_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, slicing [target]'s throat wth \the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, slicing [target]'s throat wth \the [tool]!</font>" )
|
||||
affected.createwound(CUT, 60)
|
||||
target.AdjustLosebreath(10)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Vocal Cord/Face Repair Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/face/mend_vocal
|
||||
allowed_tools = list(
|
||||
@@ -55,23 +64,27 @@
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.face == 1
|
||||
/datum/surgery_step/face/mend_vocal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.face == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \
|
||||
"You start mending [target]'s vocal cords with \the [tool].")
|
||||
..()
|
||||
/datum/surgery_step/face/mend_vocal/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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)
|
||||
user.visible_message("<font color='blue'>[user] mends [target]'s vocal cords with \the [tool].</font>", \
|
||||
"<font color='blue'>You mend [target]'s vocal cords with \the [tool].</font>")
|
||||
target.op_stage.face = 2
|
||||
/datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] mends [target]'s vocal cords with \the [tool].</font>", \
|
||||
"<font color='blue'>You mend [target]'s vocal cords with \the [tool].</font>")
|
||||
target.op_stage.face = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!</font>")
|
||||
target.AdjustLosebreath(10)
|
||||
/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!</font>")
|
||||
target.AdjustLosebreath(10)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Face Fixing Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/face/fix_face
|
||||
allowed_tools = list(
|
||||
@@ -82,24 +95,28 @@
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.face == 2
|
||||
/datum/surgery_step/face/fix_face/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.face == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts pulling the skin on [target]'s face back in place with \the [tool].", \
|
||||
"You start pulling the skin on [target]'s face back in place with \the [tool].")
|
||||
..()
|
||||
/datum/surgery_step/face/fix_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts pulling the skin on [target]'s face back in place with \the [tool].", \
|
||||
"You start pulling the 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)
|
||||
user.visible_message("<font color='blue'>[user] pulls the skin on [target]'s face back in place with \the [tool].</font>", \
|
||||
"<font color='blue'>You pull the skin on [target]'s face back in place with \the [tool].</font>")
|
||||
target.op_stage.face = 3
|
||||
/datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] pulls the skin on [target]'s face back in place with \the [tool].</font>", \
|
||||
"<font color='blue'>You pull the skin on [target]'s face back in place with \the [tool].</font>")
|
||||
target.op_stage.face = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing skin on [target]'s face with \the [tool]!</font>")
|
||||
target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1)
|
||||
/datum/surgery_step/face/fix_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing skin on [target]'s face with \the [tool]!</font>")
|
||||
target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Face Cauterizing Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/face/cauterize
|
||||
allowed_tools = list(
|
||||
@@ -112,27 +129,27 @@
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.face > 0
|
||||
/datum/surgery_step/face/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.face > 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool].</font>" , \
|
||||
"<font color='blue'>You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].</font>")
|
||||
..()
|
||||
/datum/surgery_step/face/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool].</font>" , \
|
||||
"<font color='blue'>You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].</font>")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] cauterizes the incision on [target]'s face and neck with \the [tool].</font>", \
|
||||
"<font color='blue'>You cauterize the incision on [target]'s face and neck with \the [tool].</font>")
|
||||
affected.open = 0
|
||||
affected.status &= ~ORGAN_BLEEDING
|
||||
if (target.op_stage.face == 3)
|
||||
var/obj/item/organ/external/head/h = affected
|
||||
h.disfigured = 0
|
||||
target.op_stage.face = 0
|
||||
/datum/surgery_step/face/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] cauterizes the incision on [target]'s face and neck with \the [tool].</font>", \
|
||||
"<font color='blue'>You cauterize the incision on [target]'s face and neck with \the [tool].</font>")
|
||||
affected.open = 0
|
||||
affected.status &= ~ORGAN_BLEEDING
|
||||
if (target.op_stage.face == 3)
|
||||
var/obj/item/organ/external/head/h = affected
|
||||
h.disfigured = 0
|
||||
target.op_stage.face = 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("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, leaving a small burn on [target]'s face with \the [tool]!</font>")
|
||||
target.apply_damage(4, BURN, affected)
|
||||
/datum/surgery_step/face/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, leaving a small burn on [target]'s face with \the [tool]!</font>")
|
||||
target.apply_damage(4, BURN, affected)
|
||||
@@ -5,21 +5,70 @@
|
||||
|
||||
/datum/surgery_step/generic/
|
||||
can_infect = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (isslime(target))
|
||||
return 0
|
||||
if (target_zone == O_EYES) //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/generic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (isslime(target))
|
||||
return 0
|
||||
if (target_zone == O_EYES) //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.is_stump())
|
||||
return 0
|
||||
if (affected.robotic >= ORGAN_ROBOT)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Scalpel Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/cut_open
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/scalpel = 100, \
|
||||
/obj/item/weapon/material/knife = 75, \
|
||||
/obj/item/weapon/material/shard = 50, \
|
||||
)
|
||||
req_open = 0
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
/datum/surgery_step/generic/cut_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.is_stump())
|
||||
return 0
|
||||
if (affected.robotic >= ORGAN_ROBOT)
|
||||
return 0
|
||||
return 1
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
/datum/surgery_step/generic/cut_open/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start the incision on [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!", 40)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/generic/cut_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has made an incision on [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have made an incision on [target]'s [affected.name] with \the [tool].</font>",)
|
||||
affected.open = 1
|
||||
|
||||
if(istype(target) && target.should_have_organ(O_HEART))
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
|
||||
affected.createwound(CUT, 1)
|
||||
|
||||
/datum/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Laser Scalpel Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/cut_with_laser
|
||||
allowed_tools = list(
|
||||
@@ -33,35 +82,39 @@
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/generic/cut_with_laser/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start the bloodless incision on [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("You feel a horrible, searing pain in your [affected.name]!", 50)
|
||||
..()
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>",)
|
||||
//Could be cleaner ...
|
||||
affected.open = 1
|
||||
/datum/surgery_step/generic/cut_with_laser/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start the bloodless incision on [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("You feel a horrible, searing pain in your [affected.name]!", 50)
|
||||
..()
|
||||
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
spread_germs_to_organ(affected, user)
|
||||
/datum/surgery_step/generic/cut_with_laser/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>",)
|
||||
//Could be cleaner ...
|
||||
affected.open = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 7.5)
|
||||
affected.createwound(BURN, 12.5)
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
spread_germs_to_organ(affected, user)
|
||||
|
||||
/datum/surgery_step/generic/cut_with_laser/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 7.5)
|
||||
affected.createwound(BURN, 12.5)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Incision Management Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/incision_manager
|
||||
allowed_tools = list(
|
||||
@@ -72,77 +125,41 @@
|
||||
min_duration = 80
|
||||
max_duration = 120
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/generic/incision_manager/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \
|
||||
"You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!", 50)
|
||||
..()
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>",)
|
||||
affected.open = 1
|
||||
/datum/surgery_step/generic/incision_manager/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \
|
||||
"You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!", 50)
|
||||
..()
|
||||
|
||||
if(istype(target) && target.should_have_organ(O_HEART))
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
/datum/surgery_step/generic/incision_manager/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>",)
|
||||
affected.open = 1
|
||||
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
affected.open = 2
|
||||
if(istype(target) && target.should_have_organ(O_HEART))
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 20)
|
||||
affected.createwound(BURN, 15)
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
affected.open = 2
|
||||
|
||||
/datum/surgery_step/generic/cut_open
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/scalpel = 100, \
|
||||
/obj/item/weapon/material/knife = 75, \
|
||||
/obj/item/weapon/material/shard = 50, \
|
||||
)
|
||||
req_open = 0
|
||||
/datum/surgery_step/generic/incision_manager/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 20)
|
||||
affected.createwound(BURN, 15)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start the incision on [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!", 40)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has made an incision on [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have made an incision on [target]'s [affected.name] with \the [tool].</font>",)
|
||||
affected.open = 1
|
||||
|
||||
if(istype(target) && target.should_have_organ(O_HEART))
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
|
||||
affected.createwound(CUT, 1)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 10)
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Hemostat Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/clamp_bleeders
|
||||
allowed_tools = list(
|
||||
@@ -154,30 +171,34 @@
|
||||
min_duration = 40
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open && (affected.status & ORGAN_BLEEDING)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/generic/clamp_bleeders/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \
|
||||
"You start clamping bleeders in [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("The pain in your [affected.name] is maddening!", 40)
|
||||
..()
|
||||
return affected && affected.open && (affected.status & ORGAN_BLEEDING)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.clamp()
|
||||
spread_germs_to_organ(affected, user)
|
||||
/datum/surgery_step/generic/clamp_bleeders/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \
|
||||
"You start clamping bleeders in [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("The pain in your [affected.name] is maddening!", 40)
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>",)
|
||||
affected.createwound(CUT, 10)
|
||||
/datum/surgery_step/generic/clamp_bleeders/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.clamp()
|
||||
spread_germs_to_organ(affected, user)
|
||||
|
||||
/datum/surgery_step/generic/clamp_bleeders/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>",)
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Retractor Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/retract_skin
|
||||
allowed_tools = list(
|
||||
@@ -189,50 +210,54 @@
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 1 //&& !(affected.status & ORGAN_BLEEDING)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/generic/retract_skin/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]."
|
||||
var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]."
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40)
|
||||
..()
|
||||
return affected && affected.open == 1 //&& !(affected.status & ORGAN_BLEEDING)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "<font color='blue'>[user] keeps the incision open on [target]'s [affected.name] with \the [tool].</font>"
|
||||
var/self_msg = "<font color='blue'>You keep the incision open on [target]'s [affected.name] with \the [tool].</font>"
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "<font color='blue'>[user] keeps the ribcage open on [target]'s torso with \the [tool].</font>"
|
||||
self_msg = "<font color='blue'>You keep the ribcage open on [target]'s torso with \the [tool].</font>"
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "<font color='blue'>[user] keeps the incision open on [target]'s lower abdomen with \the [tool].</font>"
|
||||
self_msg = "<font color='blue'>You keep the incision open on [target]'s lower abdomen with \the [tool].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
affected.open = 2
|
||||
/datum/surgery_step/generic/retract_skin/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]."
|
||||
var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]."
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40)
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "<font color='red'>[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
|
||||
var/self_msg = "<font color='red'>Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
|
||||
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
|
||||
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
target.apply_damage(12, BRUTE, affected, sharp=1)
|
||||
/datum/surgery_step/generic/retract_skin/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "<font color='blue'>[user] keeps the incision open on [target]'s [affected.name] with \the [tool].</font>"
|
||||
var/self_msg = "<font color='blue'>You keep the incision open on [target]'s [affected.name] with \the [tool].</font>"
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "<font color='blue'>[user] keeps the ribcage open on [target]'s torso with \the [tool].</font>"
|
||||
self_msg = "<font color='blue'>You keep the ribcage open on [target]'s torso with \the [tool].</font>"
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "<font color='blue'>[user] keeps the incision open on [target]'s lower abdomen with \the [tool].</font>"
|
||||
self_msg = "<font color='blue'>You keep the incision open on [target]'s lower abdomen with \the [tool].</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
affected.open = 2
|
||||
|
||||
/datum/surgery_step/generic/retract_skin/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/msg = "<font color='red'>[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
|
||||
var/self_msg = "<font color='red'>Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
|
||||
if (target_zone == BP_TORSO)
|
||||
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
|
||||
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
|
||||
if (target_zone == BP_GROIN)
|
||||
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
|
||||
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
|
||||
user.visible_message(msg, self_msg)
|
||||
target.apply_damage(12, BRUTE, affected, sharp=1)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Cauterize Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/cauterize
|
||||
allowed_tools = list(
|
||||
@@ -245,31 +270,35 @@
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/generic/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \
|
||||
"You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("Your [affected.name] is being burned!", 40)
|
||||
..()
|
||||
return affected && affected.open && target_zone != O_MOUTH
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You cauterize the incision on [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.open = 0
|
||||
affected.germ_level = 0
|
||||
affected.status &= ~ORGAN_BLEEDING
|
||||
/datum/surgery_step/generic/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \
|
||||
"You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].")
|
||||
target.custom_pain("Your [affected.name] is being burned!", 40)
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>")
|
||||
target.apply_damage(3, BURN, affected)
|
||||
/datum/surgery_step/generic/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You cauterize the incision on [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.open = 0
|
||||
affected.germ_level = 0
|
||||
affected.status &= ~ORGAN_BLEEDING
|
||||
|
||||
/datum/surgery_step/generic/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>")
|
||||
target.apply_damage(3, BURN, affected)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Amputation Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/generic/amputate
|
||||
allowed_tools = list(
|
||||
@@ -281,32 +310,32 @@
|
||||
min_duration = 110
|
||||
max_duration = 160
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (target_zone == O_EYES) //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
return !affected.cannot_amputate
|
||||
/datum/surgery_step/generic/amputate/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (target_zone == O_EYES) //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
return !affected.cannot_amputate
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \
|
||||
"You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].")
|
||||
target.custom_pain("Your [affected.amputation_point] is being ripped apart!", 100)
|
||||
..()
|
||||
/datum/surgery_step/generic/amputate/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \
|
||||
"You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].")
|
||||
target.custom_pain("Your [affected.amputation_point] is being ripped apart!", 100)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</font>", \
|
||||
"<font color='blue'>You amputate [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.droplimb(1,DROPLIMB_EDGE)
|
||||
/datum/surgery_step/generic/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</font>", \
|
||||
"<font color='blue'>You amputate [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.droplimb(1,DROPLIMB_EDGE)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 30)
|
||||
affected.fracture()
|
||||
/datum/surgery_step/generic/amputate/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 30)
|
||||
affected.fracture()
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
"<font color='red'>Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 20)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Space Making Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/cavity/make_space
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/surgicaldrill = 100, \
|
||||
@@ -66,6 +70,10 @@
|
||||
user.visible_message("<font color='blue'>[user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].</font>", \
|
||||
"<font color='blue'>You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].</font>" )
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Cavity Closing Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/cavity/close_space
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
@@ -78,23 +86,27 @@
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.cavity
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/cavity/close_space/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \
|
||||
"You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." )
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
affected.cavity = 0
|
||||
..()
|
||||
return affected && affected.cavity
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].</font>", \
|
||||
"<font color='blue'> You mend[target]'s [get_cavity(affected)] cavity walls with \the [tool].</font>" )
|
||||
/datum/surgery_step/cavity/close_space/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 mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \
|
||||
"You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." )
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
affected.cavity = 0
|
||||
..()
|
||||
|
||||
/datum/surgery_step/cavity/close_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].</font>", \
|
||||
"<font color='blue'> You mend[target]'s [get_cavity(affected)] cavity walls with \the [tool].</font>" )
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Item Implantation Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/cavity/place_item
|
||||
priority = 0
|
||||
@@ -103,43 +115,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/organ/external/affected = target.get_organ(target_zone)
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
return
|
||||
if(affected && affected.cavity)
|
||||
var/total_volume = tool.w_class
|
||||
for(var/obj/item/I in affected.implants)
|
||||
if(istype(I,/obj/item/weapon/implant))
|
||||
continue
|
||||
total_volume += I.w_class
|
||||
return total_volume <= get_max_wclass(affected)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/cavity/place_item/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] starts putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>", \
|
||||
"<font color='blue'>You start putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>" ) //Nobody will probably ever see this, but I made these two blue. ~CK
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
..()
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
return
|
||||
if(affected && affected.cavity)
|
||||
var/total_volume = tool.w_class
|
||||
for(var/obj/item/I in affected.implants)
|
||||
if(istype(I,/obj/item/weapon/implant))
|
||||
continue
|
||||
total_volume += I.w_class
|
||||
return total_volume <= get_max_wclass(affected)
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/cavity/place_item/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("<font color='blue'>[user] starts putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>", \
|
||||
"<font color='blue'>You start putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>" ) //Nobody will probably ever see this, but I made these two blue. ~CK
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
..()
|
||||
|
||||
user.visible_message("<font color='blue'>[user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>", \
|
||||
"<font color='blue'>You put \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>" )
|
||||
if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && (affected.robotic < ORGAN_ROBOT))
|
||||
user << "<font color='red'> You tear some blood vessels trying to fit such a big object in this cavity.</font>"
|
||||
var/datum/wound/internal_bleeding/I = new (10)
|
||||
affected.wounds += I
|
||||
affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1)
|
||||
user.drop_item()
|
||||
affected.implants += tool
|
||||
tool.loc = affected
|
||||
affected.cavity = 0
|
||||
/datum/surgery_step/cavity/place_item/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("<font color='blue'>[user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>", \
|
||||
"<font color='blue'>You put \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>" )
|
||||
if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && (affected.robotic < ORGAN_ROBOT))
|
||||
user << "<font color='red'> You tear some blood vessels trying to fit such a big object in this cavity.</font>"
|
||||
var/datum/wound/internal_bleeding/I = new (10)
|
||||
affected.wounds += I
|
||||
affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1)
|
||||
user.drop_item()
|
||||
affected.implants += tool
|
||||
tool.loc = affected
|
||||
affected.cavity = 0
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// IMPLANT/ITEM REMOVAL SURGERY //
|
||||
// IMPLANT/ITEM REMOVAL SURGERY
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/cavity/implant_removal
|
||||
@@ -152,78 +164,77 @@
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
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)
|
||||
if(affected.organ_tag == BP_HEAD)
|
||||
var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return ..() && (!sponge || !sponge.damage)
|
||||
else
|
||||
return ..()
|
||||
/datum/surgery_step/cavity/implant_removal/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)
|
||||
if(affected.organ_tag == BP_HEAD)
|
||||
var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return ..() && (!sponge || !sponge.damage)
|
||||
else
|
||||
return ..()
|
||||
|
||||
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("<font color='blue'>[user] starts poking around inside [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You start poking around inside [target]'s [affected.name] with \the [tool].</font>" )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
/datum/surgery_step/cavity/implant_removal/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("<font color='blue'>[user] starts poking around inside [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You start poking around inside [target]'s [affected.name] with \the [tool].</font>" )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/cavity/implant_removal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
|
||||
var/find_prob = 0
|
||||
var/find_prob = 0
|
||||
|
||||
if (affected.implants.len)
|
||||
if (affected.implants.len)
|
||||
|
||||
var/obj/item/obj = pick(affected.implants)
|
||||
var/obj/item/obj = pick(affected.implants)
|
||||
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
if (imp.islegal())
|
||||
find_prob +=60
|
||||
else
|
||||
find_prob +=40
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
if (imp.islegal())
|
||||
find_prob +=60
|
||||
else
|
||||
find_prob +=50
|
||||
|
||||
if (prob(find_prob))
|
||||
user.visible_message("<font color='blue'>[user] takes something out of incision on [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='blue'>You take [obj] out of incision on [target]'s [affected.name]s with \the [tool]!</font>" )
|
||||
affected.implants -= obj
|
||||
|
||||
BITSET(target.hud_updateflag, IMPLOYAL_HUD)
|
||||
|
||||
//Handle possessive brain borers.
|
||||
if(istype(obj,/mob/living/simple_animal/borer))
|
||||
var/mob/living/simple_animal/borer/worm = obj
|
||||
if(worm.controlling)
|
||||
target.release_control()
|
||||
worm.detatch()
|
||||
worm.leave_host()
|
||||
else
|
||||
obj.loc = get_turf(target)
|
||||
obj.add_blood(target)
|
||||
obj.update_icon()
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
else
|
||||
user.visible_message("<font color='blue'>[user] removes \the [tool] from [target]'s [affected.name].</font>", \
|
||||
"<font color='blue'>There's something inside [target]'s [affected.name], but you just missed it this time.</font>" )
|
||||
find_prob +=40
|
||||
else
|
||||
user.visible_message("<font color='blue'>[user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.</font>", \
|
||||
"<font color='blue'>You could not find anything inside [target]'s [affected.name].</font>" )
|
||||
find_prob +=50
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
..()
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
if (affected.implants.len)
|
||||
var/fail_prob = 10
|
||||
fail_prob += 100 - tool_quality(tool)
|
||||
if (prob(fail_prob))
|
||||
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||
user.visible_message("<font color='red'> Something beeps inside [target]'s [affected.name]!</font>")
|
||||
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
spawn(25)
|
||||
imp.activate()
|
||||
if (prob(find_prob))
|
||||
user.visible_message("<font color='blue'>[user] takes something out of incision on [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='blue'>You take [obj] out of incision on [target]'s [affected.name]s with \the [tool]!</font>" )
|
||||
affected.implants -= obj
|
||||
|
||||
BITSET(target.hud_updateflag, IMPLOYAL_HUD)
|
||||
|
||||
//Handle possessive brain borers.
|
||||
if(istype(obj,/mob/living/simple_animal/borer))
|
||||
var/mob/living/simple_animal/borer/worm = obj
|
||||
if(worm.controlling)
|
||||
target.release_control()
|
||||
worm.detatch()
|
||||
worm.leave_host()
|
||||
else
|
||||
obj.loc = get_turf(target)
|
||||
obj.add_blood(target)
|
||||
obj.update_icon()
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
else
|
||||
user.visible_message("<font color='blue'>[user] removes \the [tool] from [target]'s [affected.name].</font>", \
|
||||
"<font color='blue'>There's something inside [target]'s [affected.name], but you just missed it this time.</font>" )
|
||||
else
|
||||
user.visible_message("<font color='blue'>[user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.</font>", \
|
||||
"<font color='blue'>You could not find anything inside [target]'s [affected.name].</font>" )
|
||||
|
||||
/datum/surgery_step/cavity/implant_removal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
..()
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
if (affected.implants.len)
|
||||
var/fail_prob = 10
|
||||
fail_prob += 100 - tool_quality(tool)
|
||||
if (prob(fail_prob))
|
||||
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||
user.visible_message("<font color='red'> Something beeps inside [target]'s [affected.name]!</font>")
|
||||
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
spawn(25)
|
||||
imp.activate()
|
||||
|
||||
@@ -7,14 +7,19 @@
|
||||
priority = 3 // Must be higher than /datum/surgery_step/internal
|
||||
req_open = 0
|
||||
can_infect = 0
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected)
|
||||
return 0
|
||||
var/list/organ_data = target.species.has_limbs["[target_zone]"]
|
||||
return !isnull(organ_data)
|
||||
|
||||
/datum/surgery_step/limb/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected)
|
||||
return 0
|
||||
var/list/organ_data = target.species.has_limbs["[target_zone]"]
|
||||
return !isnull(organ_data)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Limb Attachment Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/limb/attach
|
||||
allowed_tools = list(/obj/item/organ/external = 100)
|
||||
@@ -22,45 +27,49 @@
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/E = tool
|
||||
var/obj/item/organ/external/P = target.organs_by_name[E.parent_organ]
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected)
|
||||
to_chat(user, "<span class='warning'>Something is in the way! You can't attach [E] here!</span>")
|
||||
return 0
|
||||
if(!P)
|
||||
to_chat(user, "<span class='warning'>There's nothing to attach [E] to!</span>")
|
||||
return 0
|
||||
else if((P.robotic >= ORGAN_ROBOT) && (E.robotic < ORGAN_ROBOT))
|
||||
to_chat(user, "<span class='warning'>Attaching [E] to [P] wouldn't work well.</span>")
|
||||
return 0
|
||||
else if(istype(E, /obj/item/organ/external/head) && E.robotic >= ORGAN_ROBOT && P.robotic < ORGAN_ROBOT)
|
||||
to_chat(user, "<span class='warning'>Attaching [E] to [P] might break [E].</span>")
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
/datum/surgery_step/limb/attach/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/E = tool
|
||||
var/obj/item/organ/external/P = target.organs_by_name[E.parent_organ]
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected)
|
||||
to_chat(user, "<span class='warning'>Something is in the way! You can't attach [E] here!</span>")
|
||||
return 0
|
||||
if(!P)
|
||||
to_chat(user, "<span class='warning'>There's nothing to attach [E] to!</span>")
|
||||
return 0
|
||||
else if((P.robotic >= ORGAN_ROBOT) && (E.robotic < ORGAN_ROBOT))
|
||||
to_chat(user, "<span class='warning'>Attaching [E] to [P] wouldn't work well.</span>")
|
||||
return 0
|
||||
else if(istype(E, /obj/item/organ/external/head) && E.robotic >= ORGAN_ROBOT && P.robotic < ORGAN_ROBOT)
|
||||
to_chat(user, "<span class='warning'>Attaching [E] to [P] might break [E].</span>")
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
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.drop_from_inventory(E)
|
||||
E.replaced(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.drop_from_inventory(E)
|
||||
E.replaced(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='warning'> [user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
|
||||
"<span class='warning'> 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='warning'> [user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
|
||||
target.apply_damage(10, BRUTE, null, sharp=1)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Limb Connection Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/limb/connect
|
||||
allowed_tools = list(
|
||||
@@ -73,32 +82,36 @@
|
||||
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='warning'> [user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
|
||||
"<span class='warning'> 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='warning'> [user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
|
||||
target.apply_damage(10, BRUTE, null, sharp=1)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Robolimb Attachment Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/limb/mechanize
|
||||
allowed_tools = list(/obj/item/robot_parts = 100)
|
||||
@@ -106,43 +119,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/mechanize/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)
|
||||
user.visible_message("[user] starts attaching \the [tool] to [target].", \
|
||||
"You start attaching \the [tool] to [target].")
|
||||
/datum/surgery_step/limb/mechanize/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/mechanize/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='warning'> [user]'s hand slips, damaging [target]'s flesh!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s flesh!</span>")
|
||||
target.apply_damage(10, BRUTE, null, sharp=1)
|
||||
/datum/surgery_step/limb/mechanize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s flesh!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s flesh!</span>")
|
||||
target.apply_damage(10, BRUTE, null, sharp=1)
|
||||
|
||||
@@ -65,86 +65,87 @@
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/internal/fix_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected)
|
||||
return
|
||||
var/is_organ_damaged = 0
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_organ_damaged
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected)
|
||||
return
|
||||
var/is_organ_damaged = 0
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_organ_damaged
|
||||
/datum/surgery_step/internal/fix_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
tool_name = "the bandaid"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
tool_name = "the bandaid"
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(!(I.robotic >= ORGAN_ROBOT))
|
||||
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
|
||||
"You start treating damage to [target]'s [I.name] with [tool_name]." )
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(!(I.robotic >= ORGAN_ROBOT))
|
||||
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
|
||||
"You start treating damage to [target]'s [I.name] with [tool_name]." )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
/datum/surgery_step/internal/fix_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
tool_name = "the bandaid"
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
tool_name = "the bandaid"
|
||||
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)
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(!(I.robotic >= ORGAN_ROBOT))
|
||||
user.visible_message("<span class='notice'>[user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
|
||||
"<span class='notice'>You treat damage to [target]'s [I.name] with [tool_name].</span>" )
|
||||
I.damage = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
target.sdisabilities &= ~BLIND
|
||||
if(I.organ_tag == O_LUNGS)
|
||||
target.SetLosebreath(0)
|
||||
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(!(I.robotic >= ORGAN_ROBOT))
|
||||
user.visible_message("<span class='notice'>[user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
|
||||
"<span class='notice'>You treat damage to [target]'s [I.name] with [tool_name].</span>" )
|
||||
I.damage = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
target.sdisabilities &= ~BLIND
|
||||
if(I.organ_tag == O_LUNGS)
|
||||
target.SetLosebreath(0)
|
||||
/datum/surgery_step/internal/fix_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
var/dam_amt = 2
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
target.adjustToxLoss(5)
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
var/dam_amt = 2
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
target.adjustToxLoss(5)
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Organ Detaching Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
/datum/surgery_step/internal/detatch_organ
|
||||
/datum/surgery_step/internal/detatch_organ/
|
||||
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/scalpel = 100, \
|
||||
@@ -155,54 +156,56 @@
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/internal/detatch_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
if (!..())
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && !(affected.robotic >= ORGAN_ROBOT)))
|
||||
return 0
|
||||
|
||||
if(!(affected && !(affected.robotic >= ORGAN_ROBOT)))
|
||||
return 0
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
attached_organs |= organ
|
||||
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
attached_organs |= organ
|
||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
return ..() && organ_to_remove
|
||||
|
||||
return ..() && organ_to_remove
|
||||
/datum/surgery_step/internal/detatch_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/internal/detatch_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have separated [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
|
||||
user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have separated [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
/datum/surgery_step/internal/detatch_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(CUT, rand(30,50), 1)
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(CUT, rand(30,50), 1)
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Organ Removal Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/internal/remove_organ
|
||||
|
||||
@@ -215,48 +218,51 @@
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/internal/remove_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
if (!..())
|
||||
return 0
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/internal/I = target.internal_organs_by_name[organ]
|
||||
if(istype(I) && (I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to remove?") as null|anything in removable_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
return ..()
|
||||
|
||||
/datum/surgery_step/internal/remove_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start removing [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/remove_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have removed [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(O && istype(O))
|
||||
O.removed(user)
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/internal/I = target.internal_organs_by_name[organ]
|
||||
if(istype(I) && (I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
/datum/surgery_step/internal/remove_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to remove?") as null|anything in removable_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
return ..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start removing [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have removed [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(O && istype(O))
|
||||
O.removed(user)
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Organ Replacement Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/internal/replace_organ
|
||||
allowed_tools = list(
|
||||
@@ -266,70 +272,76 @@
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/internal/replace_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/internal/O = tool
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/obj/item/organ/internal/O = tool
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/organ_compatible
|
||||
var/organ_missing
|
||||
if(!affected)
|
||||
return
|
||||
|
||||
if(!istype(O))
|
||||
return 0
|
||||
var/organ_compatible
|
||||
var/organ_missing
|
||||
|
||||
if((affected.robotic >= ORGAN_ROBOT) && !(O.robotic >= ORGAN_ROBOT))
|
||||
user << "<span class='danger'>You cannot install a naked organ into a robotic body.</span>"
|
||||
return SURGERY_FAILURE
|
||||
if(!istype(O))
|
||||
return 0
|
||||
|
||||
if(!target.species)
|
||||
user << "<span class='danger'>You have no idea what species this person is. Report this on the bug tracker.</span>"
|
||||
return SURGERY_FAILURE
|
||||
if((affected.robotic >= ORGAN_ROBOT) && !(O.robotic >= ORGAN_ROBOT))
|
||||
user << "<span class='danger'>You cannot install a naked organ into a robotic body.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
var/o_is = (O.gender == PLURAL) ? "are" : "is"
|
||||
var/o_a = (O.gender == PLURAL) ? "" : "a "
|
||||
var/o_do = (O.gender == PLURAL) ? "don't" : "doesn't"
|
||||
if(!target.species)
|
||||
user << "<span class='danger'>You have no idea what species this person is. Report this on the bug tracker.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(O.damage > (O.max_damage * 0.75))
|
||||
user << "<span class='warning'>\The [O.organ_tag] [o_is] in no state to be transplanted.</span>"
|
||||
return SURGERY_FAILURE
|
||||
var/o_is = (O.gender == PLURAL) ? "are" : "is"
|
||||
var/o_a = (O.gender == PLURAL) ? "" : "a "
|
||||
var/o_do = (O.gender == PLURAL) ? "don't" : "doesn't"
|
||||
|
||||
if(!target.internal_organs_by_name[O.organ_tag])
|
||||
organ_missing = 1
|
||||
else
|
||||
user << "<span class='warning'>\The [target] already has [o_a][O.organ_tag].</span>"
|
||||
return SURGERY_FAILURE
|
||||
if(O.damage > (O.max_damage * 0.75))
|
||||
user << "<span class='warning'>\The [O.organ_tag] [o_is] in no state to be transplanted.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(O && affected.organ_tag == O.parent_organ)
|
||||
organ_compatible = 1
|
||||
if(!target.internal_organs_by_name[O.organ_tag])
|
||||
organ_missing = 1
|
||||
else
|
||||
user << "<span class='warning'>\The [target] already has [o_a][O.organ_tag].</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
else
|
||||
user << "<span class='warning'>\The [O.organ_tag] [o_do] normally go in \the [affected.name].</span>"
|
||||
return SURGERY_FAILURE
|
||||
if(O && affected.organ_tag == O.parent_organ)
|
||||
organ_compatible = 1
|
||||
|
||||
return ..() && organ_missing && organ_compatible
|
||||
else
|
||||
user << "<span class='warning'>\The [O.organ_tag] [o_do] normally go in \the [affected.name].</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
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 transplanting \the [tool] into [target]'s [affected.name].", \
|
||||
"You start transplanting \the [tool] into [target]'s [affected.name].")
|
||||
target.custom_pain("Someone's rooting around in your [affected.name]!", 100)
|
||||
..()
|
||||
return ..() && organ_missing && organ_compatible
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You have transplanted \the [tool] into [target]'s [affected.name].</span>")
|
||||
var/obj/item/organ/O = tool
|
||||
if(istype(O))
|
||||
user.remove_from_mob(O)
|
||||
O.replaced(target,affected)
|
||||
/datum/surgery_step/internal/replace_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \
|
||||
"You start transplanting \the [tool] into [target]'s [affected.name].")
|
||||
target.custom_pain("Someone's rooting around in your [affected.name]!", 100)
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging \the [tool]!</span>")
|
||||
var/obj/item/organ/I = tool
|
||||
if(istype(I))
|
||||
I.take_damage(rand(3,5),0)
|
||||
/datum/surgery_step/internal/replace_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You have transplanted \the [tool] into [target]'s [affected.name].</span>")
|
||||
var/obj/item/organ/O = tool
|
||||
if(istype(O))
|
||||
user.remove_from_mob(O)
|
||||
O.replaced(target,affected)
|
||||
|
||||
/datum/surgery_step/internal/replace_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging \the [tool]!</span>")
|
||||
var/obj/item/organ/I = tool
|
||||
if(istype(I))
|
||||
I.take_damage(rand(3,5),0)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Organ Attaching Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/internal/attach_organ
|
||||
allowed_tools = list(
|
||||
@@ -340,45 +352,44 @@
|
||||
min_duration = 100
|
||||
max_duration = 120
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/internal/attach_organ/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
if (!..())
|
||||
return 0
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(istype(I) && (I.status & ORGAN_CUT_AWAY) && !(I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(istype(I) && (I.status & ORGAN_CUT_AWAY) && !(I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||
if(!organ_to_replace)
|
||||
return 0
|
||||
|
||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||
if(!organ_to_replace)
|
||||
return 0
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
return ..()
|
||||
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
return ..()
|
||||
/datum/surgery_step/internal/attach_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100)
|
||||
..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100)
|
||||
..()
|
||||
/datum/surgery_step/internal/attach_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
/datum/surgery_step/internal/attach_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// HEART SURGERY //
|
||||
@@ -394,5 +405,5 @@
|
||||
// min_duration = 30
|
||||
// max_duration = 40
|
||||
|
||||
// can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// /datum/surgery_step/ribcage/heart/cut/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// return ..() && target.op_stage.ribcage == 2
|
||||
@@ -3,6 +3,9 @@
|
||||
// INTERNAL WOUND PATCHING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Internal Bleeding Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/fix_vein
|
||||
priority = 2
|
||||
@@ -16,85 +19,45 @@
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
/datum/surgery_step/fix_vein/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/internal_bleeding = 0
|
||||
for(var/datum/wound/W in affected.wounds) if(W.internal)
|
||||
internal_bleeding = 1
|
||||
break
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/internal_bleeding = 0
|
||||
for(var/datum/wound/W in affected.wounds) if(W.internal)
|
||||
internal_bleeding = 1
|
||||
break
|
||||
|
||||
return affected.open == (affected.encased ? 3 : 2) && internal_bleeding
|
||||
return affected.open == (affected.encased ? 3 : 2) && internal_bleeding
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts 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!", 100)
|
||||
..()
|
||||
/datum/surgery_step/fix_vein/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 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!", 100)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have patched the damaged vein in [target]'s [affected.name] with \the [tool].</font>")
|
||||
/datum/surgery_step/fix_vein/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have patched the damaged vein in [target]'s [affected.name] with \the [tool].</font>")
|
||||
|
||||
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)) user:bloody_hands(target, 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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
|
||||
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
|
||||
affected.take_damage(5, 0)
|
||||
/datum/surgery_step/fix_vein/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
|
||||
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
|
||||
affected.take_damage(5, 0)
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue //Debridement
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/surgical/scalpel = 100, \
|
||||
/obj/item/weapon/material/knife = 75, \
|
||||
/obj/item/weapon/material/shard = 50, \
|
||||
)
|
||||
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
min_duration = 110
|
||||
max_duration = 160
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
if (target_zone == O_MOUTH || target_zone == O_EYES)
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
return affected && affected.open >= 2 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
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 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!", 100)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='blue'>[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</font>", \
|
||||
"<font color='blue'>You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</font>")
|
||||
affected.open = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</font>")
|
||||
affected.createwound(CUT, 20, 1)
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Necrosis Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/treat_necrosis
|
||||
priority = 2
|
||||
@@ -112,60 +75,64 @@
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return 0
|
||||
/datum/surgery_step/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
if(!container.reagents.has_reagent("peridaxon"))
|
||||
return 0
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
if(!container.reagents.has_reagent("peridaxon"))
|
||||
return 0
|
||||
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
if (target_zone == O_MOUTH || target_zone == O_EYES)
|
||||
return 0
|
||||
if (target_zone == O_MOUTH || target_zone == O_EYES)
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
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 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!", 50)
|
||||
..()
|
||||
/datum/surgery_step/treat_necrosis/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 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!", 50)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
/datum/surgery_step/treat_necrosis/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 (!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_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
if (trans > 0)
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
affected.owner.update_body(1)
|
||||
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
if (trans > 0)
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
affected.owner.update_body(1)
|
||||
|
||||
user.visible_message("<font color='blue'>[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name].</font>", \
|
||||
"<font color='blue'>You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].</font>")
|
||||
user.visible_message("<font color='blue'>[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name].</font>", \
|
||||
"<font color='blue'>You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].</font>")
|
||||
|
||||
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)
|
||||
/datum/surgery_step/treat_necrosis/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)
|
||||
|
||||
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_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</font>")
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</font>" , \
|
||||
"<font color='red'>Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</font>")
|
||||
|
||||
//no damage or anything, just wastes medicine
|
||||
//no damage or anything, just wastes medicine
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Hardsuit Removal Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/hardsuit
|
||||
allowed_tools = list(
|
||||
@@ -181,29 +148,28 @@
|
||||
min_duration = 120
|
||||
max_duration = 180
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!istype(target))
|
||||
/datum/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!istype(target))
|
||||
return 0
|
||||
if(istype(tool,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = tool
|
||||
if(!welder.isOn() || !welder.remove_fuel(1,user))
|
||||
return 0
|
||||
if(istype(tool,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = tool
|
||||
if(!welder.isOn() || !welder.remove_fuel(1,user))
|
||||
return 0
|
||||
return (target_zone == BP_TORSO) && istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove)
|
||||
return (target_zone == BP_TORSO) && istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \
|
||||
"You start cutting through the support systems of [target]'s [target.back] with \the [tool].")
|
||||
..()
|
||||
/datum/surgery_step/hardsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \
|
||||
"You start cutting through the support systems of [target]'s [target.back] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/hardsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/weapon/rig/rig = target.back
|
||||
if(!istype(rig))
|
||||
return
|
||||
rig.reset()
|
||||
user.visible_message("<span class='notice'>[user] has cut through the support systems of [target]'s [rig] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have cut through the support systems of [target]'s [rig] with \the [tool].</span>")
|
||||
|
||||
var/obj/item/weapon/rig/rig = target.back
|
||||
if(!istype(rig))
|
||||
return
|
||||
rig.reset()
|
||||
user.visible_message("<span class='notice'>[user] has cut through the support systems of [target]'s [rig] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have cut through the support systems of [target]'s [rig] with \the [tool].</span>")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='danger'>[user]'s [tool] can't quite seem to get through the metal...</span>", \
|
||||
"<span class='danger'>Your [tool] can't quite seem to get through the metal. It's weakening, though - try again.</span>")
|
||||
/datum/surgery_step/hardsuit/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='danger'>[user]'s [tool] can't quite seem to get through the metal...</span>", \
|
||||
"<span class='danger'>Your [tool] can't quite seem to get through the metal. It's weakening, though - try again.</span>")
|
||||
|
||||
@@ -5,21 +5,26 @@
|
||||
|
||||
/datum/surgery_step/robotics/
|
||||
can_infect = 0
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (isslime(target))
|
||||
return 0
|
||||
if (target_zone == O_EYES) //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
if (!(affected.robotic >= ORGAN_ROBOT))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/robotics/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (isslime(target))
|
||||
return 0
|
||||
if (target_zone == O_EYES) //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
if (!(affected.robotic >= ORGAN_ROBOT))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Unscrew Hatch Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/unscrew_hatch
|
||||
allowed_tools = list(
|
||||
@@ -32,27 +37,31 @@
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/unscrew_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
return affected && affected.open == 0 && target_zone != O_MOUTH
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>",)
|
||||
affected.open = 1
|
||||
/datum/surgery_step/robotics/unscrew_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
|
||||
"You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].</span>", \
|
||||
"<span class='warning'>Your [tool] slips, failing to unscrew [target]'s [affected.name].</span>")
|
||||
/datum/surgery_step/robotics/unscrew_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>",)
|
||||
affected.open = 1
|
||||
|
||||
/datum/surgery_step/robotics/unscrew_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].</span>", \
|
||||
"<span class='warning'>Your [tool] slips, failing to unscrew [target]'s [affected.name].</span>")
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Open Hatch Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/open_hatch
|
||||
allowed_tools = list(
|
||||
@@ -64,27 +73,31 @@
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/open_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].",
|
||||
"You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
return affected && affected.open == 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)
|
||||
user.visible_message("<span class='notice'>[user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You open the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.open = 3
|
||||
/datum/surgery_step/robotics/open_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].",
|
||||
"You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].</span>",
|
||||
"<span class='warning'>Your [tool] slips, failing to open the hatch on [target]'s [affected.name].</span>")
|
||||
/datum/surgery_step/robotics/open_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You open the maintenance hatch on [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.open = 3
|
||||
|
||||
/datum/surgery_step/robotics/open_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].</span>",
|
||||
"<span class='warning'>Your [tool] slips, failing to open the hatch on [target]'s [affected.name].</span>")
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Close Hatch Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/close_hatch
|
||||
allowed_tools = list(
|
||||
@@ -96,28 +109,32 @@
|
||||
min_duration = 70
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/close_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \
|
||||
"You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
return affected && affected.open && target_zone != O_MOUTH
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You close and secure the hatch on [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.open = 0
|
||||
affected.germ_level = 0
|
||||
/datum/surgery_step/robotics/close_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \
|
||||
"You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].")
|
||||
..()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].</span>",
|
||||
"<span class='warning'>Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].</span>")
|
||||
/datum/surgery_step/robotics/close_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You close and secure the hatch on [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.open = 0
|
||||
affected.germ_level = 0
|
||||
|
||||
/datum/surgery_step/robotics/close_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].</span>",
|
||||
"<span class='warning'>Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].</span>")
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Brute Repair Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/repair_brute
|
||||
allowed_tools = list(
|
||||
@@ -128,32 +145,37 @@
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(istype(tool,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = tool
|
||||
if(!welder.isOn() || !welder.remove_fuel(1,user))
|
||||
return 0
|
||||
return affected && affected.open == 3 && (affected.disfigured || affected.brute_dam > 0) && target_zone != O_MOUTH
|
||||
/datum/surgery_step/robotics/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(istype(tool,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = tool
|
||||
if(!welder.isOn() || !welder.remove_fuel(1,user))
|
||||
return 0
|
||||
return affected && affected.open == 3 && (affected.disfigured || affected.brute_dam > 0) && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
|
||||
"You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].")
|
||||
..()
|
||||
/datum/surgery_step/robotics/repair_brute/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
|
||||
"You begin to patch damage to [target]'s [affected.name]'s support structure 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("<span class='notice'>[user] finishes patching damage to [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You finish patching damage to [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.heal_damage(rand(30,50),0,1,1)
|
||||
affected.disfigured = 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("<span class='warning'>[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].</span>",
|
||||
"<span class='warning'>Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].</span>")
|
||||
target.apply_damage(rand(5,10), BURN, affected)
|
||||
/datum/surgery_step/robotics/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] finishes patching damage to [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You finish patching damage to [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.heal_damage(rand(30,50),0,1,1)
|
||||
affected.disfigured = 0
|
||||
|
||||
/datum/surgery_step/robotics/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].</span>",
|
||||
"<span class='warning'>Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].</span>")
|
||||
target.apply_damage(rand(5,10), BURN, affected)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Burn Repair Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/repair_burn
|
||||
allowed_tools = list(
|
||||
@@ -163,41 +185,45 @@
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(istype(tool,/obj/item/stack/cable_coil/))
|
||||
var/obj/item/stack/cable_coil/C = tool
|
||||
if(affected.burn_dam == 0)
|
||||
to_chat(user, "<span class='notice'>There are no burnt wires here!</span>")
|
||||
/datum/surgery_step/robotics/repair_burn/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(istype(tool,/obj/item/stack/cable_coil/))
|
||||
var/obj/item/stack/cable_coil/C = tool
|
||||
if(affected.burn_dam == 0)
|
||||
to_chat(user, "<span class='notice'>There are no burnt wires here!</span>")
|
||||
return SURGERY_FAILURE
|
||||
else
|
||||
if(!C.can_use(5))
|
||||
to_chat(user, "<span class='danger'>You need at least five cable pieces to repair this part.</span>") //usage amount made more consistent with regular cable repair
|
||||
return SURGERY_FAILURE
|
||||
else
|
||||
if(!C.can_use(5))
|
||||
to_chat(user, "<span class='danger'>You need at least five cable pieces to repair this part.</span>") //usage amount made more consistent with regular cable repair
|
||||
return SURGERY_FAILURE
|
||||
else
|
||||
C.use(5)
|
||||
C.use(5)
|
||||
|
||||
return affected && affected.open == 3 && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH
|
||||
return affected && affected.open == 3 && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \
|
||||
"You begin to splice new cabling into [target]'s [affected.name].")
|
||||
..()
|
||||
/datum/surgery_step/robotics/repair_burn/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \
|
||||
"You begin to splice new cabling into [target]'s [affected.name].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] finishes splicing cable into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You finishes splicing new cable into [target]'s [affected.name].</span>")
|
||||
affected.heal_damage(0,rand(30,50),1,1)
|
||||
affected.disfigured = 0
|
||||
/datum/surgery_step/robotics/repair_burn/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] finishes splicing cable into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You finishes splicing new cable into [target]'s [affected.name].</span>")
|
||||
affected.heal_damage(0,rand(30,50),1,1)
|
||||
affected.disfigured = 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("<span class='warning'>[user] causes a short circuit in [target]'s [affected.name]!</span>",
|
||||
"<span class='warning'>You cause a short circuit in [target]'s [affected.name]!</span>")
|
||||
target.apply_damage(rand(5,10), BURN, affected)
|
||||
/datum/surgery_step/robotics/repair_burn/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='warning'>[user] causes a short circuit in [target]'s [affected.name]!</span>",
|
||||
"<span class='warning'>You cause a short circuit in [target]'s [affected.name]!</span>")
|
||||
target.apply_damage(rand(5,10), BURN, affected)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Robot Organ Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/fix_organ_robotic //For artificial organs
|
||||
allowed_tools = list(
|
||||
@@ -209,65 +235,64 @@
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/fix_organ_robotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/is_organ_damaged = 0
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I.damage > 0 && (I.robotic >= ORGAN_ROBOT))
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return affected.open == 3 && is_organ_damaged
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) return
|
||||
var/is_organ_damaged = 0
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I.damage > 0 && (I.robotic >= ORGAN_ROBOT))
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return affected.open == 3 && is_organ_damaged
|
||||
/datum/surgery_step/robotics/fix_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= ORGAN_ROBOT)
|
||||
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
|
||||
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= ORGAN_ROBOT)
|
||||
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
|
||||
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
|
||||
/datum/surgery_step/robotics/fix_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
..()
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= ORGAN_ROBOT)
|
||||
user.visible_message("<span class='notice'>[user] repairs [target]'s [I.name] with [tool].</span>", \
|
||||
"<span class='notice'>You repair [target]'s [I.name] with [tool].</span>" )
|
||||
I.damage = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
target.sdisabilities &= ~BLIND
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/fix_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
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("<span class='warning'>[user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
target.adjustToxLoss(5)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= ORGAN_ROBOT)
|
||||
user.visible_message("<span class='notice'>[user] repairs [target]'s [I.name] with [tool].</span>", \
|
||||
"<span class='notice'>You repair [target]'s [I.name] with [tool].</span>" )
|
||||
I.damage = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
target.sdisabilities &= ~BLIND
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I)
|
||||
I.take_damage(rand(3,5),0)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
|
||||
target.adjustToxLoss(5)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/obj/item/organ/I in affected.internal_organs)
|
||||
if(I)
|
||||
I.take_damage(rand(3,5),0)
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Robot Organ Detaching Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic
|
||||
|
||||
@@ -278,46 +303,49 @@
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic/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)
|
||||
if(!(affected && (affected.robotic >= ORGAN_ROBOT)))
|
||||
return 0
|
||||
if(affected.open < 3)
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && (affected.robotic >= ORGAN_ROBOT)))
|
||||
return 0
|
||||
if(affected.open < 3)
|
||||
return 0
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
attached_organs |= organ
|
||||
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
|
||||
attached_organs |= organ
|
||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
|
||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||
if(!organ_to_remove)
|
||||
return 0
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
return ..() && organ_to_remove
|
||||
|
||||
return ..() && organ_to_remove
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." )
|
||||
..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." )
|
||||
..()
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
var/obj/item/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
|
||||
var/obj/item/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status |= ORGAN_CUT_AWAY
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, disconnecting \the [tool].</span>", \
|
||||
"<span class='warning'>Your hand slips, disconnecting \the [tool].</span>")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, disconnecting \the [tool].</span>", \
|
||||
"<span class='warning'>Your hand slips, disconnecting \the [tool].</span>")
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Robot Organ Attaching Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/attach_organ_robotic
|
||||
allowed_tools = list(
|
||||
@@ -327,45 +355,48 @@
|
||||
min_duration = 100
|
||||
max_duration = 120
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/attach_organ_robotic/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)
|
||||
if(!(affected && (affected.robotic >= ORGAN_ROBOT)))
|
||||
return 0
|
||||
if(affected.open < 3)
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && (affected.robotic >= ORGAN_ROBOT)))
|
||||
return 0
|
||||
if(affected.open < 3)
|
||||
return 0
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && (I.status & ORGAN_CUT_AWAY) && (I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||
if(I && (I.status & ORGAN_CUT_AWAY) && (I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
|
||||
removable_organs |= organ
|
||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||
if(!organ_to_replace)
|
||||
return 0
|
||||
|
||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||
if(!organ_to_replace)
|
||||
return 0
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
return ..()
|
||||
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
return ..()
|
||||
/datum/surgery_step/robotics/attach_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
..()
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
..()
|
||||
/datum/surgery_step/robotics/attach_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='notice'>[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>" , \
|
||||
"<span class='notice'>You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].</span>")
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
/datum/surgery_step/robotics/attach_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, disconnecting \the [tool].</span>", \
|
||||
"<span class='warning'>Your hand slips, disconnecting \the [tool].</span>")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips, disconnecting \the [tool].</span>", \
|
||||
"<span class='warning'>Your hand slips, disconnecting \the [tool].</span>")
|
||||
///////////////////////////////////////////////////////////////
|
||||
// MMI Insertion Surgery
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/robotics/install_mmi
|
||||
allowed_tools = list(
|
||||
@@ -375,74 +406,73 @@
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/robotics/install_mmi/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(target_zone != BP_HEAD)
|
||||
return
|
||||
|
||||
if(target_zone != BP_HEAD)
|
||||
return
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && affected.open == 3))
|
||||
return 0
|
||||
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!(affected && affected.open == 3))
|
||||
return 0
|
||||
if(!istype(M))
|
||||
return 0
|
||||
|
||||
if(!istype(M))
|
||||
return 0
|
||||
if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD)
|
||||
user << "<span class='danger'>That brain is not usable.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD)
|
||||
user << "<span class='danger'>That brain is not usable.</span>"
|
||||
return SURGERY_FAILURE
|
||||
if(!(affected.robotic >= ORGAN_ROBOT))
|
||||
user << "<span class='danger'>You cannot install a computer brain into a meat skull.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(!(affected.robotic >= ORGAN_ROBOT))
|
||||
user << "<span class='danger'>You cannot install a computer brain into a meat skull.</span>"
|
||||
return SURGERY_FAILURE
|
||||
if(!target.should_have_organ("brain"))
|
||||
user << "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(!target.should_have_organ("brain"))
|
||||
user << "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>"
|
||||
return SURGERY_FAILURE
|
||||
if(!isnull(target.internal_organs["brain"]))
|
||||
user << "<span class='danger'>Your subject already has a brain.</span>"
|
||||
return SURGERY_FAILURE
|
||||
|
||||
if(!isnull(target.internal_organs["brain"]))
|
||||
user << "<span class='danger'>Your subject already has a brain.</span>"
|
||||
return SURGERY_FAILURE
|
||||
return 1
|
||||
|
||||
return 1
|
||||
/datum/surgery_step/robotics/install_mmi/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts installing \the [tool] into [target]'s [affected.name].", \
|
||||
"You start installing \the [tool] into [target]'s [affected.name].")
|
||||
..()
|
||||
|
||||
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 installing \the [tool] into [target]'s [affected.name].", \
|
||||
"You start installing \the [tool] into [target]'s [affected.name].")
|
||||
..()
|
||||
/datum/surgery_step/robotics/install_mmi/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has installed \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You have installed \the [tool] into [target]'s [affected.name].</span>")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] has installed \the [tool] into [target]'s [affected.name].</span>", \
|
||||
"<span class='notice'>You have installed \the [tool] into [target]'s [affected.name].</span>")
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/internal/mmi_holder/holder = new(target, 1)
|
||||
target.internal_organs_by_name["brain"] = holder
|
||||
user.drop_from_inventory(tool)
|
||||
tool.loc = holder
|
||||
holder.stored_mmi = tool
|
||||
holder.update_from_mmi()
|
||||
|
||||
var/obj/item/device/mmi/M = tool
|
||||
var/obj/item/organ/internal/mmi_holder/holder = new(target, 1)
|
||||
target.internal_organs_by_name["brain"] = holder
|
||||
user.drop_from_inventory(tool)
|
||||
tool.loc = holder
|
||||
holder.stored_mmi = tool
|
||||
holder.update_from_mmi()
|
||||
if(M.brainmob && M.brainmob.mind)
|
||||
M.brainmob.mind.transfer_to(target)
|
||||
target.languages = M.brainmob.languages
|
||||
|
||||
if(M.brainmob && M.brainmob.mind)
|
||||
M.brainmob.mind.transfer_to(target)
|
||||
target.languages = M.brainmob.languages
|
||||
spawn(0) //Name yourself on your own damn time
|
||||
var/new_name = ""
|
||||
while(!new_name)
|
||||
if(!target) return
|
||||
var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name)
|
||||
var/clean_name = sanitizeName(try_name)
|
||||
if(clean_name)
|
||||
var/okay = alert(target,"New name will be '[clean_name]', ok?", "Cancel", "Ok")
|
||||
if(okay == "Ok")
|
||||
new_name = clean_name
|
||||
|
||||
spawn(0) //Name yourself on your own damn time
|
||||
var/new_name = ""
|
||||
while(!new_name)
|
||||
if(!target) return
|
||||
var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name)
|
||||
var/clean_name = sanitizeName(try_name)
|
||||
if(clean_name)
|
||||
var/okay = alert(target,"New name will be '[clean_name]', ok?", "Cancel", "Ok")
|
||||
if(okay == "Ok")
|
||||
new_name = clean_name
|
||||
target.name = new_name
|
||||
target.real_name = target.name
|
||||
|
||||
target.name = new_name
|
||||
target.real_name = target.name
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips.</span>", \
|
||||
"<span class='warning'>Your hand slips.</span>")
|
||||
/datum/surgery_step/robotics/install_mmi/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<span class='warning'>[user]'s hand slips.</span>", \
|
||||
"<span class='warning'>Your hand slips.</span>")
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
is_valid_target(mob/living/simple_animal/slime/target)
|
||||
return istype(target, /mob/living/simple_animal/slime/)
|
||||
|
||||
can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
return target.stat == 2
|
||||
/datum/surgery_step/slime/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
return target.stat == 2
|
||||
|
||||
|
||||
|
||||
/datum/surgery_step/slime/cut_flesh
|
||||
allowed_tools = list(
|
||||
@@ -19,21 +21,23 @@
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && istype(target) && target.core_removal_stage == 0
|
||||
/datum/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && istype(target) && target.core_removal_stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/simple_animal/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].")
|
||||
/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/simple_animal/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].")
|
||||
|
||||
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] cuts through [target]'s flesh with \the [tool].</font>", \
|
||||
"<font color='blue'>You cut through [target]'s flesh with \the [tool], revealing its silky innards.</font>")
|
||||
target.core_removal_stage = 1
|
||||
|
||||
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s flesh with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing [target]'s flesh with \the [tool]!</font>")
|
||||
|
||||
end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] cuts through [target]'s flesh with \the [tool].</font>", \
|
||||
"<font color='blue'>You cut through [target]'s flesh with \the [tool], revealing its silky innards.</font>")
|
||||
target.core_removal_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s flesh with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing [target]'s flesh with \the [tool]!</font>")
|
||||
|
||||
/datum/surgery_step/slime/cut_innards
|
||||
allowed_tools = list(
|
||||
@@ -45,21 +49,23 @@
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && istype(target) && target.core_removal_stage == 1
|
||||
/datum/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && istype(target) && target.core_removal_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/simple_animal/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].")
|
||||
/datum/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/simple_animal/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].")
|
||||
|
||||
/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] cuts [target]'s innards apart with \the [tool], exposing the cores.</font>", \
|
||||
"<font color='blue'>You cut [target]'s innards apart with \the [tool], exposing the cores.</font>")
|
||||
target.core_removal_stage = 2
|
||||
|
||||
/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s innards with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing [target]'s innards with \the [tool]!</font>")
|
||||
|
||||
end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='blue'>[user] cuts [target]'s innards apart with \the [tool], exposing the cores.</font>", \
|
||||
"<font color='blue'>You cut [target]'s innards apart with \the [tool], exposing the cores.</font>")
|
||||
target.core_removal_stage = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s innards with \the [tool]!</font>", \
|
||||
"<font color='red'>Your hand slips, tearing [target]'s innards with \the [tool]!</font>")
|
||||
|
||||
/datum/surgery_step/slime/saw_core
|
||||
allowed_tools = list(
|
||||
@@ -70,24 +76,24 @@
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/simple_animal/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.
|
||||
/datum/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/simple_animal/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/simple_animal/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].")
|
||||
/datum/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/simple_animal/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/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
target.cores--
|
||||
user.visible_message("<font color='blue'>[user] cuts out one of [target]'s cores with \the [tool].</font>",, \
|
||||
"<font color='blue'>You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</font>")
|
||||
/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
target.cores--
|
||||
user.visible_message("<font color='blue'>[user] cuts out one of [target]'s cores with \the [tool].</font>",, \
|
||||
"<font color='blue'>You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</font>")
|
||||
|
||||
if(target.cores >= 0)
|
||||
new target.coretype(target.loc)
|
||||
if(target.cores <= 0)
|
||||
target.icon_state = "slime extracted"
|
||||
if(target.cores >= 0)
|
||||
new target.coretype(target.loc)
|
||||
if(target.cores <= 0)
|
||||
target.icon_state = "slime extracted"
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, causing \him to miss the core!</font>", \
|
||||
"<font color='red'>Your hand slips, causing you to miss the core!</font>")
|
||||
/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("<font color='red'>[user]'s hand slips, causing \him to miss the core!</font>", \
|
||||
"<font color='red'>Your hand slips, causing you to miss the core!</font>")
|
||||
Reference in New Issue
Block a user