-Fixed MMI's being able to eavesdrop on robotic talk, mostly due to an issue with lists and how MMI's handle brains

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4413 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
sieve32@gmail.com
2012-08-15 00:07:19 +00:00
parent e0b538ea77
commit 7d0d8fc4c5
3 changed files with 9 additions and 12 deletions
@@ -34,6 +34,8 @@
brainmob.loc = src
brainmob.container = src
brainmob.stat = 0
dead_mob_list -= brainmob//Update dem lists
living_mob_list += brainmob
user.drop_item()
del(O)
@@ -69,6 +71,7 @@
var/obj/item/brain/brain = new(user.loc)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
brain.brainmob = brainmob//Set the brain to use the brainmob
brainmob = null//Set mmi brainmob var to null
+5 -11
View File
@@ -19,12 +19,9 @@
ghostize() //Ghostize checks for key so nothing else is necessary.
..()
say_understands(var/other)
if (istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))//Goddamn is this hackish, but this say code is so odd
return 0
else
return 1
say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
if (istype(other, /mob/living/silicon/ai))//No eavesdropping on the AI
return 0
if (istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
@@ -35,11 +32,8 @@
return 0
else
return 1
if (istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/robot))//Or borgs
return 0
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/metroid))
+1 -1
View File
@@ -125,5 +125,5 @@
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/M in dead_mob_list)
if(!istype(M,/mob/new_player))
if(!istype(M,/mob/new_player) && !(istype(M,/mob/living/carbon/brain)))//No meta-evesdropping
M.show_message(rendered, 2)