mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds Destroys.
This commit is contained in:
@@ -228,11 +228,18 @@
|
||||
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
|
||||
//Improved /N
|
||||
/mob/living/silicon/robot/Destroy()
|
||||
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
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.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
if(mmi.brainmob)
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
else
|
||||
src << "<span class='danger'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>"
|
||||
ghostize()
|
||||
//ERROR("A borg has been destroyed, but its MMI lacked a brainmob, so the mind could not be transferred. Player: [ckey].")
|
||||
mmi = null
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
@@ -662,7 +669,7 @@
|
||||
C.r_arm = new/obj/item/robot_parts/r_arm(C)
|
||||
C.updateicon()
|
||||
new/obj/item/robot_parts/chest(loc)
|
||||
src.Del()
|
||||
qdel(src)
|
||||
else
|
||||
// Okay we're not removing the cell or an MMI, but maybe something else?
|
||||
var/list/removable_components = list()
|
||||
|
||||
Reference in New Issue
Block a user