Runtime fixes:

- Robots being deleted passed the mmi object to the mob list instead of the mmi's brainmob

- DNA injectors were checking for a user, but not for a mob.

- DNA computers would try to modify the dna of a mob that no longer existed.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4239 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-07-31 01:19:22 +00:00
parent 4dc76c7c51
commit 6a9b24a178
3 changed files with 8 additions and 3 deletions
+2
View File
@@ -938,6 +938,8 @@
return
if(!istype(usr.loc, /turf))
return
if(!src || !src.connected || !src.connected.occupant || !src.connected.occupant.dna)
return
if ((usr.contents.Find(src) || in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["locked"])
@@ -124,8 +124,11 @@
I don't have the time to figure out how this code works so this will do for now.
I did rearrange things a bit.
*/
if(!isnull(user))//If the user still exists. Their mob may not.
user.show_message(text("\red You inject [M.name]"))
if(user)//If the user still exists. Their mob may not.
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
user.show_message(text("\red You inject [M.name]"))
else
user.show_message(text("\red You finish the injection."))
return
@@ -65,7 +65,7 @@
//Improved /N
/mob/living/silicon/robot/Del()
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
add_to_mob_list(mmi)
add_to_mob_list(mmi.brainmob)
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T)
mmi.loc = T