From 4f3df626c65e6ea250911798356f5983a42b681d Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 9 Jan 2021 00:09:17 +0100 Subject: [PATCH] no cell no problem --- code/game/objects/items/robot/robot_parts.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index e4d1dd8516..3ee69f6a86 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -304,9 +304,10 @@ O.job = "Cyborg" - O.cell = chest.cell - chest.cell.forceMove(O) - chest.cell = null + if(chest.cell) + O.cell = chest.cell + chest.cell.forceMove(O) + chest.cell = null W.forceMove(O)//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame. if(O.mmi) //we delete the mmi created by robot/New() qdel(O.mmi) @@ -346,10 +347,10 @@ O.lawupdate = FALSE O.make_laws() - - O.cell = chest.cell - chest.cell.forceMove(O) - chest.cell = null + if(chest.cell) + O.cell = chest.cell + chest.cell.forceMove(O) + chest.cell = null O.locked = panel_locked O.job = "Cyborg" forceMove(O)