diff --git a/code/game/dna.dm b/code/game/dna.dm index a671248db25..9d7141ad3fb 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -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"]) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 679be5375eb..92f91a680a8 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -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 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a3b9b68abec..6357b569684 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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