From 8ae46cf5bfb8143e3b82f3a77c1f9a0cbadd8ffc Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 23 Jun 2018 12:03:36 -0700 Subject: [PATCH] Cyborgs now drop radio keys on detonation/destruction (#38617) * Cyborgs now drop radio keys on detonation/destruction * Woops! * Update robot.dm * Use atom rather than turf --- code/modules/mob/living/silicon/robot/robot.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7af7ffe22d2..db3b9f3bdff 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -162,8 +162,8 @@ //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO /mob/living/silicon/robot/Destroy() + var/atom/T = drop_location()//To hopefully prevent run time errors. if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. - var/turf/T = get_turf(loc)//To hopefully prevent run time errors. if(T) mmi.forceMove(T) if(mmi.brainmob) @@ -182,6 +182,10 @@ connected_ai.connected_robots -= src if(shell) GLOB.available_ai_shells -= src + else + if(T && istype(radio) && istype(radio.keyslot)) + radio.keyslot.forceMove(T) + radio.keyslot = null qdel(wires) qdel(module) qdel(eye_lights)