mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Organ rewrite mapclean attempt.
This commit is contained in:
@@ -1,89 +0,0 @@
|
||||
//Procedures in this file: Appendectomy
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// APPENDECTOMY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/appendectomy/
|
||||
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
|
||||
if (target_zone != "groin")
|
||||
return 0
|
||||
var/datum/organ/external/groin = target.get_organ("groin")
|
||||
if (!groin)
|
||||
return 0
|
||||
if (groin.open < 2)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/appendectomy/cut_appendix
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
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.appendix == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to separate [target]'s appendix from the abdominal wall with \the [tool].", \
|
||||
"You start to separate [target]'s appendix from the abdominal wall with \the [tool]." )
|
||||
target.custom_pain("The pain in your abdomen is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
|
||||
"\blue You have separated [target]'s appendix with \the [tool].")
|
||||
target.op_stage.appendix = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/groin = target.get_organ("groin")
|
||||
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
|
||||
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
|
||||
groin.createwound(CUT, 50, 1)
|
||||
|
||||
/datum/surgery_step/appendectomy/remove_appendix
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.appendix == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
|
||||
"You start removing [target]'s appendix with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your bowels!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
|
||||
"\blue You have removed [target]'s appendix with \the [tool].")
|
||||
var/app = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
|
||||
app = 1
|
||||
appendicitis.cure()
|
||||
target.resistances += appendicitis
|
||||
if (app)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
|
||||
else
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
|
||||
target.op_stage.appendix = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
|
||||
"\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
|
||||
affected.createwound(BRUISE, 20)
|
||||
@@ -18,7 +18,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 2 && affected.stage == 0
|
||||
return affected.open >= 2 && affected.stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -52,7 +52,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.name != "head" && affected.open == 2 && affected.stage == 1
|
||||
return affected.name != "head" && affected.open >= 2 && affected.stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -91,7 +91,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.name == "head" && affected.open == 2 && affected.stage == 1
|
||||
return affected.name == "head" && affected.open >= 2 && affected.stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \
|
||||
@@ -127,7 +127,7 @@
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 2 && affected.stage == 2
|
||||
return affected.open >= 2 && affected.stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
//Procedures in this file: Brain extraction. Brain fixing. Slime Core extraction.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/
|
||||
priority = 2
|
||||
blood_level = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return target_zone == "head" && hasorgans(target)
|
||||
|
||||
/datum/surgery_step/brain/saw_skull
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target_zone == "head" && target.brain_op_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins to cut through [target]'s skull with \the [tool].", \
|
||||
"You begin to cut through [target]'s skull with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has cut [target]'s skull open with \the [tool].", \
|
||||
"\blue You have cut [target]'s skull open with \the [tool].")
|
||||
target.brain_op_stage = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cracking [target]'s skull with \the [tool]!" , \
|
||||
"\red Your hand slips, cracking [target]'s skull with \the [tool]!" )
|
||||
target.apply_damage(max(10, tool.force), BRUTE, "head")
|
||||
|
||||
/datum/surgery_step/brain/cut_brain
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts separating connections to [target]'s brain with \the [tool].", \
|
||||
"You start separating connections to [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] separates connections to [target]'s brain with \the [tool].", \
|
||||
"\blue You separate connections to [target]'s brain with \the [tool].")
|
||||
target.brain_op_stage = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(50, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
/datum/surgery_step/brain/saw_spine
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts separating [target]'s brain from \his spine with \the [tool].", \
|
||||
"You start separating [target]'s brain from spine with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] separates [target]'s brain from \his spine with \the [tool].", \
|
||||
"\blue You separate [target]'s brain from spine with \the [tool].")
|
||||
|
||||
var/mob/living/simple_animal/borer/borer = target.has_brain_worms()
|
||||
|
||||
if(borer)
|
||||
borer.detatch() //Should remove borer if the brain is removed - RR
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
var/mob/living/carbon/human/H
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
H = target
|
||||
|
||||
var/obj/item/brain/B
|
||||
if(H && H.species && H.species.flags & IS_SYNTHETIC)
|
||||
var/obj/item/device/mmi/posibrain/P = new(target.loc)
|
||||
P.transfer_identity(target)
|
||||
else
|
||||
B = new(target.loc)
|
||||
B.transfer_identity(target)
|
||||
|
||||
target.internal_organs -= B
|
||||
target.internal_organs_by_name -= "brain"
|
||||
|
||||
target:brain_op_stage = 4.0
|
||||
target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
|
||||
if (ishuman(user))
|
||||
user:bloody_body(target)
|
||||
user:bloody_hands(target, 0)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN DAMAGE FIXING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/bone_chips
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts taking bone chips out of [target]'s brain with \the [tool].", \
|
||||
"You start taking bone chips out of [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] takes out all the bone chips in [target]'s brain with \the [tool].", \
|
||||
"\blue You take out all the bone chips in [target]'s brain with \the [tool].")
|
||||
target.brain_op_stage = 3
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, jabbing \the [tool] in [target]'s brain!", \
|
||||
"\red Your hand slips, jabbing \the [tool] in [target]'s brain!")
|
||||
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
/datum/surgery_step/brain/hematoma
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending hematoma in [target]'s brain with \the [tool].", \
|
||||
"You start mending hematoma in [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
|
||||
"\blue You mend hematoma in [target]'s brain with \the [tool].")
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 0
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, bruising [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, bruising [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(20, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// SLIME CORE EXTRACTION //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/slime
|
||||
is_valid_target(mob/living/carbon/slime/target)
|
||||
return istype(target, /mob/living/carbon/slime/)
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return target.stat == 2
|
||||
|
||||
/datum/surgery_step/slime/cut_flesh
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
|
||||
"You start cutting through [target]'s flesh with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts through [target]'s flesh with \the [tool].", \
|
||||
"\blue You cut through [target]'s flesh with \the [tool], revealing its silky innards.")
|
||||
target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
|
||||
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
|
||||
|
||||
/datum/surgery_step/slime/cut_innards
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
|
||||
"You start cutting [target]'s silky innards apart with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores.", \
|
||||
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores.")
|
||||
target.brain_op_stage = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
|
||||
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
|
||||
|
||||
/datum/surgery_step/slime/saw_core
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2 && target.cores > 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
|
||||
"You start cutting out one of [target]'s cores with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
target.cores--
|
||||
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
|
||||
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
|
||||
|
||||
if(target.cores >= 0)
|
||||
new target.coretype(target.loc)
|
||||
if(target.cores <= 0)
|
||||
target.icon_state = "[target.colour] baby slime dead-nocore"
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, causing \him to miss the core!", \
|
||||
"\red Your hand slips, causing you to miss the core!")
|
||||
@@ -0,0 +1,68 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN DAMAGE FIXING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/bone_chips
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
priority = 3
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return (sponge && sponge.damage > 0 && sponge.damage <= 20) && affected.open == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts taking bone chips out of [target]'s brain with \the [tool].", \
|
||||
"You start taking bone chips out of [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] takes out all the bone chips in [target]'s brain with \the [tool].", \
|
||||
"\blue You take out all the bone chips in [target]'s brain with \the [tool].")
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, jabbing \the [tool] in [target]'s brain!", \
|
||||
"\red Your hand slips, jabbing \the [tool] in [target]'s brain!")
|
||||
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
/datum/surgery_step/brain/hematoma
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
|
||||
priority = 3
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return (sponge && sponge.damage > 20) && affected.open == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending hematoma in [target]'s brain with \the [tool].", \
|
||||
"You start mending hematoma in [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
|
||||
"\blue You mend hematoma in [target]'s brain with \the [tool].")
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 20
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, bruising [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, bruising [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(20, BRUTE, "head", 1, sharp=1)
|
||||
@@ -0,0 +1,220 @@
|
||||
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing internal organs.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// GENERIC RIBCAGE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/open_encased
|
||||
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
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.encased && affected.open >= 2
|
||||
|
||||
|
||||
/datum/surgery_step/open_encased/saw
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
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/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/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.display_name]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("\blue [user] has cut [target]'s [affected.encased] open with \the [tool].", \
|
||||
"\blue You have cut [target]'s [affected.encased] open with \the [tool].")
|
||||
affected.open = 2.5
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!" , \
|
||||
"\red Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!" )
|
||||
|
||||
affected.createwound(CUT, 20)
|
||||
affected.fracture()
|
||||
|
||||
|
||||
/datum/surgery_step/open_encased/retract
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
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/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open == 2.5
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.display_name] with \the [tool]."
|
||||
var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.display_name] with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your [affected.display_name]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "\blue [user] forces open [target]'s [affected.encased] with \the [tool]."
|
||||
var/self_msg = "\blue You force open [target]'s [affected.encased] with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
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/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "\red [user]'s hand slips, cracking [target]'s [affected.encased]!"
|
||||
var/self_msg = "\red Your hand slips, cracking [target]'s [affected.encased]!"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
/datum/surgery_step/open_encased/close
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/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.display_name]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "\blue [user] bends [target]'s [affected.encased] back into place with \the [tool]."
|
||||
var/self_msg = "\blue You bend [target]'s [affected.encased] back into place with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.open = 2.5
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "\red [user]'s hand slips, bending [target]'s [affected.encased] the wrong way!"
|
||||
var/self_msg = "\red Your hand slips, bending [target]'s [affected.encased] the wrong way!"
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
/*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE.
|
||||
user.visible_message("\red A rib pierces the lung!")
|
||||
target.rupture_lung()*/
|
||||
|
||||
/datum/surgery_step/open_encased/mend
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/bonegel = 100, \
|
||||
/obj/item/weapon/screwdriver = 75
|
||||
)
|
||||
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open == 2.5
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/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.display_name]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/msg = "\blue [user] applied \the [tool] to [target]'s [affected.encased]."
|
||||
var/self_msg = "\blue You applied \the [tool] to [target]'s [affected.encased]."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.open = 2
|
||||
@@ -12,7 +12,10 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
if (!affected)
|
||||
return 0
|
||||
return target_zone == "eyes"
|
||||
|
||||
var/datum/organ/internal/eyes = target.internal_organs_by_name["eyes"]
|
||||
|
||||
return target_zone == "eyes" && eyes
|
||||
|
||||
/datum/surgery_step/eye/cut_open
|
||||
allowed_tools = list(
|
||||
|
||||
@@ -56,8 +56,6 @@
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
spread_germs_to_organ(affected, user)
|
||||
if (target_zone == "head")
|
||||
target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -95,8 +93,6 @@
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
affected.open = 2
|
||||
if (target_zone == "head")
|
||||
target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -134,8 +130,6 @@
|
||||
affected.open = 1
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
affected.createwound(CUT, 1)
|
||||
if (target_zone == "head")
|
||||
target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -191,7 +185,7 @@
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 1 && !(affected.status & ORGAN_BLEEDING)
|
||||
return affected.open == 1 //&& !(affected.status & ORGAN_BLEEDING)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 2 && !(affected.status & ORGAN_BLEEDING) && (target_zone != "chest" || target.op_stage.ribcage == 2)
|
||||
return affected.open == (affected.encased ? 3 : 2) && !(affected.status & ORGAN_BLEEDING)
|
||||
|
||||
proc/get_max_wclass(datum/organ/external/affected)
|
||||
switch (affected.name)
|
||||
@@ -156,6 +156,10 @@
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
return ..() && (!sponge || !sponge.damage)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||
|
||||
@@ -0,0 +1,493 @@
|
||||
// Internal surgeries.
|
||||
/datum/surgery_step/internal
|
||||
priority = 2
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
/datum/surgery_step/internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == (affected.encased ? 3 : 2)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// ALIEN EMBRYO SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/internal/remove_embryo
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
blood_level = 2
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/embryo = 0
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
embryo = 1
|
||||
break
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && embryo && affected.open == 3 && target_zone == "chest"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
|
||||
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||
"You rip the larva out of [target]'s ribcage!")
|
||||
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
A.loc = A.loc.loc
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// CHEST INTERNAL ORGAN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/internal/fix_organ
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/medical/advanced/bruise_pack= 100, \
|
||||
/obj/item/stack/medical/bruise_pack = 20, \
|
||||
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
|
||||
)
|
||||
|
||||
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
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/is_organ_damaged = 0
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_organ_damaged
|
||||
|
||||
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"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
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.display_name] is living hell!",1)
|
||||
..()
|
||||
|
||||
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))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \
|
||||
"\blue You treat damage to [target]'s [I.name] with [tool_name]." )
|
||||
I.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, getting mess and tearing the inside of [target]'s [affected.display_name] with \the [tool]!")
|
||||
var/dam_amt = 2
|
||||
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
target.adjustToxLoss(5)
|
||||
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
target.adjustToxLoss(7)
|
||||
else
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
/datum/surgery_step/internal/fix_organ_robotic //For artificial organs
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/nanopaste = 100, \
|
||||
/obj/item/weapon/bonegel = 30, \
|
||||
/obj/item/weapon/screwdriver = 70, \
|
||||
)
|
||||
|
||||
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
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/is_organ_damaged = 0
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I.damage > 0 && I.robotic >= 2)
|
||||
is_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_organ_damaged
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= 2)
|
||||
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." )
|
||||
|
||||
target.custom_pain("The pain in your [affected.display_name] is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic >= 2)
|
||||
user.visible_message("\blue [user] repairs [target]'s [I.name] with [tool].", \
|
||||
"\blue You repair [target]'s [I.name] with [tool]." )
|
||||
I.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.display_name] with \the [tool]!")
|
||||
|
||||
target.adjustToxLoss(5)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I)
|
||||
I.take_damage(rand(3,5),0)
|
||||
|
||||
|
||||
/datum/surgery_step/internal/detatch_organ
|
||||
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/attached_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/datum/organ/internal/I = target.internal_organs_by_name[organ]
|
||||
if(!I.status && 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
|
||||
|
||||
target.op_stage.current_organ = organ_to_remove
|
||||
|
||||
return ..() && organ_to_remove
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
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.display_name] is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has separated [target]'s [target.op_stage.current_organ] with \the [tool]." , \
|
||||
"\blue You have separated [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
var/datum/organ/internal/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/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(CUT, rand(30,50), 1)
|
||||
|
||||
/datum/surgery_step/internal/remove_organ
|
||||
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/datum/organ/internal/I = target.internal_organs_by_name[organ]
|
||||
if(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 ..()
|
||||
|
||||
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]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].", \
|
||||
"\blue You have removed [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
var/datum/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
|
||||
var/obj/item/organ/O
|
||||
if(I && istype(I))
|
||||
O = I.remove(user)
|
||||
if(O && istype(O))
|
||||
|
||||
// Stop the organ from continuing to reject.
|
||||
O.organ_data.rejecting = null
|
||||
|
||||
// Transfer over some blood data, if the organ doesn't have data.
|
||||
var/datum/reagent/blood/organ_blood = O.reagents.reagent_list["blood"]
|
||||
if(!organ_blood || !organ_blood.data["blood_DNA"])
|
||||
target.vessel.trans_to(O, 5, 1, 1)
|
||||
|
||||
// Kinda redundant, but I'm getting some buggy behavior.
|
||||
target.internal_organs_by_name[target.op_stage.current_organ] = null
|
||||
target.internal_organs_by_name -= target.op_stage.current_organ
|
||||
target.internal_organs -= O.organ_data
|
||||
affected.internal_organs -= O.organ_data
|
||||
O.removed(target,user)
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
/datum/surgery_step/internal/replace_organ
|
||||
allowed_tools = list(
|
||||
/obj/item/organ = 100
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
var/obj/item/organ/O = tool
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
var/organ_compatible
|
||||
var/organ_missing
|
||||
|
||||
if(!istype(O))
|
||||
return 0
|
||||
|
||||
if(target.species && target.species.has_organ[O.organ_tag])
|
||||
|
||||
if(!O.health)
|
||||
user << "\red \The [O.organ_tag] is dead."
|
||||
return 0
|
||||
|
||||
if(!target.internal_organs_by_name[O.organ_tag])
|
||||
organ_missing = 1
|
||||
else
|
||||
user << "\red \The [target] already has a [O.organ_tag]." //TODO: grammar.
|
||||
return 0
|
||||
|
||||
if(O.organ_data && affected.name == O.organ_data.parent_organ)
|
||||
organ_compatible = 1
|
||||
else
|
||||
user << "\red \The [O.organ_tag] doesn't normally go in \the [affected.display_name]."
|
||||
return 0
|
||||
else
|
||||
user << "\red \A [target.species.name] doesn't normally have a [O.organ_tag]." //TODO: grammar.
|
||||
return 0
|
||||
|
||||
return ..() && organ_missing && organ_compatible
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.display_name].", \
|
||||
"You start transplanting \the [tool] into [target]'s [affected.display_name].")
|
||||
target.custom_pain("Someone's rooting around in your [affected.display_name]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has transplanted \the [tool] into [target]'s [affected.display_name].", \
|
||||
"\blue You have transplanted \the [tool] into [target]'s [affected.display_name].")
|
||||
user.drop_item(tool)
|
||||
var/obj/item/organ/O = tool
|
||||
|
||||
if(istype(O))
|
||||
|
||||
if(!O.organ_data.transplant_data)
|
||||
O.organ_data.transplant_data = list()
|
||||
O.organ_data.transplant_data["species"] = target.species.name
|
||||
O.organ_data.transplant_data["blood_type"] = target.dna.b_type
|
||||
O.organ_data.transplant_data["blood_DNA"] = target.dna.unique_enzymes
|
||||
|
||||
O.organ_data.owner = target
|
||||
target.internal_organs |= O.organ_data
|
||||
affected.internal_organs |= O.organ_data
|
||||
target.internal_organs_by_name[O.organ_tag] = O.organ_data
|
||||
O.organ_data.status |= ORGAN_CUT_AWAY
|
||||
O.replaced(target)
|
||||
|
||||
del(O)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, damaging \the [tool]!", \
|
||||
"\red Your hand slips, damaging \the [tool]!")
|
||||
var/obj/item/organ/I = tool
|
||||
if(istype(I))
|
||||
I.organ_data.take_damage(rand(3,5),0)
|
||||
|
||||
/datum/surgery_step/internal/attach_organ
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
|
||||
min_duration = 100
|
||||
max_duration = 120
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
var/list/removable_organs = list()
|
||||
for(var/organ in target.internal_organs_by_name)
|
||||
var/datum/organ/internal/I = target.internal_organs_by_name[organ]
|
||||
if(I.status & ORGAN_CUT_AWAY && 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
|
||||
|
||||
target.op_stage.current_organ = organ_to_replace
|
||||
return ..()
|
||||
|
||||
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]!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \
|
||||
"\blue You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].")
|
||||
|
||||
var/datum/organ/internal/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/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(BRUISE, 20)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// HEART SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// To be finished after some tests.
|
||||
// /datum/surgery_step/ribcage/heart/cut
|
||||
// allowed_tools = list(
|
||||
// /obj/item/weapon/scalpel = 100, \
|
||||
// /obj/item/weapon/kitchenknife = 75, \
|
||||
// /obj/item/weapon/shard = 50, \
|
||||
// )
|
||||
|
||||
// min_duration = 30
|
||||
// max_duration = 40
|
||||
|
||||
// can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// return ..() && target.op_stage.ribcage == 2
|
||||
@@ -27,7 +27,7 @@
|
||||
internal_bleeding = 1
|
||||
break
|
||||
|
||||
return affected.open == 2 && internal_bleeding
|
||||
return affected.open >= 2 && internal_bleeding
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -59,7 +59,7 @@
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
|
||||
if (target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
return affected.open == 2 && (affected.status & ORGAN_DEAD)
|
||||
return affected.open >= 2 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -105,7 +105,7 @@
|
||||
/obj/item/weapon/reagent_containers/spray = 50,
|
||||
/obj/item/weapon/reagent_containers/glass/bucket = 50,
|
||||
)
|
||||
|
||||
|
||||
can_infect = 0
|
||||
blood_level = 0
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
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
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
if (target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
@@ -138,34 +138,34 @@
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
if (trans > 0)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
|
||||
if(container.reagents.has_reagent("peridaxon"))
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
|
||||
|
||||
user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.display_name]", \
|
||||
"\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.display_name] with \the [tool].")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \
|
||||
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!")
|
||||
|
||||
|
||||
//no damage or anything, just wastes medicine
|
||||
|
||||
@@ -1,335 +0,0 @@
|
||||
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing internal organs.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// GENERIC RIBCAGE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/ribcage
|
||||
priority = 2
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return target_zone == "chest"
|
||||
|
||||
/datum/surgery_step/ribcage/saw_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
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/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && target.op_stage.ribcage == 0 && affected.open >= 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
|
||||
"You begin to cut through [target]'s ribcage with \the [tool].")
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has cut [target]'s ribcage open with \the [tool].", \
|
||||
"\blue You have cut [target]'s ribcage open with \the [tool].")
|
||||
target.op_stage.ribcage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cracking [target]'s ribcage with \the [tool]!" , \
|
||||
"\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
affected.createwound(CUT, 20)
|
||||
affected.fracture()
|
||||
|
||||
|
||||
/datum/surgery_step/ribcage/retract_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.ribcage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
|
||||
var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\blue [user] forces open [target]'s ribcage with \the [tool]."
|
||||
var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.op_stage.ribcage = 2
|
||||
|
||||
// Whoops!
|
||||
if(prob(10))
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
affected.fracture()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
|
||||
var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
|
||||
user.visible_message(msg, self_msg)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
/datum/surgery_step/ribcage/close_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
|
||||
var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
|
||||
var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
target.op_stage.ribcage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\red [user]'s hand slips, bending [target]'s ribs the wrong way!"
|
||||
var/self_msg = "\red Your hand slips, bending [target]'s ribs the wrong way!"
|
||||
user.visible_message(msg, self_msg)
|
||||
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
if (prob(40))
|
||||
user.visible_message("\red A rib pierces the lung!")
|
||||
target.rupture_lung()
|
||||
|
||||
/datum/surgery_step/ribcage/mend_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/bonegel = 100, \
|
||||
/obj/item/weapon/screwdriver = 75
|
||||
)
|
||||
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.ribcage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
|
||||
var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\blue [user] applied \the [tool] to [target]'s ribcage."
|
||||
var/self_msg = "\blue You applied \the [tool] to [target]'s ribcage."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
target.op_stage.ribcage = 0
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// ALIEN EMBRYO SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/ribcage/remove_embryo
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
blood_level = 2
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/embryo = 0
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
embryo = 1
|
||||
break
|
||||
return ..() && embryo && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
|
||||
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||
"You rip the larva out of [target]'s ribcage!")
|
||||
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
A.loc = A.loc.loc
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// CHEST INTERNAL ORGAN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/ribcage/fix_chest_internal
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/medical/advanced/bruise_pack= 100, \
|
||||
/obj/item/stack/medical/bruise_pack = 20, \
|
||||
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
|
||||
)
|
||||
|
||||
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/is_chest_organ_damaged = 0
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2
|
||||
|
||||
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"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
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]." )
|
||||
else
|
||||
user.visible_message("[user] attempts to repair [target]'s mechanical [I.name] with [tool_name]...", \
|
||||
"\blue You attempt to repair [target]'s mechanical [I.name] with [tool_name]...")
|
||||
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
..()
|
||||
|
||||
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))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \
|
||||
"\blue You treat damage to [target]'s [I.name] with [tool_name]." )
|
||||
else
|
||||
user.visible_message("\blue [user] pokes [target]'s mechanical [I.name] with [tool_name]...", \
|
||||
"\blue You poke [target]'s mechanical [I.name] with [tool_name]... \red For no effect, since it's robotic.")
|
||||
I.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||
user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s chest with \the [tool]!", \
|
||||
"\red Your hand slips, getting mess and tearing the inside of [target]'s chest with \the [tool]!")
|
||||
var/dam_amt = 2
|
||||
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
target.adjustToxLoss(5)
|
||||
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
target.adjustToxLoss(7)
|
||||
else
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
/datum/surgery_step/ribcage/fix_chest_internal_robot //For artificial organs
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/nanopaste = 100, \
|
||||
/obj/item/weapon/bonegel = 30, \
|
||||
/obj/item/weapon/screwdriver = 70, \
|
||||
)
|
||||
|
||||
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/is_chest_organ_damaged = 0
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_chest_organ_damaged && heart.robotic == 2 && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
|
||||
if(heart.damage > 0)
|
||||
user.visible_message("[user] starts mending the mechanisms on [target]'s heart with \the [tool].", \
|
||||
"You start mending the mechanisms on [target]'s heart with \the [tool]." )
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
if(heart.damage > 0)
|
||||
user.visible_message("\blue [user] repairs [target]'s heart with \the [tool].", \
|
||||
"\blue You repair [target]'s heart with \the [tool]." )
|
||||
heart.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!!" , \
|
||||
"\red Your hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!")
|
||||
heart.take_damage(5, 0)
|
||||
target.adjustToxLoss(5)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// HEART SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// To be finished after some tests.
|
||||
// /datum/surgery_step/ribcage/heart/cut
|
||||
// allowed_tools = list(
|
||||
// /obj/item/weapon/scalpel = 100, \
|
||||
// /obj/item/weapon/kitchenknife = 75, \
|
||||
// /obj/item/weapon/shard = 50, \
|
||||
// )
|
||||
|
||||
// min_duration = 30
|
||||
// max_duration = 40
|
||||
|
||||
// can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// return ..() && target.op_stage.ribcage == 2
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// SLIME CORE EXTRACTION //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/slime
|
||||
is_valid_target(mob/living/carbon/slime/target)
|
||||
return istype(target, /mob/living/carbon/slime/)
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return target.stat == 2
|
||||
|
||||
/datum/surgery_step/slime/cut_flesh
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.core_removal_stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
|
||||
"You start cutting through [target]'s flesh with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts through [target]'s flesh with \the [tool].", \
|
||||
"\blue You cut through [target]'s flesh with \the [tool], revealing its silky innards.")
|
||||
target.core_removal_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
|
||||
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
|
||||
|
||||
/datum/surgery_step/slime/cut_innards
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.core_removal_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
|
||||
"You start cutting [target]'s silky innards apart with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores.", \
|
||||
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores.")
|
||||
target.core_removal_stage = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
|
||||
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
|
||||
|
||||
/datum/surgery_step/slime/saw_core
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && (istype(target) && target.core_removal_stage == 2 && target.cores > 0) //This is being passed a human as target, unsure why.
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
|
||||
"You start cutting out one of [target]'s cores with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
target.cores--
|
||||
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
|
||||
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
|
||||
|
||||
if(target.cores >= 0)
|
||||
new target.coretype(target.loc)
|
||||
if(target.cores <= 0)
|
||||
target.icon_state = "[target.colour] baby slime dead-nocore"
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, causing \him to miss the core!", \
|
||||
"\red Your hand slips, causing you to miss the core!")
|
||||
@@ -86,12 +86,15 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
|
||||
//check if tool is right or close enough and if this step is possible
|
||||
if( S.tool_quality(tool) && S.can_use(user, M, user.zone_sel.selecting, tool) && S.is_valid_target(M))
|
||||
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
|
||||
//We had proper tools! (or RNG smiled.) and User did not move or change hands.
|
||||
//We had proper tools! (or RNG smiled.) and user did not move or change hands.
|
||||
if( prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
|
||||
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
|
||||
else if (tool in user.contents && user.Adjacent(M)) //or
|
||||
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
|
||||
return 1 //don't want to do weapony things after surgery
|
||||
if (user.a_intent == "help")
|
||||
user << "\red You can't see any useful way to use [tool] on [M]."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/sort_surgeries()
|
||||
@@ -114,5 +117,5 @@ proc/sort_surgeries()
|
||||
var/eyes = 0
|
||||
var/face = 0
|
||||
var/appendix = 0
|
||||
var/ribcage = 0
|
||||
var/head_reattach = 0
|
||||
var/current_organ
|
||||
|
||||
Reference in New Issue
Block a user