From 8f880a9d828b4abc5bb89b5cf60935cd387e7907 Mon Sep 17 00:00:00 2001 From: Heroman Date: Sat, 24 Aug 2019 05:43:41 +1000 Subject: [PATCH] Fixes secbots ignoring access for pull attacks --- code/modules/mob/living/bot/secbot.dm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index 1d52b591fd1..1210d41e910 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -34,15 +34,20 @@ var/list/threat_found_sounds = list('sound/voice/bcriminal.ogg', 'sound/voice/bjustice.ogg', 'sound/voice/bfreeze.ogg') var/list/preparing_arrest_sounds = list('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/bcreep.ogg') var/list/fighting_sounds = list('sound/voice/biamthelaw.ogg', 'sound/voice/bradio.ogg', 'sound/voice/bjustice.ogg') -//VOREStation Add - They don't like being pulled. This is going to fuck with slimesky, but meh. +//VOREStation Add - They don't like being pulled. This is going to fuck with slimesky, but meh. //Screw you. Just screw you and your 'meh' /mob/living/bot/secbot/Life() ..() if(health > 0 && on && pulledby) if(isliving(pulledby)) - var/mob/living/L = pulledby - UnarmedAttack(L) - say("Do not interfere with active law enforcement routines!") - global_announcer.autosay("[src] was interfered with in [get_area(src)], activating defense routines.", "[src]", "Security") + var/pull_allowed = FALSE + for(var/A in req_one_access) + if(A in pulledby.GetAccess()) + pull_allowed = TRUE + if(!pull_allowed) + var/mob/living/L = pulledby + UnarmedAttack(L) + say("Do not interfere with active law enforcement routines!") + global_announcer.autosay("[src] was interfered with in [get_area(src)], activating defense routines.", "[src]", "Security") //VOREStation Add End /mob/living/bot/secbot/beepsky name = "Officer Beepsky"