From 3d2d22c6f4889880e719aa70de1fae02ca2cc175 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sun, 5 Jan 2020 21:03:31 +0200 Subject: [PATCH] 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. --- code/game/verbs/ooc.dm | 13 +++++++++++-- html/changelogs/geeves - loocforai.yml | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/geeves - loocforai.yml diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 0023983feb5..9f61accb1b9 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -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 diff --git a/html/changelogs/geeves - loocforai.yml b/html/changelogs/geeves - loocforai.yml new file mode 100644 index 00000000000..07a352558f7 --- /dev/null +++ b/html/changelogs/geeves - loocforai.yml @@ -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."