Skip to content

Commit

Permalink
Fixes netpod healing exploit (tgstation#80717)
Browse files Browse the repository at this point in the history
## About The Pull Request
This PR addresses an issue where netpod healing effects persisted under
certain conditions (Issue tgstation#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 tgstation#80715
## Changelog
:cl:
fix: Having a netpod destroyed will no longer grant you permanent
healing.
/:cl:
  • Loading branch information
jlsnow301 authored Jan 5, 2024
1 parent 9dfc098 commit e6e3edc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/modules/bitrunning/components/netpod_healing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e6e3edc

Please sign in to comment.