Merge pull request #7230 from Citadel-Station-13/upstream-merge-38617

[MIRROR] Cyborgs now drop radio keys on detonation/destruction
This commit is contained in:
LetterJay
2018-06-24 16:40:44 -05:00
committed by GitHub
@@ -164,8 +164,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)
@@ -184,6 +184,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)