From 37db29f98434141048475fd74ce7923364535fb2 Mon Sep 17 00:00:00 2001 From: Bm0n <92271472+Bm0n@users.noreply.github.com> Date: Wed, 9 Oct 2024 06:48:48 -0400 Subject: [PATCH] Fixes Powercell Removal On Modsuits (#26989) * modsuit powercell remove fix * renames proc * Update code/modules/mod/mod_core.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Bm0n <92271472+Bm0n@users.noreply.github.com> --------- Signed-off-by: Bm0n <92271472+Bm0n@users.noreply.github.com> Co-authored-by: Bmon Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/modules/mod/mod_core.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mod/mod_core.dm b/code/modules/mod/mod_core.dm index c2ce61cab7e..40d9abe1a3a 100644 --- a/code/modules/mod/mod_core.dm +++ b/code/modules/mod/mod_core.dm @@ -86,7 +86,7 @@ if(cell) install_cell(cell) RegisterSignal(mod, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) - RegisterSignal(mod, COMSIG_ATOM_ATTACK_HAND, PROC_REF(on_attack_hand)) + RegisterSignal(mod, COMSIG_CLICK_CTRL, PROC_REF(on_ctrl_click)) RegisterSignal(mod, COMSIG_MOD_WEARER_SET, PROC_REF(on_wearer_set)) if(mod.wearer) on_wearer_set(mod, mod.wearer) @@ -94,7 +94,7 @@ /obj/item/mod/core/standard/uninstall() if(!QDELETED(cell)) cell.forceMove(drop_location()) - UnregisterSignal(mod, list(COMSIG_PARENT_EXAMINE, COMSIG_ATOM_ATTACK_HAND, COMSIG_MOD_WEARER_SET)) + UnregisterSignal(mod, list(COMSIG_PARENT_EXAMINE, COMSIG_CLICK_CTRL, COMSIG_MOD_WEARER_SET)) if(mod.wearer) on_wearer_unset(mod, mod.wearer) return ..() @@ -179,10 +179,10 @@ if(!mod.open) return - examine_text += cell ? "You could remove the cell with an empty hand." : "You could use a cell on it to install one." + examine_text += cell ? "You could remove the cell while in hand or being worn with Ctrl-Click." : "You could use a cell on it to install one." -/obj/item/mod/core/standard/proc/on_attack_hand(datum/source, mob/living/user) - SIGNAL_HANDLER +/obj/item/mod/core/standard/proc/on_ctrl_click(datum/source, mob/living/user) + SIGNAL_HANDLER // COMSIG_CLICK_CTRL if(mod.seconds_electrified && charge_amount() && mod.shock(user)) return COMPONENT_CANCEL_ATTACK_CHAIN