Fixes surgery cancellation bug/exploit. (#18097)

* Sawing somebodys chest or head open breaks the affected bone

* Silences the screams
This commit is contained in:
alex-gh
2022-06-28 17:30:27 +01:00
committed by GitHub
parent 5e0d934fca
commit bb36a5b0d1
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -50,6 +50,7 @@
user.visible_message("<span class='notice'> [user] has cut [target]'s [affected.encased] open with \the [tool].</span>", \
"<span class='notice'> You have cut [target]'s [affected.encased] open with \the [tool].</span>")
affected.open = 2.5
affected.fracture(silent = TRUE)
return 1
/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
@@ -614,13 +614,13 @@ Note that amputating the affected organ does in fact remove the infection from t
"\The [holder.legcuffed.name] falls off you.")
holder.unEquip(holder.legcuffed)
/obj/item/organ/external/proc/fracture()
/obj/item/organ/external/proc/fracture(silent = FALSE)
if(is_robotic())
return //ORGAN_BROKEN doesn't have the same meaning for robot limbs
if((status & ORGAN_BROKEN) || (limb_flags & CANNOT_BREAK))
return
if(owner)
if(owner && !silent)
owner.audible_message(
"<span class='warning'>You hear a sickening crack coming from \the [owner].</span>",
"<span class='danger'>[owner]'s [name] appears to buckle unnaturally!</span>"