Collapsed all organs into one object type. Added more interesting amputation. Added dislocation. WIP.

This commit is contained in:
Zuhayr
2015-03-11 21:17:51 +10:30
parent 9c30024ca0
commit e0f23aead5
115 changed files with 1295 additions and 1372 deletions

View File

@@ -17,11 +17,11 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.stage == 0)
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
"You start applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool].")
@@ -29,13 +29,13 @@
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] applies some [tool] to [target]'s bone in [affected.display_name]", \
"\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].")
affected.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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
@@ -51,18 +51,18 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool]." , \
"You are beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool].")
target.custom_pain("The pain in your [affected.display_name] is going to make you pass out!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.status & ORGAN_BROKEN)
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name] in place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name] in place with \the [tool].")
@@ -73,7 +73,7 @@
affected.fracture()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!" , \
"\red Your hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(BRUISE, 5)
@@ -90,7 +90,7 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.name == "head" && affected.open >= 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -99,16 +99,16 @@
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] sets [target]'s skull with \the [tool]." , \
"\blue You set [target]'s skull with \the [tool].")
affected.stage = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
"\red Your hand slips, damaging [target]'s face with \the [tool]!")
var/datum/organ/external/head/h = affected
var/obj/item/organ/external/head/h = affected
h.createwound(BRUISE, 10)
h.disfigured = 1
@@ -126,17 +126,17 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].", \
"You start to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].")
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
"\blue You have mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." )
affected.status &= ~ORGAN_BROKEN
@@ -145,6 +145,6 @@
affected.perma_injury = 0
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")

View File

@@ -14,8 +14,8 @@
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"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/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)
@@ -26,7 +26,7 @@
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"]
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
if (sponge)
sponge.damage = 0
@@ -46,8 +46,8 @@
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"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/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)
@@ -58,7 +58,7 @@
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"]
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
if (sponge)
sponge.damage = 20

View File

@@ -11,7 +11,7 @@
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.encased && affected.open >= 2
@@ -27,14 +27,14 @@
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/obj/item/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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \
"You begin to cut through [target]'s [affected.encased] with \the [tool].")
@@ -45,7 +45,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has cut [target]'s [affected.encased] open with \the [tool].", \
"\blue You have cut [target]'s [affected.encased] open with \the [tool].")
@@ -55,7 +55,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!" )
@@ -76,14 +76,14 @@
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/obj/item/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/obj/item/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]."
@@ -95,7 +95,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] forces open [target]'s [affected.encased] with \the [tool]."
var/self_msg = "\blue You force open [target]'s [affected.encased] with \the [tool]."
@@ -111,7 +111,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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]!"
@@ -133,14 +133,14 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]."
@@ -152,7 +152,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] bends [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "\blue You bend [target]'s [affected.encased] back into place with \the [tool]."
@@ -164,7 +164,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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!"
@@ -190,14 +190,14 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]."
var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]."
@@ -209,7 +209,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] applied \the [tool] to [target]'s [affected.encased]."
var/self_msg = "\blue You applied \the [tool] to [target]'s [affected.encased]."

View File

@@ -9,11 +9,11 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
var/datum/organ/internal/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes = target.internal_organs_by_name["eyes"]
return target_zone == "eyes" && eyes
@@ -42,8 +42,8 @@
target.blinded += 1.5
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
affected.createwound(CUT, 10)
@@ -72,8 +72,8 @@
target.op_stage.eyes = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
"\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
target.apply_damage(10, BRUTE, affected)
@@ -103,8 +103,8 @@
target.op_stage.eyes = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
"\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
target.apply_damage(10, BRUTE, affected, sharp=1)
@@ -129,7 +129,7 @@
"You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
"\blue You cauterize the incision around [target]'s eyes with \the [tool].")
if (target.op_stage.eyes == 3)
@@ -139,8 +139,8 @@
target.op_stage.eyes = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
"\red Your hand slips, searing [target]'s eyes with \the [tool]!")
target.apply_damage(5, BURN, affected)

View File

@@ -9,7 +9,7 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
return target_zone == "mouth"
@@ -38,7 +38,7 @@
target.op_stage.face = 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s throat wth \the [tool]!" )
affected.createwound(CUT, 60)
@@ -95,7 +95,7 @@
target.op_stage.face = 3
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \
"\red Your hand slips, tearing skin on [target]'s face with \the [tool]!")
target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1)
@@ -120,18 +120,18 @@
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cauterizes the incision on [target]'s face and neck with \the [tool].", \
"\blue You cauterize the incision on [target]'s face and neck with \the [tool].")
affected.open = 0
affected.status &= ~ORGAN_BLEEDING
if (target.op_stage.face == 3)
var/datum/organ/external/head/h = affected
var/obj/item/organ/external/head/h = affected
h.disfigured = 0
target.op_stage.face = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s face with \the [tool]!")
target.apply_damage(4, BURN, affected)

