[s] Make on_mob_movement work on all mob movement (#24491)

* Updated on_mob_move to be called on all mob movement.

* Call parent in mob/living/Moved
This commit is contained in:
Charlie Nolan
2024-03-07 17:55:06 +00:00
committed by GitHub
parent 91660824fa
commit 20096f3592
7 changed files with 18 additions and 10 deletions
+1 -1
View File
@@ -122,7 +122,7 @@
break
/obj/item/rcl/on_mob_move(direct, mob/user)
if(active)
if(active && isturf(user.loc))
trigger(user)
/obj/item/rcl/proc/trigger(mob/user)
+6
View File
@@ -359,6 +359,12 @@
/obj/item/shockpaddles/on_mob_move(dir, mob/user)
if(defib)
if(!isturf(user.loc))
// You went inside something. It blocks the cable.
// (This also means we don't have to listen for the
// surrounding object's movements.)
defib.remove_paddles(user)
var/turf/t = get_turf(defib)
if(!t.Adjacent(user))
defib.remove_paddles(user)