[MIRROR] clear pai tracking when hacking cable retracts [MDB IGNORE] (#19252)

* clear pai tracking when hacking cable retracts (#73302)

## About The Pull Request

We track the pai aswell as the cable to check for the pai moving away
from the user
But we never clear that tracking

Also adds a check for the check proc to not run if there isn't even a
hacking cable
## Why It's Good For The Game

resolves #73222
## Changelog
🆑
fix: Using a hacking cable will no longer permanently spam you with
balloon messages
/🆑

* clear pai tracking when hacking cable retracts

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-02-09 17:44:31 -08:00
committed by GitHub
co-authored by Zephyr
parent 3352447b88
commit 3185e95d87
+2 -1
View File
@@ -78,7 +78,7 @@
/mob/living/silicon/pai/proc/handle_move(atom/movable/source, atom/movable/old_loc)
if(ismovable(old_loc))
untrack_thing(old_loc)
if(!IN_GIVEN_RANGE(src, hacking_cable, CABLE_LENGTH))
if(hacking_cable && (!IN_GIVEN_RANGE(src, hacking_cable, CABLE_LENGTH)))
retract_cable()
return
if(ismovable(source.loc))
@@ -89,6 +89,7 @@
*/
/mob/living/silicon/pai/proc/retract_cable()
balloon_alert(src, "cable retracted")
untrack_pai()
QDEL_NULL(hacking_cable)
return TRUE