Give AI LOOC powers (#7886)

The AI can now hear and speak LOOC via its Eye as well as via its Core.

Tested and it works.
This commit is contained in:
Geeves
2020-01-05 21:03:31 +02:00
committed by Erki
parent 6d0e1a7f1b
commit 3d2d22c6f4
2 changed files with 17 additions and 2 deletions
+11 -2
View File
@@ -108,12 +108,21 @@
var/list/messageturfs = list()//List of turfs we broadcast to.
var/list/messagemobs = list()//List of living mobs nearby who can hear it
for (var/turf in range(world.view, get_turf(source)))
for(var/turf in range(world.view, get_turf(source)))
messageturfs += turf
if(isAI(source))
var/mob/living/silicon/ai/AI = source
for(var/turf in range(world.view, get_turf(AI.eyeobj)))
messageturfs += turf
for(var/mob/M in player_list)
if (!M.client || istype(M, /mob/abstract/new_player))
if(!M.client || istype(M, /mob/abstract/new_player))
continue
if(isAI(M))
var/mob/living/silicon/ai/AI = M
if(get_turf(AI.eyeobj) in messageturfs)
messagemobs += M
continue
if(get_turf(M) in messageturfs)
messagemobs += M
+6
View File
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- rscadd: "The AI can now hear and speak LOOC via its Eye as well as via its Core."