Fixes a few organ mending surgery oddities. (#17404)

* Fixes a few organ mending surgery oddities.

* ssss

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-09-24 12:26:58 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 485c82c416
commit dd6e9c4ab6
3 changed files with 51 additions and 7 deletions
+7 -6
View File
@@ -36,8 +36,10 @@
var/is_organ_damaged = FALSE
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I.is_damaged())
if(BP_IS_ROBOTIC(I))
to_chat(user, SPAN_NOTICE("You notice that \the [I] in [user]'s [affected.name] is a mechanical organ, and is also damaged."))
continue
is_organ_damaged = TRUE
break
return is_organ_damaged
/singleton/surgery_step/internal/fix_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -57,8 +59,6 @@
"You start treating damage to [target]'s [I.name] with [tool_name]." )
target.custom_pain("The pain in your [affected.name] is living hell!",100, affecting = affected)
..()
/singleton/surgery_step/internal/fix_organ/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))
@@ -123,9 +123,11 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/is_organ_damaged = 0
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I.is_damaged() && I.robotic >= 2)
if(I.is_damaged())
if(!BP_IS_ROBOTIC(I))
to_chat(user, SPAN_NOTICE("You notice that \the [I] in [user]'s [affected.name] is a biological organ, and is also damaged."))
continue
is_organ_damaged = TRUE
break
return is_organ_damaged && IS_ORGAN_FULLY_OPEN
/singleton/surgery_step/internal/fix_organ_robotic/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -173,7 +175,6 @@
if(I)
I.take_damage(rand(3,5),0)
/singleton/surgery_step/internal/detach_organ
name = "Separate Organ"
priority = 1
+1 -1
View File
@@ -66,7 +66,7 @@
H.bloody_hands(target,0)
if(blood_level > 1)
H.bloody_body(target,0)
return
return TRUE
// does stuff to end the step, which is normally print a message + do whatever this step changes
/singleton/surgery_step/proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)