Files
vgstation13/code/modules/surgery/other.dm
d3athrow 15fa3dc011 Merge pull request #3049 from Segrain/master
Surgery fix for FixOVein steps.
Merge pull request #3055 from Mordeth221/patch-1

Cyborg Medical Hypo Changing Doctors Delight to Tricordrazine
2013-06-13 20:18:06 -05:00

51 lines
2.2 KiB
Plaintext

//Procedures in this file: Inernal wound patching, Implant removal.
//////////////////////////////////////////////////////////////////
// INTERNAL WOUND PATCHING //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/fix_vein
priority = 2
allowed_tools = list(
/obj/item/weapon/FixOVein = 100, \
/obj/item/weapon/cable_coil = 75
)
can_infect = 1
blood_level = 1
min_duration = 70
max_duration = 90
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/internal_bleeding = 0
for(var/datum/wound/W in affected.wounds) if(W.internal)
internal_bleeding = 1
break
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)
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)
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].")
for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W
affected.update_damages()
if (ishuman(user) && prob(40)) user:bloody_hands(target, 0)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/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)