From 4b9365cb42f46a98f916fa0100176e264ca7ccef Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 5 Jan 2024 03:43:14 +0100 Subject: [PATCH] [MIRROR] Fixes netpod healing exploit [MDB IGNORE] (#26002) * Fixes netpod healing exploit (#80717) ## About The Pull Request This PR addresses an issue where netpod healing effects persisted under certain conditions (Issue #80715). Specifically, when a netpod is destroyed with a player inside, the embryonic stasis effect improperly continued. This adds another cases where the user is teleported out by other means (not currently a known issue). ## Why It's Good For The Game Fixes an in game exploit / bug Fixes #80715 ## Changelog :cl: fix: Having a netpod destroyed will no longer grant you permanent healing. /:cl: * Fixes netpod healing exploit --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> --- code/modules/bitrunning/components/netpod_healing.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/bitrunning/components/netpod_healing.dm b/code/modules/bitrunning/components/netpod_healing.dm index 03cdbc000be..86f80e854e0 100644 --- a/code/modules/bitrunning/components/netpod_healing.dm +++ b/code/modules/bitrunning/components/netpod_healing.dm @@ -6,7 +6,13 @@ if (!iscarbon(parent)) return COMPONENT_INCOMPATIBLE - RegisterSignal(pod, COMSIG_BITRUNNER_NETPOD_OPENED, PROC_REF(on_opened)) + RegisterSignals( + pod, + list(COMSIG_MACHINERY_BROKEN, COMSIG_QDELETING, COMSIG_BITRUNNER_NETPOD_OPENED), + PROC_REF(on_remove), + ) + + RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_remove)) var/mob/living/carbon/player = parent player.apply_status_effect(/datum/status_effect/embryonic, STASIS_NETPOD_EFFECT) @@ -39,7 +45,7 @@ owner.updatehealth() /// Deletes itself when the machine was opened -/datum/component/netpod_healing/proc/on_opened() +/datum/component/netpod_healing/proc/on_remove() SIGNAL_HANDLER qdel(src)