mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
actually do it properly
This commit is contained in:
@@ -277,11 +277,10 @@
|
||||
|
||||
/obj/item/weapon/card/id/cargo/miner/borg/Initialize()
|
||||
. = ..()
|
||||
if(loc)
|
||||
if(isrobot(loc?.loc))
|
||||
R = loc.loc
|
||||
if(istype(R))
|
||||
registered_name = R.braintype
|
||||
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
|
||||
registered_name = R.braintype
|
||||
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
|
||||
|
||||
/obj/item/weapon/card/id/cargo/miner/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc)
|
||||
if(old_loc == R || old_loc == R.module)
|
||||
@@ -296,7 +295,8 @@
|
||||
hud_layerise()
|
||||
|
||||
/obj/item/weapon/card/id/cargo/miner/borg/Destroy()
|
||||
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
|
||||
R = null
|
||||
last_robot_loc = null
|
||||
if(R)
|
||||
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
|
||||
R = null
|
||||
last_robot_loc = null
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user