Modifies Kathira's custom leg aug (#21870)

This adds a signal that can be used to stop bone repair surgery for any
cause that might prevent such. In this particular case, I used it with
Kathira's leg aug to fit with it being a support for her leg, which
can't heal properly otherwise.
This is primarily for when she ends up in surgery and can't inform the
doctors they shouldn't be trying to begin with.
This commit is contained in:
Casper3667
2026-02-21 02:44:05 +01:00
committed by GitHub
parent 3a955ed401
commit 3fbe896673
4 changed files with 48 additions and 0 deletions
+32
View File
@@ -2087,6 +2087,38 @@ All custom items with worn sprites must follow the contained sprite system: http
else
collapse()
/obj/item/organ/internal/augment/fluff/kath_legbrace/Initialize()
. = ..()
if(!owner)
return
RegisterSignal(owner, COMSIG_BEGIN_SURGERY, PROC_REF(negate_healing), override = TRUE)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
parent.fracture(TRUE)
/obj/item/organ/internal/augment/fluff/kath_legbrace/replaced()
. = ..()
if(!owner)
return
RegisterSignal(owner, COMSIG_BEGIN_SURGERY, PROC_REF(negate_healing), override = TRUE)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
parent.fracture(TRUE)
/obj/item/organ/internal/augment/fluff/kath_legbrace/removed()
if(!owner)
return ..()
UnregisterSignal(owner, COMSIG_BEGIN_SURGERY)
return ..()
/obj/item/organ/internal/augment/fluff/kath_legbrace/proc/negate_healing(var/owner, var/canceled, var/obj/item/organ/external/affected, var/mob/living/user, var/singleton/surgery_step/surgery)
SIGNAL_HANDLER
if(!istype(surgery, /singleton/surgery_step/glue_bone) && !istype(surgery, /singleton/surgery_step/set_bone))
return
if(affected.limb_name != parent_organ)
return
*canceled = TRUE
user.visible_message(SPAN_WARNING("[user] seems to be unable to set the bone in [owner]'s [affected.name]."), \
SPAN_WARNING("The bone in [owner]'s [affected.name] appears to be impossible to set correctly!"))
/obj/item/organ/internal/augment/fluff/kath_legbrace/proc/collapse(var/prob_chance = 20, var/weaken_strength = 2, var/pain_strength = 40)
if(prob(prob_chance))
var/obj/item/organ/external/E = owner.organs_by_name[parent_organ]
+7
View File
@@ -53,6 +53,13 @@
/singleton/surgery_step/proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!ishuman(target))
return FALSE
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/canceled = FALSE
SEND_SIGNAL(target, COMSIG_BEGIN_SURGERY, &canceled, affected, user, src)
if(canceled)
return FALSE
return TRUE
/// Does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too