View File

@@ -12,7 +12,7 @@
return 0
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected == null)
return 0
if (affected.status & ORGAN_DESTROYED)
@@ -36,18 +36,18 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts the bloodless incision on [target]'s [affected.display_name] with \the [tool].", \
"You start the bloodless incision on [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("You feel a horrible, searing pain 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has made a bloodless incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You have made a bloodless incision on [target]'s [affected.display_name] with \the [tool].",)
//Could be cleaner ...
@@ -61,7 +61,7 @@
spread_germs_to_organ(affected, user)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 7.5)
@@ -77,18 +77,18 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.display_name] with \the [tool].", \
"You start to construct a prepared incision on and within [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("You feel a horrible, searing pain in your [affected.display_name] as it is pushed apart!",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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has constructed a prepared incision on and within [target]'s [affected.display_name] with \the [tool].", \
"\blue You have constructed a prepared incision on and within [target]'s [affected.display_name] with \the [tool].",)
affected.open = 1
@@ -101,7 +101,7 @@
affected.open = 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)
@@ -119,18 +119,18 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts the incision on [target]'s [affected.display_name] with \the [tool].", \
"You start the incision on [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("You feel a horrible pain as if from a sharp knife 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has made an incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",)
affected.open = 1
@@ -141,7 +141,7 @@
affected.createwound(CUT, 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in the wrong place with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.display_name] in the wrong place with \the [tool]!")
affected.createwound(CUT, 10)
@@ -158,25 +158,25 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open && (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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.display_name] with \the [tool].", \
"You start clamping bleeders in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("The pain in your [affected.display_name] is maddening!",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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \
"\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].")
affected.clamp()
spread_germs_to_organ(affected, user)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
affected.createwound(CUT, 10)
@@ -193,11 +193,11 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
var/self_msg = "You start to pry open the incision on [target]'s [affected.display_name] with \the [tool]."
if (target_zone == "chest")
@@ -211,7 +211,7 @@
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] keeps the incision open on [target]'s [affected.display_name] with \the [tool]."
var/self_msg = "\blue You keep the incision open on [target]'s [affected.display_name] with \the [tool]."
if (target_zone == "chest")
@@ -224,7 +224,7 @@
affected.open = 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\red [user]'s hand slips, tearing the edges of the incision on [target]'s [affected.display_name] with \the [tool]!"
var/self_msg = "\red Your hand slips, tearing the edges of the incision on [target]'s [affected.display_name] with \the [tool]!"
if (target_zone == "chest")
@@ -249,18 +249,18 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool]." , \
"You are beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("Your [affected.display_name] is being burned!",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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cauterizes the incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
affected.open = 0
@@ -268,12 +268,12 @@
affected.status &= ~ORGAN_BLEEDING
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!")
target.apply_damage(3, BURN, affected)
/datum/surgery_step/generic/cut_limb
/datum/surgery_step/generic/amputate
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
@@ -287,7 +287,7 @@
return 0
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected == null)
return 0
if (affected.status & ORGAN_DESTROYED)
@@ -295,20 +295,20 @@
return target_zone != "chest" && target_zone != "groin" && target_zone != "head"
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] is beginning to cut off [target]'s [affected.display_name] with \the [tool]." , \
"You are beginning to cut off [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("Your [affected.display_name] is being ripped apart!",1)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to amputate [target]'s [affected.display_name] with \the [tool]." , \
"You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].")
target.custom_pain("Your [affected.amputation_point] is being ripped apart!",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] cuts off [target]'s [affected.display_name] with \the [tool].", \
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] amputates [target]'s [affected.display_name] with \the [tool].", \
"\blue You amputate [target]'s [affected.display_name] with \the [tool].")
affected.droplimb(1,1,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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 30)

View File

