Fixes necrotic organ repair

This commit is contained in:
Arokha Sieyes
2018-01-20 12:25:49 -05:00
parent 7a6b0fd750
commit 1cc3e02dab

View File

@@ -56,9 +56,55 @@
affected.take_damage(5, 0)
///////////////////////////////////////////////////////////////
// Necrosis Surgery
// Necrosis Surgery Step 1
///////////////////////////////////////////////////////////////
/datum/surgery_step/fix_dead_tissue //Debridement
priority = 2
allowed_tools = list(
/obj/item/weapon/surgical/scalpel = 100, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
can_infect = 1
blood_level = 1
min_duration = 110
max_duration = 160
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!hasorgans(target))
return 0
if (target_zone == O_MOUTH || target_zone == O_EYES)
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open >= 2 && (affected.status & ORGAN_DEAD)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \
"You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<font color='blue'>[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</font>")
affected.open = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<font color='red'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</font>")
affected.createwound(CUT, 20, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 2
///////////////////////////////////////////////////////////////
/datum/surgery_step/treat_necrosis
priority = 2
allowed_tools = list(