better way for that (#9080)

This commit is contained in:
Kashargul
2024-09-29 08:44:07 +02:00
committed by GitHub
parent d45c297d50
commit a7ebbadb5e

View File

@@ -7,9 +7,8 @@
/obj/item/weapon/card/id/exploration/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))
@@ -26,5 +25,8 @@
hud_layerise()
/obj/item/weapon/card/id/exploration/borg/Destroy()
if(R)
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
R = null
last_robot_loc = null
..()