@@ -6,7 +6,7 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
if (!(affected.status & ORGAN_DESTROYED))
@@ -29,7 +29,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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return !(affected.status & ORGAN_CUT_AWAY)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -38,13 +38,13 @@
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] peels back tattered flesh where [target]'s head used to be with \the [tool].", \
"\blue You peel back tattered flesh where [target]'s head used to be with \the [tool].")
affected.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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, ripping [target]'s [affected.display_name] open!", \
@@ -63,11 +63,11 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.status & ORGAN_CUT_AWAY && target.op_stage.head_reattach == 0 && !(affected.status & ORGAN_ATTACHABLE)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to reshape [target]'s esophagal and vocal region with \the [tool].", \
"You start to reshape [target]'s [affected.display_name] esophagal and vocal region with \the [tool].")
..()
@@ -78,7 +78,7 @@
target.op_stage.head_reattach = 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, further rending flesh on [target]'s neck!", \
@@ -109,7 +109,7 @@
target.op_stage.head_reattach = 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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, ripping apart flesh on [target]'s neck!", \
@@ -137,7 +137,7 @@
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished adjusting the area around [target]'s neck with \the [tool].", \
"\blue You have finished adjusting the area around [target]'s neck with \the [tool].")
target.op_stage.head_reattach = 0
@@ -147,7 +147,7 @@
affected.open = 0
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, searing [target]'s neck!", \
@@ -156,7 +156,7 @@
/datum/surgery_step/head/attach
allowed_tools = list(/obj/item/weapon/organ/head = 100)
allowed_tools = list(/obj/item/organ/head = 100)
can_infect = 0
min_duration = 80
@@ -164,7 +164,7 @@
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/datum/organ/external/head = target.get_organ(target_zone)
var/obj/item/organ/external/head = target.get_organ(target_zone)
return head.status & ORGAN_ATTACHABLE
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -172,7 +172,7 @@
"You start attaching [tool] to [target]'s reshaped neck.")
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
"\blue You have attached [target]'s head to the body.")
affected.status = 0
@@ -188,7 +188,7 @@
del(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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s neck!", \
"\red Your hand slips, damaging connectors on [target]'s neck!")
target.apply_damage(10, BRUTE, affected, sharp=1)

View File

@@ -9,10 +9,10 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == (affected.encased ? 3 : 2) && !(affected.status & ORGAN_BLEEDING)
proc/get_max_wclass(datum/organ/external/affected)
proc/get_max_wclass(var/obj/item/organ/external/affected)
switch (affected.name)
if ("head")
return 1
@@ -22,7 +22,7 @@
return 2
return 0
proc/get_cavity(datum/organ/external/affected)
proc/get_cavity(var/obj/item/organ/external/affected)
switch (affected.name)
if ("head")
return "cranial"
@@ -44,11 +44,11 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return !affected.cavity && !affected.hidden
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \
"You start making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." )
target.custom_pain("The pain in your chest is living hell!",1)
@@ -56,12 +56,12 @@
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \
"\blue You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)
@@ -80,11 +80,11 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.cavity
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \
"You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." )
target.custom_pain("The pain in your chest is living hell!",1)
@@ -92,12 +92,12 @@
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].", \
"\blue You mend [target]'s [get_cavity(affected)] cavity walls with \the [tool]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)
@@ -111,18 +111,18 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return !istype(user,/mob/living/silicon/robot) && !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \
"You start putting \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
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/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
@@ -137,7 +137,7 @@
affected.cavity = 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(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)
@@ -157,18 +157,18 @@
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"]
var/obj/item/organ/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)
var/obj/item/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].", \
"You start poking around inside the incision on [target]'s [affected.display_name] 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/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
var/find_prob = 0
@@ -223,7 +223,7 @@
"\blue You could not find anything inside [target]'s [affected.display_name]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20)

View File

