From 6a5b26d56a2c88170e1473de14b7ccec0ece84eb Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:30:23 -0600 Subject: [PATCH] Cursed heart tweaks (#23988) * Cursed heart tweaks * Update code/modules/surgery/organs/heart.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * trust in the power of the vars --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/modules/surgery/organs/heart.dm | 10 ++++++++++ code/modules/surgery/organs/organ_internal.dm | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 61a9e6408a5..9e284f5c421 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -84,6 +84,8 @@ to_chat(owner, "Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!") RegisterSignal(owner, COMSIG_LIVING_PRE_DEFIB, PROC_REF(just_before_revive)) RegisterSignal(owner, COMSIG_LIVING_DEFIBBED, PROC_REF(on_defib_revive)) + in_grace_period = TRUE + addtimer(VARSET_CALLBACK(src, in_grace_period, FALSE), revival_grace_period) /obj/item/organ/internal/heart/cursed/remove(mob/living/carbon/M, special) if(owner?.client?.prefs.colourblind_mode == COLOURBLIND_MODE_NONE) @@ -172,6 +174,14 @@ H.adjustFireLoss(-cursed_heart.heal_burn) H.adjustOxyLoss(-cursed_heart.heal_oxy) +/datum/action/item_action/organ_action/cursed_heart/Grant(mob/M) + ..() + INVOKE_ASYNC(src, PROC_REF(poll_keybinds)) + +/datum/action/item_action/organ_action/cursed_heart/proc/poll_keybinds() + if(alert(owner, "You've been given a cursed heart! Do you want to bind its action to a keybind?", "Cursed Heart", "Yes", "No") == "Yes") + button.set_to_keybind(owner) + /obj/item/organ/internal/heart/cybernetic name = "cybernetic heart" desc = "An electronic device designed to mimic the functions of an organic human heart. Offers no benefit over an organic heart other than being easy to make." diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 12143a6b53c..2087f6208e4 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -34,7 +34,6 @@ QDEL_LIST_ASSOC_VAL(organ_datums) // The removal from internal_organ_datums should be handled when the organ is removed . = ..() - /obj/item/organ/internal/proc/insert(mob/living/carbon/M, special = 0, dont_remove_slot = 0) if(!iscarbon(M) || owner == M) return