Refactored movement observable away (#20083)

Refactored movement observable away, use only the signal.
Some tweaks to the signal.
This commit is contained in:
Fluffy
2024-10-26 15:53:07 +00:00
committed by GitHub
parent 3de4911dc8
commit d40d459d42
35 changed files with 532 additions and 434 deletions
-9
View File
@@ -142,10 +142,6 @@
affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1)
user.drop_item()
affected.implants += tool
if(istype(tool, /obj/item/device/gps))
var/obj/item/device/gps/gps = tool
GLOB.moved_event.register(target, gps, TYPE_PROC_REF(/obj/item/device/gps, update_position))
gps.implanted_into = target
tool.forceMove(affected)
affected.cavity = CAVITY_CLOSED
@@ -210,11 +206,6 @@
worm.detach()
worm.leave_host()
else if(istype(I, /obj/item/device/gps))
var/obj/item/device/gps/gps = I
GLOB.moved_event.unregister(target, gps)
gps.implanted_into = null
playsound(target.loc, 'sound/effects/squelch1.ogg', 50, 1)
else
user.visible_message("<b>[user]</b> could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.", \