From 70efa8270e2a58a241cd573642d288b60f9261c4 Mon Sep 17 00:00:00 2001 From: nikothedude <59709059+nikothedude@users.noreply.github.com> Date: Sun, 16 Jul 2023 15:44:03 -0400 Subject: [PATCH] Fixes AIs being able to untilt vendors remotely (#76819) ## About The Pull Request Title. Also prevents AIs from making shocked vendors repeatedly do sparks as failed shock() procs happen on each click. ## Why It's Good For The Game Bugs... bad? ## Changelog :cl: fix: The AI can no longer untip vendors remotely/spam sparks from shocked vendors /:cl: --- code/modules/vending/_vending.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index fe3b9a7e280..0bcbec41a5e 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -860,15 +860,16 @@ return TRUE /obj/machinery/vending/interact(mob/user) - if(seconds_electrified && !(machine_stat & NOPOWER)) - if(shock(user, 100)) - return + if (!isAI(user)) + if(seconds_electrified && !(machine_stat & NOPOWER)) + if(shock(user, 100)) + return - if(tilted && !user.buckled && !isAdminGhostAI(user)) - to_chat(user, span_notice("You begin righting [src].")) - if(do_after(user, 50, target=src)) - untilt(user) - return + if(tilted && !user.buckled && !isAdminGhostAI(user)) + to_chat(user, span_notice("You begin righting [src].")) + if(do_after(user, 50, target=src)) + untilt(user) + return return ..()