From ca9b4483f848078c108c77cf331d40cd0a434fd4 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sun, 22 Mar 2026 19:45:18 +0100 Subject: [PATCH] fix robot ids (#19332) --- .../objects/items/weapons/id cards/cards.dm | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/game/objects/items/weapons/id cards/cards.dm b/code/game/objects/items/weapons/id cards/cards.dm index 09ed94244c..e040345551 100644 --- a/code/game/objects/items/weapons/id cards/cards.dm +++ b/code/game/objects/items/weapons/id cards/cards.dm @@ -272,32 +272,32 @@ return /obj/item/card/id/synthetic/borg - var/mob/living/silicon/robot/R + var/mob/living/silicon/robot/robot_owner var/last_robot_loc /obj/item/card/id/synthetic/borg/Initialize(mapload) . = ..() - if(isrobot(loc?.loc)) - R = loc.loc - registered_name = R.braintype + if(isrobot(loc)) + robot_owner = loc + registered_name = robot_owner.braintype RegisterSignal(src, COMSIG_MOVABLE_ATTEMPTED_MOVE, PROC_REF(check_loc)) /obj/item/card/id/synthetic/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc) SIGNAL_HANDLER - if(old_loc == R || old_loc == R.module) + if(old_loc == robot_owner || old_loc == robot_owner.module) last_robot_loc = old_loc - if(!istype(loc, /obj/machinery) && loc != R && loc != R.module) + if(!istype(loc, /obj/machinery) && loc != robot_owner && loc != robot_owner.module) if(last_robot_loc) forceMove(last_robot_loc) last_robot_loc = null else - forceMove(R) - if(loc == R) + forceMove(robot_owner) + if(loc == robot_owner) hud_layerise() /obj/item/card/id/synthetic/borg/Destroy() - if(R) + if(robot_owner) UnregisterSignal(src, COMSIG_MOVABLE_ATTEMPTED_MOVE) - R = null + robot_owner = null last_robot_loc = null . = ..()