mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
better way for that (#9080)
This commit is contained in:
@@ -7,9 +7,8 @@
|
|||||||
|
|
||||||
/obj/item/weapon/card/id/exploration/borg/Initialize()
|
/obj/item/weapon/card/id/exploration/borg/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(loc)
|
if(isrobot(loc?.loc))
|
||||||
R = loc.loc
|
R = loc.loc
|
||||||
if(istype(R))
|
|
||||||
registered_name = R.braintype
|
registered_name = R.braintype
|
||||||
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
|
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
|
||||||
|
|
||||||
@@ -26,5 +25,8 @@
|
|||||||
hud_layerise()
|
hud_layerise()
|
||||||
|
|
||||||
/obj/item/weapon/card/id/exploration/borg/Destroy()
|
/obj/item/weapon/card/id/exploration/borg/Destroy()
|
||||||
|
if(R)
|
||||||
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
|
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
|
||||||
|
R = null
|
||||||
|
last_robot_loc = null
|
||||||
..()
|
..()
|
||||||
|
|||||||
Reference in New Issue
Block a user