@@ -9,7 +9,7 @@
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == (affected.encased ? 3 : 2)
//////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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)
@@ -69,10 +69,10 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/is_organ_damaged = 0
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/I in affected.internal_organs)
if(I.damage > 0)
is_organ_damaged = 1
break
@@ -90,9 +90,9 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/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].", \
@@ -113,9 +113,9 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/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].", \
@@ -126,7 +126,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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]!")
@@ -143,7 +143,7 @@
target.adjustToxLoss(10)
affected.createwound(CUT, 5)
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
I.take_damage(dam_amt,0)
@@ -161,10 +161,10 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/is_organ_damaged = 0
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/I in affected.internal_organs)
if(I.damage > 0 && I.robotic >= 2)
is_organ_damaged = 1
break
@@ -174,9 +174,9 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/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.", \
@@ -189,9 +189,9 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.robotic >= 2)
@@ -203,7 +203,7 @@
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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]!")
@@ -211,7 +211,7 @@
target.adjustToxLoss(5)
affected.createwound(CUT, 5)
for(var/datum/organ/internal/I in affected.internal_organs)
for(var/obj/item/organ/I in affected.internal_organs)
if(I)
I.take_damage(rand(3,5),0)
@@ -236,7 +236,7 @@
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]
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(!I.status && I.parent_organ == target_zone)
attached_organs |= organ
@@ -250,7 +250,7 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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]." )
@@ -261,12 +261,12 @@
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]
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
if(I && istype(I))
I.status |= ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.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)
@@ -291,7 +291,7 @@
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]
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
removable_organs |= organ
@@ -314,7 +314,7 @@
// Extract the organ!
if(target.op_stage.current_organ)
var/datum/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
var/obj/item/organ/O
if(I && istype(I))
O = I.remove(user)
@@ -323,7 +323,7 @@
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)
var/obj/item/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)
@@ -339,7 +339,7 @@
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/obj/item/organ/external/affected = target.get_organ(target_zone)
var/organ_compatible
var/organ_missing
@@ -367,7 +367,7 @@
user << "\red \The [target] already has [o_a][O.organ_tag]."
return 2
if(O.organ_data && affected.name == O.organ_data.parent_organ)
if(O && affected.name == O.parent_organ)
organ_compatible = 1
else
user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.display_name]."
@@ -379,14 +379,14 @@
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)
var/obj/item/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)
var/obj/item/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)
@@ -399,7 +399,7 @@
"\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)
I.take_damage(rand(3,5),0)
/datum/surgery_step/internal/attach_organ
allowed_tools = list(
@@ -419,7 +419,7 @@
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]
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
removable_organs |= organ
@@ -440,12 +440,12 @@
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]
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
if(I && istype(I))
I.status &= ~ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/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)

View File

@@ -20,7 +20,7 @@
if(!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/internal_bleeding = 0
for(var/datum/wound/W in affected.wounds) if(W.internal)
@@ -30,14 +30,14 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \
"You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("The pain in [affected.display_name] is unbearable!",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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has patched the damaged vein in [target]'s [affected.display_name] with \the [tool].", \
"\blue You have patched the damaged vein in [target]'s [affected.display_name] with \the [tool].")
@@ -47,7 +47,7 @@
if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
affected.take_damage(5, 0)
@@ -73,25 +73,25 @@
if (target_zone == "mouth" || target_zone == "eyes")
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool]." , \
"You start cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("The pain in [affected.display_name] is unbearable!",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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].", \
"\blue You have cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].")
affected.open = 3
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 20, 1)
@@ -126,18 +126,18 @@
if (target_zone == "mouth" || target_zone == "eyes")
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.open == 3 && (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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool]." , \
"You start applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool].")
target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return
@@ -155,7 +155,7 @@
"\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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!istype(tool, /obj/item/weapon/reagent_containers))
return

View File

@@ -8,7 +8,7 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
if (!(affected.status & ORGAN_DESTROYED))
@@ -31,23 +31,23 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return !(affected.status & ORGAN_CUT_AWAY)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
affected.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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
@@ -66,23 +66,23 @@
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
affected.open = 3
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
@@ -103,17 +103,17 @@
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)
var/obj/item/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)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts adjusting the area around [target]'s [affected.display_name] with \the [tool].", \
"You start adjusting the area around [target]'s [affected.display_name] with \the [tool].")
..()
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished adjusting the area around [target]'s [affected.display_name] with \the [tool].", \
"\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].")
affected.status |= ORGAN_ATTACHABLE
@@ -122,7 +122,7 @@
affected.open = 0
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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, searing [target]'s [affected.display_name]!", \
@@ -142,17 +142,17 @@
if (p.part)
if (!(target_zone in p.part))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected.status & ORGAN_ATTACHABLE
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts attaching \the [tool] where [target]'s [affected.display_name] used to be.", \
"You start attaching \the [tool] where [target]'s [affected.display_name] used to be.")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has attached \the [tool] where [target]'s [affected.display_name] used to be.", \
"\blue You have attached \the [tool] where [target]'s [affected.display_name] used to be.")
affected.germ_level = 0
@@ -167,7 +167,7 @@
del(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)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \
"\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!")
target.apply_damage(10, BRUTE, affected, sharp=1)

View File

@@ -49,7 +49,7 @@
// does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too
proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (can_infect && affected)
spread_germs_to_organ(affected, user)
if (ishuman(user) && prob(60))
@@ -68,7 +68,7 @@
proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return null
proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
proc/spread_germs_to_organ(var/obj/item/organ/external/E, var/mob/living/carbon/human/user)
if(!istype(user) || !istype(E)) return
var/germ_level = user.germ_level