mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-28 15:48:49 +01:00
[MIRROR] Surgery fixes (#12095)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
d7415d50f7
commit
fc554df606
@@ -254,6 +254,18 @@
|
||||
|
||||
/datum/surgery_step/medical_issue
|
||||
|
||||
/datum/surgery_step/medical_issue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected) //happens if we try to target an organ that was amputated.
|
||||
return FALSE
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return FALSE
|
||||
if(!affected.medical_issues)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/medical_issue/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_danger("[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!") , \
|
||||
@@ -277,15 +289,12 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/strengthen_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/datum/medical_issue/MI in affected.medical_issues)
|
||||
if(MI.cure_surgery == "bone reinforcement")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/medical_issue/strengthen_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)
|
||||
@@ -318,15 +327,13 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/remove_growth/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/datum/medical_issue/MI in affected.medical_issues)
|
||||
if(MI.cure_surgery == "remove growths")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/remove_growth/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)
|
||||
@@ -359,15 +366,13 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/redirect_vessels/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/datum/medical_issue/MI in affected.medical_issues)
|
||||
if(MI.cure_surgery == "redirect blood vessels")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/redirect_vessels/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)
|
||||
@@ -400,15 +405,13 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/extract_object/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/datum/medical_issue/MI in affected.medical_issues)
|
||||
if(MI.cure_surgery == "extract object")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/extract_object/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)
|
||||
@@ -441,15 +444,13 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/flesh_graft/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/datum/medical_issue/MI in affected.medical_issues)
|
||||
if(MI.cure_surgery == "flesh graft")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/flesh_graft/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)
|
||||
@@ -484,16 +485,14 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/remove_growth_internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
for(var/datum/medical_issue/MI in I.medical_issues)
|
||||
if(MI.cure_surgery == "remove growths")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/remove_growth_internal/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)
|
||||
@@ -527,16 +526,14 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/redirect_vessels_internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
for(var/datum/medical_issue/MI in I.medical_issues)
|
||||
if(MI.cure_surgery == "redirect blood vessels")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/redirect_vessels_internal/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)
|
||||
@@ -570,16 +567,14 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/close_holes/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
for(var/datum/medical_issue/MI in I.medical_issues)
|
||||
if(MI.cure_surgery == "close holes")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/close_holes/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)
|
||||
@@ -613,16 +608,14 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/ultrasound/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
for(var/datum/medical_issue/MI in I.medical_issues)
|
||||
if(MI.cure_surgery == "ultrasound")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/ultrasound/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)
|
||||
@@ -656,16 +649,14 @@
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/medical_issue/reoxygenate_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
if(!..(user, target, target_zone, tool))
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
for(var/datum/medical_issue/MI in I.medical_issues)
|
||||
if(MI.cure_surgery == "reoxygenate tissue")
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= FLESH_RETRACTED
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/medical_issue/reoxygenate_tissue/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)
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
span_notice("You have mended the damaged bones in [target]'s [affected.name] with \the [tool].") )
|
||||
user.balloon_alert_visible("mends damaged bones.", "mended damaged bones.")
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.open = FLESH_RETRACTED
|
||||
affected.stage = 0
|
||||
|
||||
/datum/surgery_step/bones/finish_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -223,6 +224,7 @@
|
||||
span_notice("You sets [target]'s bone in [affected.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("sets the bone back in.", "bone set in.")
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.open = FLESH_RETRACTED
|
||||
|
||||
/datum/surgery_step/bones/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)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(!ishuman(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2
|
||||
return ..() && affected && affected.open == FLESH_RETRACTED
|
||||
|
||||
/datum/surgery_step/open_encased/saw/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -58,7 +58,8 @@
|
||||
user.visible_message(span_notice("[user] has cut [target]'s [affected.encased] open with \the [tool]."), \
|
||||
span_notice("You have cut [target]'s [affected.encased] open with \the [tool]."))
|
||||
user.balloon_alert_visible("cuts [target]'s [affected.encased] open.", "[affected.encased] cut open.")
|
||||
affected.open = 2.5
|
||||
affected.open = BONE_CUT
|
||||
affected.status |= ORGAN_BROKEN
|
||||
|
||||
/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -91,7 +92,7 @@
|
||||
if(!ishuman(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2.5
|
||||
return ..() && affected && affected.open == BONE_CUT
|
||||
|
||||
/datum/surgery_step/open_encased/retract/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -114,7 +115,7 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
user.balloon_alert_visible("forces open the [affected.encased]", "forced open the [affected.encased]")
|
||||
|
||||
affected.open = 3
|
||||
affected.open = BONE_RETRACTED
|
||||
|
||||
/datum/surgery_step/open_encased/retract/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -172,7 +173,7 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
user.balloon_alert_visible("bends [affected.encased] into place", "[affected.encased] bend into place.")
|
||||
|
||||
affected.open = 2.5
|
||||
affected.open = BONE_CUT
|
||||
|
||||
/datum/surgery_step/open_encased/close/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -210,7 +211,7 @@
|
||||
if(!ishuman(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2.5
|
||||
return ..() && affected && affected.open == BONE_CUT
|
||||
|
||||
/datum/surgery_step/open_encased/mend/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -234,7 +235,8 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
user.balloon_alert_visible("applies \the [tool] to [affected.encased]", "applied \the [tool] to [affected.encased]")
|
||||
|
||||
affected.open = 2
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.open = FLESH_RETRACTED
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Saw/Retractor/Gel Combi-open and close.
|
||||
@@ -276,7 +278,8 @@
|
||||
user.visible_message(span_notice("[user] has cut [target]'s [affected.encased] wide open with \the [tool]."), \
|
||||
span_notice("You have cut [target]'s [affected.encased] wide open with \the [tool]."))
|
||||
user.balloon_alert_visible("cuts \the [affected.encased] wide open.", "cut \the [affected.encased] wide open.")
|
||||
affected.open = 3
|
||||
affected.open = BONE_RETRACTED
|
||||
affected.status |= ORGAN_BROKEN
|
||||
|
||||
/datum/surgery_step/open_encased/advancedsaw_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
@@ -332,4 +335,5 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
user.balloon_alert_visible("seals \the [affected.encased]", "sealed \the [affected.encased]")
|
||||
|
||||
affected.open = 2
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.open = FLESH_RETRACTED
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
return affected && affected.open == (affected.encased ? 3 : 2) && !(affected.status & ORGAN_BLEEDING)
|
||||
return affected && affected.open == (affected.encased ? 3 : 2)
|
||||
|
||||
/datum/surgery_step/cavity/proc/get_max_wclass(var/obj/item/organ/external/affected)
|
||||
switch (affected.organ_tag)
|
||||
@@ -199,12 +199,7 @@
|
||||
max_duration = 50 //CHOMPedit
|
||||
|
||||
/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[O_BRAIN]
|
||||
return ..() && (!sponge || !sponge.damage)
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/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)
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
span_notice("You have connected tendons and muscles in [target]'s [E.amputation_point] with [tool]."))
|
||||
user.balloon_alert_visible("connected tendons and muscles in [target]'s [E.amputation_point]", "connected tendons and muscles in \the [E.amputation_point]")
|
||||
E.status &= ~ORGAN_CUT_AWAY
|
||||
for(var/obj/item/organ/external/child in E.children)
|
||||
child.status &= ~ORGAN_CUT_AWAY
|
||||
to_chat(user, "You attach [target]'s [child.name] as well.")
|
||||
target.update_icons_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
@@ -124,7 +127,7 @@
|
||||
/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_warning(" [user]'s hand slips, damaging [target]'s [E.amputation_point]!"), \
|
||||
span_warning(" Your hand slips, damaging [target]'s [E.amputation_point]!"))
|
||||
span_warning("Your hand slips, damaging [target]'s [E.amputation_point]!"))
|
||||
user.balloon_alert_visible("slips, damaging [target]'s [E.amputation_point]", "your hand slips, damaging \the [E.amputation_point]")
|
||||
target.apply_damage(10, BRUTE, null, sharp = TRUE)
|
||||
|
||||
|
||||
@@ -34,16 +34,17 @@
|
||||
)
|
||||
|
||||
/datum/surgery_step/generic/ripper/tear_vessel/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 ripping into [target] with \the [tool].", \
|
||||
"You start ripping into [target] with \the [tool].")
|
||||
user.balloon_alert_visible("starts ripping into [target]", "ripping into [target]")
|
||||
target.custom_pain("[user] is ripping into your [target.op_stage.current_organ]!", 100)
|
||||
target.custom_pain("[user] is ripping into your [affected.name]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/generic/ripper/tear_vessel/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_notice("[user] has ripped [target]'s [affected] \the [tool], blood and viscera spraying everywhere!"), \
|
||||
span_notice("You have ripped [target]'s [target.op_stage.current_organ] out with \the [tool], spraying blood all through the room!"))
|
||||
span_notice("You have ripped a blood vessel in [target]'s [affected.name] out with \the [tool], spraying blood all through the room!"))
|
||||
user.balloon_alert_visible("rips into [target]'s [affected], blood and viscera everywhere!", "ripped into [target]'s [affected], blood and viscera everywhere!")
|
||||
var/datum/wound/internal_bleeding/I = new (30) //splurt. New severed artery.
|
||||
affected.wounds += I
|
||||
@@ -72,7 +73,7 @@
|
||||
user.visible_message("[user] starts violently shifting \the [tool] in [target]'s [affected.name]!", \
|
||||
"You start violently moving the [tool] in [target]'s [affected.name]!")
|
||||
user.balloon_alert_visible("starts violently shifting \the [tool] in [target]'s [affected.name]!", "violently moving \the [tool] in \the [affected.name]")
|
||||
target.custom_pain("[user] is ripping into your [target.op_stage.current_organ]!", 100)
|
||||
target.custom_pain("[user] is ripping into your [affected.name]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/generic/ripper/break_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -129,9 +130,10 @@
|
||||
target.custom_pain("Someone's moving something around in your [affected.name]!", 100)
|
||||
else if(organ_to_destroy)
|
||||
target.op_stage.current_organ = organ_to_destroy
|
||||
user.visible_message("[user] starts ripping into [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"You start ripping [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message("[user] starts ripping into [target]'s [O.name] with \the [tool].", \
|
||||
"You start ripping [target]'s [O.name] with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your [O.name]!", 100)
|
||||
..()
|
||||
|
||||
|
||||
@@ -143,9 +145,9 @@
|
||||
|
||||
// Damage the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
user.visible_message(span_notice("[user] has ripped [target]'s [target.op_stage.current_organ] out with \the [tool]."), \
|
||||
span_notice("You have ripped [target]'s [target.op_stage.current_organ] out with \the [tool]."))
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_notice("[user] has ripped [target]'s [O.name] out with \the [tool]."), \
|
||||
span_notice("You have ripped [target]'s [O.name] out with \the [tool]."))
|
||||
if(O && istype(O))
|
||||
O.take_damage(10)
|
||||
target.op_stage.current_organ = null
|
||||
@@ -206,9 +208,10 @@
|
||||
target.custom_pain("Someone's moving something around in your [affected]!", 100)
|
||||
else if(organ_to_remove)
|
||||
target.op_stage.current_organ = removable_organs[organ_to_remove]
|
||||
user.visible_message("[user] starts ripping [target]'s [target.op_stage.current_organ] out with \the [tool].", \
|
||||
"You start ripping [target]'s [target.op_stage.current_organ] out with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message("[user] starts ripping [target]'s [O.name] out with \the [tool].", \
|
||||
"You start ripping [target]'s [O.name] out with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your [O.name]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/generic/ripper/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -218,11 +221,10 @@
|
||||
span_notice("You have pulled your [tool] out from [target]'s [affected]."))
|
||||
|
||||
if(target.op_stage.current_organ)
|
||||
user.visible_message(span_notice("[user] has ripped [target]'s [target.op_stage.current_organ] out with \the [tool]."), \
|
||||
span_notice("You have ripped [target]'s [target.op_stage.current_organ] out with \the [tool]."))
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(O && istype(O))
|
||||
O.removed(user)
|
||||
user.visible_message(span_notice("[user] has ripped [target]'s [O.name] out with \the [tool]."), \
|
||||
span_notice("You have ripped [target]'s [O.name] out with \the [tool]."))
|
||||
O.removed(user)
|
||||
target.op_stage.current_organ = null
|
||||
new /obj/effect/gibspawner/human(target.loc,target.dna,target.species.flesh_color,target.species.blood_color)
|
||||
target.emote("scream")
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
if(I.organ_tag == O_BRAIN && I.status == ORGAN_DEAD && target.can_defib == 0) //Let people know they still got more work to get the brain back into working order.
|
||||
to_chat(user, span_warning("You fix their [I] but the neurological structure is still heavily damaged and in need of repair."))
|
||||
user.balloon_alert(user, "fixed \the [I], neurological structure still in neeed of repair.")
|
||||
I.germ_level = 0
|
||||
I.damage = 0
|
||||
I.status = 0
|
||||
if(I.organ_tag == O_EYES)
|
||||
@@ -241,21 +242,21 @@
|
||||
|
||||
/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)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
|
||||
user.visible_message(span_filter_notice("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start to separate [target]'s [target.op_stage.current_organ] with \the [tool].") )
|
||||
user.balloon_alert_visible("starts to separate [target]'s [target.op_stage.current_organ]", "separating \the [target.op_stage.current_organ]")
|
||||
user.visible_message(span_filter_notice("[user] starts to separate [target]'s [O.name] with \the [tool]."), \
|
||||
span_filter_notice("You start to separate [target]'s [O.name] with \the [tool].") )
|
||||
user.balloon_alert_visible("starts to separate [target]'s [O.name]", "separating \the [O.name]")
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 100)
|
||||
..()
|
||||
|
||||
/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_notice("[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool].") , \
|
||||
span_notice("You have separated [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("separates [target]'s [target.op_stage.current_organ]", "separated \the [target.op_stage.current_organ]")
|
||||
|
||||
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/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_notice("[user] has separated [target]'s [O.name] with \the [tool].") , \
|
||||
span_notice("You have separated [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("separates [target]'s [O.name]", "separated \the [O.name]")
|
||||
if(O && istype(O))
|
||||
O.status |= ORGAN_CUT_AWAY
|
||||
|
||||
/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)
|
||||
@@ -317,11 +318,11 @@
|
||||
return
|
||||
|
||||
target.op_stage.current_organ = removable_organs[organ_to_remove]
|
||||
|
||||
user.visible_message(span_filter_notice("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start removing [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("starts removing [target]'s [target.op_stage.current_organ]", "removing \the [target.op_stage.current_organ]")
|
||||
target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_filter_notice("[user] starts removing [target]'s [O.name] with \the [tool]."), \
|
||||
span_filter_notice("You start removing [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("starts removing [target]'s [O.name]", "removing \the [O.name]")
|
||||
target.custom_pain("Someone's ripping out your [O.name]!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/remove_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -333,10 +334,10 @@
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
user.visible_message(span_notice("[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_notice("You have removed [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("removes [target]'s [target.op_stage.current_organ]", "removed \the [target.op_stage.current_organ]")
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_notice("[user] has removed [target]'s [O.name] with \the [tool]."), \
|
||||
span_notice("You have removed [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("removes [target]'s [O.name]", "removed \the [O.name]")
|
||||
if(O && istype(O))
|
||||
O.removed(user)
|
||||
target.op_stage.current_organ = null
|
||||
@@ -478,20 +479,21 @@
|
||||
return ..()
|
||||
|
||||
/datum/surgery_step/internal/attach_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message(span_filter_notice("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("begins reattaching [target]'s [target.op_stage.current_organ]", "reattaching [target.op_stage.current_organ]")
|
||||
target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_filter_notice("[user] begins reattaching [target]'s [O.name] with \the [tool]."), \
|
||||
span_filter_notice("You start reattaching [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("begins reattaching [target]'s [O.name]", "reattaching [O.name]")
|
||||
target.custom_pain("Someone's digging needles into your [O.name]!", 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_notice("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].") , \
|
||||
span_notice("You have reattached [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("reattached [target]'s [target.op_stage.current_organ]", "reattached [target.op_stage.current_organ]")
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_notice("[user] has reattached [target]'s [O.name] with \the [tool].") , \
|
||||
span_notice("You have reattached [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("reattached [target]'s [O.name]", "reattached [O.name]")
|
||||
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(I && istype(I))
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
if(O && istype(O))
|
||||
O.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
/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)
|
||||
|
||||
@@ -154,6 +154,11 @@
|
||||
|
||||
/datum/surgery_step/necrotic/treat_necrosis/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)
|
||||
var/obj/item/reagent_containers/container = tool
|
||||
if(!istype(container))
|
||||
return FALSE
|
||||
if(!container.reagents.has_reagent(REAGENT_ID_PERIDAXON))
|
||||
return FALSE
|
||||
return ..() && affected.open >= BONE_RETRACTED && affected.remove_necrosis >= 1
|
||||
|
||||
/datum/surgery_step/necrotic/treat_necrosis/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
@@ -411,20 +411,19 @@
|
||||
to_chat(user, span_notice("You decide against preparing any organs for removal."))
|
||||
return
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
|
||||
user.visible_message(span_filter_notice("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool].") )
|
||||
user.balloon_alert_visible("starts to decouple [target]'s [target.op_stage.current_organ]", "decoupling \the [target.op_stage.current_organ]")
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_filter_notice("[user] starts to decouple [target]'s [O.name] with \the [tool]."), \
|
||||
span_filter_notice("You start to decouple [target]'s [O.name] with \the [tool].") )
|
||||
user.balloon_alert_visible("starts to decouple [target]'s [O.name]", "decoupling \the [O.name]")
|
||||
..()
|
||||
|
||||
/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_notice("[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool].") , \
|
||||
span_notice("You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("decoupled [target]'s [target.op_stage.current_organ]", "decouple \the [target.op_stage.current_organ]")
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_notice("[user] has decoupled [target]'s [O.name] with \the [tool].") , \
|
||||
span_notice("You have decoupled [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("decoupled [target]'s [O.name]", "decouple \the [O.name]")
|
||||
|
||||
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
|
||||
O.status |= ORGAN_CUT_AWAY
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
/datum/surgery_step/robotics/detatch_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -478,20 +477,18 @@
|
||||
|
||||
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
|
||||
user.visible_message(span_filter_notice("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool]."), \
|
||||
span_filter_notice("You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("begins reattaching [target]'s [target.op_stage.current_organ]", "reattaching \the [target.op_stage.current_organ]")
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_filter_notice("[user] begins reattaching [target]'s [O.name] with \the [tool]."), \
|
||||
span_filter_notice("You start reattaching [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("begins reattaching [target]'s [O.name]", "reattaching \the [O.name]")
|
||||
..()
|
||||
|
||||
/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_notice("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool].") , \
|
||||
span_notice("You have reattached [target]'s [target.op_stage.current_organ] with \the [tool]."))
|
||||
user.balloon_alert_visible("reattaches [target]'s [target.op_stage.current_organ]", "reattached \the [target.op_stage.current_organ]")
|
||||
|
||||
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/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
user.visible_message(span_notice("[user] has reattached [target]'s [O.name] with \the [tool].") , \
|
||||
span_notice("You have reattached [target]'s [O.name] with \the [tool]."))
|
||||
user.balloon_alert_visible("reattaches [target]'s [O.name]", "reattached \the [O.name]")
|
||||
O.status &= ~ORGAN_CUT_AWAY
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
/datum/surgery_step/robotics/attach_organ_robotic/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
Reference in New Issue
Block a user