mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Surgery fix for FixOVein steps. Merge pull request #3055 from Mordeth221/patch-1 Cyborg Medical Hypo Changing Doctors Delight to Tricordrazine
51 lines
2.2 KiB
Plaintext
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)
|